/* St Basilios Theological College Custom Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Noto+Serif+Ethiopic:wght@300;400;600;700&display=swap');
/* Tailwind CSS is loaded via CDN script tag in header.ejs */

:root {
  /* Light Mode Variables */
  --primary-rgb: 26, 37, 68;
  /* Deep Liturgical Navy */
  --accent-rgb: 197, 160, 89;
  /* Burnished Gold */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;

  --font-serif: 'Playfair Display', 'Noto Serif Ethiopic', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(226, 232, 240, 0.8);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
  /* Dark Mode Variables */
  --bg-primary: #0b0f19;
  --bg-secondary: #131926;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #1e293b;
  --glass-bg: rgba(19, 25, 38, 0.7);
  --glass-border: rgba(30, 41, 59, 0.8);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

/* Global resets & styling overrides */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif {
  font-family: var(--font-serif);
}

/* Localized Amharic Font adjustments */
body[lang="am"] {
  font-family: 'Noto Serif Ethiopic', var(--font-sans);
}

/* Premium Navigation Glassmorphism */
.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

/* Color theme utilities */
.color-primary-bg {
  background-color: rgb(var(--primary-rgb));
}

.color-primary-text {
  color: rgb(var(--primary-rgb));
}

.color-accent-bg {
  background-color: rgb(var(--accent-rgb));
}

.color-accent-text {
  color: rgb(var(--accent-rgb));
}

.color-accent-border {
  border-color: rgb(var(--accent-rgb));
}

.btn-gold {
  background-color: rgb(var(--accent-rgb));
  color: #1a2544;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-gold:hover {
  background-color: #dcb360;
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.5);
  transform: translateY(-1px);
}

/* Hero Slider Settings */
.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background-color: #0f172a;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.85) 100%);
}

/* Card components with Glassmorphism */
.premium-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgb(var(--accent-rgb));
}

/* Lightbox styles */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px;
}

.lightbox-img,
.lightbox-video {
  max-width: 90%;
  max-height: 80%;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 2px solid rgb(var(--accent-rgb));
}

/* AI Chatbot Widget Styling */
#chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.chatbot-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgb(var(--primary-rgb));
  border: 2px solid rgb(var(--accent-rgb));
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.6);
}

.chatbot-window {
  display: none;
  width: 380px;
  height: 500px;
  background-color: var(--bg-secondary);
  border: 1px solid rgb(var(--accent-rgb));
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: absolute;
  bottom: 80px;
  right: 0;
  flex-direction: column;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background-color: rgb(var(--primary-rgb));
  color: white;
  padding: 16px;
  border-bottom: 2px solid rgb(var(--accent-rgb));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-primary);
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-msg.bot {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  color: var(--text-primary);
}

.chat-msg.user {
  background-color: rgb(var(--primary-rgb));
  color: white;
  align-self: flex-end;
}

.chatbot-footer {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
}

.chatbot-input:focus {
  outline: none;
  border-color: rgb(var(--accent-rgb));
}

.chatbot-send {
  padding: 8px 16px;
  background-color: rgb(var(--primary-rgb));
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.chatbot-send:hover {
  background-color: #273766;
}

/* Accessibility and screen reader support */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 3px solid rgb(var(--accent-rgb));
  outline-offset: 2px;
}

/* Responsive configurations */
@media (max-width: 640px) {
  .hero-slider {
    height: 450px;
  }

  .chatbot-window {
    width: calc(100vw - 32px);
    right: -8px;
  }
}