/* ========================================
   BRIGHTPATH ACADEMY — style.css
   Author: BrightPath Dev Team
   ======================================== */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #1a56db;
  --primary-dark: #1040b0;
  --primary-light: #e8f0fe;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --bg: #f8faff;
  --surface: #ffffff;
  --surface2: #f1f5fd;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 20px rgba(26,86,219,.08);
  --shadow-lg: 0 8px 40px rgba(26,86,219,.14);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 72px;
  --transition: .25s ease;

  /* Subject colors */
  --physics: #6366f1;
  --chemistry: #10b981;
  --math: #f59e0b;
  --biology: #ef4444;
  --english: #8b5cf6;
  --social: #0ea5e9;
}

[data-theme="dark"] {
  --primary: #4f84f7;
  --primary-dark: #3a6fd8;
  --primary-light: #1e2e50;
  --accent: #fbbf24;
  --accent-light: #3d2e00;
  --bg: #0d1117;
  --surface: #161b27;
  --surface2: #1c2333;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --shadow: 0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER / NAVBAR ===== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  box-shadow: var(--shadow);
  transition: background var(--transition);
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  font-size: 1.8rem;
  color: var(--primary);
  /* animation: spin-slow 8s linear infinite; */
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
  line-height: 1.1;
}
.logo-sub {
  font-size: .80rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
}

/* Nav */
.navbar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  padding: 8px 12px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}
.arrow { font-size: .65rem; transition: transform var(--transition); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all .2s;
  z-index: 200;
  overflow: hidden;
}
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.dropdown:hover .arrow,
.dropdown.open .arrow { transform: rotate(180deg); }
.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--text-muted);
  transition: all .15s;
}
.dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
  padding-left: 22px;
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.theme-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.theme-toggle:hover { transform: rotate(20deg); }
.btn-admin {
  background: var(--primary);
  color: #fff;
  padding: 0px 12px;
  border-radius: var(--radius-sm);
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-admin:hover { background: var(--primary-dark); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
  display: block;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: none;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(26,86,219,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,86,219,.4);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid var(--primary);
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: calc(100vh - var(--header-h));
  background: var(--surface);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 70px 40px;
  gap: 40px;
  max-width: 1300px;
  margin: 0 auto;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: .4;
  pointer-events: none;
}
.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: #92400e;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid var(--accent);
  animation: fadeInDown .6s ease both;
}
[data-theme="dark"] .hero-badge { color: var(--accent); }
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
  animation: fadeInDown .7s ease .1s both;
}
.typed-wrapper { display: block; min-height: 1.3em; }
.typed-highlight {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cursor {
  color: var(--primary);
  animation: blink 1s step-end infinite;
  -webkit-text-fill-color: var(--primary);
}
@keyframes blink { 50% { opacity: 0; } }
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 32px;
  animation: fadeInDown .7s ease .2s both;
}
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeInDown .7s ease .3s both;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  animation: fadeInDown .7s ease .4s both;
}
.stat { display: flex; flex-direction: column; padding: 0 24px; }
.stat:first-child { padding-left: 0; }
.stat-num {
  font-family: 'Space Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}
.stat span:last-child { font-size: .8rem; color: var(--text-muted); }
.stat-sep { width: 1px; height: 40px; background: var(--border); }

/* Hero visual — orbit */
.hero-visual {
  flex: 0 0 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.subject-orbit {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--border);
  border-radius: 50%;
  animation: orbit-spin 18s linear infinite;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  box-shadow: var(--shadow);
  /* Position at 4 cardinal points */
}
.orbit-item:nth-child(1) { transform: translate(-50%, calc(-190px - 50%)); }
.orbit-item:nth-child(2) { transform: translate(calc(190px - 50%), -50%) rotate(0deg); }
.orbit-item:nth-child(3) { transform: translate(-50%, calc(190px - 50%)); }
.orbit-item:nth-child(4) { transform: translate(calc(-190px - 50% + -90px), -50%); }
/* Counter-rotate text so it stays upright */
.orbit-ring { animation: orbit-spin 18s linear infinite; }
.orbit-item { counter-increment: none; }
/* Simpler: just use absolute positioning without rotation inheritance */
.ring1 { animation: orbit-spin 18s linear infinite; }
/* Prevent label from rotating with ring */
.orbit-center {
  font-size: 3rem;
  color: var(--primary);
  animation: pulse-glow 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 20px rgba(26,86,219,.5));
}
@keyframes pulse-glow {
  from { transform: scale(1); filter: drop-shadow(0 0 10px rgba(26,86,219,.3)); }
  to { transform: scale(1.1); filter: drop-shadow(0 0 30px rgba(26,86,219,.6)); }
}

/* ===== SECTIONS COMMON ===== */
.section {
  padding: 80px 0;
}
.section:nth-child(even) { background: var(--surface2); }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}
.about-img-block { position: relative; }
.about-img-placeholder {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-light) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 5rem;
}
.about-img-placeholder p {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
}
.about-badge-float {
  position: absolute;
  bottom: -16px;
  right: -20px;
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}
.about-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: .95rem;
}
.about-features {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-features li {
  font-size: .9rem;
  color: var(--text);
  font-weight: 500;
}

/* ===== FILTER BUTTONS ===== */
.course-filter-bar, .video-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== COURSES GRID ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-color, var(--primary));
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.course-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.course-class {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--card-color, var(--primary));
  margin-bottom: 6px;
}
.course-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 8px;
}
.course-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.course-meta {
  display: flex;
  gap: 12px;
  font-size: .78rem;
  color: var(--text-muted);
}
.course-meta span { display: flex; align-items: center; gap: 4px; }
.course-enroll {
  margin-top: 16px;
  display: block;
  background: var(--primary-light);
  color: var(--primary);
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .85rem;
  transition: all var(--transition);
}
.course-enroll:hover { background: var(--primary); color: #fff; }

/* ===== NOTES SECTION ===== */
.notes-toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--primary); }
.search-icon { font-size: 1rem; }
.search-box input {
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }
.notes-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-select {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: .85rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--primary); }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.note-header { display: flex; align-items: flex-start; gap: 12px; }
.note-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.note-title { font-weight: 600; font-size: .95rem; color: var(--text); }
.note-meta { font-size: .78rem; color: var(--text-muted); }
.note-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: var(--surface2);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
  border: 1px solid var(--border);
}
.tag.subject-tag { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--transition);
  margin-top: 4px;
}
.btn-download:hover { background: var(--primary-dark); transform: translateY(-1px); }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.empty-state .e-icon { font-size: 3rem; margin-bottom: 12px; }

/* ===== VIDEOS SECTION ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.video-thumb {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
}
.video-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-thumb-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,.6);
  cursor: pointer;
}
.video-thumb-placeholder .play-btn {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all .2s;
  border: 2px solid rgba(255,255,255,.3);
}
.video-thumb-placeholder:hover .play-btn { background: var(--primary); transform: scale(1.1); }
.video-thumb-placeholder p { font-size: .85rem; }
.video-info { padding: 16px; }
.video-title { font-weight: 600; font-size: .95rem; color: var(--text); margin-bottom: 6px; }
.video-meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.video-meta span { display: flex; align-items: center; gap: 4px; }

/* ===== TEST PAPERS ===== */
.test-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}
.tab-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.test-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
}
.test-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.test-card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.test-info { flex: 1; }
.test-title { font-weight: 600; font-size: .92rem; color: var(--text); margin-bottom: 4px; }
.test-meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 12px; }
.test-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  transition: all var(--transition);
}
.test-download:hover { background: var(--primary); color: #fff; }

/* ===== TOPPERS SECTION ===== */
.toppers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}
.topper-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.topper-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.topper-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.topper-rank {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
}
.topper-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
  border: 3px solid var(--primary);
}
.topper-photo img { width: 100%; height: 100%; object-fit: cover; }
.topper-name { font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: 4px; }
.topper-score {
  font-family: 'Space Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.topper-class { font-size: .78rem; color: var(--text-muted); }

/* ===== TEACHERS SECTION ===== */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.teacher-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}
.teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.teacher-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
}
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-name { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 4px; }
.teacher-subject {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.teacher-qual { font-size: .8rem; color: var(--text-muted); }
.teacher-exp { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* ===== CONTACT SECTION ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: all var(--transition);
}
.contact-card:hover { border-color: var(--primary); transform: translateX(4px); }
.c-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-card strong { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.contact-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }
.social-bar {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--transition);
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover { transform: translateY(-3px) scale(1.05); }
.social-btn.fb { background: #1877f2; }
.social-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.yt { background: #ff0000; }
.social-btn.wa { background: #25d366; }

/* Contact Form */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-form h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--text);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
  display: block;
  margin-bottom: 14px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row input { margin-bottom: 0; }
.contact-form .btn-primary { width: 100%; justify-content: center; margin-top: 4px; }

/* ===== FOOTER ===== */
.footer {
  background: #111827;
  color: rgba(255,255,255,.7);
  padding: 60px 0 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo .logo-name { color: #fff; }
.footer-logo .logo-icon { color: var(--accent); }
.footer-desc { font-size: .85rem; margin-top: 12px; line-height: 1.7; }
.footer-col h4 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: .95rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  transition: color .2s;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-col p { font-size: .85rem; margin-bottom: 8px; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 24px;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 500;
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 88px;
  right: 28px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .88rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
  z-index: 9999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .hero { justify-content: center; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img-block { max-width: 400px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .nav-list {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    align-items: stretch;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-list.open { display: flex; }
  .nav-link { padding: 12px 16px; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding-left: 20px;
    background: var(--surface2);
    display: none;
  }
  .dropdown.open .dropdown-menu { display: block; }
  .hamburger { display: flex; }
  .section { padding: 60px 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .stat-sep { display: none; }
  .stat { padding: 0; }
}

@media (max-width: 480px) {
  .courses-grid, .notes-grid, .videos-grid, .test-grid, .toppers-grid, .teachers-grid {
    grid-template-columns: 1fr;
  }
  .btn-primary, .btn-secondary { padding: 12px 20px; font-size: .9rem; }
}

/* ===== ADMIN LOGIN MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.login-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
}
.modal-overlay.open .login-modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-close:hover { background: var(--danger, #ef4444); color: #fff; border-color: transparent; }

.login-header { text-align: center; margin-bottom: 28px; }
.login-icon { font-size: 3rem; margin-bottom: 10px; }
.login-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.login-header p { font-size: .88rem; color: var(--text-muted); }

.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.login-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg);
  transition: border-color .2s;
}
.login-input-wrap:focus-within { border-color: var(--primary); }
.field-icon { font-size: 1rem; flex-shrink: 0; }
.login-input-wrap input {
  border: none; background: none; outline: none;
  font-family: inherit; font-size: .92rem;
  color: var(--text); flex: 1;
}
.login-input-wrap input::placeholder { color: var(--text-muted); }
.toggle-pass {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 0; opacity: .6;
  transition: opacity .2s;
}
.toggle-pass:hover { opacity: 1; }

.login-error {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; padding: 10px 14px;
  font-size: .85rem; color: #dc2626;
  display: none;
  text-align: center;
}
.login-error.show { display: block; }

.btn-login {
  background: var(--primary);
  color: #fff; border: none;
  border-radius: 10px; padding: 14px;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 4px 14px rgba(26,86,219,.3);
  width: 100%;
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.login-hint {
  margin-top: 20px;
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== BOARD PAPERS SECTION ===== */
.board-papers-section { background: var(--surface); }
.section-subtitle {
  font-size: .95rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.bp-toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.board-papers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.board-paper-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.board-paper-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.board-paper-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.bp-card-header { display: flex; align-items: flex-start; gap: 14px; }
.bp-icon {
  width: 48px; height: 48px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.bp-title { font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: 4px; }
.bp-meta { font-size: .78rem; color: var(--text-muted); }
.bp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bp-year-badge {
  background: var(--accent-light);
  color: #92400e;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
}
[data-theme="dark"] .bp-year-badge { color: var(--accent); }
