/* ==========================================================
   Page-specific styles for Cẩm Nang Apollo English
   These styles complement the shared style.css
   ========================================================== */

/* ---- GLOBAL OVERRIDES for single-page layout ---- */
body {
  min-width: 0;  /* override the 1336px min-width for flexible layout */
}
.viewport {
  width: 100%;
  max-width: 1336px;
}
/* khi mở bằng #page-NN, chừa chỗ cho header fixed phía trên */
.page-section { scroll-margin-top: 130px; }

/* ---- p02: Letter (thư cô Kate) — khung giấy dựng bằng CSS để chữ 16px
        chảy tự do; ảnh Kate + chữ ký tách riêng từ nền gốc ---- */
.letter { position: relative; margin-top: 16px; }
.letter .paper {
  position: relative;
  width: 648px;
  background: var(--cream);
  border-radius: 0 0 26px 26px;
  /* padding phải lớn: chừa chỗ ảnh Kate đè lên mép giấy */
  padding: 42px 86px 34px 44px;
}
/* mép trên răng cưa con tem như thiết kế */
.letter .paper::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -12px;
  height: 24px;
  background: radial-gradient(circle at 22px 24px, var(--cream) 12px, transparent 12.6px);
  background-size: 44px 24px;
  background-repeat: repeat-x;
}
.letter .text {
  font-family: 'Montserrat', 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 145%;
  text-align: justify;
}
.letter .text p { margin: 0 0 12px; }
.letter .sign { width: 160px; margin: 0 0 0 190px; }
.letter .side {
  position: absolute;
  right: 0; top: 36px;
  width: 300px;
  text-align: center;
}
.letter .side img { width: 100%; }
.letter .caption {
  margin-top: 6px;
  font-family: 'Baskerville VN', 'Baskerville', serif;
  color: var(--navy);
}
.letter .caption b { display: block; font-size: 17px; font-weight: 600; }
.letter .caption i { display: block; font-size: 16px; margin-top: 2px; }

/* ---- p03: Bản đồ hành trình ---- */
.map-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.map-head img {
  width: 70px;
  height: auto;
  flex: none;
}
.map-head h1 {
  font-family: 'Brauer', sans-serif;
  font-size: 34px;
  color: var(--heading);
  margin: 0;
  text-shadow:
    -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff,
    -2px 0 0 #fff, 2px 0 0 #fff, 0 -2px 0 #fff, 0 2px 0 #fff,
    0 4px 0 #f9b9a8,
    0 7px 9px rgba(30, 80, 120, .25);
}

/* foot: Wonderbot footer section (p03, p07, p18, p22) */
.foot {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  margin-top: 30px;
  position: relative;
}
.foot .sketch-inline {
  position: absolute;
  left: 118px;
  bottom: 6px;
  width: 97px;
}
.foot .bubble {
  width: 392px;
  margin-right: 16px;
  margin-bottom: 10px;
  font-size: 17px;
  text-align: right;
}
.foot .head {
  width: 144px;
  flex: none;
}
.foot .shooting-star {
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 100px;
}
.foot .rocket {
  position: absolute;
  left: 5%;
  bottom: 0;
  width: 90px;
}
.foot .molecule {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
}

/* ---- p04: Value panel ---- */
.value-panel {
  position: relative;
}
.value-panel .book-sketch {
  position: absolute;
  right: 40px;
  top: 210px;
  width: 240px;
  opacity: 0.8;
}
.value-panel .cta {
  margin-top: 30px;
  width: 100%;
}
.value-list li {
  font-size: 17px;
  margin-bottom: 12px;
}

/* ---- p05: App panel ---- */
.app-panel {
  position: relative;
  overflow: hidden;
  /* full-height theo yêu cầu: cao gấp đôi, gradient trên xanh dưới trắng */
  min-height: 840px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #cfe9fa 0%, #eaf6fd 55%, #ffffff 100%);
}
.app-panel .dumbbell {
  position: absolute;
  right: 26px;
  top: 22px;
  width: 170px;
  opacity: 0.55;
  transform: none;
}
.app-panel .intro {
  font-size: 18px;
  margin: 8px 0 30px;
  max-width: 600px;
}
/* 2 cột feature bên trái, pin + chữ căn giữa như thiết kế */
.features {
  display: flex;
  gap: 36px;
  width: 440px;
  margin: 20px 0 0;
}
.feature {
  flex: 1;
  text-align: center;
}
.feature .pin {
  width: 246px;      /* gấp 3 theo yêu cầu */
  max-width: none;
  margin: 0 auto 14px;
}
.feature h3 {
  font-family: 'Brauer', sans-serif;
  color: var(--blue);
  font-size: 20px;
  margin: 0 0 8px;
}
.feature p {
  margin: 0;
  font-size: 16px;
}
.app-panel .mascot {
  position: absolute;
  right: 18px;
  bottom: 16px;    /* góc phải bên dưới theo thiết kế */
  width: 300px;
}
/* nút store dồn xuống đáy trái panel */
.stores {
  display: flex;
  gap: 22px;
  margin-top: auto;
  padding-top: 30px;
}
.stores a img {
  height: 96px;
}

/* ---- p06: Journey panel ---- */
.journey-panel {
  position: relative;
  overflow: hidden;
  /* full-height theo yêu cầu: cao gấp đôi, gradient trên xanh dưới trắng */
  min-height: 720px;
  background: linear-gradient(180deg, #cfe9fa 0%, #eaf6fd 55%, #ffffff 100%);
}
.journey-panel .plane {
  position: absolute;
  right: 20px;
  top: 15px;
  width: 100px;
  opacity: 0.6;
}
.journey-panel .intro {
  font-size: 18px;
  max-width: 600px;
  margin: 10px 0 0;
}
.journey-panel .mountain {
  position: absolute;
  left: 60px;
  bottom: 140px;
  width: 240px;
  opacity: 0.6;
}
.journey-panel .climb {
  position: absolute;
  right: 18px;
  bottom: 14px;    /* góc phải bên dưới theo thiết kế */
  width: 470px;
}

/* ---- p07: First day panel ---- */
.firstday-panel {
  position: relative;
}
/* ảnh 3 bé cao bằng nhau, neo đáy → pill tên luôn ngang hàng */
.firstday-panel .kid img {
  height: 250px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
  margin: 0 auto;
}
.firstday-panel .foot {
  margin-top: 30px;
}

/* ---- p10: After 9 weeks (SAU 9 TUẦN...) ---- */
.after-head {
  text-align: left;
  margin-bottom: 4px;
}
.after-head .brush {
  font-size: 43px;
  line-height: 1;
  padding: 15px 55px 20px 30px;
}
.after-intro {
  text-align: justify;
  font-size: 16.5px;
  margin: 16px 0 0;
  padding: 0;
}
.result-panel {
  background: url('/landings/cam-nang-huong-dan/element/p10-nen-panel-trim.png') no-repeat top center / 100% 100%;
  border-radius: 0;
  padding: 0 36px 34px;
  margin-top: 90px;
}
.result-panel .kids { margin-top: 0; }
.result-panel .kid img {
  height: 250px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
  margin: -70px auto 0;
}
.result-panel .kid p {
  text-align: center;
  font-size: 16px;
}

/* ---- p12-14: Age tables ---- */
.age-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
/* headline gọn 2em, hiển thị trên 1 dòng (theo yêu cầu) */
.age-head h1 {
  font-size: 2em;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.age-head .cat {
  width: 80px;
  flex: none;
}

/* ---- p16: Stats — toàn bộ chữ đã bake sẵn trong ảnh nền (1760×910) ---- */
#page-16 .stats {
  width: 880px;
  aspect-ratio: 1760 / 910;
  background: url('/landings/cam-nang-huong-dan/element/p16-thong-ke-panel.png') no-repeat center / 100% 100%;
  margin-top: 24px;
}

/* ---- p17: Duo panel (7 thói quen + hệ sinh thái) ---- */
.duo-panel {
  position: relative;
  overflow: hidden;
}
.duo-panel .rocket-swoosh {
  position: absolute;
  right: 20px;
  top: 10px;
  width: 120px;
  opacity: 0.6;
}
.cols {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}
.cols .col {
  flex: 1;
}
.cols .col .intro {
  font-size: 16px;
  margin: 10px 0 16px;
}
.cols .brush-long {
  font-size: 20px;
  color: var(--blue);
  padding: 10px 40px 14px 24px;
}
/* sơ đồ thói quen: chữ overlay lên ảnh diagram (nhà trường/nhà, pill và checkbox đã bake) */
.habits {
  position: relative;
  width: 392px;
  height: 445px;
  background: url('/landings/cam-nang-huong-dan/element/p17-thoi-quen-diagram.png') no-repeat center / contain;
}
.habits .lab {
  position: absolute;
  font-family: 'Brauer', sans-serif;
  color: #fff;
  font-size: 14.5px;
  text-align: center;
  line-height: 1.1;
}
.habits .lab.class { left: 180px; top: 24px;  width: 196px; }
.habits .lab.home  { left: 28px;  top: 314px; width: 166px; }
.habits .item {
  position: absolute;
  font-family: 'Brauer', sans-serif;
  color: var(--navy);
  font-size: 13.5px;
  line-height: 1.2;
}
.habits .item.i1 { left: 212px; top: 57px;  width: 175px; }
.habits .item.i2 { left: 212px; top: 79px;  width: 175px; }
.habits .item.i3 { left: 212px; top: 101px; width: 178px; }
.habits .item.i4 { left: 48px;  top: 355px; width: 335px; }
.habits .item.i5 { left: 48px;  top: 377px; width: 335px; }
.habits .item.i6 { left: 48px;  top: 399px; width: 335px; }
.habits .item.i7 { left: 48px;  top: 421px; width: 335px; }
/* bánh xe hệ sinh thái: chữ đã bake sẵn trong ảnh */
.wheel {
  background: url('/landings/cam-nang-huong-dan/element/p17-he-sinh-thai-wheel.png') no-repeat center / contain;
  width: 100%;
  aspect-ratio: 864 / 844;
}

/* ---- p18: Squad / Biệt đội ---- */
.squad {
  position: relative;
}
.squad .magnifier {
  position: absolute;
  right: 20px;
  top: 10px;
  width: 90px;
  opacity: 0.6;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.card {
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
}
.card img {
  width: 140px;
  margin: 0 auto 12px;
}
.card h3 {
  font-family: 'Brauer', sans-serif;
  font-size: 20px;
  margin: 0 0 8px;
}
.card p {
  margin: 0;
  font-size: 16px;
}
.card.pink  { background: #fde8ef; }
.card.pink h3 { color: var(--pink); }
.card.blue  { background: var(--lightblue); }
.card.blue h3 { color: var(--blue); }
.card.cream { background: var(--cream); }
.card.cream h3 { color: var(--deepblue); }

/* ---- p20-21: FAQ Panel ---- */
.faq-panel {
  position: relative;
  overflow: hidden;
}
/* câu hỏi (faq-q) & câu trả lời Wonderbot (faq-a): font bình thường 16px, không nghiêng/đậm */
.faq-q .bubble,
.faq-a .bubble {
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
}
.faq-panel .bell {
  position: absolute;
  left: 20px;
  top: 15px;
  width: 80px;
  opacity: 0.5;
}
.faq-panel .molecule {
  position: absolute;
  right: 20px;
  top: 15px;
  width: 70px;
  opacity: 0.5;
}
.buddy-note {
  position: relative;
  width: 720px;
  aspect-ratio: 2297 / 466;
  background: url('/landings/cam-nang-huong-dan/element/p21-apo-buddy-note.png') no-repeat center / contain;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
}
.buddy-note .txt {
  margin-left: 132px;
  width: 555px;
  font-family: 'Brauer', sans-serif;
  color: var(--blue);
  font-size: 19px;
  line-height: 1.3;
}

/* ---- p22: Myth panel ---- */
.myth-panel {
  position: relative;
  overflow: hidden;
}
.myth-panel .telescope {
  position: absolute;
  right: 20px;
  top: 15px;
  width: 80px;
  opacity: 0.5;
}

/* ---- Sketch decorations (positioned elements on pages) ---- */
#page-12 .sketch.dumbbell {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 80px;
  opacity: 0.5;
}
#page-13 .sketch.telescope {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 80px;
  opacity: 0.5;
}
#page-14 .sketch.rocket {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 80px;
  opacity: 0.5;
}

/* ---- Trang gộp (07, 20): nội dung cao quá thì cuộn bên trong khung phải ---- */
.page-section.tall {
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #9ec9e6 transparent;
}
.page-section.tall::-webkit-scrollbar { width: 8px; }
.page-section.tall::-webkit-scrollbar-thumb { background: #9ec9e6; border-radius: 8px; }
.page-section.tall::-webkit-scrollbar-track { background: transparent; }
/* các khối gộp nối tiếp nhau có khoảng thở */
#page-07 .week:first-of-type { margin-top: 36px; }
#page-07 .after-head { margin-top: 10px; }

/* ---- p14: nhãn phân nhóm trong bảng ---- */
.age-label {
  font-family: 'Brauer', sans-serif;
  color: var(--navy);
  font-size: 18px;
  padding: 2px 0 10px;
}

/* ---- p23: link Zalo phủ lên vùng nút trong ảnh liên hệ ---- */
.contact-strip {
  position: relative;
  width: 82%;
  margin: 0 auto;
}
.contact-strip img { width: 100%; }
.contact-strip .zalo-link {
  position: absolute;
  left: 59%;
  top: 58%;
  width: 24%;
  height: 34%;
  border-radius: 14px;
}

/* ---- Nội dung mô tả canh justify (theo yêu cầu) ---- */
.content p,
.content ul.arrow-list li,
.faq-q .bubble,
.faq-a .bubble,
.myth p,
.week .txt p {
  text-align: justify;
}
/* các khối ngắn căn giữa theo thiết kế thì giữ nguyên */
.content p.center { text-align: center; }
.kids .kid p { text-align: center; }
.card p { text-align: justify; }

/* ---- Responsive mobile: nội dung co giãn theo width ---- */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .viewport { margin-top: 64px !important; }
  .layout { width: 100% !important; max-width: 100%; padding: 20px 16px 40px; }
  .content { width: 100% !important; max-width: 100%; }
  .content section { max-width: 100%; }

  /* p02: thư */
  .letter .paper { width: 100%; padding: 34px 24px 28px; }
  .letter .sign { margin-left: 40px; }
  .letter .side { position: static; margin: 18px auto 0; }

  /* tiêu đề */
  .map-head h1 { font-size: 26px; }
  .age-head h1 { white-space: normal; font-size: 1.5em; }
  .h-outline { font-size: 30px; }

  /* foot Wonderbot */
  .foot { flex-wrap: wrap; }
  .foot .bubble { width: auto; flex: 1; }
  .foot .sketch-inline, .foot .shooting-star,
  .foot .rocket, .foot .molecule { display: none; }

  /* p05, p06 */
  .app-panel, .journey-panel { min-height: 0; padding: 28px 22px; }
  .features { flex-direction: row; width: 100% !important; max-width: 100%; gap: 20px; }
  .feature { min-width: 0; }
  .app-panel .mascot { position: static; display: block; width: 240px; margin: 24px auto 0; }
  .stores { flex-wrap: wrap; gap: 14px; margin-top: 20px; padding-top: 0; justify-content: center; }
  .stores a img { height: 64px; }
  .journey-panel .climb { position: static; display: block; width: 260px; margin: 20px auto 0; }
  .journey-panel .mountain { display: none; }

  /* p07 / p10: thẻ 3 bé */
  .kids { flex-direction: column; gap: 24px; }
  .firstday-panel .kid img, .result-panel .kid img { height: auto; max-height: 260px; margin: 0 auto; }
  .result-panel { margin-top: 24px; padding: 20px; background: var(--lightblue); border-radius: 20px; }

  /* p08–09 */
  .week-flex { flex-direction: column; }
  .week-flex .art { width: 100%; max-width: 300px; margin: 0 auto; }
  .week-head { flex-wrap: wrap; gap: 12px; }
  .week-head .brush { font-size: 30px; }

  /* p12–14 */
  .age-table { flex-direction: column; }

  /* p16: ảnh panel tự scale theo width (aspect-ratio) */
  #page-16 .stats { width: 100%; }

  /* p17 */
  .cols { flex-direction: column; }
  .habits { margin: 0 auto; max-width: 100%; }

  /* p18 */
  .cards { grid-template-columns: 1fr; }

  /* p20–21 */
  .faq-row { gap: 12px; }
  .faq-row .who, .faq-row .who img { width: 70px; }
  .faq-row .avatar { width: 70px; }
  .faq-q .bubble, .faq-a .bubble { width: auto !important; margin-left: 0 !important; }
  .buddy-note { width: 100%; }
  .buddy-note .txt { margin-left: 19%; width: 76%; font-size: 15px; }

  /* p22 */
  .myth-grid { flex-direction: column; }
  .myth { width: 100%; }

  .preview-nav { margin: 20px auto; }
}
