
/* ===== ตัวแปรสี ===== */
:root {
  --primary: #1855A3;
  --primary-hover: #144687;
  --primary-soft: #EEF4FC;
  --ink: #151B26;
  --ink-2: #394354;
  --muted: #6B778A;
  --line: #E1E6EE;
  --bg: #F6F8FB;
  --card: #FFFFFF;
  --radius: 12px;
  --head: 'Anuphan', 'Sarabun', sans-serif;
  --body: 'Sarabun', 'Anuphan', sans-serif;
  --sun: #F2A93B;
  --navy: #123B70;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.75; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.35; color: var(--ink); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section, .widget { margin: 0; }

/* ===== ส่วนหัว ===== */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex-shrink: 0; }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.brand-icon svg { width: 20px; height: 20px; fill: #fff; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 19px; }
.brand img { max-height: 40px; width: auto; display: block; }
.search { margin-left: auto; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 14px; height: 38px; }
.search input { border: none; background: transparent; outline: none; font-family: var(--body); font-size: 15px; width: 180px; color: var(--ink); }
.search button { border: none; background: transparent; cursor: pointer; color: var(--muted); display: flex; padding: 6px; }
.search button svg { width: 18px; height: 18px; fill: currentColor; }
.nav { border-top: 1px solid var(--line); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav li a { display: block; padding: 10px 12px; font-family: var(--head); font-weight: 500; font-size: 15px; color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; }
.nav li a:hover, .nav li a.on { color: var(--primary); border-bottom-color: var(--primary); text-decoration: none; }

/* ===== หน้าแรก ===== */
.home-intro { padding: 28px 0 8px; }
.home-intro h1 { margin: 0; font-size: 28px; }
.home-intro p { margin: 4px 0 0; color: var(--muted); }
.list-title { font-family: var(--head); font-size: 22px; margin: 28px 0 14px; }
.featured { display: grid; grid-template-columns: 1.4fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 20px; }
.featured .thumb { aspect-ratio: 16 / 10; }
.featured .body { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.featured h2 { margin: 0; font-size: 26px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .08); transform: translateY(-2px); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 18px; }
.card h3 a, .featured h2 a { color: var(--ink); }
.thumb { display: block; aspect-ratio: 16 / 10; background: var(--primary-soft) center / cover no-repeat; }
.snippet { color: var(--muted); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--head); font-size: 12.5px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-hover); }
.chip:hover { text-decoration: none; background: #DAE7F7; }
.read-more { font-family: var(--head); font-weight: 600; font-size: 15px; }
.pager { display: flex; justify-content: space-between; margin: 32px 0; }
.pager a { font-family: var(--head); font-weight: 600; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }

/* ===== หน้าบทความ ===== */
.article { max-width: 760px; margin: 28px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 44px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.article h1 { font-size: 32px; margin: 0 0 10px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.post-body { font-size: 18px; }
.post-body h2 { font-size: 24px; margin: 34px 0 10px; padding-top: 6px; }
.post-body h3 { font-size: 20px; margin: 24px 0 8px; }
.post-body p { margin: 0 0 16px; }
.post-body ul, .post-body ol { padding-left: 24px; margin: 0 0 16px; }
.post-body li { margin-bottom: 6px; }
.post-body img { border-radius: 10px; }
.post-body figure { margin: 20px 0; }
.post-body blockquote { margin: 20px 0; padding: 12px 18px; border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0; }
.post-body .ab-disclosure { font-family: var(--body); }
.post-body .ab-hotel-card { box-shadow: 0 2px 10px rgba(16, 24, 40, .05); }
.post-body .ab-hotel-card a[rel~='sponsored'] { font-family: var(--head); }
.post-body .ab-hotel-card a[rel~='sponsored']:hover { background: var(--primary-hover) !important; text-decoration: none; }
.related { max-width: 760px; margin: 28px auto 0; }
.related h2 { font-size: 22px; margin: 0 0 14px; }
.related .grid { grid-template-columns: repeat(3, 1fr); }
.related .card h3 { font-size: 16px; }

/* ===== ท้ายเว็บ ===== */
.site-footer { margin-top: 56px; background: #0A1D38; color: #C9D6E8; padding: 36px 0; font-size: 15px; }
.site-footer a { color: #FFFFFF; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-name { font-family: var(--head); font-weight: 700; color: #fff; font-size: 18px; }
.footer-note { max-width: 520px; margin: 6px 0 0; color: #A9BBD3; }
.footer-links { display: flex; gap: 18px; align-items: flex-start; }

/* ===== มือถือ ===== */
@media (max-width: 900px) {
  .grid, .related .grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 14px; }
  .search input { width: 110px; }
  .brand-name { font-size: 17px; }
  .grid, .related .grid { grid-template-columns: 1fr; }
  .featured .body { padding: 18px; }
  .featured h2 { font-size: 21px; }
  .article { padding: 22px 18px; border-radius: 0; border-left: none; border-right: none; margin-top: 0; }
  .article h1 { font-size: 25px; }
  .post-body { font-size: 17px; }
}

/* ===== Multi-City Blog: เมนู Region → Province ===== */
.nav li { position: relative; }
.nav .sub { display: none; position: absolute; top: 100%; left: 0; z-index: 30; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(16, 24, 40, .12); padding: 8px; }
.nav li:hover > .sub, .nav li:focus-within > .sub { display: block; }
.nav .sub a { display: block; color: var(--ink) !important; padding: 6px 10px; border-radius: 6px; border: none !important; white-space: nowrap; }
.nav .sub a:hover { background: var(--primary-soft); text-decoration: none; }
.nav .sub .sub-region { font-family: var(--head); font-weight: 600; }
.nav .sub .sub-province { padding-left: 22px; font-size: 15px; color: var(--ink-2) !important; }

/* ===== หน้าแรกหลายช่วง ===== */
.hero { background: linear-gradient(135deg, var(--navy), var(--primary)); color: #fff; border-radius: 0 0 var(--radius) var(--radius); padding: 40px 0 34px; }
.hero h1 { color: #fff; margin: 0; font-size: 32px; }
.hero p { margin: 6px 0 0; color: rgba(255, 255, 255, .85); }
.hero .region-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .region-pills a { font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--navy); background: #fff; padding: 6px 14px; border-radius: 999px; }
.hero .region-pills a:hover { background: var(--sun); text-decoration: none; }
.home-section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.section-head h2 { margin: 0 0 -2px; font-size: 22px; padding-bottom: 8px; border-bottom: 2px solid var(--sun); }
.section-head .more { font-family: var(--head); font-weight: 600; font-size: 14px; white-space: nowrap; }
.section-note { color: var(--muted); margin: -6px 0 14px; font-size: 15px; }
.playlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.playlist a { display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px; padding: 14px; border-radius: var(--radius); color: #fff; font-family: var(--head); font-weight: 600; font-size: 17px; background: var(--navy) center / cover no-repeat; position: relative; overflow: hidden; }
.playlist a::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .65)); }
.playlist a span { position: relative; }
.playlist a small { position: relative; font-weight: 400; font-size: 13px; opacity: .85; }
.playlist a:hover { text-decoration: none; outline: 3px solid var(--sun); }
.province-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.province-list a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 15px; }
.province-list a:hover { border-color: var(--primary); text-decoration: none; }
.guide-list .card .thumb { background-color: var(--primary-soft); }
.scope-tag { font-family: var(--head); font-size: 12.5px; font-weight: 600; color: var(--navy); background: #FFF1E3; padding: 2px 10px; border-radius: 999px; }
.post-body .ab-figure svg { max-width: 100%; height: auto; }
.post-body .ab-cover img { aspect-ratio: 16 / 9; object-fit: cover; }

/* ===== ช่องค้นหา (Multi-City Blog) ===== */
.search { position: relative; }
.search-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: min(420px, 90vw); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(16, 24, 40, .16); padding: 6px; }
.search-hit { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; color: var(--ink) !important; }
.search-hit:hover { background: var(--primary-soft); text-decoration: none; }
.search-hit-title { font-family: var(--head); font-weight: 600; font-size: 15px; line-height: 1.4; }
.search-hit-place { font-size: 13px; color: var(--muted); }
.search-empty { padding: 8px 10px; color: var(--muted); font-size: 14px; }
#search-results { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
#search-results .search-hit { background: var(--card); border: 1px solid var(--line); }

/* ===== ภาพปกของ Post ===== */
.thumb-cover { aspect-ratio: 1200 / 630; }
.post-cover { margin: 6px 0 18px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: var(--radius); }

/* ===== ปุ่มแชร์ ===== */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.share-label { font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--muted); margin-right: 2px; }
.share-btn { font-family: var(--head); font-weight: 600; font-size: 13.5px; line-height: 1; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink) !important; cursor: pointer; }
.share-btn:hover { text-decoration: none; border-color: var(--primary); }
.share-fb { background: #1877F2; border-color: #1877F2; color: #fff !important; }
.share-line { background: #06C755; border-color: #06C755; color: #fff !important; }
.share-x { background: #111; border-color: #111; color: #fff !important; }
.share-fb:hover, .share-line:hover, .share-x:hover { opacity: .9; }

@media (max-width: 860px) {
  .search-pop { right: auto; left: 0; }
  .playlist { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 26px; }
  .nav .sub { position: static; box-shadow: none; border: none; padding: 0 0 6px 8px; display: none; }
  .nav li:focus-within > .sub { display: block; }
}
  