
/* HERO */
.faq-hero{
  position:relative;
  background:linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border-bottom:1px solid var(--border);
}
.faq-hero .wrap{ padding: clamp(40px, 8vw, 84px) 0 }
.eyebrow{
  font-size:14px; color:var(--brand-blue); letter-spacing:.04em;
  text-transform:uppercase; margin:0 0 6px;
}
.title{ font-size: 42px; line-height:1.45; margin:0 ; font-weight: 400; color:#342216 ; transform: skewX(-6deg); }
.subtitle{ font-size: px; color:#64748b; margin:10px 0 0 }

/* Search */
.searchbar{ margin-top:20px; display:flex; gap:10px; align-items:center }
.searchbar input{
  flex:1; padding:14px 14px; border:1px solid var(--border);
  border-radius:20px; outline:none; background:var(--brand-yellow); color:#0f172a;
}
.searchbar input:focus{ box-shadow: var(--ring); border-color:#c7d7fe }
.searchbar button{
  padding:12px 16px; border-radius:20px; border:1px solid var(--border);
  background:var(--brand-blue); cursor:pointer; color:#fff;
}
.searchbar button:hover{ background:#f8fafc }


/* Layout */
.layout{
  display:grid; grid-template-columns: 260px 1fr; gap: 28px;
  padding: clamp(22px, 5vw, 36px) 0;
}
@media (max-width: 960px){
  .layout{ grid-template-columns: 1fr; }
}

/* Sidebar (TOC) */
.toc{
  position:sticky; top:14px; align-self:start;
  background:var(--bg-alt); border:1px solid var(--border);
  border-radius:16px; padding:14px;
}
.toc h3{ margin:6px 8px 8px; font-size:14px; color:#0f172a }
.toc ul{ list-style:none; padding:0; margin:0 }
.toc a{
  display:block; padding:10px 12px; color:#0f172a;
  border-radius:10px; font-size:14px;
}
.toc a[aria-current="true"], .toc a:hover{
  background:#eaf1ff; color:var(--brand-blue); text-decoration:none;
}

/* Section Head */
.faq-section{ scroll-margin-top: 90px; }
.faq-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin: 8px 0 14px;
}
.faq-head h2{ margin:0; font-size: clamp(18px, 2.6vw, 22px) }
.faq-head .badge{
  display:inline-flex; align-items:center; gap:6px;
  background:#eadfd1; color:#373435; border:1px solid #e5e7eb;
  font-size:12px; padding:6px 10px; border-radius:999px;
}

/* Accordion (details/summary) */
.faq{ display:grid; gap:10px }
details{
  background:#fff; border:1px solid var(--border);
  border-radius:14px; padding: 2px 6px;
}
summary{
  list-style:none; cursor:pointer; padding: 14px 12px; font-weight:600;
  display:flex; gap:10px; align-items:center;
}
summary::-webkit-details-marker{ display:none }
details[open]{ box-shadow: var(--shadow) }
.q-icon{
  width:22px; height:22px; border-radius:6px;
  background:#eaf1ff; color:#0b57d0; display:grid; place-items:center;
  font-weight:700; font-size:13px;
}
.answer{ padding: 0 14px 16px 44px; color:#0f172a }
.answer p{ margin: 0 0 10px }
.answer ul{ margin:8px 0 12px 18px }
.muted{ color:var(--muted) }

/* Callouts */
.callout{
  background:#fff7ed; border:1px solid #fed7aa; color:#9a3412;
  padding:14px; border-radius:14px; font-size:14px;
}
.callout.blue{
  background:#eff6ff; border-color:#bfdbfe; color:#1e40af;
}

/* CTA */
.faq-cta{
  margin: 34px 0 64px;
  background:linear-gradient(180deg, #0a66ff, #0a6bff);
  color:#fff; border-radius:18px; padding: clamp(16px, 3vw, 28px);
}
.faq-cta .row{
  display:grid; grid-template-columns: 1fr auto; align-items:center; gap:16px;
}

.faq-cta h3{
  margin:0;
  font-size: 26px;
  font-weight: 400;   /* 👈 เพิ่มน้ำหนัก Regular */
}
.faq-cta p{
  margin:6px 0 0;
  color:rgba(255,255,255,.9);
  font-weight: 400;   
}
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 16px; border-radius:12px; border:1px solid rgba(255,255,255,.25);
  color:#fff; text-decoration:none; background:rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
}
.btn.orange{ background:var(--brand-orange); border-color:transparent }
.btn.orange:hover{ filter: brightness(0.95); }

/* Footer-ish spacing */
.space{ height: 40px }

/* เล็กน้อยสำหรับ mobile */
@media (max-width:640px){
  .toc{ position:static }
  .answer{ padding-left: 14px }
}

/* ===== Mobile tweaks (<=640px) เฉพาะหน้า FAQ ===== */
@media (max-width: 640px){
  .faq-hero .wrap{
    /* ลด padding ส่วนหัวให้พอดีจอเล็ก */
    padding: 28px 0 22px;
  }

  .eyebrow{
    font-size: 12px;            /* เหมือนหน้าอื่น */
    letter-spacing: .08em;
  }

  .title{
    font-size: 26px;            /* ✅ เท่ามาตรฐานหน้าอื่น */
    line-height: 1.35;
    font-weight: 400;
    transform: skewX(-6deg);    /* คงเอียงแบบที่ใช้ */
    color:#342216;
  }

  .subtitle{
    font-size: 14px;            /* ✅ แก้จาก font-size: px; */
    color:#64748b;
    margin-top: 6px;
  }
}

/* ===== มือถือ (<=640px) ย่อเพิ่มอีกนิด ===== */
@media (max-width: 640px){
  .faq-cta{
    margin: 16px 0 28px;
    padding: 12px;                      /* ย่อ padding */
    border-radius: 12px;
    width: 85%;                   /* กว้าง 85% ของจอ */
    justify-self: center;
     text-align: center; 
  }
  .faq-cta .row{
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .faq-cta h3{ font-size: 18px; }       /* หัวข้อเล็กลง */
  .faq-cta p{ font-size: 13px; }        /* คำบรรยายเล็กลง */
  .btn{
    width: 100%;                        /* ปุ่มเต็มบรรทัดในมือถือ */
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ===== FAQ: ปรับขนาดฟอนต์บนมือถือ ===== */
@media (max-width: 640px){
  .faq-head h2{
    font-size: 18px;       /* หัวข้อหมวดเล็กลง */
  }
  summary{
    font-size: 14px;       /* คำถามเล็กลง */
  }
  .answer{
    font-size: 13px;       /* คำตอบเล็กลง */
    line-height: 1.5;      /* ระยะห่างบรรทัดพอดี */
  }
  .faq-head .badge{
    font-size: 11px;       /* ป้าย badge เล็กลง */
    padding: 4px 8px;
  }
  .q-icon{
    width: 18px;
    height: 18px;
    font-size: 11px;
  }
}
