﻿/* =========================================================
   Mentor Me School â€” main stylesheet (no build step needed)
   ========================================================= */
:root {
  /* MentorMe brand: navy blue (logo head) + orange (logo "Me") */
  --brand: #1f3f9a;
  --brand-600: #172f78;
  --brand-900: #0c1d4f;
  --brand-50: #eef2fc;
  --brand-100: #dce4f8;
  --accent: #f26b21;
  --accent-600: #d95810;
  --accent-50: #fff1e8;
  --ink: #111a33;
  --ink-2: #39425c;
  --muted: #6a7390;
  --line: #e4e8f1;
  --bg: #ffffff;
  --bg-soft: #f4f7fd;
  --ok: #12a26b;
  --ok-50: #e8f8f1;
  --warn: #c27c06;
  --warn-50: #fff6e0;
  --danger: #d33a3a;
  --danger-50: #fdeeee;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(21, 20, 43, .05), 0 8px 24px rgba(21, 20, 43, .06);
  --shadow-lg: 0 18px 50px rgba(21, 20, 43, .14);
  --container: 1200px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack > * + * { margin-top: 1rem; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s, color .15s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(31, 63, 154, .28); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d95810; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand); }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 28px; height: 78px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), #3a6ad6); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; box-shadow: 0 6px 16px rgba(31, 63, 154, .3); }
.logo-img { height: 62px; width: auto; }
.site-footer a.footer-logo { display: inline-block; padding: 8px 14px; }
.footer-logo { display: inline-block; background: #fff; border-radius: 14px; padding: 8px 14px; margin-bottom: 16px; }
.footer-logo img { height: 64px; width: auto; }

/* ---------- Partners ---------- */
.partners { padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.partners-title { text-align: center; color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 30px; }
.partner-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 22px; align-items: center; }
.partner { display: flex; align-items: center; justify-content: center; height: 86px; padding: 10px; border-radius: 12px; transition: background .2s; }
.partner:hover { background: var(--bg-soft); }
.partner img { max-height: 62px; max-width: 100%; width: auto; object-fit: contain; transition: transform .25s; }
.partner:hover img { transform: scale(1.06); }
.partner-grid.large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.partner-grid.large .partner { height: 120px; border: 1px solid var(--line); background: #fff; }
.partner-grid.large .partner img { max-height: 80px; filter: none; opacity: 1; }
.logo small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-top: -3px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav > a, .nav-mega-link { color: var(--ink-2); font-weight: 600; font-size: .95rem; padding: 8px 14px; border-radius: 999px; }
.nav > a:hover, .nav > a.active { background: var(--brand-50); color: var(--brand); }
.header-search { flex: 1; max-width: 360px; position: relative; }
.header-search input { width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg-soft); font: inherit; font-size: .92rem; }
.header-search input:focus { outline: none; border-color: var(--brand); background: #fff; }
.header-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar.xl { width: 110px; height: 110px; font-size: 2rem; }
.avatar-photo { object-fit: cover; background: #fff; }
.course-card .foot .avatar-photo { width: 28px; height: 28px; }
.instructor-photo.has-photo { background: none; box-shadow: none; aspect-ratio: auto; }
.instructor-photo.has-photo img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(21, 20, 43, .18)); }
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .93rem; background: none; border: 0; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-soft); color: var(--brand); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }

/* ---------- Flash messages ---------- */
.flash { padding: 14px 18px; border-radius: var(--radius-sm); margin: 18px 0; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.flash-success { background: var(--ok-50); color: #0b6e49; }
.flash-warning { background: var(--warn-50); color: #8a5800; }
.flash-error { background: var(--danger-50); color: #9c2424; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #d9e3fb 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, #ffe4d2 0%, transparent 55%), var(--bg-soft); padding: 80px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--brand); font-weight: 700; font-size: .82rem; box-shadow: var(--shadow); margin-bottom: 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 span { background: linear-gradient(120deg, var(--brand), #3a6ad6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 560px; margin-bottom: 28px; }
.hero-search { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 999px; box-shadow: var(--shadow-lg); max-width: 560px; }
.hero-search input { flex: 1; border: 0; font: inherit; padding: 10px 16px; background: transparent; min-width: 0; }
.hero-search input:focus { outline: none; }
.hero-trust { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust div strong { display: block; font-size: 1.5rem; font-weight: 800; }
.hero-trust div span { color: var(--muted); font-size: .88rem; }
.hero-visual { position: relative; }
.hero-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; transform: rotate(1.5deg); }
.hero-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.hero-card .body { padding: 18px 20px; }
.hero-badge { position: absolute; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 12px 16px; display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: .9rem; }
.hero-badge .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.hero-badge.one { left: -28px; bottom: -26px; }
.hero-badge.two { right: -16px; top: -18px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; max-width: 560px; }
.kicker { color: var(--brand); font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; display: block; }

/* ---------- Course cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; color: var(--ink); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--ink); }
.course-card .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--brand-50); overflow: hidden; }
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.course-card:hover .thumb img { transform: scale(1.05); }
.course-card .tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.course-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.course-card .school { font-size: .78rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.course-card h3 { font-size: 1.08rem; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .meta { display: flex; gap: 14px; color: var(--muted); font-size: .85rem; margin-bottom: 14px; flex-wrap: wrap; }
.course-card .meta span { display: inline-flex; gap: 5px; align-items: center; }
.course-card .foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.price del { color: var(--muted); font-weight: 600; font-size: .88rem; margin-left: 6px; }
.price.free { color: var(--ok); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.tag-accent { background: var(--accent); color: #fff; }
.tag-brand { background: var(--brand); color: #fff; }
.tag-ok { background: var(--ok-50); color: var(--ok); box-shadow: none; }
.tag-warn { background: var(--warn-50); color: var(--warn); box-shadow: none; }
.tag-muted { background: var(--bg-soft); color: var(--muted); box-shadow: none; }
.tag-danger { background: var(--danger-50); color: var(--danger); box-shadow: none; }

/* ---------- Schools ---------- */
.school-card { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); transition: .2s; }
.school-card:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); transform: translateY(-2px); }
.school-card .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; }
.school-card strong { display: block; font-size: .98rem; line-height: 1.3; }
.school-card span { font-size: .84rem; color: var(--muted); }

/* ---------- Features / instructor ---------- */
.feature { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.feature .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.feature p { color: var(--muted); margin: 0; }
.instructor-block { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: center; }
.instructor-photo { aspect-ratio: 1; border-radius: 26px; background: linear-gradient(135deg, var(--brand), #3a6ad6); display: grid; place-items: center; color: #fff; font-size: 4.5rem; font-weight: 800; box-shadow: var(--shadow-lg); }
.instructor-stats { display: flex; gap: 30px; margin: 18px 0 22px; flex-wrap: wrap; }
.instructor-stats strong { display: block; font-size: 1.4rem; }
.instructor-stats span { color: var(--muted); font-size: .86rem; }
.bio p { color: var(--ink-2); }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, var(--brand), #2f57c0); color: #fff; border-radius: 26px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { opacity: .85; margin: 0; max-width: 540px; }
.cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .08); }

/* ---------- Page header ---------- */
.page-head { background: var(--bg-soft); padding: 46px 0; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--muted); margin: 0; }
.breadcrumbs { font-size: .86rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ---------- Catalog ---------- */
.catalog { display: grid; grid-template-columns: 270px 1fr; gap: 34px; padding: 40px 0 80px; }
.filters { position: sticky; top: 96px; align-self: start; }
.filter-group { margin-bottom: 26px; }
.filter-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.filter-link { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.filter-link:hover { background: var(--bg-soft); color: var(--brand); }
.filter-link.active { background: var(--brand-50); color: var(--brand); }
.filter-link span { color: var(--muted); font-weight: 500; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.empty { text-align: center; padding: 60px 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- Course page ---------- */
.course-hero { background: #0c1d4f; color: #fff; padding: 50px 0 60px; }
.course-hero .breadcrumbs, .course-hero .breadcrumbs a { color: #aebbe0; }
.course-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); max-width: 720px; }
.course-hero .sub { color: #c8d2ee; font-size: 1.08rem; max-width: 700px; }
.course-hero .facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; color: #cfd8f0; font-size: .93rem; }
.course-hero .facts span { display: inline-flex; gap: 6px; align-items: center; }
.course-layout { display: grid; grid-template-columns: 1fr 370px; gap: 44px; padding: 44px 0 80px; }
.course-side { position: relative; }
.buy-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; position: sticky; top: 96px; margin-top: -200px; }
.buy-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.buy-card .body { padding: 22px; }
.buy-card .price { font-size: 1.9rem; }
.buy-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.buy-card li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.buy-card li span:first-child { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 28px; background: #fff; }
.box h2 { font-size: 1.35rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.check-list svg { color: var(--ok); flex-shrink: 0; margin-top: 3px; }
.curriculum-topic { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.curriculum-topic > summary { list-style: none; cursor: pointer; padding: 16px 18px; background: var(--bg-soft); display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.curriculum-topic > summary::-webkit-details-marker { display: none; }
.curriculum-topic > summary .chev { transition: transform .2s; }
.curriculum-topic[open] > summary .chev { transform: rotate(180deg); }
.curriculum-topic > summary small { color: var(--muted); font-weight: 600; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-2); }
.lesson-row .t { flex: 1; }
.lesson-row .d { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.lesson-row a { color: var(--ink); font-weight: 600; }
.lesson-row a:hover { color: var(--brand); }
.lesson-row svg { color: var(--muted); flex-shrink: 0; }
.progress { height: 8px; border-radius: 999px; background: var(--brand-50); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand), #3a6ad6); border-radius: 999px; transition: width .4s; }
.rating-stars { color: var(--accent); letter-spacing: 2px; }
.review { padding: 18px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { display: none; }
.star-input label { font-size: 1.8rem; color: #d6dbe8; cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--accent); }

/* ---------- Lesson player ---------- */
.learn { display: grid; grid-template-columns: 1fr 360px; min-height: calc(100vh - 64px); background: #0a1640; }
.learn-top { height: 64px; background: #0c1d4f; color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 20px; position: sticky; top: 0; z-index: 40; }
.learn-top a { color: #cfd8f0; }
.learn-top a:hover { color: #fff; }
.learn-top .title { font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learn-top .progress { width: 160px; background: rgba(255, 255, 255, .15); }
.learn-main { background: #fff; display: flex; flex-direction: column; }
.player { background: #000; aspect-ratio: 16 / 9; width: 100%; }
.player video, .player iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }
.player-empty { aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(135deg, #0c1d4f, #23408f); color: #bccaee; text-align: center; padding: 30px; }
.lesson-body { padding: 30px 36px 50px; max-width: 900px; }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 36px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.learn-side { background: #fff; border-left: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 64px); position: sticky; top: 64px; }
.learn-side .head { padding: 20px; border-bottom: 1px solid var(--line); }
.learn-side .topic-title { padding: 14px 20px 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.learn-item { display: flex; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; align-items: flex-start; }
.learn-item:hover { background: var(--bg-soft); color: var(--ink); }
.learn-item.current { background: var(--brand-50); color: var(--brand); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.learn-item .state { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; margin-top: 1px; }
.learn-item .state.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.learn-item .state.locked { border-style: dashed; }
.learn-item small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }

/* ---------- Forms ---------- */
.form-card { max-width: 460px; margin: 50px auto 80px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); font: inherit; font-size: .95rem; background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
textarea.input { min-height: 120px; resize: vertical; }
.error { color: var(--danger); font-size: .85rem; margin-top: 5px; font-weight: 600; }
.checkbox { display: flex; gap: 10px; align-items: center; font-size: .92rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Dashboard ---------- */
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat-card strong { display: block; font-size: 1.9rem; font-weight: 800; }
.stat-card span { color: var(--muted); font-size: .9rem; }
.my-course { display: grid; grid-template-columns: 180px 1fr auto; gap: 22px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 14px; }
.my-course img { border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--bg-soft); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .thumb-sm { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* ---------- Admin layout ---------- */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 72px); }
.admin-nav { background: #0c1d4f; padding: 22px 14px; }
.admin-nav a { display: flex; gap: 10px; align-items: center; color: #bccaee; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: .93rem; margin-bottom: 2px; }
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-nav a.active { background: var(--brand); color: #fff; }
.admin-nav .badge { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 800; }
.admin-main { padding: 32px 36px 60px; background: var(--bg-soft); min-width: 0; }
.admin-main h1 { font-size: 1.7rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel h2 { font-size: 1.15rem; }
.topic-admin { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 16px; background: #fff; }
.topic-admin .th { display: flex; gap: 10px; padding: 12px 14px; background: var(--bg-soft); align-items: center; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topic-admin .lr { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: center; font-size: .92rem; }
.topic-admin .add { padding: 14px; background: #fcfcff; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; padding: 0 12px; background: #fff; }
.pagination .active span { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled span { opacity: .4; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: #b3bfdc; padding: 60px 0 26px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: #b3bfdc; display: block; padding: 4px 0; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1.1fr .8fr 1.1fr; gap: 34px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .86rem; }
.site-footer .logo { color: #fff; }

/* =========================================================
   Professional template layout (v2)
   ========================================================= */
.strong { font-weight: 700; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-primary { box-shadow: 0 6px 18px rgba(31, 63, 154, .25); }
.tag-danger-solid { background: var(--danger); color: #fff; }

/* Top bar */
.topbar { background: var(--brand-900); color: #c9d3ef; font-size: .84rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar a, .topbar span { color: #c9d3ef; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar-contact, .topbar-right { display: flex; gap: 22px; align-items: center; }
.social { display: inline-flex; gap: 8px; align-items: center; }
.social a { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: inherit; }
.topbar .social a { width: 24px; height: 24px; }
.social-dark a { background: rgba(255, 255, 255, .08); color: #fff; width: 36px; height: 36px; }
.social-dark a:hover { background: var(--accent); color: #fff; }
.social-light a { background: var(--brand-50); color: var(--brand); }
.social-light a:hover { background: var(--brand); color: #fff; }

/* Header */
.site-header { background: #fff; box-shadow: 0 2px 14px rgba(17, 26, 51, .06); border-bottom: 0; }
.nav { margin: 0 auto; }
.nav > a, .nav-mega-link { border-radius: 0; padding: 26px 14px; position: relative; background: none !important; display: inline-flex; align-items: center; gap: 4px; }
.nav > a::after, .nav-mega-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 18px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.nav > a:hover, .nav > a.active, .nav-mega-link:hover, .nav-mega-link.active, .nav-mega:hover .nav-mega-link { color: var(--brand); }
.nav > a.active::after, .nav > a:hover::after, .nav-mega-link.active::after, .nav-mega:hover .nav-mega-link::after { transform: scaleX(1); }
.header-actions { margin-left: 0; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--ink); list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.search-pop { position: relative; }
.search-pop-panel { position: absolute; right: 0; top: calc(100% + 12px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px; display: flex; gap: 8px; width: min(420px, 86vw); z-index: 60; }

/* Hero */
.hero2 { background: linear-gradient(180deg, #eef3fd 0%, #f6f9ff 100%); overflow: hidden; position: relative; }
.hero2-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; min-height: 520px; }
.hero2-text { padding: 64px 0; }
.kicker-line { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.kicker-line::before, .kicker-line::after { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero2 h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.08; margin-bottom: 18px; }
.hero2 h1 span { color: var(--brand); }
.hero2 .lead { color: var(--ink-2); font-size: 1.08rem; max-width: 540px; margin-bottom: 30px; }
.hero2-visual { position: relative; align-self: end; display: flex; justify-content: center; min-height: 480px; }
.hero2-blob { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #3a6ad6, var(--brand) 70%); bottom: 20px; left: 50%; transform: translateX(-50%); }
.hero2-photo { position: relative; z-index: 1; width: 420px; max-width: 100%; align-self: center; filter: drop-shadow(0 20px 30px rgba(12, 29, 79, .25)); }
.hero2-dots { position: absolute; width: 70px; height: 50px; background-image: radial-gradient(var(--accent) 2px, transparent 2.5px); background-size: 12px 12px; z-index: 0; }
.hero2-dots.one { top: 40px; left: 10px; }
.hero2-dots.two { bottom: 50px; right: 0; background-image: radial-gradient(var(--brand) 2px, transparent 2.5px); }
.float-card { position: absolute; z-index: 2; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px 16px; }
.float-card strong { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.float-card span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.fc-students { left: 0; top: 120px; }
.fc-thumbs { display: flex; margin-top: 8px; }
.fc-thumbs img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; margin-left: -7px; }
.fc-thumbs img:first-child { margin-left: 0; }
.fc-rating { right: 0; top: 60px; display: flex; gap: 10px; align-items: center; }
.fc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-50); color: var(--accent); display: grid; place-items: center; }

/* Section titles */
.section-title { text-align: center; max-width: 620px; margin: 0 auto 38px; }
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--muted); margin: 0; }
.h-sm { font-size: 1.45rem; margin: 0; }
.head-row { margin-bottom: 22px; }

/* Course cards (template style) */
.course-card { border-radius: 14px; box-shadow: 0 4px 18px rgba(17, 26, 51, .06); border-color: #edf0f6; }
.course-card .thumb { aspect-ratio: 16 / 10.5; }
.card-school { position: absolute; left: 12px; bottom: 12px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-card h3 { font-size: 1.02rem; min-height: 2.5em; }
.course-card .meta { font-size: .82rem; gap: 12px; }
.course-card .foot { border-top: 1px solid var(--line); }
.course-card .price { color: var(--brand); }
.course-card .price.free { color: var(--ok); }
.card-rating { display: inline-flex; gap: 4px; align-items: center; font-size: .85rem; font-weight: 700; color: var(--ink-2); }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cat-item { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--ink); transition: .2s; }
.cat-item:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); transform: translateY(-2px); }
.cat-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.cat-item:nth-child(even) .cat-ic { background: var(--accent-50); color: var(--accent); }
.cat-item strong { display: block; font-size: .93rem; line-height: 1.3; }
.cat-item small { color: var(--muted); font-size: .8rem; }
.split-wide-right { grid-template-columns: .9fr 1.1fr; gap: 40px; }
.why { display: grid; grid-template-columns: 1fr 150px; gap: 18px; align-items: center; border-left: 1px solid var(--line); padding-left: 36px; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.why-item { display: flex; gap: 12px; align-items: flex-start; }
.why-ic { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--brand-100); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; background: #fff; }
.why-item strong { display: block; font-size: .93rem; margin-bottom: 2px; }
.why-item p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.why-photo { position: relative; }
.why-photo img { width: 100%; }
.years-badge { position: absolute; right: -6px; bottom: 16px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 14px; text-align: center; }
.years-badge strong { display: block; color: var(--brand); font-size: 1.4rem; font-weight: 800; line-height: 1; }
.years-badge span { font-size: .72rem; color: var(--muted); font-weight: 600; line-height: 1.2; display: block; margin-top: 3px; }

/* Stats band */
.stats-band { margin-top: -1px; background: linear-gradient(100deg, var(--brand-900), var(--brand) 60%, #2c55c4); border-radius: 18px; color: #fff; display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px 20px; position: relative; top: 40px; box-shadow: 0 18px 40px rgba(12, 29, 79, .25); z-index: 2; }
.sb-item { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 0 10px; border-right: 1px solid rgba(255, 255, 255, .18); }
.sb-item:last-child { border-right: 0; }
.sb-ic { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.sb-item strong { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.sb-item span { font-size: .85rem; color: #d5ddf3; }
.stats-band + * , .container:has(> .stats-band) + .section { padding-top: 110px; }

/* Teacher card */
.teacher-card { display: grid; grid-template-columns: 170px 1fr; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); align-items: center; }
.teacher-photo { border-radius: 14px; background: linear-gradient(180deg, var(--brand-50), #fff); overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-photo span { font-size: 3rem; font-weight: 800; color: var(--brand); }
.teacher-role { color: var(--accent); font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.teacher-stats { display: flex; gap: 16px; font-size: .84rem; color: var(--muted); margin: 10px 0 12px; flex-wrap: wrap; }
.teacher-stats strong { color: var(--ink); }

/* Upcoming list */
.event-list { display: grid; gap: 12px; }
.event-item { display: grid; grid-template-columns: 58px 1fr 92px; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; color: var(--ink); transition: .2s; }
.event-item:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.event-date { background: var(--brand); color: #fff; border-radius: 10px; text-align: center; padding: 8px 4px; display: grid; place-items: center; }
.event-date.alt { background: var(--accent); }
.event-date strong { font-size: 1.25rem; line-height: 1; display: grid; place-items: center; }
.event-date small { font-size: .7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; margin-top: 3px; }
.event-body strong { display: block; font-size: .93rem; line-height: 1.3; margin-bottom: 4px; }
.event-body small { color: var(--muted); font-size: .78rem; display: inline-flex; gap: 5px; align-items: center; }
.event-item img { width: 92px; height: 58px; object-fit: cover; border-radius: 8px; }

/* Testimonials + FAQ */
.testi-stack { display: grid; gap: 14px; }
.testi-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); position: relative; }
.testi-card p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.7; }
.testi-quote { color: var(--accent); display: block; margin-bottom: 8px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { color: var(--brand); }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); font-size: .92rem; }

/* Newsletter */
.newsletter { background: linear-gradient(100deg, var(--brand-900), var(--brand)); border-radius: 20px; padding: 40px 48px; display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 30px; align-items: center; color: #fff; position: relative; overflow: hidden; }
.newsletter h2 { color: #fff; font-size: 1.6rem; margin-bottom: 6px; }
.newsletter p { color: #cfd8f0; margin: 0; font-size: .93rem; }
.newsletter-form { display: flex; background: #fff; border-radius: 12px; padding: 6px; gap: 6px; flex-wrap: wrap; position: relative; }
.newsletter-form input[type=email] { flex: 1; border: 0; font: inherit; padding: 10px 14px; min-width: 0; border-radius: 8px; }
.newsletter-form input[type=email]:focus { outline: none; }
.newsletter-form .btn { border-radius: 8px; }
.newsletter-ic { color: rgba(255, 255, 255, .85); transform: rotate(-12deg); }

/* Contact strip + footer */
.contact-strip { padding: 50px 0 40px; }
.contact-strip-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.cs-item { display: flex; gap: 14px; align-items: center; padding: 6px 18px; border-right: 1px solid var(--line); }
.cs-item:last-child { border-right: 0; }
.cs-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.cs-item strong { display: block; font-size: .95rem; }
.cs-item a, .cs-item span { color: var(--muted); font-size: .9rem; }
.cs-item a:hover { color: var(--brand); }
.footer-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.site-footer .footer-gallery a { padding: 0; }
.footer-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; transition: opacity .2s; }
.footer-gallery a:hover img { opacity: .8; }

@media (max-width: 1080px) {
  .why { grid-template-columns: 1fr; padding-left: 30px; }
  .why-photo { display: none; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .newsletter { grid-template-columns: 1fr 1.3fr; }
  .newsletter-ic { display: none; }
}
@media (max-width: 900px) {
  .hero2-grid, .split, .split-wide-right { grid-template-columns: 1fr; }
  .hero2-text { padding: 46px 0 10px; }
  .hero2-visual { min-height: 380px; }
  .hero2-blob { width: 300px; height: 300px; }
  .hero2-photo { width: 320px; }
  .why { border-left: 0; padding-left: 0; }
  .stats-band { grid-template-columns: 1fr 1fr; gap: 22px 0; }
  .sb-item:nth-child(2) { border-right: 0; }
  .nav > a, .nav-mega-link { padding: 12px 14px; }
  .nav > a::after, .nav-mega-link::after { display: none; }
  .newsletter { grid-template-columns: 1fr; padding: 32px 26px; }
  .cs-item { border-right: 0; }
}
@media (max-width: 600px) {
  .topbar-contact { gap: 14px; }
  .hide-sm { display: none !important; }
  .fc-students { top: 30px; }
  .fc-rating { top: auto; bottom: 30px; }
  .cat-grid, .why-grid { grid-template-columns: 1fr; }
  .teacher-card { grid-template-columns: 1fr; }
  .teacher-photo { max-width: 200px; }
  .stats-band { grid-template-columns: 1fr; }
  .sb-item { border-right: 0; justify-content: flex-start; }
  .event-item { grid-template-columns: 52px 1fr; }
  .event-item img { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-form .btn { width: 100%; }
}

/* ---------- Courses mega menu ---------- */
.nav-mega { position: static; display: flex; align-items: center; }
.nav-mega-link svg { transition: transform .2s; }
.nav-mega:hover .nav-mega-link svg, .nav-mega:focus-within .nav-mega-link svg { transform: rotate(180deg); }
.mega-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink-2); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 24px 48px rgba(12, 29, 79, .14); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 55; }
.nav-mega:hover .mega, .nav-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* hover bridge */
.mega-grid { display: grid; grid-template-columns: 1.15fr 1.25fr 1fr .95fr; gap: 34px; padding-top: 30px; padding-bottom: 32px; }
.mega-col { min-width: 0; }
.mega-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin: 0 0 14px; }
.mega a { color: var(--ink-2); }
.mega-schools { display: grid; gap: 2px; }
.mega-school { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .9rem; }
.mega-school small { min-width: 24px; height: 22px; border-radius: 999px; background: var(--brand-50); color: var(--brand); display: inline-grid; place-items: center; font-size: .74rem; font-weight: 800; padding: 0 7px; }
.mega-school:hover { background: var(--bg-soft); color: var(--brand); }
.mega-school:hover small { background: var(--brand); color: #fff; }
.mega-quick { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: grid; gap: 2px; }
.mega-quick a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--brand); }
.mega-quick a small { margin-left: auto; color: var(--muted); font-weight: 600; }
.mega-quick a:hover { background: var(--brand-50); }
.mega-course { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; margin-bottom: 6px; }
.mega-course:hover { background: var(--bg-soft); }
.mega-course img { width: 92px; height: 58px; object-fit: cover; border-radius: 8px; }
.mega-course strong { display: block; font-size: .9rem; line-height: 1.3; color: var(--ink); margin-bottom: 3px; }
.mega-course:hover strong { color: var(--brand); }
.mega-course small { color: var(--muted); font-size: .78rem; }
.mega-course b { color: var(--brand); }
.mega-course b.free { color: var(--ok); }
.mega-upcoming { display: grid; gap: 2px; }
.mega-upcoming a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; font-size: .88rem; font-weight: 600; line-height: 1.35; }
.mega-upcoming a:hover { background: var(--bg-soft); color: var(--brand); }
.mega-upcoming .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.mega-more { display: inline-flex; gap: 6px; align-items: center; margin: 10px 10px 0; font-size: .86rem; font-weight: 700; }
.mega .mega-more { color: var(--accent); }
.mega-promo { background: linear-gradient(150deg, var(--brand-900), var(--brand)); color: #fff; border-radius: 16px; padding: 24px; position: relative; overflow: hidden; align-self: start; }
.mega-promo::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .07); right: -40px; bottom: -40px; }
.mega-promo h4 { color: #fff; font-size: 1.12rem; margin: 10px 0 8px; }
.mega-promo p { color: #cfd8f0; font-size: .86rem; margin-bottom: 16px; }
.mega-promo-tag { display: inline-block; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; }
.mega .mega-promo .btn { color: #fff; position: relative; z-index: 1; }

@media (max-width: 1080px) {
  .mega-grid { grid-template-columns: 1fr 1.3fr 1fr; }
  .mega-promo { display: none; }
}
@media (max-width: 900px) {
  .nav-mega { flex-wrap: wrap; justify-content: space-between; }
  .nav-mega-link svg { display: none; }
  .mega-toggle { display: block; }
  .nav-mega.open .mega-toggle svg { transform: rotate(180deg); }
  .mega, .nav-mega:hover .mega, .nav-mega:focus-within .mega { position: static; flex-basis: 100%; box-shadow: none; border-top: 0; opacity: 1; visibility: visible; transform: none; display: none; background: var(--bg-soft); border-radius: 12px; }
  .nav-mega.open .mega { display: block; }
  .mega::before { display: none; }
  .mega-grid { grid-template-columns: 1fr; gap: 18px; padding: 16px 6px; }
  .mega-promo { display: none; }
  .mega-course img { width: 72px; height: 46px; }
  .mega-course { grid-template-columns: 72px 1fr; }
  .nav { max-height: calc(100vh - 120px); overflow-y: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .course-layout { grid-template-columns: 1fr 330px; }
  .header-search { display: none; }
  .partner-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid, .instructor-block, .course-layout, .catalog, .learn, .admin { grid-template-columns: 1fr; }
  .hero { padding: 50px 0 60px; }
  .hero-visual { max-width: 480px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .buy-card { margin-top: 0; position: static; }
  .course-side { order: -1; }
  .filters { position: static; }
  .learn-side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .admin-nav { display: flex; overflow-x: auto; gap: 4px; padding: 10px; }
  .admin-nav a { white-space: nowrap; margin: 0; }
  .admin-main { padding: 24px 16px 50px; }
  .instructor-photo { max-width: 220px; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .my-course { grid-template-columns: 120px 1fr; }
  .my-course > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4, .form-row, .form-row-3, .check-list, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .cta { padding: 34px 24px; }
  .hero-badge { display: none; }
  .form-card { padding: 24px; margin: 24px 16px 50px; }
  .lesson-body, .lesson-nav { padding-left: 18px; padding-right: 18px; }
  .learn-top .progress { display: none; }
  .header-actions .btn-ghost { display: none; }
  .hero-search { flex-direction: column; border-radius: 18px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .logo-img { height: 44px; }
}
