/*
 * ============================================================
 *  ITS Education Asia — IGCSE Results Page
 *  Standalone CSS (extracted from igcse-results.html)
 *
 *  Sections:
 *   1.  Brand tokens (CSS custom properties)
 *   2.  Reset & base
 *   3.  Layout shell (page-content, grid, sidebar)
 *   4.  Typography utilities (section-title, section-sub, eyebrow)
 *   5.  Hero
 *   6.  Buttons
 *   7.  Scenario filter tabs  ← colour-coded: green / orange / blue
 *   8.  Accordion             ← colour-coded top-border + icon bg
 *   9.  Process steps
 *  10.  Alternative pathways grid
 *  11.  Scroll reveal
 *  12.  Responsive breakpoints
 *  13.  Free Consultation form  (flt-* namespace)
 *
 *  Font dependency (add to <head> before this stylesheet):
 *    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap" rel="stylesheet"/>
 *
 *  Icon dependency (add to <head> before this stylesheet):
 *    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css"/>
 * ============================================================
 */


/* ============================================================
   1. BRAND TOKENS
   ============================================================ */
:root {
  --blue:       #0067AC;   /* ITS primary blue */
  --light-blue: #00A4E4;
  --dark-blue:  #003A63;   /* headings, dark backgrounds */
  --navy:       #003760;
  --green:      #01A355;   /* "Better Than Expected" accent */
  --gold:       #CEA82C;   /* eyebrow labels, step numbers */
  --teal:       #168CA1;
  --tint:       #E8F4FC;   /* light blue tint — backgrounds, icon fills */
  --ink:        #2b2f33;   /* body copy */
  --grey:       #5b6168;   /* secondary / muted text */
  --light-bg:   #f4f8fb;   /* scenario section background */
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


/* ============================================================
   3. LAYOUT SHELL
   ============================================================ */

/* Hide the CMS site navigation when embedded */
.site-nav { display: none; }

/* Constrain the main content column */
.page-content {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
}

.content-grid { display: block; }

/* Sidebar is hidden — page uses full-width single column */
.sidebar { display: none !important; }

#content-area { max-width: 100%; }

#content-area section { padding: 48px 0; }

/* Inner content wrap (narrower than page-content) */
.wrap { max-width: 900px; }


/* ============================================================
   4. TYPOGRAPHY UTILITIES
   ============================================================ */

/* Section heading — centred, brand blue */
h2.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--blue);
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

/* Subtitle beneath section headings */
.section-sub {
  text-align: center;
  color: var(--grey);
  /* max-width: 660px; */
  margin: 0 auto 36px;
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.7;
}

/* Small all-caps label above hero title */
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}


/* ============================================================
   5. HERO
   ============================================================ */
.hero {
  background: linear-gradient(160deg, #fff 0%, var(--tint) 100%);
  padding: 56px 36px 48px;
  border-bottom: 5px solid var(--blue);
}

.hero .eyebrow { color: var(--gold); }

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--dark-blue);
  font-weight: 800;
  line-height: 1.2;
  /* max-width: 780px; */
  margin-bottom: 10px;
}

/* Gold accent span inside h1 */
.hero h1 .accent { color: var(--gold); }

/* Optional Chinese sub-title (English-only pages leave this blank) */
.hero .subtitle-zh {
  font-size: clamp(14px, 1.8vw, 18px);
  color: var(--grey);
  font-weight: 500;
  margin-bottom: 20px;
}

/* Main hero paragraph (English) */
.hero .lead-text {
  font-size: clamp(14px, 1.9vw, 18px);
  color: var(--grey);
  /* max-width: 760px; */
  line-height: 1.8;
  margin-bottom: 28px;
}

/* Optional Chinese lead paragraph */
.hero .lead-text-zh {
  font-size: 14px;
  color: #888;
  margin-top: 8px;
  line-height: 1.7;
}


/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

#content-area .btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
  font-family: 'Poppins', sans-serif;
}

#content-area .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 58, 99, 0.18);
}

/* Filled primary button */
#content-area .btn-primary {
  background: var(--blue);
  color: #fff !important;
}

/* Outlined ghost button */
.btn-ghost {
  background: #fff;
  color: var(--blue) !important;
  border: 2px solid var(--blue);
}


/* ============================================================
   7. SCENARIO FILTER TABS
   Filter keys: "better" (green) | "missed" (orange) | "options" (blue)
   The "All Scenarios" tab uses the default --blue.
   ============================================================ */
.scenario-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}

/* Default pill tab */
.scenario-tab {
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--tint);
  color: var(--dark-blue);
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

/* Default hover / active state — "All Scenarios" */
.scenario-tab:hover,
.scenario-tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ── Better Than Expected — green #01A355 ── */
.scenario-tab[data-filter="better"]:hover,
.scenario-tab[data-filter="better"].active {
  background: #01A355;
  border-color: #01A355;
  color: #fff;
}

/* ── Missed Grades — orange #E07B00 ── */
.scenario-tab[data-filter="missed"]:hover,
.scenario-tab[data-filter="missed"].active {
  background: #E07B00;
  border-color: #E07B00;
  color: #fff;
}

/* ── Other Options — blue #0067AC ── */
.scenario-tab[data-filter="options"]:hover,
.scenario-tab[data-filter="options"].active {
  background: #0067AC;
  border-color: #0067AC;
  color: #fff;
}


/* ============================================================
   8. ACCORDION
   Each item carries data-category="better|missed|options"
   which drives the top-border colour and icon circle colour.
   ============================================================ */
.scenario-section {
  background: var(--light-bg);
  padding: 40px 0;
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Default accordion card — blue top border */
.accordion-item {
  background: #fff;
  border-radius: 14px;
  border-top: 5px solid var(--blue);
  box-shadow: 0 4px 18px rgba(0, 58, 99, 0.07);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

/* ── Colour-coded top borders ── */
.accordion-item[data-category="better"]  { border-top-color: #01A355; }
.accordion-item[data-category="missed"]  { border-top-color: #E07B00; }
.accordion-item[data-category="options"] { border-top-color: #0067AC; }

/* ── Colour-coded icon circles ── */
.accordion-item[data-category="better"]  .accordion-icon { background: #e8f9f0; color: #01A355; }
.accordion-item[data-category="missed"]  .accordion-icon { background: #fff4e6; color: #E07B00; }
.accordion-item[data-category="options"] .accordion-icon { background: #e8f4fc; color: #0067AC; }

.accordion-item:hover {
  box-shadow: 0 8px 28px rgba(0, 58, 99, 0.13);
}

/* Clickable header row */
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  cursor: pointer;
  gap: 16px;
  user-select: none;
}

.accordion-header:hover { background: var(--tint); }

/* Circular icon on the left */
.accordion-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);      /* overridden by data-category rules above */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--blue);           /* overridden by data-category rules above */
}

.accordion-title-wrap { flex: 1; }

.accordion-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark-blue);
  line-height: 1.4;
}

/* Optional Chinese subtitle beneath the English question */
.accordion-title-zh {
  font-size: 13px;
  color: var(--grey);
  margin-top: 3px;
  font-weight: 400;
}

/* + / × toggle circle on the right */
.accordion-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue);
  font-size: 16px;
  transition: transform 0.3s ease, background 0.2s ease;
}

/* Rotate + to × when open */
.accordion-item.open .accordion-toggle {
  transform: rotate(45deg);
  background: var(--blue);
  color: #fff;
}

/* Collapsible body — max-height animated by JS */
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-body-inner {
  padding: 0 28px 28px 28px;
  border-top: 1px solid #e8f0f8;
}

.accordion-body-inner p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 14px;
}

.accordion-body-inner p:last-child { margin-bottom: 0; }

/* Dashed separator between English and Chinese body text */
.lang-divider {
  border: none;
  border-top: 1px dashed #d0e3f0;
  margin: 16px 0;
}

/* Chinese body paragraphs */
.zh-text {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.8;
}

/* "Contact Us" button inside accordion body */
.body-cta {
  margin-top: 20px;
  text-align: center;
}

.body-cta a {
  display: inline-block;
  padding: 11px 28px;
  background: var(--blue);
  color: #fff !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.body-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 58, 99, 0.2);
}


/* ============================================================
   9. PROCESS STEPS (dark-blue band, 4-column grid)
   ============================================================ */
.process-section {
  background: var(--dark-blue);
  padding: 52px 0;
  color: #fff;
}

.process-section .section-title { color: #fff; }
.process-section .section-sub   { color: #a8c8e0; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.step-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.step-card:hover { background: rgba(255, 255, 255, 0.14); }

/* Gold numbered circle */
.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark-blue);
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 { color: #fff; font-size: 17px; margin-bottom: 10px; }
.step-card p  { font-size: 14px; color: #a8c8e0; line-height: 1.7; }


/* ============================================================
   10. ALTERNATIVE PATHWAYS GRID (3 → 2 → 1 column)
   ============================================================ */
.paths-section { padding: 48px 0; }

.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.path-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 6px 24px rgba(0, 58, 99, 0.07);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.path-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 58, 99, 0.14);
}

/* Circular icon */
.path-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--blue);
  margin: 0 auto 16px;
}

.path-card h3 {
  font-size: 17px;
  color: var(--dark-blue);
  font-weight: 700;
  margin-bottom: 10px;
}

.path-card p {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.7;
  flex: 1;
}

/* "Learn More →" pill link */
.path-card a {
  margin-top: 18px;
  display: inline-block;
  padding: 9px 22px;
  border-radius: 30px;
  background: var(--tint);
  color: var(--blue) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s ease;
}

.path-card a:hover {
  background: var(--blue);
  color: #fff !important;
}


/* ============================================================
   11. SCROLL REVEAL
   JS adds .in-view when element enters the viewport.
   .reveal-stagger staggers each child by 100 ms.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.in-view > * {
  opacity: 1;
  transform: none;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ============================================================
   12. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Steps grid — 4 → 2 columns at tablet */
@media (max-width: 1200px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Paths grid — 3 → 2 columns at tablet */
@media (max-width: 1200px) {
  .paths-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Steps + paths grids — 1 column on mobile */
@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .paths-grid { grid-template-columns: 1fr; }
}

/* Hero + accordion — tighter padding on small screens */
@media (max-width: 640px) {
  .hero              { padding: 36px 20px; }
  .accordion-header  { padding: 18px 18px; }
  .accordion-body-inner { padding: 0 18px 22px; }
}


/* ============================================================
   13. FREE CONSULTATION FORM  (flt-* namespace)
   Sky-blue background band — matches global ITS form style.
   ============================================================ */
.flt-form-wrap {
  background: #27a5d4;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 36px 28px;
  border-radius: 4px;
}

.flt-form-wrap h3 {
  color: #fff;
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* Two-column input row */
.flt-row {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}

/* Full-width input row */
.flt-row-full { margin-bottom: 12px; }

/* Input group: icon prefix + text field */
.flt-group {
  display: flex;
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
}

/* Icon prefix square */
.flt-icon {
  background: rgb(68, 197, 245);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 15px;
  flex-shrink: 0;
}

/* Text / email / tel input */
.flt-input {
  flex: 1;
  background: #3cbdec;
  border: none;
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  min-width: 0;
}

.flt-input::placeholder { color: rgba(255, 255, 255, 0.85); }
.flt-input:focus         { background: #2db3e4; }

.flt-recaptcha   { margin-bottom: 14px; }
.flt-btn-wrap    { text-align: center; }

/* Submit button */
.flt-btn {
  border: 3px solid #fff;
  background: transparent;
  color: #fff;
  padding: 14px 48px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  border-radius: 2px;
  transition: background 0.25s ease;
}

.flt-btn:hover { background: rgba(255, 255, 255, 0.15); }

/* Success message (shown by JS after submit) */
.flt-success {
  display: none;
  text-align: center;
  color: #fff;
  padding: 20px 0;
}

.flt-success i  { font-size: 52px; margin-bottom: 14px; display: block; }
.flt-success h3 { font-size: 22px; margin-bottom: 8px; }
.flt-success p  { font-size: 15px; color: rgba(255, 255, 255, 0.85); }

/* Stack form rows on small screens */
@media (max-width: 640px) {
  .flt-btn {    padding: 14px 30px;}
}
@media (max-width: 600px) {
  .flt-form-wrap { padding: 18px 16px 22px; }
}

@media (max-width: 560px) {
  .flt-row { flex-direction: column; }
}
