/* ═══════════════════════════════════════════════════════════════
   SHIVANGI SCIENCE CLASSES — Core Design System
   style.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── GOOGLE FONTS ALREADY LOADED IN HTML ─────────────────────── */

/* ─── CSS CUSTOM PROPERTIES (Design Tokens) ────────────────────── */
:root {
  /* Brand Palette */
  --primary:       #1D4ED8;
  --primary-light: #1E40AF;
  --primary-dark:  #0F172A;
  --grad-primary:  linear-gradient(135deg, #1D4ED8 0%, #0F766E 100%);

  /* Subject Colors (light-theme safe) */
  --science-a:  #0F766E; --science-b:  #166534;
  --english-a:  #1D4ED8; --english-b:  #1E3A8A;
  --hindi-a:    #B45309; --hindi-b:    #92400E;
  --sst-a:      #9D174D; --sst-b:      #831843;
  --math-a:     #7C3AED; --math-b:     #5B21B6;

  /* Light Theme */
  --bg-root:    #F7F8FA;
  --bg-card:    #FFFFFF;
  --bg-card2:   #F1F5F9;
  --bg-surface: #F1F5F9;
  --border:     #E2E5EA;
  --border-glow:#BFDBFE;

  /* Text */
  --text-primary:   #1F2933;
  --text-secondary: #5B6673;
  --text-muted:     #5B6673;
  --text-white:     #FFFFFF;

  /* Accent / UI */
  --accent:         #1D4ED8;
  --accent-hover:   #1E40AF;
  --accent-light:   #EFF6FF;
  --success:        #16A34A;
  --success-bg:     #DCFCE7;
  --success-text:   #166534;
  --danger:         #DC2626;
  --danger-bg:      #FEE2E2;
  --danger-text:    #991B1B;
  --warning:        #D97706;
  --highlight-bg:   #FEF3C7;
  --highlight-text: #78350F;
  --code-bg:        #EEF2FF;
  --code-text:      #3730A3;
  --color-danger:   #DC2626;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl:3rem;
  --space-3xl:4rem;

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  30px;
  --radius-full:9999px;

  /* Typography */
  --font-body: 'Poppins', 'Hind Siliguri', sans-serif;
  --font-hindi:'Hind Siliguri', 'Poppins', sans-serif;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow:0 0 20px rgba(29,78,216,0.12);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: 0.15s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --container-max: 1280px;
  --header-height: 68px;
}

/* ─── RESET & BASE ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover { color: var(--accent-hover); }
a:visited { color: #1E3A8A; }
a:visited:hover { color: var(--accent-hover); }

mark, .highlight {
  background: var(--highlight-bg);
  color: var(--highlight-text);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-weight: 600;
}

ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ─── SCROLLBAR ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-root); }
::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ─── SELECTION ─────────────────────────────────────────────────── */
::selection {
  background: rgba(29,78,216,0.15);
  color: var(--text-primary);
}

/* ─── LAYOUT ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ─── ANNOUNCEMENT BAR ──────────────────────────────────────────── */
#announcement-bar {
  background: linear-gradient(90deg, #1D4ED8, #0F766E, #1D4ED8);
  background-size: 300% 100%;
  animation: gradientShift 6s ease infinite;
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  z-index: 1001;
  overflow: hidden;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.45rem var(--space-xl);
  max-width: var(--container-max);
  margin: 0 auto;
}

.announcement-icon { font-size: 0.9rem; flex-shrink: 0; }
.announcement-text { text-align: center; }

.announcement-close {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  padding: 2px 6px;
  transition: color var(--transition-fast);
}
.announcement-close:hover { color: white; }

#announcement-bar.hidden { display: none; }

/* ─── HEADER / NAVBAR ───────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  background: rgba(255, 255, 255, 0.98);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-lg);
  overflow: hidden;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition);
}
.logo-icon.small { width: 32px; height: 32px; font-size: 0.9rem; }
.nav-logo:hover .logo-icon { transform: rotate(8deg) scale(1.05); }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-primary {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.logo-secondary {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.45rem var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.nav-chevron {
  font-size: 0.65rem;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

/* Dropdowns */
.nav-dropdown { position: relative; }

.nav-dropdown:hover .nav-chevron { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  min-width: 220px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 200;
  overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.6rem var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.dropdown-item i { width: 16px; text-align: center; }

.dropdown-item.subject-science:hover { background: #F0FDF4; color: #0F766E; }
.dropdown-item.subject-physics:hover { background: #F0F9FF; color: #1E3A8A; }
.dropdown-item.subject-chemistry:hover { background: #FFF7ED; color: #9A3412; }
.dropdown-item.subject-biology:hover { background: #F0FDF4; color: #166534; }
.dropdown-item.subject-english:hover { background: #EFF6FF; color: #1D4ED8; }
.dropdown-item.subject-hindi:hover   { background: #FFFBEB; color: #92400E; }
.dropdown-item.subject-sst:hover     { background: #FDF2F8; color: #9D174D; }
.dropdown-item.subject-math:hover    { background: #F5F3FF; color: #5B21B6; }

/* Nav Actions */
.nav-actions { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; min-width: 0; }

.search-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-card2);
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border: 1px solid var(--border);
}
.search-btn:hover { color: var(--accent); background: var(--accent-light); border-color: var(--border-glow); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}
.hamburger:hover { background: var(--bg-card2); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── SEARCH OVERLAY ────────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  z-index: 2000;
  padding: var(--space-xl);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  max-height: 80vh;
  overflow-y: auto;
  border-bottom: 1px solid var(--border);
}
.search-overlay.open { transform: translateY(0); }

.search-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  border-bottom: 2px solid var(--accent);
  padding-bottom: var(--space-sm);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--text-primary);
  padding: var(--space-sm) 0;
}
.search-input::placeholder { color: var(--text-muted); }

.search-close {
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}
.search-close:hover { color: var(--accent); }

.search-results { max-width: 700px; margin: 0 auto; }

/* ─── MOBILE MENU ───────────────────────────────────────────────── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding-bottom: var(--space-3xl);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: #0F172A;
  background: var(--bg-card);
}
.mobile-menu-header span { flex: 1; }

.mobile-close {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: var(--space-xs);
}

.mobile-nav { padding: var(--space-md); }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  transition: background var(--transition-fast);
}
.mobile-nav-link:hover { background: var(--bg-card2); text-decoration: none; }

.mobile-nav-section {
  margin: var(--space-md) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mobile-nav-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem var(--space-md);
  background: var(--bg-card2);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-nav-sub {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.6rem var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: background var(--transition-fast);
  border-top: 1px solid var(--border);
}
.mobile-nav-sub:hover { background: var(--bg-card2); text-decoration: none; }

/* ─── PAGE LOADER ───────────────────────────────────────────────── */
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.mobile-close {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: var(--space-xs);
}

/* ─── HERO SECTION ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, #EFF6FF 0%, #F7F8FA 100%);
}

/* ─── HERO GRID (Image + Content side-by-side) ──────────────── */
.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-3xl);
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl);
  }
}

/* Left: Image Column */
.hero-image-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero-image-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-card2);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
}

.hero-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.hero-image-box:hover .hero-main-img {
  transform: scale(1.04);
}

.hero-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(transparent, rgba(15,23,42,0.85));
}

.hero-image-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.hero-teacher-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.hero-teacher-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}

.hero-teacher-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-teacher-name-row {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-teacher-role-row {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* Right: Content Column */
.hero-content-col {
  text-align: left;
}

@media (max-width: 900px) {
  .hero-content-col {
    text-align: center;
  }
  .hero-content-col .hero-trust {
    justify-content: center;
  }
  .hero-content-col .hero-actions {
    justify-content: center;
  }
  .hero-teacher-row {
    justify-content: center;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 20% 50%, rgba(29,78,216,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(15,118,110,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(29,78,216,0.04) 0%, transparent 50%);
  z-index: 0;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Left-align hero text inside grid */
.hero-grid .hero-title,
.hero-grid .hero-subtitle {
  text-align: left;
}
.hero-grid .hero-actions {
  justify-content: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(29,78,216,0.08);
  border: 1px solid rgba(29,78,216,0.2);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  animation: fadeInDown 0.6s ease both;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-title .grad-text {
  color: var(--primary-dark);
  -webkit-text-fill-color: var(--primary-dark);
}

.hero-title .hindi-text {
  font-family: var(--font-hindi);
  font-size: 0.85em;
  display: block;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: var(--space-xs);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 var(--space-xl);
  animation: fadeInUp 0.7s ease 0.2s both;
}
.hero-grid .hero-subtitle {
  margin: 0 0 var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  animation: fadeInUp 0.7s ease 0.4s both;
}

.stat-card {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover {
  background: var(--bg-card);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}
.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: var(--space-xs);
}

/* ─── HERO TEACHER FLOAT ──────────────────────────────────────── */
.hero-teacher-float {
  position: absolute;
  top: 50%;
  right: 6%;
  transform: translateY(-50%);
  z-index: 2;
  text-align: center;
  animation: fadeInUp 0.8s ease 0.4s both;
}
.hero-teacher-float .hero-teacher-photo-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-sm);
}
.hero-teacher-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow:
    0 4px 24px rgba(29,78,216,0.2),
    0 0 0 2px rgba(29,78,216,0.1);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}
.hero-teacher-float:hover .hero-teacher-photo {
  transform: scale(1.08);
}
.hero-teacher-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--accent), #14B8A6, var(--accent)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-spin 3s linear infinite;
}
.hero-teacher-float .hero-teacher-info {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(29,78,216,0.1);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  box-shadow: 0 4px 16px rgba(29,78,216,0.08);
}
.hero-teacher-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0;
  line-height: 1.2;
}
.hero-teacher-role {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary,
.btn-primary:visited {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(29,78,216,0.3);
  border: none;
}
.btn-primary:hover,
.btn-primary:visited:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29,78,216,0.35);
  text-decoration: none;
}

.btn-outline,
.btn-outline:visited {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover,
.btn-outline:visited:hover {
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
}

/* ─── SECTION COMMON ─────────────────────────────────────────────── */
.section { padding: var(--space-3xl) 0; }
.section-header { text-align: center; margin-bottom: var(--space-2xl); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.section-label::before,
.section-label::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #0F172A;
  margin-bottom: var(--space-sm);
}

.section-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ─── CLASS SELECTOR (Homepage) ──────────────────────────────────── */
.class-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 700px;
  margin: 0 auto;
}

.class-card {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  display: block;
}

.class-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  background: #F8FAFF;
}

.class-card-num {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.class-card-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: var(--space-xs);
  display: block;
}
.class-card-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
  margin-top: var(--space-md);
}
.class-card-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ─── SUBJECT CARDS GRID ─────────────────────────────────────────── */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.subject-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.subject-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
}

.subject-card.subject-science::after { background: linear-gradient(90deg, var(--science-a), var(--science-b)); }
.subject-card.subject-english::after { background: linear-gradient(90deg, var(--english-a), var(--english-b)); }
.subject-card.subject-hindi::after   { background: linear-gradient(90deg, var(--hindi-a), var(--hindi-b)); }
.subject-card.subject-sst::after     { background: linear-gradient(90deg, var(--sst-a), var(--sst-b)); }
.subject-card.subject-math::after    { background: linear-gradient(90deg, var(--math-a), var(--math-b)); }

.subject-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glow);
}

.subject-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-md);
}

.subject-science .subject-card-icon { background: linear-gradient(135deg, var(--science-a), var(--science-b)); color: white; }
.subject-english .subject-card-icon { background: linear-gradient(135deg, var(--english-a), var(--english-b)); color: white; }
.subject-hindi   .subject-card-icon { background: linear-gradient(135deg, var(--hindi-a), var(--hindi-b));   color: white; }
.subject-sst     .subject-card-icon { background: linear-gradient(135deg, var(--sst-a), var(--sst-b));     color: white; }
.subject-math    .subject-card-icon { background: linear-gradient(135deg, var(--math-a), var(--math-b));    color: white; }
.subject-physics   .subject-card-icon { background: linear-gradient(135deg, #0f2027, #2c5364); color: white; }
.subject-chemistry .subject-card-icon { background: linear-gradient(135deg, #e44d26, #f16529); color: white; }
.subject-biology   .subject-card-icon { background: linear-gradient(135deg, #134e5e, #71b280); color: white; }

.subject-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}
.subject-card-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-hindi);
  margin-bottom: var(--space-md);
}
.subject-card-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: auto;
}
.subject-card-arrow {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}
.subject-card:hover .subject-card-arrow { transform: translateX(4px); }

/* ─── BREADCRUMB ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.5; font-size: 0.7rem; }

/* ─── CHAPTER LIST ───────────────────────────────────────────────── */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.chapter-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.chapter-item:hover { border-color: var(--border-glow); }

.chapter-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
  user-select: none;
}
.chapter-header:hover { background: var(--bg-card2); }

.chapter-num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.chapter-info { flex: 1; }
.chapter-title-en {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0F172A;
}
.chapter-title-hi {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-hindi);
  margin-top: 1px;
}

.chapter-tags {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}
.chapter-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid;
  font-weight: 500;
}
.tag-qa  { color: var(--english-b); border-color: var(--english-b); }
.tag-mcq { color: var(--science-b); border-color: var(--science-b); }

.chapter-toggle {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
  margin-left: var(--space-sm);
}
.chapter-item.open .chapter-toggle { transform: rotate(180deg); }

/* ─── PAGE HERO STRIP ────────────────────────────────────────────── */
.page-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(29,78,216,0.06), transparent 70%);
  pointer-events: none;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.page-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: var(--space-xs);
  line-height: 1.2;
  color: #0F172A;
}

.page-hero-subtitle {
  font-family: var(--font-hindi);
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.page-hero-meta span { display: flex; align-items: center; gap: var(--space-xs); }

/* ─── SIDEBAR ────────────────────────────────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-xl);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.sidebar-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.sidebar-chapters a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  margin-bottom: 2px;
}
.sidebar-chapters a:hover { background: var(--bg-card2); color: var(--text-primary); text-decoration: none; }
.sidebar-chapters a.current { color: var(--accent); background: var(--accent-light); font-weight: 500; text-decoration: none; }
.sidebar-ch-num {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 22px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
  background: #0F172A;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-3xl);
  margin-top: var(--space-3xl);
  color: #CBD5E1;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}
.footer-name {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}
.footer-tagline {
  font-size: 0.78rem;
  color: #94A3B8;
}

.footer-links {
  display: flex;
  gap: var(--space-2xl);
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94A3B8;
  margin-bottom: var(--space-md);
}
.footer-col a {
  display: block;
  color: #CBD5E1;
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: #60A5FA; text-decoration: underline; }

.footer-bottom {
  padding: var(--space-lg) 0;
  text-align: center;
  color: #94A3B8;
  font-size: 0.78rem;
}

/* ─── SCROLL TO TOP ──────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition);
}
.scroll-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-teacher-float { position: relative; top: auto; right: auto; transform: none; margin-top: var(--space-xl); }
  .hero-teacher-float .hero-teacher-photo-wrap { width: 80px; height: 80px; }
  .hero-stats { grid-template-columns: repeat(3,1fr); gap: var(--space-sm); }
  .class-selector { grid-template-columns: 1fr; max-width: 360px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: var(--space-lg); }
}

@media (max-width: 1100px) {
  .nav-link { padding: 0.45rem 0.6rem; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  :root { --space-lg: 1rem; }
  .hero-stats { grid-template-columns: repeat(3,1fr); }
  .stat-number { font-size: 1.3rem; }
  .subjects-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Google Translate Widget ─────────────────────────────────── */

/* Make the Google translate widget small but VISIBLE (needed for init) */

/* ─── NAV LINK FIXES (light header) ───────────────────────────── */
.nav-logo:hover { text-decoration: none; }
.nav-logo:hover .logo-icon { transform: rotate(8deg) scale(1.05); }
.nav-link i { text-decoration: none; }
.btn, .btn-primary, .btn-outline { text-decoration: none; }
.btn:hover, .btn-primary:hover, .btn-outline:hover { text-decoration: none; }
