/* ============================================================
   ธนกร อพาร์ทเม้นท์ — Landing Page Styles
   Mobile-first · สีอบอุ่น เป็นมิตร · เน้นปุ่มโทร
   ============================================================ */

:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --surface-alt: #fdf1e7;
  --ink: #2a211c;
  --muted: #6f635b;
  --brand: #c2562e;        /* ส้มดินเผา */
  --brand-dark: #a3431f;
  --brand-2: #e2873d;      /* อำพัน */
  --brand-soft: #fbe7d8;
  --line-green: #06c755;   /* สี LINE */
  --line-green-dark: #05a948;
  --border: #ecddce;
  --shadow: 0 6px 22px rgba(120, 70, 35, 0.10);
  --shadow-sm: 0 2px 8px rgba(120, 70, 35, 0.08);
  --radius: 16px;
  --radius-sm: 11px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  /* กันคอนเทนต์โดนแถบปุ่มโทรล่างบนมือถือบัง */
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

h1, h2, h3 { font-family: "Prompt", "Sarabun", sans-serif; line-height: 1.25; font-weight: 600; }

a { color: var(--brand-dark); }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: "Prompt", sans-serif; font-weight: 600; font-size: 1.05rem;
  text-decoration: none; border: 2px solid transparent; border-radius: 999px;
  padding: 13px 22px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  line-height: 1.2; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { flex: 0 0 auto; }

.btn-call { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(194, 86, 46, .32); }
.btn-call:hover { background: var(--brand-dark); box-shadow: 0 8px 20px rgba(194, 86, 46, .4); }

.btn-line { background: var(--line-green); color: #fff; box-shadow: 0 6px 16px rgba(6, 199, 85, .28); }
.btn-line:hover { background: var(--line-green-dark); }

.btn-outline { background: var(--surface); color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }

.btn-lg { font-size: 1.18rem; padding: 16px 28px; }
.btn-sm { font-size: .95rem; padding: 9px 16px; }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 241, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  box-shadow: var(--shadow-sm); background: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: "Prompt", sans-serif; font-size: 1.06rem; }
.brand-text small { color: var(--muted); font-size: .8rem; }
.header-call { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 90% -10%, rgba(226, 135, 61, .25), transparent 55%),
    radial-gradient(110% 80% at -10% 110%, rgba(194, 86, 46, .14), transparent 55%),
    linear-gradient(180deg, #fff8f1 0%, #ffeede 100%);
  padding: 40px 0 46px;
  text-align: center;
}
.hero-inner { display: grid; gap: 26px; align-items: center; }
.hero-media img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 4px solid #fff;
}
.eyebrow {
  display: inline-block; font-family: "Prompt", sans-serif; font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; color: var(--brand-dark); background: var(--brand-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: 2.05rem; font-weight: 700; letter-spacing: -.01em; }
.hero-accent { color: var(--brand); }
.hero-sub { margin: 16px auto 0; max-width: 620px; color: var(--muted); font-size: 1.08rem; }
.hero-sub strong { color: var(--ink); }

.hero-cta { display: flex; flex-direction: column; gap: 12px; margin: 26px auto 0; max-width: 380px; }

.hero-note {
  display: inline-flex; align-items: flex-start; gap: 8px; text-align: left;
  margin: 22px auto 0; max-width: 460px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 15px; font-size: .92rem; color: var(--muted); box-shadow: var(--shadow-sm);
}
.hero-note svg { color: var(--brand); flex: 0 0 auto; margin-top: 3px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 50px 0; }
.section-alt { background: var(--surface-alt); }
.section-title { font-size: 1.6rem; text-align: center; }
.section-lead { text-align: center; color: var(--muted); margin: 10px auto 30px; max-width: 600px; }

/* ---------- จุดเด่น ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.feature-ic {
  display: inline-grid; place-items: center; width: 46px; height: 46px; font-size: 1.5rem;
  background: var(--brand-soft); border-radius: 12px; margin-bottom: 12px;
}
.feature-card h3 { font-size: 1.12rem; margin-bottom: 5px; }
.feature-card p { color: var(--muted); font-size: .97rem; }

.nearby {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.nearby-title { font-size: 1.18rem; margin-bottom: 14px; text-align: center; }
.nearby-list { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0; }
.nearby-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 4px; border-bottom: 1px dashed var(--border);
}
.nearby-list li:last-child { border-bottom: none; }
.nearby-list span { font-weight: 500; }
.nearby-list em { color: var(--brand-dark); font-style: normal; font-weight: 600; white-space: nowrap; }
.nearby-foot { margin-top: 12px; font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- ห้องและราคา ---------- */
.room-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.room-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.room-card-featured { border-color: var(--brand); box-shadow: 0 8px 24px rgba(194, 86, 46, .16); }
.room-tag {
  position: absolute; top: -11px; right: 18px; background: var(--brand); color: #fff;
  font-family: "Prompt", sans-serif; font-size: .78rem; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
}
.room-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.room-head h3 { font-size: 1.22rem; }
.room-size {
  flex: 0 0 auto; font-size: .82rem; color: var(--brand-dark); background: var(--brand-soft);
  padding: 4px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.room-price { font-size: 1.05rem; color: var(--muted); margin-bottom: 8px; }
.room-price strong { font-family: "Prompt", sans-serif; font-size: 1.5rem; color: var(--brand); }
.room-floors {
  font-size: .87rem; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft);
  padding: 7px 11px; border-radius: 9px; margin-bottom: 11px;
}
.room-desc { color: var(--muted); font-size: .95rem; margin-bottom: 18px; flex: 1 1 auto; }

.rooms-note, .hero-note {
  -webkit-text-size-adjust: 100%;
}
.rooms-note {
  display: flex; align-items: flex-start; gap: 8px; justify-content: center;
  margin-top: 24px; color: var(--muted); font-size: .92rem; text-align: left;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px;
  max-width: 640px; margin-left: auto; margin-right: auto; box-shadow: var(--shadow-sm);
}
.rooms-note svg { color: var(--brand); flex: 0 0 auto; margin-top: 3px; }

/* ---------- ค่าใช้จ่าย ---------- */
.cost-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 760px; margin: 0 auto; }
.cost-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.cost-block-title {
  font-size: 1.1rem; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid var(--brand-soft);
}
.cost-list { list-style: none; }
.cost-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px dashed var(--border);
}
.cost-list li:last-child { border-bottom: none; }
.cost-list span { font-weight: 500; }
.cost-list em { color: var(--brand-dark); font-style: normal; font-weight: 600; text-align: right; }
.cost-hint { margin-top: 12px; font-size: .86rem; color: var(--muted); }

/* ---------- รูปภาพ ---------- */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery-item {
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; display: block; }
.gallery-item figcaption {
  padding: 9px 10px; font-family: "Prompt", sans-serif; font-size: .86rem;
  color: var(--ink); text-align: center;
}

/* ---------- แผนที่ ---------- */
.map-wrap {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); max-width: 880px; margin: 0 auto;
}
.map-wrap iframe { width: 100%; height: 340px; border: 0; }
.btn-map { display: flex; max-width: 320px; margin: 18px auto 0; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-family: "Prompt", sans-serif;
  font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: 0 0 auto; width: 11px; height: 11px;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px;
}
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-body { padding: 0 20px 18px; color: var(--muted); }
.faq-body a { font-weight: 600; }

/* ---------- Contact CTA ---------- */
.contact { background: linear-gradient(180deg, #ffeede 0%, #fff8f1 100%); }
.contact-inner { text-align: center; }
.contact-lead { color: var(--muted); margin: 8px auto 26px; }
.contact-cta { display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 0 auto 22px; }
.line-card {
  display: flex; align-items: center; gap: 16px; justify-content: center; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow-sm); max-width: 380px; margin: 0 auto 24px;
}
.line-card img { width: 116px; height: 116px; border-radius: 10px; flex: 0 0 auto; }
.line-card-text { display: flex; flex-direction: column; gap: 2px; font-size: .95rem; }
.line-card-text strong { font-family: "Prompt", sans-serif; font-size: 1.02rem; }
.line-card-text b { color: var(--line-green-dark); }
.line-card-text a { font-weight: 600; }
.contact-info { list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin: 0 auto; text-align: left; }
.contact-info li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); }
.contact-info svg { color: var(--brand); flex: 0 0 auto; margin-top: 4px; }
.contact-info a { font-weight: 700; font-family: "Prompt", sans-serif; }

/* ---------- Footer ---------- */
.site-footer { background: #2a211c; color: #f3e7da; text-align: center; padding: 30px 0; }
.footer-brand { font-family: "Prompt", sans-serif; font-weight: 600; font-size: 1.1rem; }
.footer-text { color: #cdbcab; font-size: .95rem; margin-top: 6px; }
.footer-small { color: #9c8a79; font-size: .82rem; margin-top: 12px; }

/* ============================================================
   STICKY MOBILE BAR (เน้นปุ่มโทรบนมือถือ)
   ============================================================ */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 248, 241, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(120, 70, 35, .1);
}
.mobile-bar .btn { flex: 1 1 50%; padding: 14px 10px; font-size: 1.08rem; }
.mb-call { flex: 1 1 60% !important; }
.mb-line { flex: 1 1 40% !important; }

/* ============================================================
   RESPONSIVE — แท็บเล็ตขึ้นไป
   ============================================================ */
@media (min-width: 600px) {
  .hero-cta, .contact-cta { flex-direction: row; justify-content: center; max-width: none; }
  .hero-cta .btn, .contact-cta .btn { flex: 0 1 auto; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .room-grid { grid-template-columns: 1fr 1fr; }
  .cost-wrap { grid-template-columns: 1fr 1fr; }
  .nearby-list { grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }            /* ไม่ต้องเผื่อแถบล่างบนจอใหญ่ */
  .mobile-bar { display: none; }          /* ซ่อนแถบมือถือ */
  .header-call { display: inline-flex; }  /* โชว์ปุ่มโทรบน header */
  .hero { padding: 60px 0 66px; text-align: left; }
  .hero-inner { grid-template-columns: 1.08fr .92fr; gap: 44px; }
  .hero h1 { font-size: 2.9rem; }
  .hero-sub { font-size: 1.18rem; margin-left: 0; margin-right: 0; }
  .hero .hero-cta { justify-content: flex-start; }
  .hero-note { margin-left: 0; margin-right: 0; }
  .section { padding: 70px 0; }
  .section-title { font-size: 2rem; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .room-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ลด motion สำหรับผู้ที่ตั้งค่าไว้ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
