/* ================================================================
   EdTech Games — index2.css
   New main-page styles (standalone; does not touch legacy CSS)
   ================================================================ */

/* Below 768px (true mobile): use centered brand, hide inline logo,
   keep hamburger. */
@media (max-width: 767px) {
  #header-main .navbar-header .navbar-brand {
    display: block !important;
  }
  #header-main .navbar-nav > li.logo {
    display: none !important;
  }
}

/* Mid-width range (768-1199px): match wide-width layout — inline logo
   in the middle, nav items split around it, no hamburger. Overrides
   common.css portrait/mobile rules that fire on tall desktop windows. */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Hide hamburger and the centered brand (using inline logo instead) */
  #header-main .navbar-toggle { display: none !important; }
  #header-main .navbar-header .navbar-brand { display: none !important; }

  /* Restore Bootstrap-default navbar layout (overriding mobile-portrait rules).
     Navbar bar is THIN (50px) — logo overflows DOWN past the bar for the
     angled-edge look, matching wide-width behavior. */
  #header-main nav.navbar.navbar-default.navbar-fixed-top {
    height: 53px !important;
    min-height: 53px !important;
    max-height: 53px !important;
    background: rgba(0,0,0,0.14) !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  #header-main .container-fluid {
    display: flex !important;
    align-items: flex-start !important;
    padding: 0 8px !important;
    width: 100% !important;
    height: 53px !important;
    overflow: visible !important;
  }
  #header-main .navbar-header {
    width: 0 !important;          /* effectively hidden — toggle and brand are display:none */
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #header-main .navbar-collapse,
  #header-main .navbar-collapse.collapse,
  #header-main .navbar-collapse.in {
    display: block !important;
    position: static !important;
    height: auto !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    float: none !important;
    flex: 1 1 auto !important;
  }
  #header-main .navbar-nav {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;       /* top-align so logo overflows DOWN */
    justify-content: center !important;
    gap: 4px;
    overflow: visible !important;
  }
  #header-main .navbar-nav > li {
    float: none !important;
    display: flex !important;
    align-items: flex-start;
    border: 0 !important;
    margin: 0 !important;
  }
  #header-main .navbar-nav > li > a {
    font-size: 13px !important;
    padding: 16px 10px !important;            /* vertical-centers text in 53px bar */
    line-height: 1.2 !important;
    color: #fff !important;
    -webkit-text-stroke: 1px rgba(0,0,0,.9);
    paint-order: stroke fill;
    white-space: nowrap;
    border: 0 !important;
  }
  /* Inline logo: overflows past the thin bar for the angled-edge look */
  #header-main .navbar-nav > li.logo {
    display: flex !important;
    align-items: flex-start;
    align-self: flex-start;
  }
  #header-main .navbar-nav > li.logo a {
    padding: 0 8px !important;
    height: auto !important;
  }
  #header-main .navbar-nav > li.logo img {
    max-height: 78px !important;
    height: auto !important;
    width: auto !important;
    display: block;
  }
}

/* Header transition: transparent over hero video → solid black with white
   text after scrolling past it. Triggered by JS adding body.etg-scrolled. */
#header-main nav.navbar.navbar-fixed-top {
  transition: background .25s ease, backdrop-filter .25s ease;
}
body.etg-scrolled #header-main nav.navbar.navbar-fixed-top {
  background: #000 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
body.etg-scrolled #header-main .navbar-nav > li > a {
  color: #fff !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}

/* ---------- Custom Properties ---------- */
:root {
  /* Brand */
  --etg-blue:        #00b1db;
  --etg-blue-dark:   #0076d7;
  --etg-blue-deep:   #0a2540;
  --etg-orange:      #e8722a;
  --etg-orange-dark: #c55a1a;
  --etg-teacher-red:      #d00000;
  --etg-teacher-red-dark: #d00000;
  --etg-red:         #d4213d;

  /* Neutrals */
  --etg-white:       #ffffff;
  --etg-gray-50:     #f5f7fa;
  --etg-gray-100:    #e8ecf1;
  --etg-gray-400:    #94a3b8;
  --etg-gray-600:    #475569;
  --etg-gray-800:    #1e293b;
  --etg-dark:        #0f172a;

  /* Surfaces */
  --etg-bg-alt:      var(--etg-gray-50);
  --etg-radius:      16px;
  --etg-radius-sm:   10px;
  --etg-shadow:      0 4px 24px rgba(0,0,0,.07);
  --etg-shadow-lg:   0 12px 48px rgba(0,0,0,.12);

  /* Layout */
  --etg-max-w:       1400px;
  --etg-gutter:      clamp(16px, 4vw, 48px);
  --header-h:        50px;              /* approximate; JS may override */

  /* Active tab colour (JS toggles via data-active-tab) */
  --tab-color:       var(--etg-blue);
  --tab-color-dark:  var(--etg-blue-dark);
}

/* When Fractions tab is active, swap accent colour */
[data-active-tab="fractions"] {
  --tab-color:      var(--etg-orange);
  --tab-color-dark: var(--etg-orange-dark);
}

/* ---------- Hero video: collapse container to match video height ----------
   When the window is narrower than 16:9, the video shrinks to fit the width
   but #section0 stayed at 100vh, creating black bars top/bottom.
   This shrinks the container to match the video's actual rendered height. */
@media (max-aspect-ratio: 16/9) {
  #section0 {
    height: calc(100vw / 1.7778) !important;   /* 9/16 of width */
    min-height: 0 !important;
  }
}

/* ---------- Base / Reset (scoped to new sections) ---------- */
.etg-page { font-family: 'Open Sans', system-ui, -apple-system, sans-serif; color: var(--etg-gray-800); line-height: 1.65; }
.etg-page *, .etg-page *::before, .etg-page *::after { box-sizing: border-box; }
.etg-page img { max-width: 100%; height: auto; display: block; }
.etg-page h1,.etg-page h2,.etg-page h3 { font-family: 'Khand', 'Open Sans', sans-serif; line-height: 1.2; margin: 0 0 .5em; }
.etg-page p { margin: 0 0 1em; }

/* ================================================================
   INTRO  (pre-title + subtitle)
   ================================================================ */
.etg-intro {
  text-align: center;
  padding: 14px var(--etg-gutter) 14px;
  background: var(--etg-white);
}
.etg-subtitle {
  font-size: clamp(18px, 2.6vw, 30px);
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--etg-gray-600);
  margin: 0 !important;
  font-weight: 600;
  text-wrap: balance;
}
.etg-intro-lede {
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.55;
  color: var(--etg-gray-600);
  max-width: 820px;
  margin: 4px auto 0 !important;
  text-align: center !important;
  font-family: 'Open Sans', sans-serif;
  display: block;
  text-wrap: balance;                /* browser auto-balances line lengths at any width */
}
.etg-intro-lede a {
  color: var(--etg-blue);
  text-decoration: underline;
}
.etg-intro-lede a:hover {
  color: var(--etg-blue-dark);
}
.etg-intro-promise {
  font-family: 'Khand', sans-serif;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
  color: var(--etg-dark);
  font-weight: 600;
  max-width: 820px;
  margin: 14px auto 0 !important;
  text-align: center;
  text-wrap: balance;
}

/* ================================================================
   STICKY NAV  (tabs + pills)
   ================================================================ */
.etg-nav-sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 500;
  background: var(--etg-white);
  /* No drop shadow: it drew a soft horizontal line right under the active pill,
     breaking the "tab merges into panel below" illusion. */
}
.etg-nav-inner {
  max-width: var(--etg-max-w);
  margin: 0 auto;
}

/* ---- Tab toggles ---- */
.etg-tabs {
  display: flex;
  background: var(--etg-white);
}
.etg-tab {
  flex: 1;                          /* inactive tab — 1 unit of space */
  border: none;
  cursor: pointer;
  font-family: 'Khand', sans-serif;
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 600;
  padding: 18px 12px 14px;
  text-align: center;
  transition: background .2s, color .2s, flex .25s ease;
  position: relative;
  background: var(--etg-gray-100);
  color: var(--etg-gray-400);
  line-height: 1.1;
}
.etg-tab.active {
  flex: 3;                          /* active tab takes 3x more space than inactive */
}
/* Prefix text "Essential Keys to Mastering" shows only on the active tab */
.etg-tab:not(.active) .etg-tab-prefix {
  display: none;
}
.etg-tab:first-child { border-radius: var(--etg-radius-sm) var(--etg-radius-sm) 0 0; }
.etg-tab:last-child  { border-radius: var(--etg-radius-sm) var(--etg-radius-sm) 0 0; }

.etg-tab.active {
  background: var(--tab-color);
  color: var(--etg-white);
}
[data-active-tab="fluency"] .etg-tab.active {
  background: var(--etg-blue-dark);
}
.etg-tab:not(.active):hover {
  background: var(--etg-gray-100);
  color: var(--etg-gray-600);
}

/* ---- Pill row ---- */
.etg-pills-row {
  background: var(--tab-color);
  padding: 0 var(--etg-gutter);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  border-radius: 0 0 var(--etg-radius-sm) var(--etg-radius-sm);
}
[data-active-tab="fluency"] .etg-pills-row {
  background: var(--etg-blue-dark);
}
.etg-pills-row::-webkit-scrollbar { display: none; }

.etg-pills {
  display: inline-flex;
  gap: 4px;
  padding: 6px 0 0;                 /* no bottom padding — active pill reaches the row's bottom edge */
  min-width: 100%;
  justify-content: center;
  align-items: flex-end;            /* pills bottom-align so active-pill's taller shape sits flush */
}
.etg-pills--grouped {
  gap: 10px;
  align-items: stretch;
}
.etg-pill-group {
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  min-width: max-content;
}
.etg-pill-group--teacher {
  flex: 0 0 auto;
}
.etg-pill-group--program {
  flex: 0 0 auto;
}
.etg-pill-group__label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 14px 4px;
  border-radius: 12px 12px 0 0;
  background: rgba(255,255,255,.22);
  color: rgba(255,255,255,.92);
  font-family: 'Open Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}
.etg-pill-group--teacher .etg-pill-group__label {
  background: var(--etg-teacher-red);
  color: var(--etg-white);
}
.etg-pill-group__pills {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
}
.etg-pill-group--teacher .etg-pill-group__pills {
  background: var(--etg-teacher-red);
}
.etg-pill-group--program .etg-pill-group__pills {
  justify-content: flex-start;
  background: var(--etg-blue);
}
.etg-pill-group--program .etg-pill-group__label {
  background: var(--etg-blue);
}
.etg-pill-group--program .etg-pill {
  background: var(--etg-blue);
  border-radius: 0;
}
.etg-pill-group--program .etg-pill:not(.active):hover {
  background: #16c1e6;
}
.etg-pill-group--teacher .etg-pill {
  background: var(--etg-teacher-red);
  color: var(--etg-white);
  border-radius: 0;
}
.etg-pill-group--teacher .etg-pill:not(.active):hover {
  background: var(--etg-teacher-red);
}
.etg-pill-group--teacher .etg-pill.active {
  background: var(--etg-white);
  color: var(--etg-teacher-red-dark);
}
.etg-pill-group--teacher .etg-pill.active[data-section-bg="alt"] {
  background: var(--etg-bg-alt);
}

.etg-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 10px 18px;
  border-radius: 18px;
  min-height: 56px;
  min-width: 90px;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.12);
  transition: background .15s, color .15s, transform .15s;
  cursor: pointer;
  border: none;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
}
.etg-pill:hover {
  color: #fff;
}
/* Inactive pills get a brighter background + a grow on hover. */
.etg-pill:not(.active):hover {
  background: rgba(255,255,255,.35);
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.etg-pill.active {
  background: var(--etg-white);
  color: var(--tab-color-dark);
  border-radius: 18px 18px 0 0;     /* tab shape — rounded top only, flat bottom */
  box-shadow: none;
  padding-bottom: 14px;             /* slightly taller so it visually merges into block below */
}
/* When active pill's target section uses the alt (gray) bg, match it so the
   "tab merges into panel" illusion holds across both section colors. */
.etg-pill.active[data-section-bg="alt"] {
  background: var(--etg-bg-alt);
}
/* Active pill hover: scale slightly. Growth extends the flat bottom INTO the
   block below (both are white), so no gap appears. Upward shadow adds
   a subtle lift feel. Defined AFTER .etg-pill.active to win the cascade. */
.etg-pill.active:hover {
  transform: scale(1.03);
  box-shadow: 0 -2px 10px rgba(0,0,0,.12);
}
/* Kill default anchor underline + focus outline on pills (was breaking the
   "tab merges into panel" effect by drawing a line along the bottom edge). */
.etg-pill,
.etg-pill:hover,
.etg-pill:focus,
.etg-pill:active,
.etg-pill:visited {
  text-decoration: none !important;
  outline: none;
}
/* Keep a11y: keyboard-only focus gets a subtle indicator */
.etg-pill:focus-visible {
  box-shadow: 0 0 0 2px rgba(0,0,0,.25);
}
.pill-num {
  display: none;             /* Hidden by default — shown in the narrow @media block below */
  font-weight: 700;
  font-size: 14px;
}
.pill-label {
  display: block;
  font-size: 13px;
  line-height: 1.15;
  white-space: normal;       /* Allow 2-line labels like "Conceptual Understanding" */
  max-width: 12ch;
}
.pill-label-mobile {
  display: none;
  font-size: 11px;
  line-height: 1.05;
  white-space: nowrap;
}
.pill-label__keep {
  white-space: nowrap;
}

/* ================================================================
   CONTENT BLOCKS
   ================================================================ */
.etg-tab-content { display: none; }
.etg-tab-content.active { display: block; }

.etg-block {
  padding: var(--etg-gutter);         /* equal padding all around, matches left/right */
  overflow: hidden;
}
.etg-block--alt {
  background: var(--etg-bg-alt);
}

.etg-block__inner {
  max-width: var(--etg-max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "title title"
    "text  media";
  column-gap: clamp(24px, 4vw, 64px);   /* horizontal gap between text and media */
  row-gap: 4px;                          /* tiny gap between title and content */
  align-items: start;
}
/* Grid items default to min-width: auto, which lets children expand the cell.
   Zero it so the Swiper carousel can't blow the column out to millions of px. */
.etg-block__inner > * {
  min-width: 0;
  min-height: 0;
}
.etg-block__title { grid-area: title; }
.etg-block__text  { grid-area: text;  }
.etg-block__media { grid-area: media; }

/* Alternating blocks swap the text/media columns, title still spans top. */
.etg-block--reverse .etg-block__inner {
  grid-template-areas:
    "title title"
    "media text";
}

/* Number badge hidden — keeping the DOM element in case we want it back,
   but never showing it in the body (numbers live in the pill nav only). */
.etg-block__num {
  display: none;
}

/* ---- Title ---- */
.etg-block__title {
  font-size: clamp(24px, 3vw, 40px);
  color: var(--etg-dark);
  text-align: center;
  /* !important: `.etg-page h2` (specificity 0,1,1) wins over `.etg-block__title` (0,1,0)
     and adds a 0.5em bottom margin (~20px) under every title. Force it to zero so
     row-gap controls spacing. */
  margin: 0 !important;
}
.etg-block__title em {
  font-style: normal;
  color: var(--tab-color);
  white-space: nowrap;           /* keep emphasis phrases together — title wraps BEFORE them if needed */
  /* Fade in AFTER the title has slid up (cascading entrance) */
  opacity: 0;
  transition: opacity .7s ease;
  transition-delay: .45s;
}
.etg-block__title.is-visible em {
  opacity: 1;
}
.etg-block__title .etg-title-red {
  color: var(--etg-teacher-red);
  opacity: 0;
  transition: opacity .7s ease;
  transition-delay: .45s;
}
.etg-block__title.is-visible .etg-title-red {
  opacity: 1;
}

/* ---- Body text ---- */
.etg-block__body {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--etg-gray-600);
}
.etg-block__body p {
  text-wrap: balance;              /* intelligent line breaks per paragraph */
  margin: 0 !important;            /* single-spaced — paragraphs sit flush, no extra gap */
}
.etg-block__body strong {
  color: var(--etg-gray-800);
}

/* ---- Media side ---- */
.etg-block__media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.etg-hero-img {
  border-radius: var(--etg-radius);
  box-shadow: var(--etg-shadow);
  width: 100%;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.etg-hero-img:hover {
  transform: scale(1.015);
  box-shadow: var(--etg-shadow-lg);
}

/* ---- Thumbnail grid ---- */
.etg-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.etg-thumb {
  display: block;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--etg-radius-sm);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.etg-thumb img {
  width: 100%;
  border-radius: var(--etg-radius-sm);
  transition: transform .3s;
}
.etg-thumb:hover {
  transform: translateY(-3px);
  box-shadow: var(--etg-shadow);
}
.etg-thumb:hover img {
  transform: scale(1.04);
}
.etg-thumb-item {
  min-width: 0;
}
.etg-thumb-text {
  margin: 12px 0 0 !important;
  color: var(--etg-gray-600);
  font-size: 15px;
  line-height: 1.55;
}
.etg-gallery {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.etg-gallery__hero {
  display: block;
  border-radius: var(--etg-radius);
}
.etg-gallery__hero .etg-hero-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.etg-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.etg-gallery__thumb {
  border: 3px solid transparent;
  border-radius: var(--etg-radius-sm);
  overflow: hidden;
  padding: 0;
  background: transparent;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}
.etg-gallery__thumb.active {
  border-color: var(--etg-blue);
}
.etg-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Placeholder (missing media) ---- */
.etg-placeholder {
  border: 2px dashed var(--etg-gray-400);
  border-radius: var(--etg-radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--etg-gray-400);
  font-size: 14px;
  font-style: italic;
}

/* ---- Quotes / Testimonials ---- */
.etg-quote {
  margin: 24px 0 0;
  padding: 20px 24px;
  border-left: 4px solid var(--tab-color);
  background: rgba(0,177,219,.04);
  border-radius: 0 var(--etg-radius-sm) var(--etg-radius-sm) 0;
}
.etg-quote p {
  font-style: italic;
  font-size: clamp(15px, 1.3vw, 18px);
  margin-bottom: 8px;
  color: var(--etg-gray-800);
}
.etg-quote cite {
  font-style: normal;
  font-size: 13px;
  color: var(--etg-gray-600);
  font-weight: 600;
}

.etg-reference {
  font-size: 12px;
  color: var(--etg-gray-400);
  margin-top: 8px;
}
.etg-demo-buy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 8px auto 0;
  max-width: 1080px;
}
.etg-demo-buy-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: 1200px;
  align-items: stretch;
}
.etg-demo-buy-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--etg-gray-100);
  border-top: 4px solid var(--tab-color);
  background: var(--etg-white);
  padding: 28px 32px;
  border-radius: var(--etg-radius-sm);
  box-shadow: var(--etg-shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.etg-demo-buy-card:hover {
  box-shadow: var(--etg-shadow-lg);
  transform: translateY(-2px);
}
.etg-demo-buy-card--primary {
  background: linear-gradient(135deg, rgba(0,177,219,.08), rgba(255,255,255,1));
  border-top-width: 6px;
}
.etg-demo-buy-card h3 {
  margin: 0 0 10px;
  font-family: 'Khand', sans-serif;
  font-size: 32px;
  line-height: 1;
  color: var(--etg-gray-800);
}
.etg-demo-buy-card p {
  margin: 0 0 14px;
}
.etg-demo-buy-card p + p {
  margin-top: -2px;
}
.etg-demo-buy-card p:last-of-type {
  margin-bottom: 20px;
}
.etg-demo-buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: auto;                       /* push CTA to the bottom so 2 cards align */
  padding: 12px 22px;
  border-radius: 6px;
  background: var(--tab-color);
  color: var(--etg-white);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.etg-demo-buy-link:hover,
.etg-demo-buy-link:focus {
  color: var(--etg-white);
  background: var(--tab-color-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.etg-demo-buy-link--secondary {
  background: transparent;
  color: var(--tab-color);
  border: 2px solid var(--tab-color);
  padding: 10px 20px;
}
.etg-demo-buy-link--secondary:hover,
.etg-demo-buy-link--secondary:focus {
  background: var(--tab-color);
  color: var(--etg-white);
}

/* ---- Video embeds ---- */
.etg-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.etg-video-card {
  border-radius: var(--etg-radius);
  overflow: hidden;
  box-shadow: var(--etg-shadow);
  background: var(--etg-dark);
}
.etg-video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}
.etg-video-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.etg-video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease, opacity .25s ease;
}
.etg-video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  transition: transform .2s ease, opacity .2s ease;
}
.etg-video-card__thumb:hover img,
.etg-video-card__thumb:focus-visible img {
  transform: scale(1.03);
  opacity: .92;
}
.etg-video-card__thumb:hover .etg-video-card__play,
.etg-video-card__thumb:focus-visible .etg-video-card__play {
  transform: scale(1.08);
}
.etg-video-card__info {
  padding: 14px 18px;
  color: var(--etg-white);
}
.etg-video-card__info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.etg-video-card__info p {
  font-size: 13px;
  color: var(--etg-gray-400);
  margin: 0;
}
#fluency-quick-start .etg-block__inner,
#fluency-quick-start.etg-block--reverse .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text"
    "media";
}
#fluency-quick-start .etg-block__text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
#fluency-quick-start .etg-video-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1320px;
  margin: 10px auto 0;
  width: 100%;
}
#fluency-the-challenge .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text"
    "media";
}
#fluency-the-challenge .etg-block__text {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}
#fluency-the-challenge .etg-block__media {
  width: 100%;
}
#fluency-the-challenge .etg-thumbs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1080px;
  margin: 18px auto 0;
  gap: 24px;
}
#fluency-the-challenge .etg-thumb img {
  box-shadow: var(--etg-shadow);
}
#fluency-strategies .etg-block__inner,
#fluency-strategies.etg-block--reverse .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text";
}
#fluency-strategies .etg-block__text {
  max-width: 1080px;
  margin: 0 auto;
}
.etg-strategy-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.etg-strategy-pair article {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.etg-strategy-pair img {
  width: 100%;
  box-shadow: var(--etg-shadow);
}
.etg-strategy-pair h3 {
  margin: 0 !important;
  font-family: 'Khand', sans-serif;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1;
  color: var(--etg-blue);
}
.etg-strategy-pair p {
  margin: 0 !important;
}
#fluency-reports .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text";
}
#fluency-reports .etg-block__text {
  max-width: 1080px;
  margin: 0 auto;
}
#fluency-demo-buy .etg-block__inner,
#fluency-demo-buy.etg-block--reverse .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text";
}
#fluency-demo-buy .etg-block__text {
  max-width: 1200px;
  margin: 0 auto;
}
.etg-automaticity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;                /* equal-height cards so the quotes can line up */
}
.etg-automaticity-grid article {
  display: flex;
  flex-direction: column;              /* lets the quote-graphic claim margin-top:auto and pin to bottom */
  background: var(--etg-white);
  border-top: 4px solid var(--etg-blue);
  border-radius: var(--etg-radius-sm);
  padding: 24px;
  box-shadow: var(--etg-shadow);
}
.etg-automaticity-grid article > .etg-quote-graphic {
  margin-top: auto;                    /* push quote to the bottom — both columns end at the same baseline */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;           /* image at top, text/cite at bottom inside the quote */
  min-height: 360px;                   /* matches both quotes to a common height so tops line up too */
}
.etg-automaticity-grid .etg-quote-graphic img {
  flex: 0 0 auto;
}
.etg-automaticity-grid h3 {
  margin: 0 0 12px !important;
  font-family: 'Khand', sans-serif;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
  color: var(--etg-gray-800);
}
.etg-automaticity-grid p {
  margin: 0 !important;
}
.etg-quote-graphic {
  margin: 22px 0 0;
  padding: 22px 24px;
  border-left: 5px solid var(--etg-blue);
  background: linear-gradient(135deg, rgba(0,177,219,.10), rgba(255,255,255,.95));
  border-radius: 0 var(--etg-radius-sm) var(--etg-radius-sm) 0;
}
.etg-quote-graphic img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin: 0 auto 16px;
}
.etg-quote-graphic p {
  font-family: 'Khand', sans-serif;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.15;
  color: var(--etg-gray-800);
}
.etg-quote-graphic cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 700;
  color: var(--etg-gray-600);
}

/* ---- Quote variant: big stat instead of screenshot ---- */
.etg-quote-graphic--stat {
  text-align: center;
}
/* Inside the bottom-pinned automaticity quote-graphic, anchor the stat to the
   top so the big number reads as a header, with the quote/cite/link grouped
   at the bottom edge (matching the teacher card's quote-at-bottom rhythm). */
.etg-automaticity-grid .etg-quote-graphic--stat .etg-quote-stat {
  margin-bottom: auto;
}
.etg-quote-stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,177,219,.18);
}
.etg-quote-stat__number {
  font-family: 'Khand', sans-serif;
  font-weight: 700;
  font-size: clamp(60px, 8vw, 92px);
  line-height: .9;
  color: var(--etg-blue);
  letter-spacing: -.02em;
}
.etg-quote-stat__label {
  font-family: 'Khand', sans-serif;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--etg-gray-600);
  text-align: left;
  max-width: 180px;
}
.etg-quote-graphic--stat p {
  text-align: center;
  font-size: clamp(18px, 1.8vw, 22px);   /* slightly smaller than other variant since the number is the visual hook */
}
.etg-quote-graphic--stat cite {
  text-align: center;
}
.etg-quote-source {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--etg-blue);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,177,219,.4);
  padding-bottom: 1px;
}
.etg-quote-source:hover,
.etg-quote-source:focus {
  color: var(--etg-blue-dark);
  border-bottom-color: var(--etg-blue-dark);
  border-bottom-style: solid;
}

@media (max-width: 600px) {
  .etg-quote-stat {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .etg-quote-stat__label {
    text-align: center;
    max-width: none;
  }
}
#fluency-gameplay {
  /* Dark, brand-rich treatment for the visual peak of the page */
  background: linear-gradient(180deg, #0a2540 0%, #0f172a 100%) !important;
  color: var(--etg-white);
}
#fluency-gameplay .etg-block__title {
  color: var(--etg-white);
}
#fluency-gameplay .etg-block__title em {
  color: var(--etg-blue);                /* keep brand blue for emphasis on dark bg */
}
#fluency-gameplay .etg-block__body,
#fluency-gameplay .etg-block__body p {
  color: rgba(255,255,255,.86);
}
#fluency-gameplay .etg-block__body strong {
  color: var(--etg-white);
}
#fluency-gameplay .etg-hero-img,
#fluency-gameplay .etg-thumb img {
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
#fluency-gameplay .etg-gallery__thumb {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.15);
}
#fluency-gameplay .etg-gallery__thumb.active {
  border-color: var(--etg-blue);
  background: rgba(0,177,219,.15);
}
#fluency-gameplay .etg-block__inner,
#fluency-gameplay.etg-block--reverse .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text"
    "media";
}
#fluency-gameplay .etg-block__text {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
#fluency-gameplay .etg-block__body p + p {
  margin-top: 12px !important;
}
#fluency-effort .etg-block__text {
  max-width: 1080px;
}
#fluency-effort .etg-panel {
  width: 320px;
}
.etg-cheer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  text-align: left;
}
.etg-cheer-grid article {
  background: var(--etg-white);
  border-radius: var(--etg-radius-sm);
  overflow: hidden;
  box-shadow: var(--etg-shadow);
}
.etg-cheer-grid h3 {
  margin: 0 0 14px !important;
  font-family: 'Khand', sans-serif;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  color: var(--etg-white);
  background: var(--etg-teacher-red);
  padding: 12px 20px 10px;
}
.etg-cheer-grid article p {
  padding: 0 20px;
}
.etg-cheer-grid article p:last-child {
  padding-bottom: 20px;
}
.etg-cheer-grid p + p {
  margin-top: 12px !important;
}

/* ================================================================
   LIGHTBOX
   ================================================================ */
.etg-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 24px;
  cursor: zoom-out;
}
.etg-lightbox.open {
  display: flex;
}
.etg-lightbox__img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: var(--etg-radius);
  box-shadow: var(--etg-shadow-lg);
  object-fit: contain;
  animation: etgLightboxIn .25s ease;
}
.etg-lightbox__close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s;
}
.etg-lightbox__close:hover { opacity: 1; }

@keyframes etgLightboxIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1);   }
}

/* ================================================================
   FAQ SECTION
   ================================================================ */
.etg-faq {
  padding: clamp(40px, 6vw, 80px) var(--etg-gutter);
  background: var(--etg-white);
}
.etg-faq__inner {
  max-width: 860px;
  margin: 0 auto;
}
.etg-faq__title {
  text-align: center;
  font-family: 'Khand', sans-serif;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.05;
  margin-bottom: 32px;
  color: var(--etg-dark);
}
.etg-faq details {
  border: 1px solid var(--etg-gray-100);
  border-radius: var(--etg-radius-sm);
  margin-bottom: 10px;
  background: var(--etg-white);
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.etg-faq details:hover {
  border-color: var(--etg-gray-100);
  box-shadow: 0 2px 12px rgba(15,23,42,.05);
}
.etg-faq details[open] {
  border-color: rgba(0,177,219,.35);
  background: linear-gradient(180deg, rgba(0,177,219,.03) 0%, var(--etg-white) 100%);
  box-shadow: 0 4px 18px rgba(0,177,219,.08);
}
.etg-faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--etg-gray-800);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color .15s;
}
.etg-faq summary:hover { color: var(--etg-blue); }
.etg-faq summary::-webkit-details-marker { display: none; }
.etg-faq summary::after {
  content: '';
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-right: 2px solid var(--etg-blue);
  border-bottom: 2px solid var(--etg-blue);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.etg-faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.etg-faq details .faq-body {
  padding: 0 22px 22px;
  font-size: 15px;
  color: var(--etg-gray-600);
  line-height: 1.7;
}
.etg-faq details .faq-body p {
  margin: 0;
}
/* Smooth open/close — supported in modern Chrome/Edge/Safari (graceful fallback elsewhere) */
@supports (interpolate-size: allow-keywords) {
  .etg-faq details {
    interpolate-size: allow-keywords;
  }
  .etg-faq details::details-content {
    overflow: hidden;
    height: 0;
    transition: height .25s ease, content-visibility .25s allow-discrete;
  }
  .etg-faq details[open]::details-content {
    height: auto;
  }
}

/* ================================================================
   CONTACT SECTION  (modernized)
   ================================================================ */
.etg-contact {
  padding: clamp(48px, 7vw, 96px) var(--etg-gutter);
  background: linear-gradient(180deg, var(--etg-gray-50) 0%, var(--etg-white) 100%);
}
.etg-contact__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.etg-contact__title {
  font-family: 'Khand', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  color: var(--etg-dark);
  margin: 0 0 12px;
}
.etg-contact__lede {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--etg-gray-600);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 420px;
}
.etg-contact__channels {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.etg-contact__channels li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--etg-gray-600);
}
.etg-contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--etg-blue);
  color: var(--etg-white);
  flex-shrink: 0;
}
.etg-contact__channels a {
  color: var(--etg-blue);
  font-weight: 600;
  text-decoration: none;
}
.etg-contact__channels a:hover {
  color: var(--etg-blue-dark);
  text-decoration: underline;
}

.etg-contact__form-wrap {
  background: var(--etg-white);
  border-radius: var(--etg-radius);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--etg-shadow-lg);
  border: 1px solid var(--etg-gray-100);
}
.etg-contact__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.etg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.etg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.etg-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--etg-gray-800);
  letter-spacing: .02em;
}
.etg-field__optional {
  font-weight: 400;
  color: var(--etg-gray-400);
}
.etg-contact__form input[type="text"],
.etg-contact__form input[type="email"],
.etg-contact__form textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--etg-gray-800);
  background: var(--etg-white);
  border: 1px solid var(--etg-gray-100);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.etg-contact__form input::placeholder,
.etg-contact__form textarea::placeholder {
  color: var(--etg-gray-400);
}
.etg-contact__form input:focus,
.etg-contact__form textarea:focus {
  border-color: var(--etg-blue);
  box-shadow: 0 0 0 3px rgba(0,177,219,.18);
}
.etg-contact__form textarea {
  resize: vertical;
  min-height: 120px;
}
.etg-contact__form .form-error {
  display: block;
  font-size: 12px;
  color: var(--etg-red);
  min-height: 1em;
}
.etg-contact__form .form-error:empty {
  display: none;
}

.etg-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--etg-gray-600);
  cursor: pointer;
  margin: 4px 0;
}
.etg-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--etg-blue);
}
.etg-contact__submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  background: var(--etg-blue);
  color: var(--etg-white);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.etg-contact__submit:hover,
.etg-contact__submit:focus {
  background: var(--etg-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,118,215,.28);
}
.etg-contact__submit:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .etg-contact__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .etg-form-row {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   PANEL CAROUSEL (Swiper)
   Used when a block has a 'panels' array. The carousel takes the
   full grid-area of the media column, and for blocks-with-panels we
   also force the text body to be centered and narrower above.
   ================================================================ */
/* Panel blocks: inner box is single-column (title + text only), carousel
   is a sibling AFTER the inner so it can extend edge-to-edge. */
.etg-block--panels {
  padding-left: 0 !important;           /* kill horizontal padding so carousel can extend */
  padding-right: 0 !important;
}
.etg-block--panels .etg-block__inner {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "text";
  row-gap: 4px;
  padding: 0 var(--etg-gutter);          /* restore horizontal padding only on the inner */
}
.etg-block--panels .etg-block__text {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.etg-panels-wrapper {
  width: 100%;
  margin-top: 24px;
  overflow: hidden;                       /* clip the far-off slides */
}
.etg-panels {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Pagination + play/pause row below the carousel */
.etg-panels-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.etg-panels-nav .swiper-pagination {
  position: static;               /* no absolute positioning — flow in the nav row */
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  background: #eef2f6;
  border-radius: 999px;
  padding: 6px 12px;
}
.etg-panels-playpause {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: #eef2f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--etg-gray-600);
  transition: background .2s;
  padding: 0;
}
.etg-panels-playpause:hover {
  background: #dfe6ee;
}
.etg-panels-playpause .icon-pause { display: none; }
.etg-panels-playpause.is-playing .icon-play  { display: none; }
.etg-panels-playpause.is-playing .icon-pause { display: block; }
.etg-panels .swiper-slide {
  height: auto;                         /* slides auto-size to content */
}
.etg-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
  width: clamp(280px, 32vw, 440px);    /* fixed slide width lets panels extend past content area */
  box-sizing: border-box;
}
.etg-panel__media {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--etg-radius);
  background: #fff;                    /* fills any gap when image isn't 16:9 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;                    /* clip image to the rounded corners */
}
/* Placeholder state (no image): restore the subtle gradient */
.etg-panel__media:has(> .etg-panel__placeholder) {
  background: linear-gradient(135deg, rgba(0,177,219,.15), rgba(232,114,42,.10));
}
.etg-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;                 /* preserve aspect ratio; white fills any gap */
  display: block;
}
.etg-panel__link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.etg-panel__link img {
  transition: transform .25s;
}
.etg-panel__link:hover img {
  transform: scale(1.02);
}
.etg-panel__placeholder {
  color: var(--etg-gray-400);
  font-size: 14px;
  font-style: italic;
}
.etg-panel__title {
  font-family: 'Khand', sans-serif;
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--etg-blue);
  margin: 0 !important;           /* override .etg-page h3 base rule */
  font-weight: 700;
  letter-spacing: .5px;
}
.etg-panel__text {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.55;
  color: var(--etg-gray-600);
  margin: 0 !important;           /* override .etg-page p base rule */
}
/* Pagination dots styling (matches the ASUS-style look) */
.etg-panels .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--etg-gray-400);
  opacity: .4;
  transition: all .25s ease;
}
.etg-panels .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--etg-blue);
  width: 28px;
  border-radius: 5px;
}

/* ================================================================
   SCROLL SNAP — gently "clicks" each block below the sticky nav
   when users scroll slowly. Fast scrolls pass through freely.
   ================================================================ */
html {
  scroll-snap-type: y proximity;
  /* Account for fixed header + sticky tabs/pills so snap lands below them */
  scroll-padding-top: calc(var(--header-h, 50px) + 140px);
}
@media (max-width: 900px) {
  html { scroll-padding-top: calc(var(--header-h, 36px) + 110px); }
}
@media (max-width: 600px) {
  html { scroll-padding-top: calc(var(--header-h, 36px) + 90px); }
}
.etg-block {
  scroll-snap-align: start;
  scroll-snap-stop: normal;  /* don't force stop on every block */
}

/* ================================================================
   SCROLL-IN ANIMATIONS
   ================================================================ */
.animate-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children */
.animate-in.delay-1 { transition-delay: .1s; }
.animate-in.delay-2 { transition-delay: .2s; }
.animate-in.delay-3 { transition-delay: .3s; }

/* Slide from left */
.animate-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.animate-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Respect user preference */
@media (prefers-reduced-motion: reduce) {
  .animate-in, .animate-left, .animate-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ---- Tablet & below ---- */
@media (max-width: 900px) {
  .etg-block__inner,
  .etg-block--reverse .etg-block__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "text"
      "media";
    gap: 24px;
  }
  .etg-thumbs-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .etg-video-grid {
    grid-template-columns: 1fr;
  }
  #fluency-quick-start .etg-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #fluency-the-challenge .etg-thumbs-grid {
    grid-template-columns: 1fr;
  }
  .etg-strategy-pair {
    grid-template-columns: 1fr;
  }
  .etg-automaticity-grid {
    grid-template-columns: 1fr;
  }
  .etg-cheer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Phone ---- */
@media (max-width: 600px) {
  :root {
    --header-h: 36px;
  }
  .etg-tab {
    font-size: 18px;
    padding: 12px 8px 10px;
  }
  /* Narrow screens: use short horizontal labels instead of number-only pills. */
  #pills-fluency .pill-label { display: none; }
  #pills-fluency .pill-label-mobile { display: inline; }
  #pills-fluency .pill-num { display: none; }
  #pills-fractions .pill-label { display: inline; }
  #pills-fractions .pill-num { display: none; }
  .etg-pill {
    flex-direction: row;
    padding: 7px 8px;
    min-height: 32px;
    min-width: 58px;
    font-size: 11px;
    border-radius: 12px 12px 0 0;
  }
  .etg-pills {
    justify-content: flex-start;
    gap: 3px;
  }
  .etg-pills--grouped {
    gap: 6px;
  }
  .etg-pill-group {
    gap: 0;
  }
  .etg-pill-group__label {
    min-height: 18px;
    padding: 3px 8px;
    border-radius: 9px 9px 0 0;
    font-size: 9px;
    letter-spacing: .04em;
  }
  .etg-pill-group--teacher .etg-pill-group__label {
    font-size: 0;
  }
  .etg-pill-group--teacher .etg-pill-group__label::before {
    content: 'Teacher';
    font-size: 9px;
  }
  .etg-pill-group__pills {
    gap: 3px;
  }
  .etg-block__num { font-size: 36px; }
  .etg-block__title { font-size: 22px; }
  .etg-thumbs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .etg-demo-buy-grid,
  .etg-demo-buy-grid--two {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #fluency-quick-start .etg-video-grid {
    grid-template-columns: 1fr;
  }
  .etg-gallery__thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .etg-intro { padding: 16px 16px 16px; }
  .etg-quote { padding: 14px 16px; }

  /* Pill row gets edge-fade hint + scroll-snap so swipes feel natural.
     Active pill is auto-centered in JS when the scroll-spy fires. */
  .etg-pills-row {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    scroll-snap-type: x proximity;
    scroll-padding-inline: 24px;
    scroll-behavior: smooth;
  }
  .etg-pill,
  .etg-pill-group {
    scroll-snap-align: center;
  }
  /* Lift the start padding so the first pill isn't masked by the left fade */
  #pills-fluency,
  #pills-fractions {
    padding-inline: 12px;
  }

  /* Helper class: hidden by default, becomes a line break on narrow screens.
     Used for in-title breakpoints that should only kick in on phone. */
  br.break-narrow { display: block; }
}

/* Above the phone breakpoint, suppress narrow-only line breaks. */
@media (min-width: 601px) {
  br.break-narrow { display: none; }
}

/* ---- Wide desktop ---- */
@media (min-width: 1440px) {
  .etg-block__inner {
    column-gap: 80px;          /* horizontal-only — `gap` here previously injected a 76px row-gap on wide screens, blowing apart title→text→media spacing */
  }
}

/* ================================================================
   UTILITY / HELPERS
   ================================================================ */
.etg-text-center { text-align: center; }
.etg-mb-0 { margin-bottom: 0; }
.etg-mt-lg { margin-top: 48px; }

/* Accent underline for emphasis words */
.etg-accent {
  position: relative;
  display: inline;
}
.etg-accent::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 3px;
  background: var(--etg-red);
  border-radius: 2px;
  opacity: .6;
}

/* Blue highlight span */
.etg-hl { color: var(--etg-blue); }
.etg-hl-orange { color: var(--etg-orange); }
