/* ============================================================
   THING TO DO IN CHIANG RAI — DESIGN SYSTEM
   Charter ข้อ 7: ห้ามเปลี่ยนสี/ฟอนต์ตามอำเภอใจ
   ============================================================ */

:root {
  --green: #2F6B4F;
  --green-dark: #234F3B;
  --gold: #D99A2B;
  --cream: #FAF7F0;
  --section: #F1EFE7;
  --text: #222222;
  --warn: #B85C38;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(34, 34, 34, 0.08);
  --shadow-lg: 0 6px 24px rgba(34, 34, 34, 0.12);
  --font-head: "Fraunces", "Merriweather", Georgia, serif;
  --font-body: "Outfit", "Inter", -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  /* space for sticky bottom bar on mobile */
  padding-bottom: 64px;
}

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

a { color: var(--green); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--green-dark); }
h1 { font-size: 32px; }
h2 { font-size: 24px; margin-bottom: 12px; }
h3 { font-size: 20px; margin-bottom: 8px; }

p { margin-bottom: 14px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

section { padding: 36px 0; }
section.alt { background: var(--section); }

/* ---------- Header ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid #e5e0d4;
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; max-width: 1080px; margin: 0 auto;
}
.logo {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  color: var(--green-dark); text-decoration: none; line-height: 1.2;
}
.logo span { color: var(--gold); }

.menu-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 26px; color: var(--green-dark); padding: 4px 8px;
}

.main-nav { display: none; }
.main-nav.open {
  display: block; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--cream); border-bottom: 1px solid #e5e0d4;
  box-shadow: var(--shadow-lg);
}
.main-nav ul { list-style: none; }
.main-nav a {
  display: block; padding: 14px 20px; text-decoration: none;
  color: var(--text); font-weight: 500; border-top: 1px solid #eee8da;
}
.main-nav a:hover, .main-nav a.active { color: var(--green); background: var(--section); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white);
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 55%, #4d8a6a 100%);
  padding: 64px 0 56px; text-align: center;
}
.hero.has-image { background-size: cover; background-position: center; }
.hero .overlay { position: absolute; inset: 0; background: rgba(25, 50, 38, 0.55); }
.hero .container { position: relative; }
.hero h1 { color: var(--white); margin-bottom: 12px; }
.hero p { font-size: 17px; max-width: 620px; margin: 0 auto 24px; opacity: 0.95; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; min-height: 48px; padding: 12px 24px;
  border-radius: var(--radius); font-size: 16px; font-weight: 600;
  text-decoration: none; text-align: center; cursor: pointer;
  border: 2px solid transparent; transition: all .15s ease;
  font-family: var(--font-body);
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: var(--white); color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--section); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #c08620; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }

.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-img {
  height: 180px; background: linear-gradient(135deg, var(--green) 0%, #6aa183 100%);
  display: flex; align-items: flex-end; padding: 12px;
  color: rgba(255,255,255,.9); font-size: 13px; font-style: italic;
  background-size: cover; background-position: center;
}
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 a { text-decoration: none; color: var(--green-dark); }
.card-meta { font-size: 14px; color: #6b6b6b; margin-bottom: 8px; }
.card-body p { font-size: 15px; flex: 1; }
.card .btn { align-self: flex-start; margin-top: 10px; padding: 10px 18px; min-height: 44px; }

/* category chip cards */
.chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.chip {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 14px; text-align: center; text-decoration: none;
  color: var(--green-dark); font-weight: 600;
}
.chip .emoji { display: block; font-size: 26px; margin-bottom: 6px; }
.chip:hover { background: var(--section); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; margin: 0 6px 6px 0;
}
.badge-gold { background: #faf0db; color: #9c6c12; }
.badge-green { background: #e4efe9; color: var(--green-dark); }
.badge-warn { background: #f6e5dd; color: var(--warn); }

.unverified {
  font-size: 12.5px; color: #8a8a8a; font-style: italic;
}
.unverified::before { content: "ⓘ "; }

/* ---------- Honest note box ---------- */
.honest-note {
  background: #fdf6e9; border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px; margin: 14px 0; font-size: 15px;
}
.honest-note strong { color: #9c6c12; }

.warn-box {
  background: #f9ece5; border-left: 4px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px; margin: 14px 0; font-size: 15px;
}
.warn-box strong { color: var(--warn); }

.tip-box {
  background: #e9f1ec; border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px; margin: 14px 0; font-size: 15px;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
table {
  border-collapse: collapse; width: 100%; min-width: 560px;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); font-size: 15px;
}
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #efeadd; }
th { background: var(--green); color: var(--white); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td.rec { color: var(--green); font-weight: 700; }
td.notrec { color: var(--warn); font-weight: 600; }

/* ---------- Timeline (itinerary) ---------- */
.timeline { list-style: none; margin: 20px 0; }
.timeline li {
  position: relative; padding: 0 0 26px 30px;
  border-left: 3px solid #d8e3dc; margin-left: 8px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -9.5px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--cream);
}
.timeline .time { font-weight: 700; color: var(--green-dark); font-size: 15px; }
.timeline h3 { margin: 2px 0 6px; }
.timeline p { font-size: 15px; margin-bottom: 6px; }

/* ---------- CTA section (soft) ---------- */
.soft-cta {
  background: var(--green-dark); color: var(--white);
  border-radius: var(--radius); padding: 28px 22px; margin: 28px 0;
  text-align: center;
}
.soft-cta h2, .soft-cta h3 { color: var(--white); }
.soft-cta p { opacity: .92; max-width: 560px; margin: 8px auto 18px; font-size: 15.5px; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 10px; padding: 0;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 16px 18px;
  font-family: var(--font-body); color: var(--green-dark); font-size: 16px;
}
.faq details > div { padding: 0 18px 16px; font-size: 15px; }

/* ---------- Sticky bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--white); border-top: 1px solid #e5e0d4;
  display: flex; box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.bottom-nav a {
  flex: 1; text-align: center; padding: 8px 2px 9px;
  text-decoration: none; color: #6b6b6b; font-size: 11.5px; font-weight: 600;
}
.bottom-nav a .ico { display: block; font-size: 19px; margin-bottom: 1px; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--green); }
.bottom-nav a.tour-btn { color: var(--gold); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13.5px; color: #8a8a8a; padding: 14px 0 0; }
.breadcrumb a { color: #8a8a8a; text-decoration: none; }
.breadcrumb a:hover { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark); color: #d8e3dc;
  padding: 36px 0 28px; margin-top: 40px; font-size: 14.5px;
}
.site-footer a { color: #f0e6cf; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 { color: var(--white); font-size: 16px; margin-bottom: 10px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.footer-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; opacity: .8; }

/* ---------- Utility ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.section-head p { color: #5d5d5d; font-size: 15.5px; }
.center { text-align: center; }
.mt-2 { margin-top: 16px; }

/* ============== TABLET ≥ 640px ============== */
@media (min-width: 640px) {
  h1 { font-size: 42px; }
  h2 { font-size: 30px; }
  h3 { font-size: 22px; }
  body { font-size: 17px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .chip-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 88px 0 76px; }
}

/* ============== DESKTOP ≥ 1024px ============== */
@media (min-width: 1024px) {
  h1 { font-size: 52px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
  body { font-size: 18px; padding-bottom: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .chip-grid { grid-template-columns: repeat(6, 1fr); }
  .bottom-nav { display: none; }
  .menu-toggle { display: none; }
  .main-nav { display: block !important; position: static; box-shadow: none; background: none; border: none; }
  .main-nav ul { display: flex; gap: 4px; }
  .main-nav a { padding: 8px 13px; border: none; border-radius: 8px; font-size: 15px; }
  .hero { padding: 110px 0 96px; }
  .hero p { font-size: 19px; }
}
