/* ============================================================
   CodeKids — shared stylesheet
   Palette: yellow #FFD32B · charcoal #1F1D0D · body #29281E
            white #FFFFFF · soft #F6F6F6 / #FAF9F5 · lime #F7FF62
   Fonts:   Barlow 800 (headings) · Roboto (body)
   Edit the variables below to re-theme the whole site.
   ============================================================ */

:root {
  --yellow: #FFD32B;
  --lime: #F7FF62;
  --dark: #1F1D0D;
  --body: #29281E;
  --white: #FFFFFF;
  --soft: #F6F6F6;
  --cream: #FAF9F5;
  --muted: #6d6b60;
  --border: #e8e6dd;
  --radius: 12px;      /* cards */
  --radius-sm: 8px;    /* buttons, inputs */
  --muted-on-dark: #C8C8C8;
  --muted-on-dark-2: #D2D2D2;
  --shadow: 0 10px 30px rgba(31, 29, 13, 0.08);
  --shadow-lg: 0 18px 50px rgba(31, 29, 13, 0.14);
  --heading: 'Barlow', sans-serif;
  --text: 'Roboto', sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.65;   /* ~26px */
  color: var(--body);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 {
  font-family: var(--heading);
  color: var(--dark);
}
h1 { font-weight: 800; font-size: clamp(2.6rem, 5.5vw, 4.0625rem); line-height: 1.05; } /* ~65px / 68px */
h2 { font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.8125rem); line-height: 1.15; } /* ~45px */
h3 { font-weight: 700; font-size: 1.75rem; line-height: 1.2; }                          /* ~28px */
h4 { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
h5 { font-family: var(--text); font-weight: 500; font-size: 1rem; color: var(--dark); } /* subheads: Roboto 500 */
.card h3, .price-card .plan-name { font-size: 1.35rem; } /* card titles stay compact */

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dark); color: var(--white);
  padding: 10px 18px; border-radius: 0 0 12px 0; z-index: 999;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--dark); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Layout helpers */
.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: 80px 0; }
.section--soft { background: var(--soft); }
.section--cream { background: var(--cream); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { margin-top: 12px; color: var(--muted); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--text); font-weight: 400; font-size: 1rem;
  padding: 13px 26px; border-radius: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--dark { background: var(--dark); color: var(--white); }
.btn--dark:hover { background: #35321c; color: var(--white); }
.btn--yellow { background: var(--yellow); color: var(--dark); }
.btn--outline { border: 1.5px solid var(--dark); color: var(--dark); background: transparent; }
.btn--white { background: var(--white); color: var(--dark); }
.btn--lg { padding: 18px 42px; font-size: 1.1rem; }
.btn--sm { padding: 9px 22px; font-size: .9rem; }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-block; font-family: var(--heading); font-weight: 700;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; background: var(--soft); color: var(--dark);
}
.badge--free { background: var(--dark); color: var(--lime); }
.badge--yellow { background: var(--yellow); color: var(--dark); }
.badge--lime { background: var(--lime); color: var(--dark); }
.badge--outline { border: 1.5px solid var(--dark); background: transparent; }

/* ============================================================
   HEADER / NAVBAR (sticky)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 14px rgba(31,29,13,.07);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 78px;
}
.logo {
  font-family: var(--heading); font-weight: 800; font-size: 1.6rem; color: var(--dark);
  display: inline-flex; align-items: center; gap: 8px;
}
.logo .logo-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--yellow);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--heading); font-weight: 700; font-size: 1rem;
  color: var(--dark); padding: 10px 14px; border-radius: 999px;
  background: none; transition: background .15s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--soft); }
.nav-link .caret { font-size: .65rem; transition: transform .2s; }
.nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }
.nav-link--free {
  background: var(--yellow); color: var(--dark);
}
.nav-link--free:hover { background: var(--lime); }

.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 210px;
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .2s ease;
}
.nav-item.open > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 9px 14px; border-radius: 10px;
  font-weight: 500; color: var(--body);
}
.dropdown a:hover { background: var(--soft); color: var(--dark); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 10px;
  border-radius: 10px;
}
.nav-toggle span {
  width: 24px; height: 3px; background: var(--dark); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO (home)
   ============================================================ */
.hero { background: var(--yellow); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center;
  gap: 40px; padding: 70px 0 0;
}
.hero-copy p.lead { margin: 18px 0 28px; font-size: 1.15rem; max-width: 480px; }

.hero-search {
  display: flex; background: var(--white); border-radius: 999px;
  padding: 6px; max-width: 520px; box-shadow: var(--shadow);
}
.hero-search input {
  flex: 1; border: none; background: none; padding: 12px 22px;
  font-size: 1rem; color: var(--body); min-width: 0;
}
.hero-search input:focus { outline: none; }

.topic-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 50px; }
.topic-tags a {
  font-family: var(--heading); font-weight: 700; font-size: .82rem;
  letter-spacing: .05em; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--dark); color: var(--dark);
  transition: background .15s;
}
.topic-tags a:hover { background: var(--dark); color: var(--yellow); }
.topic-tags a.tag--free { background: var(--dark); color: var(--lime); border-color: var(--dark); }

.hero-figure { align-self: end; }
.hero-figure img { border-radius: 24px 24px 0 0; }

/* ============================================================
   PAGE BANNER (inner pages)
   ============================================================ */
.page-banner { background: var(--yellow); padding: 64px 0; }
.page-banner h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.breadcrumb { display: flex; gap: 8px; font-weight: 500; margin-bottom: 10px; font-size: .95rem; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: .5; }

/* ============================================================
   CARDS
   ============================================================ */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; }
.card-media img { width: 100%; height: 210px; object-fit: cover; }
.card-media .badge { position: absolute; top: 14px; left: 14px; }
.card-media .badge + .badge { left: auto; right: 14px; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: .88rem; color: var(--muted); margin-bottom: 10px;
}
.card-meta .price { font-family: var(--heading); font-weight: 800; font-size: 1.05rem; color: var(--dark); }
.card-meta .price--free { color: #0a7a2f; }
.stars { color: #e5a100; letter-spacing: 2px; font-size: .9rem; }
.card h3 { margin-bottom: 10px; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.card .card-cta { margin-top: auto; padding-top: 14px; }
.card-cta a { font-family: var(--heading); font-weight: 700; color: var(--dark); }
.card-cta a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

/* Course list (horizontal) card */
.card--list { flex-direction: row; }
.card--list .card-media { flex: 0 0 280px; }
.card--list .card-media img { height: 100%; min-height: 220px; }

/* Filter/sort bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  justify-content: space-between; margin-bottom: 36px;
  background: var(--cream); border: 1px solid var(--border);
  padding: 16px 20px; border-radius: var(--radius);
}
.filter-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-btn {
  font-family: var(--heading); font-weight: 700; font-size: .85rem;
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--dark);
  color: var(--dark); background: transparent; transition: all .15s;
}
.filter-btn:hover { background: var(--soft); }
.filter-btn.active, .filter-btn[aria-pressed="true"] { background: var(--dark); color: var(--yellow); }
.filter-bar select {
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--dark);
  background: var(--white); font-weight: 500; color: var(--dark);
}

/* ---------- Age group cards ---------- */
.age-card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); text-align: center;
}
.age-card .age-emoji {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--yellow); display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.age-card p { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* ---------- Steps (01–04, thin outlined numbers) ---------- */
.step { text-align: left; }
.step-num {
  font-family: var(--heading); font-weight: 800; font-size: 4.2rem;
  line-height: 1; color: transparent;
  -webkit-text-stroke: 2px var(--dark);
  margin-bottom: 14px; display: block;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Free Algorithms banner ---------- */
.free-banner {
  background: var(--dark); border-radius: 24px; color: var(--white);
  padding: 54px; display: grid; grid-template-columns: 1.4fr .6fr;
  gap: 30px; align-items: center;
}
.free-banner h2 { color: var(--white); }
.free-banner .accent { color: var(--lime); }
.free-banner p { margin: 14px 0 24px; color: var(--muted-on-dark); max-width: 560px; }
.free-banner .btn { justify-self: start; }

/* ---------- Mentors ---------- */
.mentor-card { text-align: center; }
.mentor-card img { height: 300px; object-fit: cover; width: 100%; }
.mentor-card .role { color: var(--muted); font-size: .92rem; }
.mentor-stats {
  display: flex; justify-content: center; gap: 18px; margin-top: 10px;
  font-size: .88rem; color: var(--muted);
}

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: var(--heading); font-weight: 800; font-size: 2.6rem; color: var(--dark); }
.stat-label { color: var(--muted); }

/* ---------- Logos row ("Where our graduates go") ---------- */
.logo-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
}
.logo-row span {
  font-family: var(--heading); font-weight: 800; font-size: 1.2rem;
  color: var(--muted); background: var(--white); border: 1px solid var(--border);
  padding: 14px 28px; border-radius: var(--radius-sm);
}

/* ============================================================
   COURSE DETAILS
   ============================================================ */
.course-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.course-hero-img { border-radius: var(--radius); width: 100%; object-fit: cover; }

.sidebar-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 28px; position: sticky; top: 100px;
}
.sidebar-card .big-price { font-family: var(--heading); font-weight: 800; font-size: 2.2rem; }
.sidebar-card ul { margin: 18px 0; }
.sidebar-card ul li {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px dashed var(--border); font-size: .95rem;
}
.sidebar-card ul li span:first-child { color: var(--muted); }

.checklist li {
  position: relative; padding: 6px 0 6px 34px;
}
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--yellow);
  color: var(--dark); font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}

/* Accordion (curriculum + FAQ) */
.accordion { display: grid; gap: 14px; }
.acc-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.acc-header {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 18px 22px; font-family: var(--heading);
  font-weight: 700; font-size: 1.05rem; color: var(--dark); text-align: left;
}
.acc-header .acc-icon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--dark); display: flex; align-items: center;
  justify-content: center; font-size: 1rem; transition: transform .2s;
}
.acc-item.open .acc-icon { transform: rotate(45deg); background: var(--yellow); }
.acc-panel { display: none; padding: 0 22px 20px; }
.acc-item.open .acc-panel { display: block; }
.lesson-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-top: 1px dashed var(--border); font-size: .95rem;
}
.lesson-row .len { color: var(--muted); white-space: nowrap; }

/* Progress bars */
.progress { background: var(--soft); border-radius: 999px; height: 10px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--yellow); border-radius: 999px; }

/* Countdown / sale banner */
.sale-banner {
  background: var(--yellow); border-radius: var(--radius); padding: 26px 30px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.countdown { display: flex; gap: 12px; }
.countdown .cd-box {
  background: var(--dark); color: var(--yellow); border-radius: var(--radius-sm);
  min-width: 64px; padding: 10px 8px; text-align: center;
}
.countdown .cd-num { font-family: var(--heading); font-weight: 800; font-size: 1.5rem; display: block; }
.countdown .cd-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }

/* Carousel ("Students Also Bought") */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 320px; scroll-snap-align: start; }
.carousel-nav { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 20px; }
.carousel-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--dark);
  font-size: 1.1rem; color: var(--dark); background: var(--white);
  transition: background .15s;
}
.carousel-btn:hover { background: var(--yellow); }

/* ============================================================
   PRICING
   ============================================================ */
.toggle-wrap { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 44px; font-weight: 700; }
.switch {
  position: relative; width: 62px; height: 32px; border-radius: 999px;
  background: var(--dark); transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--yellow); transition: transform .2s;
}
.switch[aria-checked="true"]::after { transform: translateX(30px); }
.save-note { background: var(--lime); border-radius: 999px; padding: 3px 12px; font-size: .8rem; }

.price-card {
  background: var(--white); border-radius: 20px; padding: 38px 32px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative;
}
.price-card--featured { background: var(--yellow); box-shadow: var(--shadow-lg); transform: scale(1.03); }
.price-card .plan-name { font-family: var(--heading); font-weight: 800; font-size: 1.3rem; }
.price-card .plan-price { font-family: var(--heading); font-weight: 800; font-size: 2.8rem; margin: 12px 0 2px; }
.price-card .plan-price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card--featured .plan-price small { color: var(--body); }
.price-card ul { margin: 22px 0 28px; display: grid; gap: 10px; font-size: .96rem; }
.price-card .ribbon {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: var(--lime); font-family: var(--heading);
  font-weight: 700; font-size: .78rem; letter-spacing: .06em;
  padding: 6px 18px; border-radius: 999px; white-space: nowrap;
}
.price-card .btn { margin-top: auto; }

.notice {
  background: var(--cream); border: 1.5px dashed var(--dark);
  border-radius: var(--radius); padding: 22px 26px; margin-top: 40px;
}

/* ============================================================
   ALGORITHMS FREE COURSE (interactive)
   ============================================================ */
.algo-hero { background: var(--dark); color: var(--white); padding: 80px 0; }
.algo-hero h1 { color: var(--white); }
.algo-hero .accent { color: var(--lime); }
.algo-hero p.lead { color: var(--muted-on-dark); margin: 18px 0 26px; max-width: 620px; }

.lesson-block {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px; margin-bottom: 30px;
}
.lesson-block h2 { font-size: 1.6rem; margin-bottom: 14px; }
.lesson-block .lesson-tag { margin-bottom: 12px; }

.demo-box {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 24px; margin-top: 20px;
}
.demo-box .demo-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

/* Sorting visualizer bars */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.bars .bar {
  flex: 1; background: var(--yellow); border-radius: 8px 8px 0 0;
  display: flex; align-items: flex-end; justify-content: center;
  font-weight: 700; color: var(--dark); padding-bottom: 6px;
  transition: height .3s ease, background .2s ease;
}
.bars .bar.compare { background: var(--lime); }
.bars .bar.sorted { background: var(--dark); color: var(--yellow); }

/* Guess / search demo */
.range-track { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.range-track span {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 10px;
  font-weight: 700; font-size: .85rem;
}
.range-track span.cut { opacity: .25; text-decoration: line-through; }
.range-track span.mid { background: var(--yellow); border-color: var(--dark); }
.range-track span.found { background: var(--dark); color: var(--lime); border-color: var(--dark); }

/* Quiz */
.quiz-option {
  display: block; width: 100%; text-align: left; padding: 13px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); margin-bottom: 10px; font-size: 1rem;
  transition: border-color .15s, background .15s;
}
.quiz-option:hover { border-color: var(--dark); }
.quiz-option.correct { background: #e7f8ec; border-color: #0a7a2f; }
.quiz-option.wrong { background: #fdeaea; border-color: #b3261e; }
.quiz-feedback { font-weight: 700; margin-top: 8px; min-height: 1.5em; }

/* Flowchart */
.flowchart { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; }
.flow-node {
  padding: 12px 26px; border: 2px solid var(--dark); font-weight: 700;
  background: var(--white); text-align: center;
}
.flow-node--start { border-radius: 999px; background: var(--yellow); }
.flow-node--decision { transform: none; border-radius: var(--radius-sm); background: var(--lime); }
.flow-arrow { font-size: 1.3rem; line-height: 1; }

/* ============================================================
   ABOUT / EVENTS / BLOG / CONTACT / AUTH / FAQ
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; object-fit: cover; }

.value-card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.value-card .v-emoji { font-size: 2rem; margin-bottom: 10px; display: block; }

.event-date {
  position: absolute; top: 14px; left: 14px; background: var(--yellow);
  border-radius: var(--radius-sm); text-align: center; padding: 8px 14px;
  font-family: var(--heading); font-weight: 800; line-height: 1.2;
}
.event-date small { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; }

.article-body { max-width: 760px; margin: 0 auto; }
.article-body img { border-radius: var(--radius); margin: 28px 0; }
.article-body h2 { font-size: 1.6rem; margin: 34px 0 14px; }
.article-body p { margin-bottom: 18px; }
.article-body blockquote {
  border-left: 5px solid var(--yellow); background: var(--cream);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 26px; margin: 26px 0; font-style: italic;
}
.author-row { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.author-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin: 0; }

/* Forms */
.form-card {
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 40px; max-width: 520px; margin: 0 auto;
}
.form-grid { display: grid; gap: 18px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-family: var(--heading); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 13px 18px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--cream);
  transition: border-color .15s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--dark); }
.form-note { font-size: .88rem; color: var(--muted); }
.form-success { color: #0a7a2f; font-weight: 700; }

.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-side { background: var(--yellow); padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.auth-form { background: var(--white); padding: 48px; }

/* ============================================================
   TESTIMONIALS (yellow image accents)
   ============================================================ */
.testi-card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px;
}
.section--soft .testi-card { box-shadow: none; border: 1px solid var(--border); }
.testi-quote { font-size: 1.02rem; }
.testi-quote::before { content: "“"; display: block; font-family: var(--heading); font-weight: 800; font-size: 3rem; line-height: .6; color: var(--yellow); margin-bottom: 12px; }
.testi-author { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.testi-avatar {
  background: var(--yellow); border-radius: var(--radius); padding: 5px; flex: 0 0 auto;
}
.testi-avatar img { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; }
.testi-author strong { font-family: var(--heading); font-weight: 700; }
.testi-author small { color: var(--muted); display: block; }

/* ============================================================
   404
   ============================================================ */
.error-page { text-align: center; padding: 90px 0; }
.error-code {
  font-family: var(--heading); font-weight: 800; font-size: clamp(6rem, 18vw, 11rem);
  line-height: 1; color: transparent; -webkit-text-stroke: 3px var(--dark);
}
.error-page img { max-width: 380px; margin: 10px auto 20px; }

/* ============================================================
   NEWSLETTER + FOOTER
   ============================================================ */
.newsletter { background: var(--yellow); padding: 64px 0; }
.newsletter-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
}
.newsletter form {
  display: flex; background: var(--white); border-radius: 999px; padding: 6px;
  min-width: min(460px, 100%);
}
.newsletter input {
  flex: 1; border: none; background: none; padding: 12px 22px; min-width: 0;
}
.newsletter input:focus { outline: none; }

.site-footer { background: var(--dark); color: var(--muted-on-dark); padding: 70px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 36px;
  padding-bottom: 50px;
}
.site-footer h4 { color: var(--white); margin-bottom: 18px; font-size: 1.05rem; }
.site-footer .logo { color: var(--white); margin-bottom: 14px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--yellow); }
.footer-post { display: flex; gap: 12px; margin-bottom: 16px; }
.footer-post img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.footer-post a { font-weight: 500; color: var(--muted-on-dark-2); font-size: .92rem; line-height: 1.4; }
.footer-post a:hover { color: var(--yellow); }
.footer-post small { color: var(--muted-on-dark); }
.footer-bottom {
  border-top: 1px solid #3a3826; padding: 20px 0; display: flex;
  flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .9rem;
}
.footer-bottom a:hover { color: var(--yellow); }

/* ============================================================
   COURSE DETAILS — Collab V.1 layout extras
   ============================================================ */
.banner-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.banner-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0 22px; font-weight: 500; }
.banner-price { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.banner-price del { color: rgba(31,29,13,.55); font-size: 1.1rem; }
.banner-price .sale-price { font-family: var(--heading); font-weight: 800; font-size: 2rem; }
.banner-figure img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

.info-card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); height: 100%;
}
.info-card .i-emoji { font-size: 2rem; display: block; margin-bottom: 12px; }
.info-card ul li {
  position: relative; padding: 5px 0 5px 20px; font-size: .95rem; color: var(--muted);
}
.info-card ul li::before {
  content: "▪"; position: absolute; left: 0; color: var(--yellow); font-size: 1.1rem;
}

.content-grid { display: grid; grid-template-columns: 380px 1fr; gap: 44px; align-items: start; }
.video-wrap { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.video-wrap img { width: 100%; object-fit: cover; }
.play-btn {
  position: absolute; inset: 0; margin: auto; width: 78px; height: 78px;
  border-radius: 50%; background: var(--yellow); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: var(--shadow-lg); transition: transform .15s;
}
.play-btn:hover { transform: scale(1.08); }

.completed-progress { font-weight: 700; margin-bottom: 12px; }
.completed-progress span { background: var(--yellow); border-radius: 999px; padding: 2px 12px; margin-right: 6px; }
.lesson-check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--border); }
.lesson-check input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 4px; accent-color: var(--dark); flex: 0 0 auto;
}
.lesson-check label { cursor: pointer; }

.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.counters .stat-num { font-size: 2.2rem; }

.deal-flex { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin: 24px 0; }
.discount-value {
  width: 110px; height: 110px; border-radius: 50%; background: var(--dark);
  color: var(--yellow); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-family: var(--heading);
  flex: 0 0 auto;
}
.discount-value strong { font-size: 1.8rem; font-weight: 800; }

@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .banner-grid { grid-template-columns: 1fr; }
  .counters { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .course-layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .section { padding: 56px 0; }
  .hero-inner, .split, .free-banner, .auth-wrap, .newsletter-inner { grid-template-columns: 1fr; }
  .hero-figure { order: 2; }
  .card--list { flex-direction: column; }
  .card--list .card-media { flex: auto; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 16px; gap: 4px; box-shadow: var(--shadow-lg);
    display: none; max-height: calc(100vh - 78px); overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-link { width: 100%; justify-content: space-between; border-radius: var(--radius-sm); }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; display: none; padding-left: 18px;
  }
  .nav-item.open > .dropdown { display: block; }
  .nav-actions .btn--outline { display: none; }
}

@media (max-width: 560px) {
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-side { padding: 32px; }
  .auth-form { padding: 32px; }
  .form-card { padding: 28px; }
  .free-banner { padding: 32px; }
  .btn--lg { padding: 15px 30px; font-size: 1rem; }
  .hero-search { flex-direction: column; border-radius: 20px; gap: 6px; }
  .hero-search .btn { width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
