@font-face {
  font-family: 'MunroSmall';
  src: url('/assets/fonts/MunroSmall.ttf') format('truetype');
}

/* ---------- RESET & BASE ---------- */
html {
  font-size: 15px;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  font-family: 'Segoe UI', 'Noto Sans Thai', 'Noto Sans', sans-serif;
  margin: 0;
  color: #23272f;
  line-height: 1.85;
  min-height: 100vh;
  font-size: 1.07rem;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- TYPOGRAPHY ---------- */
h1, .h1 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #13b47f;
  margin: 0 0 1.3rem 0;
  letter-spacing: 0.045em;
  background: linear-gradient(to right, #13b47f 30%, #0eb0d5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  line-height: 1.22;
}
h2, .h2 {
  font-size: 1.23rem;
  font-weight: 700;
  color: #0eb0d5;
  margin: 0 0 1.08rem 0;
  letter-spacing: 0.018em;
}
h3, .h3 {
  font-size: 1.16rem;
  font-weight: 600;
  color: #1e957c;
  margin: 0 0 0.88rem 0;
  letter-spacing: 0.013em;
}
.lead {
  font-size: 1.11em;
  color: #34535a;
  margin-bottom: 2rem;
  font-weight: 400;
  text-align: center;
}
.text-center { text-align: center; }
.text-muted { color: #8ea1b8; }
.text-small { font-size: 0.94em; }
strong, b { color: #13b47f; font-weight: 700; }

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1110px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

/* ---------- SECTION SPACING ---------- */
.section {
  margin: 2.7rem 0 !important;
}
@media (max-width: 600px) {
  .section { margin: 1.7rem 0 !important; }
}

/* ---------- CARD ---------- */
section {
  background: #fff;
  border-radius: 25px;
  border: 1.2px solid #E1F4F1;
  padding: 2rem 2.1rem;
  margin-bottom: 5rem;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 1.3rem;
  font-size: 1.06rem;
  position: relative;
  transition: border-color 0.09s, background 0.09s;
}
section.n {
  padding: 0 !important;
  background: none;
  border-radius: 0;
  border: none;
  
}
sectio:hover, sectio:focus-within {
  border-color: #13b47f;
  background: #f8fefc;
}
@media (max-width: 700px) {
  section {
    padding: 1.2rem 0.8rem;
    margin-bottom: 5rem;
    gap: 0.8rem;
  }
}

/* ---------- BUTTONS (IMPROVED) ---------- */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  padding: 1.28em 2.1em;
  font-size: 1.07rem;
  border-radius: 100px;
  border: none;
  outline: none;
  gap: 0.8em;
  background: linear-gradient(to right, #E6F7FF 0%, #f1fff8 100%);
  color: #13b47f;
  
  cursor: pointer;
  letter-spacing: 0.013em;
  line-height: 1.17;
  user-select: none;
  border: 1.5px solid #d8efe7;
  font-variant-numeric: tabular-nums;
  position: relative;
  transition:
    background 0.17s,
    color 0.12s,
    border-color 0.13s,
    box-shadow 0.18s,
    filter 0.13s;
  min-width: 120px;
  min-height: 46px;
}

.button-primary, .btn-primary {
  background: linear-gradient(to right, #11c3ec 0%, #13b47f 100%);
  color: #fff;
  border: 1.5px solid #13b47f;
  font-weight: 800;
  box-shadow: 0 4px 24px 0 rgba(19, 180, 127, 0.12), 0 1.5px 8px 0 rgba(13,180,127,0.02);
}
.button-primary:active, .btn-primary:active {
  background: linear-gradient(to right, #13b47f 0%, #11c3ec 100%);
}
.button-secondary, .btn-secondary {
  position: relative;
  color: #0eb0d5;
  border: 1.5px solid #0eb0d5;
  font-weight: 700;
  overflow: hidden;
  z-index: 1;
}

.button-secondary::before, .btn-secondary::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, #E0F7FC 0%, #D2F1FF 100%);
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: -1;
}

.button-secondary:hover::before, .btn-secondary:hover::before {
  opacity: 1;
}
.button[disabled], .btn[disabled] {
  background: #e6eaea;
  color: #b2bfc5;
  cursor: not-allowed;
  border: 1.5px solid #e6ecf7;
  box-shadow: none;
  opacity: 0.7;
}
.button .btn-icon, .btn .btn-icon {
  margin-right: 0.6em;
  font-size: 1em;
  display: inline-flex;
  align-items: center;
}

.blur-overlay-top {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 200vw;
  height: 100px;
  z-index: 999;
  pointer-events: none; /* ไม่ไปรบกวนการคลิกหรือ hover */
  box-shadow: 0 70px 50px #13b47f;
}

.hio {
  height: 100%;
  width: 100%;
  background: #FFFFFF;
  padding-top: 0rem;
}
/* ---------- HERO ---------- */
.hero {
  background: none;
  border-radius: 0px !important;
  padding: 2.2rem 0rem 0rem 0rem;
  margin-bottom: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  min-height: 120px;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 -60px 30px rgba(247, 249, 251, 1);
  
}
.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.5rem;
}
.hero h1 {
  text-align: center;
  width: 100%;
}
.hero-content {
  flex: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  z-index: 2;
}
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  z-index: 2;
}
.hero-img {
  width: 90px;
  max-width: 120px;
  border-radius: 25px;
  background: #eaf7ff;
  object-fit: contain;
  aspect-ratio: 1/1;
  border: 3px solid #e6ecf7;
  transition: border-color 0.1s;
  
}
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.2rem 0.6rem 1.1rem 0.6rem;
    border-radius: 25px;
    min-height: initial;
  }
  .hero-img {
    width: 65px;
    max-width: 80px;
    border-radius: 25px;
    margin-top: 3px;
  }
}

/* ---------- FEATURE ---------- */
.feature-icon {
  font-size: 2.1em;
  color: #0eb0d5;
  margin-bottom: 0.23rem;
  flex-shrink: 0;
  background: #EAF7FF;
  border-radius: 50%;
  padding: 0.33em 0.48em;
  margin-top: 0.12em;
  box-shadow: none;
  font-weight: 700;
}

/* ---------- NOTICE ---------- */
.notice  {
  background: #FFFEF8;
  color: #CA8400;
  border-left: 2px solid #FFD880;
  border-radius: 35px !important;
  padding: 1.6rem 1.8rem;
  margin-bottom: 5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 1.05em;
  position: relative;
  font-weight: 600;
  margin-left: auto;
  margin-right: auto;
  
}
.notice-icon {
  font-size: 1.26em;
  margin-right: 0.46em;
  background: #fffbe9;
  border-radius: 99px;
  padding: 0.13em 0.36em;
  border: 1.1px solid #FFD15E;
}

.notice a {
  color: #CA8400;
  font-size: 1.05em;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: color 100ms;
}

.notice a:hover {
  color: #CE9D40;
}

/* ---------- FAQ ---------- */
.faq-question {
  font-weight: 700;
  color: #1b3f3f;
  cursor: pointer;
  position: relative;
  padding: 1.2em 2em 1.2em 0;
  transition: color 300ms ease;
  display: block;
  font-size: 1.03em;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  outline: none;
  letter-spacing: 0.012em;
  z-index: 2;

  /* เตรียมตัวล่วงหน้าให้ GPU handle การเปลี่ยนแปลง */
  will-change: color, transform;
  transform: translateZ(0); /* บังคับสร้าง GPU layer */
}

.faq-question:hover {
  color: #13b47f;
}

.faq-question::after {
  content: "▼";
  font-size: 0.92em;
  color: #13b47f;
  position: absolute;
  right: 0.8em;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
  backface-visibility: hidden; /* ช่วยให้ GPU render smooth */
  transform-style: preserve-3d;
}

.faq-toggle:checked + .faq-question::after {
  transform: translateY(-60%) rotate(-180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  color: #425060;
  background: #f6f7fb;
  font-size: 1em;
  padding: 0 1.1em;
  transition: max-height 0.4s ease, padding 0.3s ease;
  line-height: 1.82;
  font-weight: 500;

  /* เตรียมตัวก่อนขยาย ให้ GPU handle การเคลื่อนไหว */
  will-change: max-height, padding;
}

.faq-toggle:checked + .faq-question + .faq-answer {
  max-height: 170px;
  padding: 0.9em 1.1em 1.3em 1.1em;
}

section.o {
  padding-bottom: 0.2rem !important;
  transition: padding 0.3s ease;
  will-change: padding;
}

/* ถ้า input checkbox checked อยู่ใน section.o → ให้ section.o เปลี่ยนได้! */
section.o:has(.faq-toggle:checked) {
  padding-bottom: 2.1rem !important;
}

/* ---------- APP HEADER IN BOX ---------- */
.text-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0rem;
  gap: 1.3rem;
}
.text-h h1 {
  font-size: 1.12em;
  font-weight: 800;
  margin: 0;
  color: #222b45;
}
.text-h button {
  font-size: 0.9em;
  font-weight: 700;
  padding: 0.6em 1.15em;
  border-radius: 25px;
  background: #FFFFFF;
  border: 1.2px solid #D3D3D3;
  color: #13b47f;
  transition: background 500ms, color 0.10s, border-color 500ms;
  user-select: none;
  display: flex;
}

.text-h button svg {
  height: 18.5px !important;
  width: auto !important;
  stroke: #13b47f !important;
}

.text-h button:hover {
  background: #DBFFF5;
  border-color: #81AFA1;
}

/* ---------- APP CATEGORY SECTION ---------- */
.category-section {
  background: #FFFFFF;
  border-radius: 25px;
  margin-bottom: 2rem;
}

.category-section h2 {
  font-size: 1.03em;
  margin: 1.12rem 0 0.8rem 0;
  color: #575e6d;
  font-weight: 700;
  padding-left: 15px;
  padding-top: 10px;
}

/* ---------- APP SCROLLABLE CONTENT / ITEM CARDS (IMPROVED) ---------- */
.content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8d0e7 #f6f7fb;
  white-space: nowrap;
  padding-bottom: 0.22rem;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  will-change: transform;
}
.carousel-container {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 102px;
  overflow-x: auto;
  overflow-y: visible;
  will-change: transform;
}
.carousel-track {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: auto;
  padding-bottom: 0rem;
  width: 100%;
  white-space: nowrap;
  min-width: 0;
  flex-wrap: nowrap;
  padding: 10px;
  will-change: transform;
}
.item-card {
  background: #fff;
  border-radius: 25px;
  width: 148px;
  padding: 1.25rem 0.82rem 1.05rem 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: border-color 0.11s, background 0.11s;
  cursor: pointer;
  border: 1.2px solid #e6ecf7;
  position: relative;
  text-align: center;
  font-size: 1.05em;
  gap: 0.38rem;
  outline: none;
  flex-shrink: 0;
  box-sizing: border-box;
  word-break: break-word;
  overflow: visible;
  
}
.item-card .emoji {
  font-size: 1.61rem;
  margin-bottom: 0.16rem;
  transition: filter 0.10s;
  z-index: 2;
  user-select: none;
}
.item-card .name {
  font-size: 0.8em;
  color: #0eb0d5;
  font-weight: 800;
  letter-spacing: 0.013em;
  opacity: 0.99;
  max-width: 100%;
  line-height: 1.37;
  margin-bottom: 0.09em;
  z-index: 2;
  white-space: nowrap;           /* ไม่ขึ้นบรรทัดใหม่ */
  overflow: hidden;              /* ซ่อนส่วนที่เกิน */
  text-overflow: ellipsis;       /* แสดง ... เมื่อเกิน */
  display: block;                /* แน่ใจว่า element เป็น block สำหรับตัดบรรทัด */
}
.item-card .desc,
.item-card .detail,
.item-card .content {
  font-size: 1em;
  color: #295c73;
  margin-top: 0.24em;
  margin-bottom: 0.1em;
  text-align: left;
  width: 100%;
  z-index: 2;
  font-weight: 500;
}
.item-card:hover {
  border-color: #13b47f;
  background: #F1FFFC;
  z-index: 2;
}

@media (max-width: 900px) {
  .item-card {
    width: 108px;
    min-width: 108px;
    max-width: 140px;
    padding: 0.8rem 0.3rem 0.6rem 0.3rem;
    border-radius: 25px;
  }
  
  .item-card .name {
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
}

/* ---------- MOBILE FONT ADJUSTMENTS ---------- */
@media (max-width: 600px) {
  html { font-size: 15px; }
  body { font-size: 0.97rem; }
  .section { margin: 1.1rem 0; }
  .h1, h1 { font-size: 1.15rem; }
  .h2, h2 { font-size: 1rem; }
  .h3, h3 { font-size: 1rem; }
  .lead { font-size: 0.9em; }
  section { font-size: 0.9rem; padding: 1.05rem 1.15rem; border-radius: 25px; }
  .button, .btn { font-size: 0.9em; padding: 1.1em 0.96em; border-radius: 25px; }
  .button-secondary { border-width: 1px; }
  .feature-item { font-size: 0.93em; padding: 0.92rem 0.55rem 0.92rem 0.55rem; border-radius: 25px; }
  .notice { font-size: 0.9em; padding: 2.3rem 1.5rem; border-radius: 30px; }
  .faq-item { font-size: 0.92em; padding: 0 0.6em; border-radius: 25px; }
  .faq-question { font-size: 0.93em; padding: 0.8em 1.1em 0.8em 0; }
  .main { font-size: 0.96em;}
  .text-h h1 { font-size: 1em; }
  .text-h button { font-size: 0.8em !important; padding: 0.85em 1.2em; border-radius: 25px; }
  .category-section h2 { font-size: 0.99em; margin: 0.6rem 0 0.6rem 0; }
  .item-card { font-size: 0.91em; border-radius: 25px; }
  .item-card .name { font-size: 1em; }
  .item-card .desc, .item-card .detail, .item-card .content { font-size: 0.7em; }
  .img-d1 { padding: 0 10px 0 10px; }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  height: 7px;
  width: 7px;
  background: #f6f7fb;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: #e0e7f2;
  border-radius: 6px;
  transition: background 0.10s;
}
::-webkit-scrollbar-thumb:hover {
  background: #c8d0e7;
}

@media (max-width: 450px) {
  .container {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
    border-radius: 25px;
  }
}

/* ---------- IMAGE WRAPPER ---------- */
.img-d1 {
  padding: 0 30px 0 30px;
}
.img-d1 img {
  width: 100%;
  border-radius: 25px;
  
}