/* ==========================================================================
   REKO STUDY – HOME PAGE STYLES
   ========================================================================== */

/* ======= RESET & BASE ======= */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #222;
}

.fake-3d-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: 2.5rem;
  text-align: center;
  color: #1e40af;  /* Base blue */
  text-shadow:
    1px 1px 0 #1a368f,  /* slightly darker blue */
    2px 2px 0 #162e73,  /* deeper navy */
    3px 3px 0 #12265c,  /* very dark navy */
    4px 4px 0 #0d1d45;  /* almost black-blue */
  margin-bottom: 1.5rem;
  letter-spacing: 4px;
}
/* ======= HERO SECTION ======= */
/* Make the <img> behave like a cover background */



.hero{
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: clip;
  /* must match the inline critical CSS to avoid a late size change */
  block-size: clamp(360px, 56svh, 620px);
}

/* Decorative, image-free background (dark chalkboard vibe) */
.hero--noimg{
  background:
    radial-gradient(1200px 600px at 50% 0%,
      rgba(255,255,255,.06) 0%,
      rgba(255,255,255,.02) 35%,
      rgba(255,255,255,0) 70%) ,
    radial-gradient(800px 500px at 80% 85%,
      rgba(255,255,255,.05) 0%,
      rgba(255,255,255,0) 70%),
    linear-gradient(#0b1220, #0b1220);     /* base */
}


.hero-overlay{
  position: relative; z-index: 1;
  width: 100%;
  padding-inline: 1rem;
}

.hero-panel{
  max-width: 900px;
  margin: 0 auto;
  color: #fff; text-align: center;
  background:
    linear-gradient( to bottom right,
      rgba(11,18,32,.66), rgba(11,18,32,.35) );
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
  border-radius: 20px;
  padding: clamp(1rem, 2.5vw, 2rem);
}


.hero-title{
  font-size: clamp(2rem, 1.4rem + 3vw, 4rem);
  line-height: 1.05;
  margin: 0 0 .5rem 0;
  letter-spacing: .5px;
  text-shadow: 0 3px 14px rgba(0,0,0,.45);
}


.hero-lead{
  font-size: clamp(1.05rem, .95rem + .6vw, 1.4rem);
  color: #e7edf7;
  margin: .25rem 0 .35rem 0;
}
.hero-sub{
  font-size: clamp(1rem, .9rem + .45vw, 1.2rem);
  color: #d7deeb;
  margin: 0 0 1rem 0;
}

.hero-cta{
  display: flex; justify-content: center;
  gap: .75rem; flex-wrap: wrap;
}

/* CTA button (home-scoped) */
.hero-cta .btn{
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 1.1rem; border-radius: 999px;
  font-weight: 800; letter-spacing: .2px; text-decoration: none;
  transition: transform .08s ease, box-shadow .2s ease, background-color .2s ease;
}
.hero-cta .btn:active{ transform: translateY(1px); }

.hero-cta .btn-primary{
  background: #ffd24d; color: #1b2337;
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.hero-cta .btn-primary:hover{ filter: brightness(0.95); }
/* First-viewport sections should be rendered normally */
.hero,
.section-soft-blue.intro-video,
#exam-boards{
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

/* Dark mode polish */
.dark-mode .hero--noimg{
  background:
    radial-gradient(1200px 600px at 50% 0%,
      rgba(255,255,255,.08) 0%,
      rgba(255,255,255,.03) 35%,
      rgba(255,255,255,0) 70%),
    radial-gradient(800px 500px at 80% 85%,
      rgba(255,255,255,.06) 0%,
      rgba(255,255,255,0) 70%),
    linear-gradient(#0b1220, #0b1220);
}

@media (prefers-reduced-motion: reduce){
  .hero-cta .btn{ transition: none; }
}

html.dark-mode .hero-text .button:hover {
  background-color: #1d4ed8; /* slightly darker blue */
}

.animated-headline {
  animation: fadeInUp 1.2s ease-in-out;
}

@keyframes fadeInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ======= POPULAR QUIZZES ======= */

/* Back-to-top button */
#backToTop{
  position: fixed;
  right: clamp(12px, 2.4vw, 20px);
  bottom: clamp(12px, 2.4vw, 20px);
  display: none;                 /* JS toggles this */
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9999px;
  background: #1e40af;           /* brand blue */
  color: #fff;
  font-size: 20px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(2,6,23,.18);
  z-index: 9999;                 /* sit above overlays/ads */
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
#backToTop:hover{ transform: translateY(-2px); box-shadow: 0 14px 26px rgba(2,6,23,.26); }
#backToTop:active{ transform: translateY(0); box-shadow: 0 8px 16px rgba(2,6,23,.22); }
#backToTop:focus-visible{ outline: 3px solid #93c5fd; outline-offset: 2px; }



/* Dark mode */
html.dark-mode #backToTop{
  background: #60a5fa;
  color: #0b1220;
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
}

.btn.primary {
  background-color: #1e40af;
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn.primary:hover {
  background-color: #326d88;
  transform: translateY(-2px);
}

/* ======= VIDEO SECTION (Intro or Preview) ======= */
.video-preview,
.intro-video {
  background-color: #eaf2ff;
  padding: 2rem 1rem;
  text-align: center;
}

.video-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.video-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
  width: 100%;
  height: auto;
  display: block;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video-overlay p {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

#introVideo { max-width: 800px; margin: 0 auto; position: relative; }
#introVideo .video-poster { all: unset; display:block; position:relative; cursor:pointer; }
#introVideo .video-poster img { width:100%; height:auto; display:block; border-radius:12px; box-shadow:0 4px 10px rgba(0,0,0,.1); }
#introVideo .play {
  position:absolute; inset:auto auto 16px 16px;
  display:inline-grid; place-items:center;
  width:56px; height:56px; border-radius:50%;
  background:#1e40af; color:#fff; font-weight:900;
  box-shadow:0 6px 16px rgba(2,6,23,.25);
}

/* light, safe defaults for virtualization */
.section-light, .section-soft-blue, .section-gray, .cta, #exam-boards, #tutoring-steps, #benefits, .blog-section, .faq {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}


.btn.disabled {
  background-color: #aaa;
  cursor: not-allowed;
  pointer-events: none;
}

/* put this below the .section-soft-blue rule */
.section-soft-blue.intro-video {
  background-color: #eaf2ff;   /* or #0f172a for dark */
  color: #0f172a;              /* set to #fff if you choose dark */
}


/* Floating Element */
.floating-cube {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  opacity: 0.85;
  animation: float 4s ease-in-out infinite;
  z-index: 5;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}


/* Flip card container */
.flip-card {
  perspective: 1000px;
  height: 140px;
}

/* Inner */
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s ease;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(17,24,39,.08);
}

/* Flip on hover/focus */
.flip-card:hover .flip-inner,
.flip-card:focus-within .flip-inner {
  transform: rotateY(180deg);
}

/* Faces */
.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-weight: 700;
}

/* Front look (brand teal you use) */
.flip-front {
  background: #1e40af;
  color: #fff;
  letter-spacing: 2px;
}

/* Back look */
.flip-back {
  display: flex;
  transform: rotateY(180deg);
   align-items: center;
  background: #facc15;
  border: 2px solid #d4e8f0;
  gap: .6rem;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 1.25rem;
}

/* Buttons on back */
.tbtn {
  display: inline-block;
  padding: .5rem .9rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  background: #1e40af;   /* header blue */
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.tbtn:hover { transform: translateY(-2px); }

.tbtn.ghost {
  background: #facc15;   /* friendly yellow */
  color: #0f172a;        /* dark navy text */
}

.topic-links {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 260px;           /* tweak if you want wider */
  text-align: center;
}

.topic-links li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(15,23,42,.12);
}
.topic-links li:last-child { border-bottom: 0; }

/* “Hero button text” colour */
.topic-links a {
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.3;
}
.topic-links a:hover,
.topic-links a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Responsive sizing */
@media (max-width: 640px) {
  .flip-card { height: 120px; }
  .flip-back { gap: .4rem; }
  .tbtn { padding: .45rem .7rem; font-size: .9rem; }
}

/* Grid layout for the topics */
.topics-grid {
  display: grid;
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto 0;
  grid-template-columns: repeat(1, minmax(0, 1fr));   /* mobile: 1 col */
}

/* Mobile horizontal gutters for the Topics section */
@media (max-width: 640px) {
  /* Add padding to the section and the grid (belt + braces) */
  .section-light.categories,
  .categories,
  .topics-grid {
    box-sizing: border-box;
    padding-inline: 16px !important;   /* left & right */
  }

  /* Keep spacing tidy */
  .topics-grid { gap: 1.25rem; }

  /* Ensure cards don't cling to the edges even if padding is stripped */
  .topics-grid > .flip-card {
    width: 100%;
    margin-inline: 0;                  /* reset any weird margins */
  }
}


@media (min-width: 1024px) { /* ≥ lg */
  .topics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Ensure each card fits its grid cell */
.topics-grid .flip-card {
  width: 100%;
  height: 160px;    /* tweak as you like */
}

.topics-grid .flip-back {
  display: flex;
  flex-direction: column;     /* was row */
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

/* Safari/backface fix */
.flip-front, .flip-back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Center each line; no flex needed on li */
.topics-grid .flip-back .topic-links {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 260px;
  text-align: center;         /* centers inline content */
}

.topics-grid .flip-back .topic-links li {
  display: block;             /* was flex */
  padding: .55rem 0;
  border-bottom: 1px solid rgba(15,23,42,.12);
}
.topics-grid .flip-back .topic-links li:last-child { border-bottom: 0; }

.topics-grid .flip-back .topic-links a {
  color: #0f172a;             /* hero button text colour */
  font-weight: 800;
  text-decoration: none;
  line-height: 1.25;
}
.topics-grid .flip-back .topic-links a:hover,
.topics-grid .flip-back .topic-links a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Give the card enough height for 4 centered lines */
.topics-grid .flip-card { height: 230px; }
@media (min-width: 1024px) { .topics-grid .flip-card { height: 240px; } }

/* LIGHT — Topics */
/* Token defaults scoped to the Topics section */
#topics {
  --card-front: #1e40af;          /* blue-800 */
  --card-front-text: #ffffff;
  --card-back: #facc15;           /* yellow */
  --card-back-divider: rgba(15,23,42,.12);
}

#topics .flip-front {
  font-size: clamp(1.05rem, 0.5rem + 1.2vw, 1.5rem);
  line-height: 1.25;
}

/* Less-white, branded background for Topics */
.section-light.categories {
  --top: #dbeafe;                 /* soft blue (not white) */
  --bottom: #c7d2fe;              /* soft indigo */
  --vignette: rgba(30, 64, 175, .10);  /* subtle blue glow */
  padding-top: 5rem;
  padding-bottom: 5rem;

  background:
    radial-gradient(900px 220px at 50% -80px, var(--vignette), transparent 70%),
    linear-gradient(180deg, var(--top) 0%, var(--bottom) 100%);
}

/* LIGHT — Topics */
#topics {
  --top: #dbeafe;                        /* soft blue */
  --bottom: #c7d2fe;                     /* soft indigo */
  --vignette: rgba(30, 64, 175, .12);    /* subtle blue glow */
  padding-top: 5rem;
  padding-bottom: 5rem;
  background:
    radial-gradient(900px 220px at 50% -80px, var(--vignette), transparent 70%),
    linear-gradient(180deg, var(--top) 0%, var(--bottom) 100%) !important;
  background-color: var(--bottom) !important; /* fallback */
}

/* DARK — match common theme toggles & force override */
body.dark-mode #topics,
html.dark-mode #topics,
.dark #topics,
[data-theme="dark"] #topics {
  --top: #0b1220;
  --bottom: #0f172a;
  --vignette: rgba(250, 204, 21, .08);
  background:
    radial-gradient(900px 220px at 50% -80px, var(--vignette), transparent 70%),
    linear-gradient(180deg, var(--top) 0%, var(--bottom) 100%) !important;
  background-color: var(--bottom) !important;
}

/* Optional: also respect OS dark mode */
@media (prefers-color-scheme: dark) {
  #topics {
    --top: #0b1220;
    --bottom: #0f172a;
    --vignette: rgba(250, 204, 21, .08);
    background:
      radial-gradient(900px 220px at 50% -80px, var(--vignette), transparent 70%),
      linear-gradient(180deg, var(--top) 0%, var(--bottom) 100%) !important;
    background-color: var(--bottom) !important;
  }
}

/* Exam boards badges */
.exam-subtext {
  margin: 0 auto 0.75rem;
  text-align: center;
  color: #374151;
  max-width: 720px;
}

.board-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 0 auto 1.25rem;
  padding: 0;
  list-style: none;
  max-width: 900px;
}

.badge {
  cursor: default;               /* not a link */
  user-select: text;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 9999px;         /* pill */
  font-weight: 700;
  letter-spacing: .2px;
  background: #ffffff;
  color: #0f172a;
  border: 2px solid rgba(30,64,175, .15); /* subtle tie-in to brand blue */
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.badge:active { transform: scale(.98); }

/* Accent rings per board (kept tasteful) */
.badge-edexcel { border-color: rgba(14,165,233,.35); } /* sky-ish blue */
.badge-aqa     { border-color: rgba(239,68,68,.35); }  /* red accent */
.badge-ocr     { border-color: rgba(124,58,237,.35); } /* violet accent */

/* CTA wrap */
.exam-cta-wrap { text-align: center; margin-top: .5rem; }

/* Dark mode */
html.dark-mode .exam-subtext { color: #cbd5e1; }

html.dark-mode .badge {
  background: #1f2937;
  color: #e5e7eb;
  border-color: rgba(148,163,184,.35);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* Keep the board accents readable on dark */
html.dark-mode .badge-edexcel { border-color: rgba(56,189,248,.45); }
html.dark-mode .badge-aqa     { border-color: rgba(248,113,113,.45); }
html.dark-mode .badge-ocr     { border-color: rgba(167,139,250,.45); }

/* Boards card container */
#exam-boards { padding: 3rem 1rem; } /* section breathing room */

#exam-boards .boards-card {
  background: #ffffff;
  border-radius: 18px;
  padding: clamp(16px, 3vw, 32px);
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  border: 1px solid rgba(30,64,175,.12); /* subtle brand ring */
}

/* Tighter spacing inside the card */
#exam-boards .exam-subtext { margin-bottom: .75rem; }
#exam-boards .board-badges { margin-bottom: 1.25rem; }

/* Dark mode */
html.dark-mode #exam-boards .boards-card {
  background: #111827;                 /* gray-900 */
  border: 1px solid #374151;           /* gray-700 */
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
}

/* Optional: faint top glow to tie in brand */
#exam-boards .boards-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 16px;
  border-radius: 18px 18px 0 0;
  background: radial-gradient(60% 120% at 50% -40%, rgba(30,64,175,.12), transparent 60%);
  pointer-events: none;
}
#exam-boards .boards-card { position: relative; } /* needed for ::before */


/* Boards card: soft lemon */
#exam-boards .boards-card {
  background: #fff7cc;                /* pale yellow */
  border: 1px solid #fde68a;
}
html.dark-mode #exam-boards .boards-card {
  background: #1f2937;                /* dark gray panel */
  border-color: #374151;
}

/* CTA in the Exam Boards card */
#exam-boards .exam-cta-wrap { text-align: center; }

#exam-boards .cta-btn {
  /* layout */
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 1.4rem;
  border-radius: 9999px;

  /* type */
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;

  /* colour (brand yellow, dark navy text) */
  background: linear-gradient(180deg, #facc15, #eab308);
  color: #0f172a;

  /* affordance */
  border: 0;
  box-shadow:
    0 10px 22px rgba(0,0,0,.12),
    0 0 0 1px rgba(15,23,42,.08) inset;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

/* arrow nudge on hover */
#exam-boards .cta-btn::after {
  content: "→";
  font-weight: 900;
  transition: transform .2s ease;
}
#exam-boards .cta-btn:hover { transform: translateY(-2px); filter: brightness(1.02); }
#exam-boards .cta-btn:hover::after { transform: translateX(3px); }
#exam-boards .cta-btn:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(0,0,0,.14); }

/* clear, accessible focus */
#exam-boards .cta-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #fef08a,                 /* soft yellow */
    0 0 0 6px rgba(30, 64, 175, .35),   /* brand blue ring */
    0 10px 22px rgba(0,0,0,.12),
    0 0 0 1px rgba(15,23,42,.08) inset;
}

/* Dark mode — softer amber CTA */
html.dark-mode #exam-boards .cta-btn {
  background: linear-gradient(180deg, #d8ad0a, #b98f06); /* deeper, less bright */
  color: #0b1220;                                        /* navy text, easier on eyes */
  box-shadow:
    0 10px 24px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.05) inset;
  filter: saturate(.9) brightness(.96);
}
html.dark-mode #exam-boards .cta-btn:hover {
  filter: saturate(.98) brightness(1.02);
  transform: translateY(-1px);
}
html.dark-mode #exam-boards .cta-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0,0,0,.34);
}

/* more subdued focus ring in dark */
html.dark-mode #exam-boards .cta-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #e9c94f,                 /* dim amber */
    0 0 0 6px rgba(147,197,253,.22),   /* soft blue ring */
    0 10px 24px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.05) inset;
}

/* ===== Tutoring Steps ===== */
#tutoring-steps { padding: 3rem 1rem; }
#tutoring-steps .tutoring-text {
  text-align: center; max-width: 720px; margin: 0.25rem auto 1.5rem;
  color: #374151;
}

/* Card-like panel look for the section (soft brand tint) */
#tutoring-steps {
  --panel-top: #f0f7ff;
  --panel-bottom: #e9f2ff;
  background:
    radial-gradient(900px 220px at 50% -80px, rgba(30,64,175,.08), transparent 70%),
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
}

/* Steps grid */
.steps-grid {
  list-style: none; padding: 0; margin: 0 auto 1.25rem;
  display: grid; gap: 1.25rem; max-width: 1000px;
  grid-template-columns: repeat(1, minmax(0,1fr));
}
@media (min-width: 640px){ .steps-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px){ .steps-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* Step card */
.step-card {
  background: #ffffff;
  border: 2px solid #d4e8f0;
  border-radius: 14px;
  padding: 1.1rem 1rem 1.1rem 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
  text-align: left;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
}
.step-card h3 {
  margin: .35rem 0 .3rem; font-size: 1.1rem; color: #1e40af;
}
.step-card p {
  margin: 0; color: #444; font-size: .98rem; line-height: 1.35;
}

/* Step number pill */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9999px;
  background: #facc15; color: #0f172a; font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,.08); margin-bottom: .25rem;
}

/* Benefits strip */
.tutor-benefits {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem .75rem; list-style: none; padding: 0; margin: .5rem auto 1.25rem;
}
.tutor-benefits li {
  background: #fff; color: #0f172a; border: 1px solid rgba(30,64,175,.12);
  border-radius: 9999px; padding: .45rem .8rem; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

/* Dark mode */
html.dark-mode #tutoring-steps {
  --panel-top: #0f172a;
  --panel-bottom: #111827;
  background:
    radial-gradient(900px 220px at 50% -80px, rgba(250,204,21,.06), transparent 70%),
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
}
html.dark-mode #tutoring-steps .tutoring-text { color: #cbd5e1; }

html.dark-mode .step-card {
  background: #1f2937; border-color: #374151; color: #e5e7eb;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
html.dark-mode .step-card h3 { color: #93c5fd; }
html.dark-mode .step-card p  { color: #cbd5e1; }
html.dark-mode .step-num     { background: #d8ad0a; color: #0b1220; }

html.dark-mode .tutor-benefits li {
  background: #1f2937; color: #e5e7eb; border-color: #374151;
  box-shadow: 0 6px 14px rgba(0,0,0,.3);
}

/* CTA reuse from earlier */
#tutoring-steps .exam-cta-wrap { text-align: center; }

/* Tutoring CTA (scoped) */
#tutoring-steps .exam-cta-wrap { text-align: center; margin-top: .5rem; }

#tutoring-steps .cta-btn{
  /* layout */
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  padding:.95rem 1.6rem; border-radius:9999px; text-decoration:none;

  /* type */
  font-weight:800; letter-spacing:.2px;

  /* colour (brand blue primary) */
  background:linear-gradient(180deg,#2563eb,#1e40af);
  color:#ffffff;

  /* affordance */
  border:0;
  box-shadow:0 12px 24px rgba(0,0,0,.14), 0 0 0 1px rgba(255,255,255,.06) inset;
  transition:transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

/* arrow nudge */
#tutoring-steps .cta-btn::after{
  content:"→"; font-weight:900; transition:transform .2s ease;
}

#tutoring-steps .cta-btn:hover{
  transform:translateY(-2px);
  filter:brightness(1.03);
  box-shadow:0 16px 28px rgba(0,0,0,.16), 0 0 0 1px rgba(255,255,255,.06) inset;
}
#tutoring-steps .cta-btn:hover::after{ transform:translateX(3px); }

#tutoring-steps .cta-btn:active{ transform:translateY(0); box-shadow:0 10px 18px rgba(0,0,0,.18); }

#tutoring-steps .cta-btn:focus-visible{
  outline:none;
  box-shadow:
    0 0 0 3px rgba(147,197,253,.65),   /* soft blue */
    0 0 0 6px rgba(30,64,175,.35),     /* brand ring */
    0 12px 24px rgba(0,0,0,.14);
}

/* Dark mode (slightly deeper, not glary) */
html.dark-mode #tutoring-steps .cta-btn{
  background:linear-gradient(180deg,#1e3a8a,#1e40af);
  color:#fff;
  box-shadow:0 14px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06) inset;
}
html.dark-mode #tutoring-steps .cta-btn:focus-visible{
  box-shadow:
    0 0 0 3px rgba(147,197,253,.35),
    0 0 0 6px rgba(30,64,175,.45),
    0 14px 30px rgba(0,0,0,.35);
}

/* Full-width on mobiles */
@media (max-width:640px){
  #tutoring-steps .cta-btn{ width:100%; }
}


/* ======= BLOG SECTION ======= */
/* ---- Blog: featured cards (anchor-as-card) ---- */
.blog-section .blog-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 2.5vw, 22px);
  margin-inline: clamp(8px, 3vw, 24px);
}

.blog-section a.blog-card{
  display:flex; flex-direction:column;
  text-decoration:none; color:inherit;
  overflow:hidden; border-radius:18px;
  background: #fff;
  border:1px solid rgba(59,130,246,.12);
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}

.blog-section a.blog-card:hover{
  transform: translateY(-3px);
  border-color: #3b82f6;
  filter: saturate(1.03);
}

/* Critical to show and crop images consistently */
.blog-section .blog-thumb{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio: 16 / 9;   /* locks ratio */
  object-fit: cover;
  background:#eaf2ff;     /* gentle fallback bg while loading */
  border-bottom:1px solid rgba(59,130,246,.10);
}


.blog-section .blog-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 2.5vw, 22px);
  margin-inline: clamp(8px, 3vw, 24px);
}



.blog-section .blog-thumb{
  width:100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display:block;
  border-bottom:1px solid color-mix(in oklab, var(--brand, #3b82f6) 10%, transparent);
}

.blog-section a.blog-card h3{
  margin:.8rem .95rem 0;
  font-weight:900;
  letter-spacing:.2px;
}

.blog-section a.blog-card p{
  margin:.45rem .95rem .9rem;
  color: var(--text-dim, #64748b);
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden;
}

.blog-section a.blog-card .read-more{
  margin:0 .95rem 1rem;
  font-weight:800;
  color: color-mix(in oklab, var(--brand, #3b82f6) 85%, #111 15%);
}

/* dark mode polish */
html.dark-mode .blog-section a.blog-card {
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #1e293b 96%, black 4%),   /* dark panel */
    color-mix(in oklab, #111827 96%, black 4%)    /* darker base */
  );
  border: 1px solid color-mix(in oklab, var(--brand, #3b82f6) 25%, transparent);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
  color: #e5e7eb; /* default text */
}

html.dark-mode .blog-section a.blog-card h3 {
  color: #f9fafb; /* bright headings */
}

html.dark-mode .blog-section a.blog-card p {
  color: #cbd5e1; /* softer paragraph text */
}

html.dark-mode .blog-section a.blog-card .read-more {
  color: color-mix(in oklab, var(--brand, #3b82f6) 85%, #f9fafb 15%);
}

html.dark-mode .blog-section .blog-thumb {
  border-bottom: 1px solid color-mix(in oklab, var(--brand, #3b82f6) 25%, transparent);
  filter: brightness(0.85) contrast(1.1);
}

/* ===========================
   Super-cool CTA (no HTML changes)
   =========================== */

.cta{
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(2.2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  text-align: center;
  max-width: 1100px;
  margin: 3rem auto;
  /* layered, brandy background */
  --cta-top: #dbeafe;         /* soft blue */
  --cta-bot: #c7d2fe;         /* soft indigo */
  --cta-glow: rgba(30,64,175,.12);
  background:
    radial-gradient(900px 240px at 50% -120px, var(--cta-glow), transparent 70%),
    linear-gradient(180deg, var(--cta-top), var(--cta-bot));
  box-shadow: 0 20px 40px rgba(2,6,23,.12);
}

/* subtle animated sheen */
.cta::before{
  content:"";
  position:absolute; inset:-40%;
  background: conic-gradient(from 0deg at 50% 50%,
              transparent 0 25%, rgba(255,255,255,.18) 25% 35%,
              transparent 35% 100%);
  animation: cta-drift 16s linear infinite;
  pointer-events:none;
  mix-blend-mode: overlay;
}
@keyframes cta-drift{ to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .cta::before{ animation:none; } }

@font-face{
  font-family: "Luckiest Guy Fallback";
  src: local("Arial");
  ascent-override: 88%;
  descent-override: 20%;
  line-gap-override: 0%;
  size-adjust: 112%;
}
.luckiest{
  font-family: "Luckiest Guy","Luckiest Guy Fallback",system-ui,Arial,sans-serif;
}

/* Heading */
.cta h2{
  margin: 0 0 1rem;
  font-family: 'Luckiest Guy', cursive;
  letter-spacing: 1.5px;
  font-size: clamp(1.6rem, 4.8vw, 2.4rem);
  color: #0f172a;
  text-shadow: 1px 1px 0 #1a368f, 2px 2px 0 #162e73;
}

/* Button */
.cta .cta-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.5rem;
  margin-top: .6rem;
  padding: clamp(.9rem, 2.2vw, 1.1rem) clamp(1.2rem, 3.2vw, 1.8rem);
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: .8px;
  text-decoration: none;
  background: linear-gradient(180deg, #3b82f6, #1e40af);
  color:#fff !important;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow:
    0 10px 18px rgba(30,64,175,.28),
    inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cta .cta-btn::after{
  content:"→";
  font-weight:900;
  transform: translateX(0);
  transition: transform .18s ease;
}
.cta .cta-btn:hover{
  transform: translateY(-3px);
  box-shadow:
    0 16px 26px rgba(30,64,175,.34),
    inset 0 1px 0 rgba(255,255,255,.45);
}
.cta .cta-btn:hover::after{ transform: translateX(4px); }
.cta .cta-btn:focus-visible{
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

/* ------- Dark mode ------- */
html.dark-mode .cta{
  --cta-top:#0b1220;
  --cta-bot:#0f172a;
  --cta-glow: rgba(250,204,21,.08);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
html.dark-mode .cta h2{
  color:#c7d2fe;
  text-shadow: 1px 1px 0 #1e3a8a, 2px 2px 0 #172554;
}
html.dark-mode .cta .cta-btn{
  background: linear-gradient(180deg, #60a5fa, #1d4ed8);
  border-color: rgba(255,255,255,.15);
  box-shadow:
    0 14px 28px rgba(2,6,23,.6),
    inset 0 1px 0 rgba(255,255,255,.25);
}

/* ===== FAQ Section ===== */
.faq {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem 1rem;
  background: var(--card, #fff);
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.faq h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.faq details {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background: var(--bg-soft, #f8fafc);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  list-style: none;
  position: relative;
  color: var(--ink, #0f172a);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "＋";
  position: absolute;
  right: 1rem;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq[open] summary::after {
  content: "–";
}

.faq p {
  padding: 0 1.25rem 1rem 1.25rem;
  margin: 0;
  color: var(--muted, #64748b);
  line-height: 1.6;
}

/* hover/focus states */
.faq summary:hover,
.faq summary:focus {
  background: rgba(31,111,235,0.05); /* subtle blue highlight */
}

/* Dark mode support */
html.dark-mode .faq {
  background: var(--card, #0f172a);
  border: 1px solid var(--border, #1f2937);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
html.dark-mode .faq summary {
  color: var(--ink, #e6ebf5);
}
html.dark-mode .faq p {
  color: var(--muted, #9aa6bf);
}

html.dark-mode .section-soft-blue {
  background: #0b1220;      /* same in dark */
  color: var(--ink);
}

html.dark-mode .section-light.faq{
  background: #0b1220;        /* chalkboard tone */
  color: #f3f4f6;
}

html.dark-mode .section-light.faq details{
  background: #111827;        /* slightly lighter than page */
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

html.dark-mode .section-light.faq summary{
  color: #e5e7eb;
}

html.dark-mode .section-light.faq p{
  color: #cbd5e1;
}

/* chevron + focus in dark */
html.dark-mode .section-light.faq summary::before{
  color: #cbd5e1;
  opacity: .9;
}
html.dark-mode .section-light.faq summary:focus-visible{
  outline-color: rgba(96,165,250,.55); /* uses --ring vibe */
}

/* ================================
   Benefits — Section + Slider
   ================================ */

/* Section shell */
.section-gray.benefits{
  background:#f9fafb;
  padding:2.5rem 1rem;
}
.dark-mode .section-gray.benefits{ background:#0b1220; }

/* Slider container */
.benefits-slider{
  max-width:1100px;
  margin:0 auto;
  position:relative;
}

/* Track (horizontal grid) */
.benefits-slider .slides{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:100%;
  gap:1rem;
  overflow:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  border-radius:16px;
}

/* Hide native scrollbar where it might appear */
.benefits-slider .slides::-webkit-scrollbar{ display:none; }
.benefits-slider .slides{ -ms-overflow-style:none; scrollbar-width:none; }

/* Slide card */
.benefit-slide{
  scroll-snap-align:start;
  background:var(--card, #fff);
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  padding:1.5rem;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.5rem;
  min-height:160px;                  /* reserves space -> no jump */
  transition:transform .2s ease, box-shadow .2s ease;
}
.benefit-slide:hover{
  transform:translateY(-3px);
  box-shadow:0 6px 20px rgba(0,0,0,.08);
}
.dark-mode .benefit-slide{
  background:#111827;
  border-color:rgba(255,255,255,.12);
}

/* Icon stub — replace with inline SVG later if you want */
.benefit-icon{
  width:40px; height:40px; border-radius:10px;
  background:linear-gradient(180deg,#ffd24d,#e3a700);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 6px 16px rgba(0,0,0,.2);
}
.benefit-slide h3{ margin:0; font-weight:800; }
.benefit-slide p{ margin:.25rem 0 0 0; color:var(--muted, #6b7280); }

/* Nav arrows */
.benefits-slider .nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border-radius:999px;
  border:1px solid rgba(0,0,0,.1);
  background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
  display:grid; place-items:center; cursor:pointer; z-index:2;
}
.benefits-slider .prev{ left:-12px; }
.benefits-slider .next{ right:-12px; }
.dark-mode .benefits-slider .nav{
  background:#0b1220; color:#e5e7eb; border-color:rgba(255,255,255,.15);
}
.benefits-slider .nav:focus-visible{
  outline:2px solid var(--ring, rgba(32,93,223,.35)); outline-offset:2px;
}

/* Dots */
.benefits-slider .dots{
  display:flex; gap:.5rem; justify-content:center; margin-top:.75rem;
}
.benefits-slider .dots button{
  width:8px; height:8px; border-radius:999px; border:0;
  background:#cbd5e1; opacity:.6; cursor:pointer;
}
.benefits-slider .dots button[aria-selected="true"]{ opacity:1; background:var(--brand, #1e40af); }
.benefits-slider .dots button:focus-visible{
  outline:2px solid var(--ring, rgba(32,93,223,.45)); outline-offset:2px;
}

/* Responsive: 1 → 2 → 3 cards */
@media (min-width:720px){
  .benefits-slider .slides{ grid-auto-columns:50%; }
}
@media (min-width:1024px){
  .benefits-slider .slides{ grid-auto-columns:33.333%; }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .benefits-slider .slides{ scroll-behavior:auto; }
  .benefit-slide{ transition:none; }
}

/* No-JS fallback: simple grid, hide controls */
.no-js .benefits-slider .slides,
.benefits-slider[data-js="off"] .slides{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1rem;
  overflow:visible;
}
.no-js .benefits-slider .nav,
.benefits-slider[data-js="off"] .nav,
.no-js .benefits-slider .dots,
.benefits-slider[data-js="off"] .dots{ display:none; }

/* Don’t virtualize above-the-fold sections */
.hero,
.section-soft-blue.intro-video {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}
