/* Thai Holistic Sleep Center — Focused 3-page Thai site */

:root {
  --teal-900: #0f3d3e;
  --teal-700: #1c6b6d;
  --teal-500: #2c9596;
  --teal-100: #e6f3f3;
  --sand-50: #fbf7f1;
  --sand-100: #f3ebdd;
  --gold: #c9a35a;
  --line-green: #06c755;
  --red: #c94e4e;
  --orange: #d97706;
  --green: #2f8a4d;
  --ink: #1a2a2b;
  --muted: #5a6a6b;
  --line: #e3ddd1;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(15, 61, 62, 0.08);
  --shadow-lg: 0 12px 36px rgba(15, 61, 62, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--sand-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sarabun', sans-serif;
  color: var(--teal-900);
  line-height: 1.3;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--teal-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal-500); }

img { max-width: 100%; display: block; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ===== Header / Nav ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-900);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-900));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  background: white;
}

/* ===== Hero banner strip (above hero) ===== */
.hero-banner-strip {
  width: 100%;
  /* Fallback gradient if image not present */
  background: linear-gradient(135deg, var(--teal-100), var(--sand-50));
  background-size: cover;
  background-position: center;
  /* Tall enough to show branded banner content but not dominate page */
  aspect-ratio: 3 / 1;
  max-height: 360px;
  min-height: 160px;
  display: block;
}

.hero-banner-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 760px) {
  .hero-banner-strip {
    aspect-ratio: 16 / 9;
    max-height: 240px;
  }
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--teal-700);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  font-family: inherit;
}

.btn-primary {
  background: var(--teal-700);
  color: white;
}
.btn-primary:hover {
  background: var(--teal-900);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--teal-700);
  border: 1.5px solid var(--teal-700);
}
.btn-outline:hover {
  background: var(--teal-700);
  color: white;
}

.btn-line {
  background: var(--line-green);
  color: white;
}
.btn-line:hover {
  background: #04a847;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--teal-900);
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--teal-100) 0%, var(--sand-50) 70%);
  padding: 60px 0 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  right: -150px;
  top: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(44,149,150,0.10), transparent 70%);
  border-radius: 50%;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-700);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  position: relative;
  z-index: 1;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin: 18px auto 32px;
  position: relative;
  z-index: 1;
}

.hero-cta {
  position: relative;
  z-index: 1;
}

/* ===== Sections ===== */
.section {
  padding: 60px 0;
}

.section-sand { background: var(--sand-100); }
.section-white { background: var(--white); }

.section-head {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head .eyebrow {
  color: var(--teal-700);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: block;
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ===== Reason cards (why fix sleep apnea) ===== */
.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.reason-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}

.reason-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--teal-100);
  color: var(--teal-700);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 1.5rem;
}

.reason-card h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.reason-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ===== STOP-BANG questionnaire ===== */
.quiz {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.quiz-progress-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--sand-100);
  border-radius: 999px;
  margin: 0 18px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--teal-500);
  width: 0;
  transition: width 0.3s ease;
  border-radius: 999px;
}

.quiz-question {
  display: none;
}

.quiz-question.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quiz-letter {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  margin-right: 10px;
  font-size: 0.95rem;
}

.quiz-q-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 8px;
}

.quiz-q-help {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
  padding-left: 42px;
}

.quiz-options {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.quiz-option {
  flex: 1;
  padding: 18px 20px;
  background: var(--sand-50);
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  transition: all 0.2s;
  text-align: center;
}

.quiz-option:hover {
  border-color: var(--teal-500);
  background: var(--teal-100);
}

.quiz-option.selected {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: white;
}

.quiz-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.quiz-input-group {
  flex: 1;
}

.quiz-input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.quiz-input-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--sand-50);
}

.quiz-input-group input:focus {
  outline: none;
  border-color: var(--teal-500);
  background: white;
}

.quiz-bmi-result {
  font-size: 0.95rem;
  color: var(--teal-700);
  font-weight: 600;
  margin-top: 8px;
  display: none;
}

.quiz-bmi-result.show { display: block; }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.quiz-nav .btn {
  min-width: 110px;
}

.quiz-nav .btn-back {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 10px 18px;
}

.quiz-nav .btn-back:hover {
  color: var(--teal-700);
  background: transparent;
  transform: none;
  box-shadow: none;
}

.quiz-nav .btn-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== Result panel ===== */
.result {
  display: none;
  background: white;
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.result.show { display: block; animation: fadeIn 0.4s ease; }

.result-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.result-badge.low { background: #e6f7ec; color: var(--green); }
.result-badge.intermediate { background: #fef3e2; color: var(--orange); }
.result-badge.high { background: #fce8e8; color: var(--red); }

.result-score {
  font-family: 'Sarabun', serif;
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--teal-900);
  line-height: 1;
  margin: 8px 0 4px;
}

.result-score-label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.result-message {
  background: var(--sand-50);
  border-left: 4px solid var(--teal-500);
  padding: 20px 22px;
  border-radius: 8px;
  text-align: left;
  margin-bottom: 24px;
}

.result-message.low { border-color: var(--green); }
.result-message.intermediate { border-color: var(--orange); }
.result-message.high { border-color: var(--red); }

.result-message h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.result-message p {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.result-recommendation {
  background: var(--teal-100);
  border-radius: 12px;
  padding: 22px 24px;
  text-align: left;
  margin-bottom: 24px;
}

.result-recommendation h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--teal-900);
}

.result-recommendation ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 0.95rem;
}

.result-recommendation li {
  margin-bottom: 8px;
}

.result-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.result-restart {
  display: block;
  margin-top: 18px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.result-restart:hover { color: var(--teal-700); }

/* ===== LINE QR card ===== */
.line-qr-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 18px;
  gap: 8px;
}

.line-qr-card img {
  width: 130px;
  height: 130px;
  display: block;
}

.line-qr-card .qr-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
  line-height: 1.3;
}

.line-qr-card .qr-id {
  font-size: 0.78rem;
  color: var(--line-green);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cta-banner .line-qr-card {
  background: rgba(255,255,255,0.96);
}

/* On mobile, hide QR (LINE button is more useful) */
@media (max-width: 600px) {
  .line-qr-card { display: none; }
}

/* ===== Comparison table (sleep study page) ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.compare-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
}

.compare-card.featured {
  border-color: var(--teal-500);
  border-width: 2px;
  box-shadow: var(--shadow);
}

.compare-card-image {
  margin: -32px -28px 22px;
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 8 / 5;
  overflow: hidden;
}
.compare-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-tag {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--teal-700);
  color: white;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.compare-tag.wellness {
  background: var(--gold);
}

.compare-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.compare-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.compare-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 4px;
}

.compare-price-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 22px;
}

.compare-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.compare-features li {
  padding: 8px 0;
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
}

.compare-features li:last-child { border-bottom: none; }

.compare-features li::before {
  content: '✓';
  color: var(--teal-500);
  font-weight: 700;
  flex-shrink: 0;
}

.compare-features li.no::before {
  content: '–';
  color: var(--muted);
}

/* ===== CPAP product cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.product-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-img {
  aspect-ratio: 16/10;
  background: var(--sand-100);
  display: grid;
  place-items: center;
  color: var(--teal-700);
  position: relative;
}

.product-img svg { width: 45%; opacity: 0.85; }

.product-img.has-photo {
  background: white;
}

.product-img img.product-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  padding: 12px;
}

.product-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--teal-900);
  color: white;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.product-tag.gold { background: var(--gold); }

.product-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-body h3 { margin-bottom: 4px; font-size: 1.1rem; }

.product-body .price {
  color: var(--teal-700);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.product-body p {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 16px;
  flex: 1;
}

/* ===== CTA banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
  color: white;
  padding: 50px 36px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0 0;
}

.cta-banner h2 { color: white; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 540px; margin: 0 auto 24px; }

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-banner .btn-line {
  background: var(--line-green);
}

.cta-banner .btn-call {
  background: white;
  color: var(--teal-900);
}
.cta-banner .btn-call:hover {
  background: var(--sand-50);
  color: var(--teal-900);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--teal-900);
  color: rgba(255,255,255,0.85);
  padding: 36px 0 24px;
  margin-top: 60px;
  text-align: center;
}

.site-footer p { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 8px; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
  flex-wr