/* ==========================================================================
   Aksharaa Academy — MASTER THEME STYLESHEET
   Supports 3 Complete Visual Themes:
   1. Heritage Elite (Traditional, Regal Gold & Navy, Serif)
   2. Modern Academic (International, Tech-forward, Royal Blue & Cyan, Sans)
   3. Warm Excellence (Indian Ethos, Maroon & Saffron, Warm Cream)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;600;700&family=Merriweather:wght@400;700&display=swap');

:root {
  /* Default: Heritage Elite */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  
  --color-primary: #0b1a30;
  --color-primary-dark: #060e1b;
  --color-primary-light: #162a4d;
  --color-primary-rgb: 11, 26, 48;
  
  --color-accent: #c59b27;
  --color-accent-hover: #b0871d;
  --color-accent-light: #fef9ed;
  --color-accent-rgb: 197, 155, 39;
  
  --color-surface-bg: #fcfbf8;
  --color-surface-card: #ffffff;
  --color-surface-alt: #f7f4ec;
  
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;
  
  --color-border: #e8e2d4;
  --color-border-accent: rgba(197, 155, 39, 0.4);
  
  --radius-btn: 0.375rem; /* 6px */
  --radius-card: 0.5rem; /* 8px */
  --radius-badge: 0.25rem;
  
  --card-shadow: 0 4px 20px -2px rgba(11, 26, 48, 0.08);
  --card-shadow-hover: 0 16px 32px -4px rgba(11, 26, 48, 0.16);
  --hero-overlay: linear-gradient(135deg, rgba(11, 26, 48, 0.92) 0%, rgba(11, 26, 48, 0.78) 60%, rgba(11, 26, 48, 0.88) 100%);
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #c59b27 50%, #997519 100%);
}

/* ==========================================================================
   THEME 01: HERITAGE ELITE
   Regal Indian Institution | Navy, Antique Gold, Warm Ivory | Editorial Serif
   ========================================================================== */
[data-theme="heritage"],
.theme-heritage {
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  
  --color-primary: #0b1a30;
  --color-primary-dark: #060e1b;
  --color-primary-light: #162a4d;
  --color-primary-rgb: 11, 26, 48;
  
  --color-accent: #c59b27;
  --color-accent-hover: #a88118;
  --color-accent-light: #fef9ed;
  --color-accent-rgb: 197, 155, 39;
  
  --color-surface-bg: #fdfcf9;
  --color-surface-card: #ffffff;
  --color-surface-alt: #f7f3ea;
  
  --color-text-main: #1a2233;
  --color-text-muted: #57657e;
  --color-border: #e6dfcf;
  --color-border-accent: rgba(197, 155, 39, 0.45);
  
  --radius-btn: 0.375rem;
  --radius-card: 0.5rem;
  --radius-badge: 0.25rem;
  
  --card-shadow: 0 4px 18px rgba(11, 26, 48, 0.07);
  --card-shadow-hover: 0 16px 36px rgba(11, 26, 48, 0.14);
  --hero-overlay: linear-gradient(135deg, rgba(11, 26, 48, 0.94) 0%, rgba(22, 42, 77, 0.82) 55%, rgba(11, 26, 48, 0.92) 100%);
  --accent-gradient: linear-gradient(135deg, #e5c058 0%, #c59b27 50%, #997519 100%);
}

/* ==========================================================================
   THEME 02: MODERN ACADEMIC
   Clean International School | Royal Blue, Tech Cyan, Crisp White | Bold Modern Sans
   ========================================================================== */
[data-theme="modern"],
.theme-modern {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  --color-primary: #1a56db;
  --color-primary-dark: #1e40af;
  --color-primary-light: #3b82f6;
  --color-primary-rgb: 26, 86, 219;
  
  --color-accent: #0284c7;
  --color-accent-hover: #0369a1;
  --color-accent-light: #f0f9ff;
  --color-accent-rgb: 2, 132, 199;
  
  --color-surface-bg: #f8fafc;
  --color-surface-card: #ffffff;
  --color-surface-alt: #f1f5f9;
  
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-accent: rgba(2, 132, 199, 0.35);
  
  --radius-btn: 9999px; /* Pill buttons */
  --radius-card: 1.25rem; /* 20px modern rounded cards */
  --radius-badge: 9999px;
  
  --card-shadow: 0 10px 30px -5px rgba(26, 86, 219, 0.07);
  --card-shadow-hover: 0 20px 40px -10px rgba(26, 86, 219, 0.15);
  --hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(26, 86, 219, 0.78) 60%, rgba(2, 132, 199, 0.70) 100%);
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #1a56db 100%);
}

/* ==========================================================================
   THEME 03: WARM EXCELLENCE
   Indian Cultural & Academic Identity | Deep Maroon, Saffron, Rich Cream | Warm Humanist
   ========================================================================== */
[data-theme="warm"],
.theme-warm {
  --font-heading: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  
  --color-primary: #831843; /* Deep Maroon / Burgundy */
  --color-primary-dark: #500724;
  --color-primary-light: #9d174d;
  --color-primary-rgb: 131, 24, 67;
  
  --color-accent: #c2410c; /* Warm Terracotta / Saffron */
  --color-accent-hover: #9a3412;
  --color-accent-light: #fff7ed;
  --color-accent-rgb: 194, 65, 12;
  
  --color-surface-bg: #fffbf5;
  --color-surface-card: #ffffff;
  --color-surface-alt: #fef3c7;
  
  --color-text-main: #292524;
  --color-text-muted: #57534e;
  --color-border: #f2e8dc;
  --color-border-accent: rgba(194, 65, 12, 0.35);
  
  --radius-btn: 0.75rem; /* 12px friendly rounded */
  --radius-card: 1rem; /* 16px */
  --radius-badge: 0.5rem;
  
  --card-shadow: 0 4px 20px rgba(131, 24, 67, 0.06);
  --card-shadow-hover: 0 16px 36px rgba(131, 24, 67, 0.12);
  --hero-overlay: linear-gradient(135deg, rgba(80, 7, 36, 0.94) 0%, rgba(131, 24, 67, 0.85) 60%, rgba(194, 65, 12, 0.78) 100%);
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 50%, #c2410c 100%);
}

/* ==========================================================================
   GLOBAL BASE STYLES
   ========================================================================== */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-surface-bg);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: var(--accent-gradient);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease;
}

/* ==========================================================================
   THEME-DRIVEN COMPONENT UTILITIES
   ========================================================================== */
.theme-btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-btn);
  transition: all 0.25s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.theme-btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(var(--color-primary-rgb), 0.35);
}

.theme-btn-accent {
  background: var(--accent-gradient);
  color: #ffffff;
  border-radius: var(--radius-btn);
  transition: all 0.25s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.theme-btn-accent:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(var(--color-accent-rgb), 0.38);
}

.theme-btn-outline {
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-btn);
  transition: all 0.25s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
}
.theme-btn-outline:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.theme-card {
  background-color: var(--color-surface-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--color-border-accent);
}

.theme-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  border-radius: var(--radius-badge);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid var(--color-border-accent);
}

/* Hero Section Special Elements */
.hero-gradient-overlay {
  background: var(--hero-overlay);
}

/* Heritage specific ornament lines */
[data-theme="heritage"] .gold-divider,
.theme-heritage .gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
[data-theme="heritage"] .gold-divider::before,
[data-theme="heritage"] .gold-divider::after {
  content: "";
  height: 1px;
  width: 40px;
  background-color: var(--color-accent);
}

/* Modern specific glass styling */
[data-theme="modern"] .theme-card,
.theme-modern .theme-card {
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.88);
}

/* Warm specific border styling */
[data-theme="warm"] .theme-card,
.theme-warm .theme-card {
  border-top: 3px solid var(--color-accent);
}

/* ==========================================================================
   NAVIGATION STYLING
   ========================================================================== */
.site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.site-header.scrolled .nav-link {
  color: #1e293b;
}

/* Dropdown Menu */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==========================================================================
   LIGHTBOX COMPONENT
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 27, 0.94);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: #f8fafc;
  margin-top: 1rem;
  text-align: center;
  max-width: 600px;
}
.lightbox-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}
.toast-msg {
  background: #ffffff;
  border-left: 4px solid var(--color-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-btn);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast-msg.closing {
  animation: slideOutToast 0.25s ease forwards;
}
@keyframes slideInToast {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideOutToast {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}

/* ==========================================================================
   FLOATING THEME SWITCHER WIDGET
   ========================================================================== */
.theme-switcher-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.theme-switcher-toggle {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  font-size: 0.825rem;
  font-weight: 600;
}
.theme-switcher-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.theme-switcher-panel {
  display: none;
  margin-bottom: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  border-radius: 1rem;
  padding: 1rem;
  width: 280px;
  animation: fadeIn 0.2s ease forwards;
}
.theme-switcher-panel.active {
  display: block;
}
.theme-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  text-align: left;
  transition: background 0.2s ease;
  cursor: pointer;
  margin-bottom: 0.35rem;
}
.theme-option-btn:hover {
  background-color: var(--color-surface-alt);
}
.theme-option-btn.selected {
  background-color: var(--color-accent-light);
  border: 1px solid var(--color-border-accent);
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 8999;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Aksharaa Academy — restrained, school-focused visual refinement */
:root {
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body: 'Lato', Arial, sans-serif;
  --color-primary: #6d1f2b;
  --color-primary-dark: #50141d;
  --color-primary-light: #873342;
  --color-primary-rgb: 109, 31, 43;
  --color-accent: #bd742b;
  --color-accent-hover: #9d5d20;
  --color-accent-light: #fff5e8;
  --color-accent-rgb: 189, 116, 43;
  --color-surface-bg: #fffdf9;
  --color-surface-card: #ffffff;
  --color-surface-alt: #f8f3ec;
  --color-text-main: #292725;
  --color-text-muted: #625d58;
  --color-border: #e8dfd4;
  --radius-btn: 4px;
  --radius-card: 5px;
  --radius-badge: 3px;
  --card-shadow: 0 2px 10px rgba(45, 30, 20, .06);
  --card-shadow-hover: 0 5px 16px rgba(45, 30, 20, .10);
  --hero-overlay: linear-gradient(90deg, rgba(43, 24, 25, .82), rgba(43, 24, 25, .35));
  --accent-gradient: linear-gradient(135deg, #c88b42, #ad6729);
}
html, body {
  font-family: 'Lato', Arial, sans-serif !important;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0 !important;
}
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Merriweather', Georgia, serif !important;
  letter-spacing: -.025em !important;
  font-weight: 700 !important;
}
h1 { line-height: 1.18 !important; }
h2 { line-height: 1.3 !important; }
p { line-height: 1.75 !important; }
.theme-badge {
  letter-spacing: .04em !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
}
.theme-card {
  border-radius: 5px !important;
  box-shadow: 0 2px 9px rgba(35, 25, 18, .055) !important;
}
.theme-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(35, 25, 18, .09) !important;
}
.theme-btn-primary, .theme-btn-accent, .theme-btn-outline {
  border-radius: 4px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  padding-top: .8rem !important;
  padding-bottom: .8rem !important;
}
.hero-gradient-overlay { background: var(--hero-overlay) !important; }
#site-header-container { font-family: 'Lato', Arial, sans-serif !important; }
@media (max-width: 640px) {
  h1 { font-size: 2.15rem !important; }
  h2 { font-size: 1.75rem !important; }
  h3 { font-size: 1.15rem !important; }
  p { font-size: .95rem !important; }
}


/* Warm Indian-school theme overrides */
[data-theme="warm"] {
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body: 'Lato', Arial, sans-serif;
  --color-primary: #6d1f2b;
  --color-primary-dark: #50141d;
  --color-primary-light: #873342;
  --color-primary-rgb: 109, 31, 43;
  --color-accent: #bd742b;
  --color-accent-hover: #9d5d20;
  --color-accent-light: #fff5e8;
  --color-accent-rgb: 189, 116, 43;
  --color-surface-bg: #fffdf9;
  --color-surface-card: #ffffff;
  --color-surface-alt: #f8f3ec;
  --color-text-main: #292725;
  --color-text-muted: #625d58;
  --color-border: #e8dfd4;
  --radius-btn: 4px;
  --radius-card: 5px;
  --radius-badge: 3px;
  --card-shadow: 0 2px 10px rgba(45, 30, 20, .06);
  --card-shadow-hover: 0 5px 16px rgba(45, 30, 20, .10);
  --hero-overlay: linear-gradient(90deg, rgba(43, 24, 25, .82), rgba(43, 24, 25, .35));
  --accent-gradient: linear-gradient(135deg, #c88b42, #ad6729);
}
