/* ============================================================
   Fun Academy — Landing page "Giải pháp dạy Toán cho giáo viên"
   Template: page.matific-giai-phap-day-toan-cho-giao-vien-tieu-hoc
   All rules are namespaced under .tlp so nothing else in the
   theme can be affected. Design tokens follow snippets/all.liquid.
   ============================================================ */

.tlp {
  --tlp-purple: #3A1B49;
  --tlp-yellow: #FBB516;
  --tlp-cream: #FFEFCC;
  --tlp-grey: #757575;
  --tlp-rule: #D9D9D9;
  --tlp-lav: #FDF8FF;

  --tlp-max: 1536px;
  --tlp-gutter: 24px;

  /* fluid type — the max values are the Figma values at a 1920 canvas */
  --tlp-title: clamp(28px, 3.33vw, 64px);
  --tlp-title-lh: 1.36;
  --tlp-stroke: clamp(3px, 0.31vw, 6px);
  --tlp-h: clamp(19px, 1.67vw, 32px);
  --tlp-text: clamp(15px, 1.25vw, 24px);
  --tlp-fa: clamp(16px, 1.46vw, 28px);
  --tlp-num: clamp(30px, 3.33vw, 64px);

  font-family: 'Nunito', sans-serif;
  color: var(--tlp-purple);
  overflow-x: hidden;
}

.tlp *,
.tlp *::before,
.tlp *::after { box-sizing: border-box; }

.tlp img { max-width: 100%; height: auto; display: block; }

/* The Figma canvas is 1920 wide with a 194px side margin (10.1%).
   Keeping the inset proportional is what makes every section line up
   with the baked-in artwork at any viewport width. */
.tlp__wrap {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: clamp(20px, 10.1vw, 194px);
}

/* ---------- shared typography ---------- */
.tlp-title {
  font-size: var(--tlp-title);
  font-weight: 900;
  line-height: var(--tlp-title-lh);
  margin: 0;
  text-transform: uppercase;
}
.tlp-title--outline {
  color: #fff;
  -webkit-text-stroke: var(--tlp-stroke) var(--tlp-purple);
  paint-order: stroke fill;
  text-shadow: 2px 3px 0 var(--tlp-purple);
}
.tlp-title--purple { color: var(--tlp-purple); }
.tlp-title--yellow { color: var(--tlp-yellow); }

.tlp-text {
  font-size: var(--tlp-text);
  font-weight: 600;
  line-height: 1.38;
  margin: 0;
}

.tlp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  font-size: clamp(14px, 1.15vw, 22px);
  line-height: 1.2;
  text-transform: uppercase;
  padding: clamp(12px, 1.05vw, 20px) clamp(20px, 2.1vw, 40px);
  border-radius: 10px;
  border: 2px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
}
.tlp-btn--solid {
  background: var(--tlp-yellow);
  color: #fff;
}
.tlp-btn--solid:hover,
.tlp-btn--solid:focus-visible { background: var(--tlp-purple); color: #fff; }

.tlp-btn--ghost {
  background: #fff;
  color: var(--tlp-yellow);
}
.tlp-btn--ghost:hover,
.tlp-btn--ghost:focus-visible { background: var(--tlp-yellow); color: #fff; }

/* small decorative doodles */
.tlp-doodle {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* =========================================================
   1. HERO
   ========================================================= */
.tlp-hero {
  position: relative;
  background: var(--tlp-purple);
  isolation: isolate;
}
.tlp-hero__media { display: block; }
.tlp-hero__media img { width: 100%; }

/* padding-top is a % of the hero WIDTH, so the copy keeps its position
   relative to the baked artwork (headline sits 104/1920 below the hero top). */
.tlp-hero__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 5.4%;
}
/* vw-based (not %) so the copy column tracks the artwork, which is
   baked at 1920: the Figma text box is 732/1920 ≈ 38vw + headroom. */
.tlp-hero__copy { width: min(41vw, 820px); }

.tlp-hero h1 {
  font-size: clamp(28px, 3.33vw, 64px);
  line-height: 1.19;
  font-weight: 900;
  color: var(--tlp-yellow);
  text-transform: uppercase;
  margin: 0 0 clamp(12px, 1.5vw, 28px);
}
.tlp-hero__lede {
  color: #fff;
  margin-bottom: clamp(16px, 1.8vw, 34px);
  max-width: 43ch;
}
.tlp-hero__actions { display: flex; flex-wrap: wrap; gap: clamp(10px, 1.1vw, 21px); }

/* =========================================================
   2. ĐỐI TƯỢNG
   ========================================================= */
.tlp-audience {
  position: relative;
  background: #fff;
  padding-block: clamp(24px, 3vw, 56px) clamp(40px, 5vw, 96px);
  text-align: center;
}
.tlp-audience__lede {
  max-width: 62ch;
  margin: clamp(12px, 1.4vw, 26px) auto 0;
  text-align: center;
}
.tlp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 5vw, 97px);
  margin-top: clamp(28px, 3.4vw, 64px);
}
.tlp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--tlp-purple);
  border-radius: 50% 50% 12px 12px / 45.5% 45.5% 2.4% 2.4%;
  overflow: hidden;
  aspect-ratio: 446 / 490;
}
.tlp-card img { width: 100%; }
.tlp-card__label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: var(--tlp-fa);
  line-height: 1.36;
  text-transform: uppercase;
  padding: 6px 10px 10px;
}

/* =========================================================
   3. CÁCH THỨC SỬ DỤNG  (3-step switcher)
   ========================================================= */
.tlp-how {
  position: relative;
  background: linear-gradient(180deg, var(--tlp-lav) 0%, var(--tlp-purple) 100%);
  padding-block: clamp(40px, 5vw, 96px) clamp(48px, 6vw, 110px);
  overflow: hidden;
}
.tlp-how__grid {
  display: grid;
  grid-template-columns: minmax(0, 47%) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 58px);
  align-items: start;
}
.tlp-how__title { margin-bottom: clamp(20px, 2.4vw, 46px); }

.tlp-steps { display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 30px); }

.tlp-step {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.9vw, 36px);
  width: 100%;
  text-align: left;
  background: var(--tlp-purple);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: clamp(16px, 1.9vw, 36px) clamp(18px, 2.1vw, 40px);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
  font-family: inherit;
}
.tlp-step__num {
  flex: none;
  font-weight: 800;
  font-size: var(--tlp-num);
  line-height: 1.36;
  color: #fff;
  transition: color .25s ease;
}
.tlp-step__label {
  font-weight: 800;
  font-size: var(--tlp-h);
  line-height: 1.38;
  text-transform: uppercase;
}
.tlp-step[aria-selected="true"] {
  background: #fff;
  color: var(--tlp-purple);
  box-shadow: 0 6px 18px rgba(58, 27, 73, .12);
}
.tlp-step[aria-selected="true"] .tlp-step__num { color: var(--tlp-yellow); }

.tlp-how__figure { position: relative; }
.tlp-how__figure img {
  width: 100%;
  display: none;
}
.tlp-how__figure img.is-active { display: block; }

/* =========================================================
   4. MATIFIC CÓ GÌ ĐẶC BIỆT?
   ========================================================= */
.tlp-features {
  position: relative;
  background: #fff;
  padding-block: clamp(40px, 5vw, 96px);
  overflow: hidden;
}
.tlp-features__title { text-align: center; margin-bottom: clamp(28px, 3.5vw, 66px); }

.tlp-features__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3.4vw, 64px);
  row-gap: clamp(28px, 3.4vw, 64px);
}
.tlp-feature {
  display: flex;
  flex-direction: column;
  padding-inline: clamp(0px, 1.2vw, 24px);
}
.tlp-feature:nth-child(odd) { border-right: 1px solid var(--tlp-rule); }
.tlp-feature:nth-child(1),
.tlp-feature:nth-child(2) {
  border-bottom: 1px solid var(--tlp-rule);
  padding-bottom: clamp(24px, 3vw, 56px);
}
.tlp-feature__head {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 28px);
  margin-bottom: clamp(14px, 1.7vw, 32px);
}
.tlp-feature__num {
  font-weight: 800;
  font-size: var(--tlp-num);
  line-height: 1.36;
  color: var(--tlp-yellow);
  flex: none;
}
.tlp-feature__title {
  font-weight: 800;
  font-size: var(--tlp-h);
  line-height: 1.38;
  text-transform: uppercase;
  margin: 0;
}
.tlp-feature__media { margin-bottom: clamp(14px, 1.7vw, 32px); }
.tlp-feature__media img { width: 100%; }
.tlp-feature p { text-align: justify; color: #000; }

/* =========================================================
   5. TABS
   ========================================================= */
.tlp-tabs {
  position: relative;
  background: var(--tlp-cream);
  padding-block: clamp(32px, 3.9vw, 74px) clamp(40px, 5vw, 96px);
  overflow: hidden;
}
.tlp-tabs__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2.1vw, 40px);
  max-width: 1340px;
  margin: 0 auto clamp(28px, 4vw, 76px);
}
.tlp-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid var(--tlp-grey);
  padding: 0 4px 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: var(--tlp-h);
  line-height: 1.38;
  color: var(--tlp-grey);
  text-align: center;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.tlp-tab:hover { color: var(--tlp-purple); }
.tlp-tab[aria-selected="true"] {
  color: var(--tlp-purple);
  border-bottom-color: var(--tlp-purple);
}

.tlp-panel { display: none; }
.tlp-panel.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: clamp(24px, 3.4vw, 64px);
  align-items: center;
}
.tlp-panel__title { margin-bottom: clamp(14px, 1.7vw, 32px); }
.tlp-panel__body { color: var(--tlp-purple); max-width: 46ch; }
/* The four tab screenshots have very different aspect ratios (1.78 → 3.12),
   so the white card fills its width and takes its height from the image,
   with a floor so the short, wide ones still read as a framed panel. */
.tlp-panel__figure {
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 1.5vw, 28px);
  min-height: clamp(180px, 16vw, 320px);
  overflow: hidden;
}
.tlp-panel__figure img { width: 100%; height: auto; }

/* =========================================================
   6. NHÀ TRƯỜNG VÀ GIÁO VIÊN NÓI GÌ
   ========================================================= */
.tlp-voices {
  position: relative;
  background: #fff;
  padding-block: clamp(40px, 5vw, 96px) 0;
  overflow: hidden;
}
.tlp-voices__grid {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
  align-items: center;
}
.tlp-voices__lede { margin-top: clamp(14px, 1.7vw, 32px); max-width: 40ch; }
.tlp-voices__bubbles { position: relative; z-index: 1; }
.tlp-voices__monsters {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -2%;
  pointer-events: none;
}
.tlp-voices__monsters img { width: clamp(90px, 10vw, 190px); }
.tlp-voices__monsters img:first-child { width: clamp(80px, 9vw, 170px); }

/* =========================================================
   7. ĐĂNG KÝ TƯ VẤN
   ========================================================= */
.tlp-cta {
  position: relative;
  background: var(--tlp-cream);
  padding-block: clamp(40px, 5vw, 96px);
  overflow: hidden;
  /* clears the theme's sticky header when a CTA jumps down here */
  scroll-margin-top: clamp(70px, 6vw, 110px);
}
.tlp-cta__head { text-align: center; margin-bottom: clamp(24px, 3.2vw, 60px); }
.tlp-cta__head .tlp-text { margin-top: clamp(10px, 1.2vw, 22px); }

.tlp-form {
  position: relative;
  z-index: 1;
  max-width: 1150px;
  margin-inline: auto;
}
.tlp-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 2.1vw, 40px);
  row-gap: clamp(16px, 1.9vw, 36px);
}
.tlp-field { display: flex; flex-direction: column; gap: 8px; }
.tlp-field__label {
  font-weight: 700;
  font-size: clamp(14px, 1.05vw, 20px);
  line-height: 1.3;
  color: var(--tlp-purple);
}
.tlp-field__label .tlp-req { color: #EC221F; }
.tlp-field__note {
  font-weight: 600;
  font-size: clamp(11px, .73vw, 14px);
  color: var(--tlp-grey);
}
.tlp-input,
.tlp-select {
  width: 100%;
  background: #fff;
  border: 1px solid #E3DCE8;
  border-radius: 8px;
  padding: clamp(10px, .95vw, 18px) clamp(12px, 1.05vw, 20px);
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(14px, 1.05vw, 20px);
  line-height: 1.35;
  color: var(--tlp-purple);
}
.tlp-input::placeholder { color: #9E96A6; }
.tlp-input:focus,
.tlp-select:focus {
  outline: 2px solid var(--tlp-purple);
  outline-offset: -2px;
  border-color: var(--tlp-purple);
}
.tlp-form__submit { text-align: center; margin-top: clamp(22px, 2.6vw, 50px); }
.tlp-form__submit .tlp-btn { min-width: clamp(200px, 17.5vw, 336px); }

/* multi-select — mirrors the markup already used on page.stores */
.tlp-ms { position: relative; }
.tlp-ms__box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
  background: #fff;
  border: 1px solid #E3DCE8;
  border-radius: 8px;
  padding: clamp(8px, .7vw, 13px) clamp(12px, 1.05vw, 20px);
  min-height: clamp(42px, 3.4vw, 64px);
  cursor: pointer;
}
.tlp-ms__box:focus-within,
.tlp-ms.is-open .tlp-ms__box { border-color: var(--tlp-purple); }
.tlp-ms__tags { display: flex; gap: 5px; flex-wrap: nowrap; overflow: hidden; }
.tlp-ms__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--tlp-cream);
  border: 1px solid #EBD9AE;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: clamp(11px, .73vw, 14px);
  font-weight: 700;
  color: var(--tlp-purple);
  max-width: 100%;
}
.tlp-ms__tag span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.tlp-ms__remove { flex-shrink: 0; cursor: pointer; font-weight: 800; }
.tlp-ms__input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 80px;
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(14px, 1.05vw, 20px);
  color: var(--tlp-purple);
  background: transparent;
  cursor: pointer;
}
.tlp-ms__input::placeholder { color: #9E96A6; }
.tlp-ms__menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #E3DCE8;
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
  display: none;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(58, 27, 73, .12);
}
.tlp-ms.is-open .tlp-ms__menu { display: block; }
.tlp-ms__opt {
  padding: 10px 14px;
  font-weight: 600;
  font-size: clamp(13px, .94vw, 18px);
  color: var(--tlp-purple);
  cursor: pointer;
}
.tlp-ms__opt:hover { background: var(--tlp-cream); }
.tlp-ms__opt.is-picked { opacity: .45; cursor: default; }

/* =========================================================
   8. Floating consult widget
   ========================================================= */
.tlp-float {
  position: fixed;
  right: clamp(12px, 1.6vw, 30px);
  bottom: clamp(76px, 8vw, 120px);
  z-index: 60;
}
.tlp-float__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--tlp-yellow);
  color: #fff;
  font-weight: 800;
  font-size: clamp(13px, .94vw, 18px);
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(58, 27, 73, .25);
  transition: background-color .2s ease;
}
.tlp-float__pill:hover { background: var(--tlp-purple); color: #fff; }
.tlp-float__close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--tlp-purple);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.tlp-float__mini {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 14px;
  background: var(--tlp-purple);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(58, 27, 73, .3);
}
.tlp-float.is-collapsed .tlp-float__pill { display: none; }
.tlp-float.is-collapsed .tlp-float__mini { display: flex; }

/* =========================================================
   Decorative doodles — all sit inside the page's side margin
   (10.1vw) so they can never collide with copy.
   ========================================================= */
.tlp-doodle { width: clamp(46px, 6.2vw, 120px); }

/* ĐỐI TƯỢNG */
.tlp-d-a1 { top: 7%;  right: 1.5%; }
.tlp-d-a2 { top: 40%; right: 0.8%; width: clamp(56px, 7vw, 135px); }
/* CÁCH THỨC SỬ DỤNG */
.tlp-d-h1 { bottom: 7%; left: 1.5%; width: clamp(40px, 4.6vw, 88px); }
/* MATIFIC CÓ GÌ ĐẶC BIỆT */
.tlp-d-f1 { top: 3%;  right: 1.2%; width: clamp(56px, 7vw, 132px); }
.tlp-d-f2 { top: 40%; left: 1%; }
.tlp-d-f3 { bottom: 8%; right: 1.5%; }
/* TABS */
.tlp-d-t1 { top: 9%; left: 1.5%; width: clamp(40px, 4.4vw, 84px); }
/* ĐĂNG KÝ TƯ VẤN */
.tlp-d-c1 { top: 20%; left: 1.5%; width: clamp(58px, 7.2vw, 140px); }
.tlp-d-c2 { bottom: 24%; right: 1.2%; width: clamp(58px, 7.2vw, 140px); }
.tlp-d-c3 { bottom: 7%;  right: 5.5%; width: clamp(38px, 4.2vw, 80px); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1199px) {
  .tlp-hero__inner { padding-top: 4%; }
  .tlp-hero__copy { width: 52%; }
}

@media (max-width: 991px) {
  .tlp__wrap { padding-inline: 20px; }

  /* hero stacks: copy on purple first, then the artwork (cropped to the
     teacher so the 1920-wide composition still reads on a phone) */
  .tlp-hero { display: flex; flex-direction: column; }
  .tlp-hero__inner {
    position: static;
    order: 1;
    padding: 34px 0 30px;
  }
  .tlp-hero__media { order: 2; overflow: hidden; }
  .tlp-hero__media img { width: 182%; margin-left: -82%; max-width: none; }
  .tlp-hero__copy { width: 100%; max-width: none; }
  .tlp-hero h1 { font-size: clamp(26px, 6.4vw, 40px); }
  .tlp-hero__lede { max-width: none; }

  .tlp-how__grid { grid-template-columns: minmax(0, 1fr); }
  .tlp-how__figure { order: -1; max-width: 520px; margin-inline: auto; }

  .tlp-features__grid { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .tlp-feature { border-right: 0 !important; padding-inline: 0; }
  .tlp-feature:not(:last-child) {
    border-bottom: 1px solid var(--tlp-rule);
    padding-bottom: 28px;
    margin-bottom: 28px;
  }
  .tlp-feature:last-child { border-bottom: 0; padding-bottom: 0; }

  .tlp-tabs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlp-panel.is-active { grid-template-columns: minmax(0, 1fr); }
  .tlp-panel__figure { max-width: 460px; margin-inline: auto; order: -1; }
  .tlp-panel__body { max-width: none; }

  .tlp-voices__grid { grid-template-columns: minmax(0, 1fr); }
  .tlp-voices__lede { max-width: none; }

  .tlp-form__grid { grid-template-columns: minmax(0, 1fr); }

  .tlp .tlp-doodle { display: none; }  /* .tlp img sets display:block, so this needs equal-or-higher specificity */
}

@media (max-width: 767px) {
  .tlp-cards { grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 380px; margin-inline: auto; }
  .tlp-step { padding: 14px 16px; gap: 12px; border-radius: 10px; }
  .tlp-tabs__list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tlp-tab {
    border-bottom: 1px solid var(--tlp-rule);
    padding: 12px 4px;
  }
  .tlp-tab[aria-selected="true"] { border-bottom-width: 2px; }
  .tlp-voices__monsters img { width: 84px; }
  .tlp-voices__monsters img:first-child { width: 74px; }
  .tlp-float { bottom: 70px; right: 12px; }
  .tlp-float__pill { padding: 12px 18px; font-size: 12px; }
  .tlp-feature p { text-align: left; }
}
