/* ============ Noor Library ============ */
:root {
  /* night-sky indigo palette, matched to the Nawara logo (var names kept from the old teal theme) */
  --teal-950: #12104a;
  --teal-900: #191663;
  --teal-800: #232180;
  --teal-700: #2f2c9e;
  --teal-600: #4a43c0;
  --teal-100: #e3e1f5;
  --teal-50:  #efeef9;
  --purple:   #4b2a72;
  --gold:     #f9b021;
  --gold-soft:#e39b12;
  --cream:    #f8f7f2;
  --paper:    #ffffff;
  --ink:      #1a1831;
  --ink-soft: #545169;
  --line:     #e4e2ee;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(18,16,74,.08), 0 8px 24px rgba(18,16,74,.07);
  --shadow-lg: 0 4px 12px rgba(18,16,74,.12), 0 18px 44px rgba(18,16,74,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.ar { font-family: 'Amiri', serif; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--teal-950), var(--teal-800) 70%, #3a2a6e);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(18,16,74,.35);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: .2px; }
.brand-sub { color: var(--gold); font-weight: 600; margin-left: 4px; }
.brand-logo {
  width: 46px; height: 46px; margin: 0 4px;
  transform: scale(2.1); /* the logo SVG has large transparent padding around the mark */
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.3));
}
.main-nav { display: flex; gap: 4px; margin-left: 10px; flex: 1; }
.main-nav a {
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  color: rgba(255,255,255,.82); transition: .18s;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.main-nav a.active { color: var(--gold); background: rgba(255,255,255,.07); }
.search-form input {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff; border-radius: 999px;
  padding: 9px 16px; width: 200px; font: inherit; font-size: .9rem;
  transition: .2s;
}
.search-form input::placeholder { color: rgba(255,255,255,.55); }
.search-form input:focus { outline: none; background: rgba(255,255,255,.16); border-color: var(--gold); width: 230px; }

/* ---------- Hero ---------- */
.hero {
  margin: 34px 0 44px;
  background:
    radial-gradient(1000px 380px at 85% -60%, rgba(249,176,33,.28), transparent 60%),
    linear-gradient(160deg, var(--teal-950) 0%, var(--teal-800) 55%, var(--purple) 100%);
  color: #fff;
  border-radius: 22px;
  padding: 58px 54px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::after { /* geometric star lattice */
  content: ""; position: absolute; inset: 0; opacity: .1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M42 8l10 24 24 10-24 10-10 24-10-24-24-10 24-10z'/%3E%3Ccircle cx='42' cy='42' r='6'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-basmala { font-family: 'Amiri', serif; color: var(--gold); font-size: 1.5rem; margin: 0 0 14px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 800; margin: 0 0 14px; line-height: 1.2; max-width: 640px; }
.hero p.lead { color: rgba(255,255,255,.85); max-width: 560px; font-size: 1.05rem; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: .97rem;
  border: none; cursor: pointer; transition: .18s; font-family: inherit;
}
.btn-gold { background: var(--gold); color: var(--teal-950); }
.btn-gold:hover { background: #ffc247; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hero-stats { display: flex; gap: 40px; margin-top: 38px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.7rem; color: var(--gold); font-weight: 800; line-height: 1.1; }
.stat span { color: rgba(255,255,255,.75); font-size: .88rem; }

/* ---------- Mission strip ---------- */
.mission-strip {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--teal-50); border: 1px solid var(--teal-100);
  border-radius: var(--radius); padding: 22px 26px; margin: 34px 0;
}
.mission-icon {
  color: var(--gold-soft); font-size: 1.3rem; line-height: 1;
  flex-shrink: 0; margin-top: 2px;
}
.mission-strip p { margin: 0; color: var(--ink-soft); font-size: .96rem; line-height: 1.7; }
.mission-strip p b { color: var(--ink); }

/* ---------- Sections ---------- */
.section { margin: 52px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.section-head h2::after { content: ""; display: block; width: 46px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 8px; }
.section-head .see-all { color: var(--teal-700); font-weight: 700; font-size: .92rem; }
.section-head .see-all:hover { color: var(--teal-600); }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; transition: .2s; position: relative; overflow: hidden;
}
.cat-card::before {
  content: "✦"; position: absolute; right: -8px; top: -14px; font-size: 4.6rem;
  color: var(--teal-50); transition: .25s; line-height: 1;
}
.cat-card:hover { border-color: var(--teal-600); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card:hover::before { color: var(--teal-100); transform: rotate(18deg); }
.cat-card h3 { margin: 0 0 6px; font-size: 1.06rem; font-weight: 800; position: relative; }
.cat-card .cat-meta { color: var(--ink-soft); font-size: .86rem; position: relative; }

/* ---------- Course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 20px; }
.course-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .2s;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--teal-100); }
.course-thumb { position: relative; aspect-ratio: 16/9; background: var(--teal-900); }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb .lesson-count {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(7,46,43,.85); color: #fff; font-size: .76rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.course-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body h3 { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.4; }
.course-chan { color: var(--teal-700); font-size: .84rem; font-weight: 700; }
.course-cat-tag {
  align-self: flex-start; margin-top: auto;
  background: var(--teal-50); color: var(--teal-800);
  font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.progress-bar { height: 5px; background: var(--teal-50); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--gold)); border-radius: 4px; }
.progress-label { font-size: .76rem; color: var(--ink-soft); }

/* ---------- Page headers / breadcrumbs ---------- */
.page-head { margin: 36px 0 26px; }
.crumbs { font-size: .86rem; color: var(--ink-soft); margin-bottom: 10px; }
.crumbs a { color: var(--teal-700); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
.page-head .sub { color: var(--ink-soft); }

/* ---------- Course detail ---------- */
.course-hero {
  background: linear-gradient(150deg, var(--teal-950), var(--teal-800) 60%, var(--purple));
  color: #fff; border-radius: 20px; padding: 40px 42px; margin: 34px 0 30px;
  display: flex; gap: 34px; align-items: center; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.course-hero .info { flex: 1; min-width: 260px; }
.course-hero h1 { margin: 6px 0 10px; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; }
.course-hero .meta { color: rgba(255,255,255,.8); font-size: .95rem; }
.course-hero .meta b { color: var(--gold); }
.course-hero .thumb { width: 300px; max-width: 100%; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); }
.lesson-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lesson-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid var(--line); transition: .15s;
}
.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: var(--teal-50); }
.lesson-row .num { color: var(--ink-soft); font-size: .82rem; font-weight: 700; width: 30px; text-align: right; flex-shrink: 0; }
.lesson-row .t { flex: 1; font-weight: 600; font-size: .95rem; }
.lesson-row .dur { color: var(--ink-soft); font-size: .82rem; flex-shrink: 0; }
.lesson-row .done-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line);
  flex-shrink: 0; display: grid; place-items: center; font-size: .7rem; color: #fff;
}
.lesson-row.done .done-dot { background: var(--teal-600); border-color: var(--teal-600); }
.lesson-row.done .t { color: var(--ink-soft); }

/* ---------- Player page ---------- */
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; margin: 30px 0; align-items: start; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-title { margin: 18px 0 4px; font-size: 1.3rem; font-weight: 800; }
.player-meta { color: var(--ink-soft); font-size: .9rem; margin-bottom: 16px; }
.player-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-teal { background: var(--teal-800); color: #fff; }
.btn-teal:hover { background: var(--teal-700); }
.btn-outline { background: transparent; border: 1.5px solid var(--teal-800); color: var(--teal-800); }
.btn-outline:hover { background: var(--teal-50); }
.btn.done { background: var(--teal-600); color: #fff; }
.playlist-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  max-height: 76vh; overflow-y: auto;
}
.playlist-panel .panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-weight: 800; font-size: .95rem; position: sticky; top: 0; background: var(--paper); z-index: 2;
}
.playlist-panel .panel-head span { display: block; color: var(--ink-soft); font-weight: 600; font-size: .78rem; }
.playlist-panel .lesson-row { padding: 11px 16px; }
.playlist-panel .lesson-row.current { background: var(--teal-100); border-left: 3px solid var(--gold); }

/* ---------- Search & misc ---------- */
.result-group h2 { font-size: 1.1rem; margin: 26px 0 12px; }
.empty-note {
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
  text-align: center; padding: 60px 30px; color: var(--ink-soft); margin: 40px 0;
}
.empty-note .ar { font-size: 1.9rem; color: var(--teal-700); display: block; margin-bottom: 12px; }
.loading { text-align: center; padding: 90px 0; color: var(--ink-soft); }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 26px; }
.pill {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: .85rem; font-weight: 700; color: var(--ink-soft); transition: .15s;
}
.pill:hover { border-color: var(--teal-600); color: var(--teal-800); }
.pill.active { background: var(--teal-800); border-color: var(--teal-800); color: #fff; }
.prose { max-width: 720px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px; margin: 34px 0; }
.prose h2 { margin-top: 0; }
.prose h2 + p { margin-top: 0; }
.prose h2:not(:first-child) { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.about-emblem {
  margin: 34px auto 6px; width: 160px; height: 160px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, var(--teal-800), var(--teal-950));
  border-radius: 24px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.about-emblem img { width: 190px; height: 190px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }

/* ---------- Timeline ---------- */
.tl-intro {
  display: flex; gap: 30px; align-items: center;
  background: linear-gradient(150deg, var(--teal-950), var(--teal-800) 60%, var(--purple));
  color: #fff; border-radius: 20px; padding: 36px 40px; margin: 0 0 46px;
  box-shadow: var(--shadow-lg);
}
.tl-intro-text { flex: 1; min-width: 260px; }
.tl-intro-text .ar { color: var(--gold); font-size: 1.5rem; }
.tl-intro-text h2 { margin: 6px 0 10px; font-size: 1.5rem; }
.tl-intro-text p { color: rgba(255,255,255,.85); margin: 0 0 20px; max-width: 560px; }
.tl-intro-thumb { width: 280px; max-width: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); }

.timeline { position: relative; padding-left: 34px; margin-bottom: 60px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 3px;
  background: linear-gradient(to bottom, var(--gold), var(--teal-700));
  border-radius: 2px;
}
.tl-era { position: relative; margin-bottom: 34px; }
.tl-node {
  position: absolute; left: -31px; top: 26px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--cream);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.tl-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow);
}
.tl-years {
  display: inline-block; background: var(--teal-50); color: var(--teal-800);
  font-size: .78rem; font-weight: 800; letter-spacing: .3px;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
}
.tl-card h2 { margin: 2px 0 8px; font-size: 1.25rem; }
.tl-card > p { color: var(--ink-soft); margin: 0 0 16px; max-width: 720px; }
.tl-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 10px; }
.tl-course {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  transition: .15s; background: var(--cream);
}
.tl-course:hover { border-color: var(--teal-600); box-shadow: var(--shadow); transform: translateY(-1px); }
.tl-course img { width: 86px; aspect-ratio: 16/9; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.tl-course-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-course-info b { font-size: .84rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-course-info span { font-size: .74rem; color: var(--ink-soft); }
@media (max-width: 680px) {
  .tl-intro { padding: 26px 22px; }
  .timeline { padding-left: 26px; }
  .tl-node { left: -23px; }
  .tl-card { padding: 20px 18px; }
}

/* ---------- Essentials path ---------- */
.ess-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ess-day {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s;
}
.ess-day:hover { box-shadow: var(--shadow); }
.ess-day.done { border-color: var(--teal-600); }
.ess-day-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--teal-50); border-bottom: 1px solid var(--line);
}
.ess-day.done .ess-day-head { background: var(--teal-100); }
.ess-day-num { font-weight: 800; color: var(--teal-800); }
.ess-day-min { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.ess-day .lesson-row { padding: 10px 14px; }
.ess-day .lesson-row .t { font-size: .87rem; }
.ess-book-ic {
  width: 86px; aspect-ratio: 16/9; flex-shrink: 0; border-radius: 7px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(155deg, var(--teal-800), var(--teal-950));
}

/* ---------- Books ---------- */
#book-cats .pill { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit; }
.pill-count {
  background: var(--teal-100); color: var(--teal-800);
  font-size: .72rem; font-weight: 800; line-height: 1;
  padding: 3px 7px; border-radius: 999px;
}
#book-cats .pill:hover .pill-count { background: var(--teal-50); }
section[id^="bookcat-"] { scroll-margin-top: 84px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.book-card { display: flex; flex-direction: column; gap: 10px; }
.book-cover {
  position: relative; aspect-ratio: 3 / 4.1;
  border-radius: 10px 14px 14px 10px; padding: 22px 18px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  background: linear-gradient(155deg, var(--teal-800), var(--teal-950) 70%, var(--purple));
  color: #fff; overflow: hidden; transition: .2s;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--gold);
}
.book-cover::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(212,175,55,.4);
  border-radius: 7px 10px 10px 7px; pointer-events: none;
}
.book-cover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.book-orn { position: absolute; top: 18px; right: 16px; color: var(--gold); font-size: 1.2rem; opacity: .9; }
.book-title { font-weight: 800; font-size: .98rem; line-height: 1.35; }
.book-source { color: rgba(255,255,255,.65); font-size: .76rem; font-weight: 600; }
.book-actions { display: flex; gap: 8px; }
.btn-book {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px;
  background: var(--teal-800); color: #fff; font-weight: 700; font-size: .82rem; transition: .15s;
}
.btn-book:hover { background: var(--teal-700); }
.btn-book.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink-soft); }
.btn-book.ghost:hover { border-color: var(--teal-600); color: var(--teal-800); }

/* ---------- Reader ---------- */
.reader-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 26px 0 16px;
}
.reader-title { flex: 1; min-width: 200px; }
.reader-title b { display: block; font-size: 1.05rem; }
.reader-title span { color: var(--ink-soft); font-size: .84rem; }
.reader-frame {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #444; box-shadow: var(--shadow-lg); height: 78vh;
}
.reader-frame iframe { width: 100%; height: 100%; border: 0; }
.reader-note { color: var(--ink-soft); font-size: .85rem; text-align: center; margin: 14px 0 40px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-950); color: rgba(255,255,255,.8); margin-top: 70px; padding-top: 44px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 30px; }
.footer-brand { color: #fff; font-size: 1.1rem; margin-bottom: 10px; }
.footer-note { max-width: 380px; font-size: .88rem; color: rgba(255,255,255,.6); }
.footer-socials { display: flex; gap: 12px; margin-top: 14px; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.85); transition: .18s;
}
.footer-socials svg { width: 19px; height: 19px; }
.footer-socials a:hover { color: var(--teal-950); background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.footer-links a:hover { color: var(--gold); }
.footer-ayah {
  border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 22px 20px 30px;
}
.footer-ayah .ar { display: block; font-size: 1.5rem; color: var(--gold); }
.footer-ayah .tr { font-size: .82rem; color: rgba(255,255,255,.55); }

/* ---------- Entrance animations ---------- */
.will-reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .55s cubic-bezier(.2,.7,.3,1);
}
.will-reveal.revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile nav ---------- */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 9px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .player-layout { grid-template-columns: 1fr; }
  .search-form input { width: 150px; }
  .search-form input:focus { width: 180px; }
  .hero { padding: 40px 28px; }
  .course-hero { padding: 30px 26px; }
}
@media (max-width: 680px) {
  .header-inner {
    justify-content: space-between; gap: 10px;
    flex-wrap: wrap; height: auto; padding: 10px 0 12px;
  }
  .brand { font-size: 1.12rem; }
  .search-form { order: 3; flex-basis: 100%; display: flex; justify-content: center; }
  .nav-toggle { display: flex; margin-right: 6px; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 12px 18px 16px; margin: 0;
    background: linear-gradient(160deg, var(--teal-950), var(--teal-800));
    box-shadow: 0 18px 30px rgba(18,16,74,.35);
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 1.02rem; }
  .search-form input, .search-form input:focus { width: 100%; max-width: 340px; }
  .brand-logo { width: 40px; height: 40px; transform: scale(1.9); }
  .hero-stats { gap: 24px; }
  .prose { padding: 26px 22px; }
}
