/* ==========================================================================
   content.css — article pages, hotel-data card, accommodation grid
   (baanmaikaew.com).

   ARTICLE LAYER REDESIGN 2026-10-29 — "Thai garden guesthouse journal":
   the shared story-* and artcard skeleton used by the builder-family sites
   was replaced with a journal language rooted in this site's own Themify
   identity — peach band rgb(255,224,199)/#fbe7d4, warm brown #6d391a,
   Mitr display (Thai + Latin), Public Sans body, rounded corners, pill
   buttons, bilingual TH/EN micro-labels. The recovered theme css files
   stay untouched; everything article-specific lives here.
   ========================================================================== */

:root {
  --accent: #a14e1d;
  --accent-dark: #6d391a;
  --accent-soft: #e8b98a;
  --ink: #333333;
  --muted: #757575;
  --bg: #ffffff;
  --peach: #fbe7d4;
  --peach-band: #ffe0c7;
  --panel: #fdf4ea;
  --line: #ecdccb;
  --shadow: 0 2px 10px rgba(109, 57, 26, .10);
  --shadow-hover: 0 6px 18px rgba(109, 57, 26, .16);
  --radius: 8px;
  --radius-lg: 14px;
  --pill: 30px;
  --heading: 'Mitr', 'Segoe UI', Tahoma, sans-serif;
  --body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.75 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   ARTICLE PAGES — guesthouse journal
   ========================================================================== */

.article {
  max-width: 980px; margin: 0 auto; padding: 0 20px 60px;
}

/* peach masthead band overlapping the hero's bottom edge */
.journal-band {
  position: relative;
  background: var(--peach-band);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  margin: -70px 20px 32px;
  padding: 28px 22px 24px;
}
.journal-kicker {
  margin: 0 0 10px; display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  font-family: var(--heading); font-weight: 400;
  font-size: .82rem; color: var(--accent-dark); letter-spacing: .06em;
}
.journal-kicker::before, .journal-kicker::after {
  content: ""; width: 34px; height: 2px; background: var(--accent-soft); border-radius: 2px;
}
.story-h1 {
  font-family: var(--heading); font-weight: 500;
  font-size: 1.9rem; line-height: 1.4; letter-spacing: .01em;
  color: var(--accent-dark); text-align: center;
  margin: 0 0 .4em;
}
.story-byline {
  margin: 0; font-size: .9rem; color: var(--muted); text-align: center;
  border: 0; padding: 0;
}
.story-intro { font-size: 1.02rem; color: var(--muted); margin: 0 0 1.6em; }

/* body: Mitr heads with peach leaf-tab marker */
.story-text h2 {
  font-family: var(--heading); font-weight: 500;
  font-size: 1.3rem; line-height: 1.45; color: var(--accent-dark);
  margin: 2.1em 0 .6em;
  padding-bottom: .35em;
  border-bottom: 2px solid var(--peach);
  position: relative;
}
.story-text h2::before {
  content: ""; display: inline-block;
  width: .55em; height: .55em; margin-right: .5em;
  background: var(--accent-soft);
  border-radius: 50% 50% 50% 0;   /* leaf shape */
  transform: rotate(-45deg) translateY(-.08em);
}
.story-text h3 { font-family: var(--heading); font-weight: 500; font-size: 1.1rem; color: var(--accent-dark); margin: 1.7em 0 .5em; }
.story-text p { margin: .85em 0; }
.story-text ul, .story-text ol { margin: .85em 0; padding-left: 1.5em; }
.story-text li { margin: .3em 0; }
.story-text li::marker { color: var(--accent); }
.story-text blockquote {
  margin: 1.4em 0; padding: 1em 1.3em;
  background: var(--peach); border-radius: var(--radius);
  color: var(--accent-dark);
}
.story-text blockquote p { margin: .3em 0; }
.story-text pre {
  background: var(--panel); border: 1px solid var(--line);
  padding: 12px 14px; border-radius: var(--radius); overflow-x: auto; font-size: .9em;
}
.story-text code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }
.story-text table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .95em; }
.story-text th, .story-text td {
  border: 1px solid var(--line); padding: 8px 12px;
  text-align: left; vertical-align: top;
}
.story-text th { background: var(--peach); color: var(--accent-dark); font-family: var(--heading); font-weight: 400; }
.story-text hr { border: 0; border-top: 2px dashed var(--line); margin: 2.4em 0; }
.story-text img { border-radius: var(--radius); }

/* ---- photo-first journal: hero + snapshot pairs ---------------------------- */
/* the first photo opens the page full-width; the title band overlaps its
   bottom edge; the remaining photos travel as 2-up postcard pairs. */
.bm-hero {
  margin: 0 -20px; line-height: 0;
  border-bottom: 6px solid var(--peach);
  cursor: zoom-in;
}
.bm-hero img {
  display: block; width: 100%; height: 380px; object-fit: cover;
}

.pair-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px; margin: 2.5em 0 1.2em;
}
.pair-row .story-photo {
  margin: 0; line-height: 0; overflow: hidden;
  border: 5px solid var(--peach); border-radius: var(--radius-lg);
  background: var(--peach); cursor: zoom-in;
  transition: box-shadow .16s ease, transform .16s ease;
}
.pair-row .story-photo:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pair-row .story-photo img { display: block; width: 100%; height: 170px; object-fit: cover; border-radius: 9px; }
.pair-row .story-photo:only-child { grid-column: 1 / -1; }
.pair-row .story-photo:only-child img { height: 260px; }
@media (max-width: 560px) {
  .bm-hero { margin: 0 -16px; }
  .bm-hero img { height: 220px; }
  .pair-row { gap: 10px; }
  .pair-row .story-photo img { height: 104px; }
  .pair-row .story-photo:only-child img { height: 180px; }
}

/* ---- "human-written" sticky note (bilingual) ------------------------------- */
.story-note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--accent-soft); border-radius: var(--radius);
  padding: 14px 18px; margin: 34px 0 36px;
}
.story-note-badge {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
}
.story-note-tag {
  display: inline-block; font-family: var(--heading); font-weight: 400;
  font-size: .78rem; color: var(--accent-dark);
  background: var(--peach); border-radius: var(--pill);
  padding: 1px 12px; margin-bottom: 5px;
}
.story-note p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--ink); }

/* ---- hotel sheet: journal clipping, placed above the first h2 -------------- */
/* Layout rendered by js/hotel-data.js (hsheet-* DOM). */
hotel-data { display: block; margin: 2.2em 0 2em; }
.hsheet {
  background: var(--panel);
  border: 1px solid var(--accent-soft); border-radius: var(--radius-lg);
  padding: 26px 24px 20px;
  position: relative;
}
.hsheet::before {
  content: "ลักสาร์ำ · Hotel info";
  position: absolute; top: -12px; left: 20px;
  background: var(--accent-dark); color: #fff;
  font-family: var(--heading); font-weight: 400; font-size: .74rem;
  letter-spacing: .04em;
  padding: 2px 14px 3px; border-radius: var(--pill);
}
.hsheet-head { display: flex; gap: 16px; align-items: center; }
.hsheet-seal {
  flex: 0 0 auto; width: 66px; height: 66px; border-radius: 50%;
  background: var(--peach); border: 2px solid var(--accent-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
}
.hsheet-score {
  font-family: var(--heading); font-weight: 500; font-size: 1.3rem;
  color: var(--accent-dark); line-height: 1;
}
.hsheet-stars {
  position: relative; display: inline-block;
  font-size: .62rem; line-height: 1; letter-spacing: 1px; color: #e0c7ac;
}
.hsheet-stars-bg { white-space: nowrap; }
.hsheet-stars-fg {
  position: absolute; top: 0; left: 0;
  overflow: hidden; white-space: nowrap; color: var(--accent);
}
.hsheet-titlewrap { min-width: 0; }
.hsheet-name {
  font-family: var(--heading); font-weight: 500; font-size: 1.15rem;
  color: var(--accent-dark); line-height: 1.4;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hsheet-tag {
  font-family: var(--body); font-size: .66rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-dark); background: var(--peach);
  border-radius: var(--pill); padding: 3px 12px;
}
.hsheet-count { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.hsheet-facts {
  list-style: none; margin: 16px 0 0; padding: 14px 0 0;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 7px;
}
.hsheet-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .88rem; color: var(--muted); text-decoration: none; width: fit-content;
}
.hsheet-row svg { flex: 0 0 auto; color: var(--accent); margin-top: 3px; }
a.hsheet-row:hover { color: var(--accent-dark); text-decoration: underline; }
.hsheet-cta {
  display: block; margin: 18px 0 0; text-align: center;
  padding: 11px 20px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .92rem; border-radius: var(--pill);
  transition: background-color .25s ease;
}
.hsheet-cta:hover { background: var(--accent-dark); color: #fff; }
@media (max-width: 560px) {
  .hsheet { padding: 20px 16px 16px; }
  .hsheet-seal { width: 56px; height: 56px; }
  .hsheet-score { font-size: 1.1rem; }
  .hsheet-name { font-size: 1.05rem; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(46, 23, 2, .93);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw; max-height: 84vh;
  border-radius: var(--radius-lg); border: 6px solid var(--peach);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  background: var(--peach);
}
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  width: 44px; height: 44px; font-size: 22px; line-height: 1;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.lightbox button:hover { background: var(--accent); border-color: var(--accent); }
.lightbox-x { top: 18px; right: 18px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   ACCOMMODATION GRID — journal index (homepage section + /accommodation/)
   Peach band, big-snapshot entries, featured-first horizontal card.
   ========================================================================== */

.jrnl { padding: 46px 0 54px; clear: both; background: var(--peach); }
.jrnl-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.jrnl-head {
  font-family: var(--heading); font-weight: 500;
  margin: 0 0 4px; text-align: center; font-size: 1.7rem; color: var(--accent-dark);
}
.jrnl-sub {
  margin: 0 auto 30px; text-align: center; color: var(--muted); font-size: .95rem;
  max-width: 640px;
}
.jrnl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.jrnl-list-page { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* one journal entry */
.jcard {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .16s ease, box-shadow .16s ease;
}
.jcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); color: inherit; }
.jcard-img { line-height: 0; overflow: hidden; }
.jcard-img img {
  display: block; width: 100%; height: 200px; object-fit: cover;
  transition: transform .3s ease;
}
.jcard:hover .jcard-img img { transform: scale(1.045); }
.jcard-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 20px 18px; }
.jcard-hotel {
  font-family: var(--heading); font-weight: 400;
  font-size: .8rem; color: var(--accent); margin-bottom: 5px;
  letter-spacing: .04em;
}
.jcard-title { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.5; color: var(--accent-dark); }
.jcard:hover .jcard-title { color: var(--accent); }
.jcard-text {
  margin: 0 0 14px; font-size: .88rem; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.jcard-meta {
  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: .8rem; color: var(--muted);
}

/* featured first entry: image beside the text on desktop */
@media (min-width: 701px) {
  .jrnl-list .jcard:first-child {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: stretch;
  }
  .jrnl-list .jcard:first-child .jcard-img { height: auto; }
  .jrnl-list .jcard:first-child .jcard-img img { height: 100%; min-height: 250px; }
  .jrnl-list .jcard:first-child .jcard-body { padding: 24px 28px 26px; justify-content: center; }
  .jrnl-list .jcard:first-child .jcard-title { font-size: 1.3rem; }
}
.jrnl-list .jcard:first-child:not(:has(.jcard-img)) { display: flex; grid-column: 1 / -1; }

.jrnl-more {
  display: table; margin: 32px auto 0; padding: 10px 30px;
  border: 0; border-radius: var(--pill);
  color: #fff; background: var(--accent); font-size: .85rem; font-weight: 700;
  letter-spacing: .05em; text-decoration: none;
  transition: background-color .3s ease, transform .16s ease;
}
.jrnl-more:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

.jrnl a.jcard, .jrnl a.jcard:link { color: inherit; text-decoration: none; }
.jrnl a.jrnl-more, .jrnl a.jrnl-more:link { color: #fff; text-decoration: none; }

/* ---- article page footer -------------------------------------------------- */
.pagefoot {
  background: var(--accent-dark); color: rgba(255, 255, 255, .82); margin-top: 46px;
  border-top: 6px solid var(--peach-band);
}
.pagefoot-in {
  max-width: 1180px; margin: 0 auto; padding: 34px 20px 38px;
  text-align: center; font-size: .85rem; line-height: 1.8;
}
.pagefoot-brand {
  font-family: var(--heading); letter-spacing: .04em;
  color: #fff;
}
.pagefoot-addr { color: rgba(255, 255, 255, .62); }
.pagefoot a { color: var(--accent-soft); text-decoration: none; }
.pagefoot a:hover { color: #fff; }
.pagefoot-copy { margin-top: 10px; color: rgba(255, 255, 255, .45); font-size: .78rem; }

/* ---- responsive ------------------------------------------------------------ */
@media (max-width: 640px) {
  .article { padding: 0 16px 120px; }
  .journal-band { margin: -48px 12px 26px; padding: 22px 18px 20px; }
  .story-h1 { font-size: 1.45rem; }
  .jrnl { padding: 36px 0 42px; }
  .jrnl-list { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .jcard, .jcard-img img, .jrnl-more, .bm-cta-btn { transition: none; transform: none; }
}

/* ---- top CTA chip: booking button right under the title band -------------- */
.bm-cta-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 30px;
}
.bm-cta-top-note { font-size: .86rem; color: var(--muted); }
.bm-cta-top-note strong { color: var(--accent-dark); }
@media (max-width: 640px) {
  .bm-cta-top { gap: 10px; margin: 0 0 26px; }
  .bm-cta-top .bm-cta-btn { padding: 9px 18px; font-size: .85rem; }
}

/* ---- booking CTA bar: sticky bottom on mobile, band on desktop ------------ */
.bm-cta {
  margin: 44px 0 0;
  background: var(--peach);
  border: 1px solid var(--accent-soft); border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.bm-cta-text { flex: 1 1 260px; min-width: 0; }
.bm-cta-head {
  font-family: var(--heading); font-weight: 500; font-size: 1.1rem;
  color: var(--accent-dark);
}
.bm-cta-sub { font-size: .86rem; color: var(--ink); margin: 4px 0 0; }
.bm-cta-btn {
  display: inline-block; text-align: center; padding: 11px 24px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .92rem;
  border-radius: var(--pill); transition: background-color .25s ease;
}
.bm-cta-btn:hover { background: var(--accent-dark); color: #fff; }
.bm-cta-disc { width: 100%; font-size: .72rem; line-height: 1.5; color: var(--muted); text-align: center; }
@media (max-width: 640px) {
  .bm-cta {
    position: fixed; left: 10px; right: 10px; bottom: 10px;
    z-index: 500; margin: 0;
    padding: 10px 14px; gap: 10px; flex-wrap: nowrap; align-items: center;
    box-shadow: 0 8px 24px rgba(46, 23, 2, .3);
  }
  .bm-cta-head { font-size: .95rem; }
  .bm-cta-sub { display: none; }
  .bm-cta-btn { margin-left: auto; padding: 9px 16px; font-size: .85rem; }
  .bm-cta-disc { display: none; }
}

/* ---- mobile menu fallback (Themify drawer CSS was never archived) ----
   Uses the menu module's own .is-open mechanism with the exact computed
   colors of the homepage menu. Applied to homepages + article pages.
   Toggled by js/article-nav.js. See _builder/article_nav_extract.py. */
@media (max-width: 600px) {
  .module-menu .module-menu-container.is-open {
    display: block;
  }
  .module-menu .module-menu-container.is-open ul.ui.nav {
    display: block;
    width: 100%;
    background-color: rgb(255, 242, 224);
    border-radius: 4px;
    padding: 6px 0;
  }
  .module-menu .module-menu-container.is-open ul.ui.nav li {
    display: block;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
  }
  .module-menu .module-menu-container.is-open ul.ui.nav li:last-child {
    border-bottom: 0;
  }
  .module-menu .module-menu-container.is-open ul.ui.nav li a {
    display: block;
    padding: 11px 16px;
    font-size: 19px;
    color: rgb(92, 89, 89);
  }
  .module-menu .module-menu-container.is-open ul.ui.nav li a:hover,
  .module-menu .module-menu-container.is-open ul.ui.nav li.current-menu-item a,
  .module-menu .module-menu-container.is-open ul.ui.nav li.current_page_item a {
    background-color: rgb(201, 201, 201);
  }
}
