/*
Theme Name: Kanghan
Theme URI: https://ร้านกังหันน้ำ.com/
Author: ร้านกังหันน้ำ ขอนแก่น
Description: ธีมเบาและเร็วสำหรับร้านกังหันน้ำ ขอนแก่น ไม่ใช้ page builder หรือ jQuery แก้ไขเนื้อหาหน้าแรกได้ที่เมนู "ร้านกังหันน้ำ" ในหลังบ้าน
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: kanghan
*/

:root {
  --night: #0f1f1b;
  --night-2: #16302a;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --ink: #1f2623;
  --muted: #5d6762;
  --gold: #e3a74a;
  --gold-dark: #c98a2c;
  --line: #06c755;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 31, 27, .12);
  --wrap: 1180px;
  --narrow: 820px;
  --header-h: 76px;
  --admin-bar: 0px;
}
.admin-bar { --admin-bar: 32px; }
@media (max-width: 782px) { .admin-bar { --admin-bar: 46px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--admin-bar)); }
body {
  margin: 0;
  font-family: Kanit, system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0 0 1em; }
figure { margin: 0; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 32px, var(--narrow)); }
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section-sm { padding: clamp(40px, 6vw, 72px) 0; }
.section-dark { background: var(--night); color: #e9efe9; }
.section-cream { background: var(--cream); }
.center { text-align: center; margin-top: 40px; }
.eyebrow {
  font-size: .85rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-bottom: .6em;
}
.eyebrow a { text-decoration: none; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p:last-child:not(.eyebrow) { color: var(--muted); }
.section-dark .section-head p:last-child:not(.eyebrow) { color: #b9c6bf; }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 16px; border-radius: 8px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 500; font-size: 1rem; font-family: inherit;
  text-decoration: none; border: 2px solid transparent; transition: .2s ease; cursor: pointer;
  white-space: nowrap; line-height: 1.4;
}
.btn-sm { padding: 7px 18px; font-size: .95rem; }
.btn-gold { background: var(--gold); color: #1d1406; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { filter: brightness(.92); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--night); color: var(--night); }
.btn-outline:hover { background: var(--night); color: #fff; }

/* header */
.site-header {
  position: fixed; top: var(--admin-bar); left: 0; right: 0; z-index: 50; height: var(--header-h);
  transition: background .25s, box-shadow .25s;
}
.site-header.scrolled, .site-header:has(.nav.open) { background: rgba(255, 253, 248, .97); box-shadow: 0 2px 16px rgba(0,0,0,.08); }
.has-solid-header { padding-top: var(--header-h); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: block; flex: none; }
.brand img { width: 150px; height: auto; }
.logo-light { filter: drop-shadow(0 1px 4px rgba(0,0,0,.45)); }
.logo-dark, .site-header.scrolled .logo-light, .site-header:has(.nav.open) .logo-light { display: none; }
.site-header.scrolled .logo-dark, .site-header:has(.nav.open) .logo-dark { display: block; }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 400; font-size: 1rem; position: relative; display: block; }
.site-header:not(.scrolled) .nav a { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--gold); transform: scaleX(0); transition: .2s; }
.nav a:hover::after, .nav .current-menu-item > a::after { transform: scaleX(1); }
.header-cta { display: flex; gap: 10px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; color: var(--ink); }
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; }
.site-header:not(.scrolled) .nav-toggle { color: #fff; }
.site-header:has(.nav.open) .nav-toggle { color: var(--ink); }

/* hero */
.hero { position: relative; min-height: 100svh; display: grid; align-content: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,18,15,.55) 0%, rgba(8,18,15,.25) 40%, rgba(8,18,15,.75) 100%); }
.hero-content { position: relative; text-align: center; padding-top: var(--header-h); }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 5vw, 5.2rem); margin-bottom: .2em; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.hero h1 span { color: var(--gold); }
.hero-lead { font-size: clamp(1.1rem, .9rem + 1vw, 1.6rem); font-weight: 400; margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-facts {
  --cols: 4;
  position: relative; list-style: none; padding: 0; margin: 56px auto 32px;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr);
  background: rgba(15, 31, 27, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); overflow: hidden;
}
.hero-facts li { padding: 16px 20px; text-align: center; line-height: 1.4; box-shadow: -1px 0 0 rgba(255,255,255,.15), 0 -1px 0 rgba(255,255,255,.15); }
.hero-facts strong { display: block; font-weight: 500; color: var(--gold); }
.hero-facts span { font-size: .95rem; }

/* intro */
.intro-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ornament { margin-bottom: 16px; }
.intro-text p { color: var(--muted); }
.intro-text strong { color: var(--ink); font-weight: 500; }
.intro-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.social { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.social a { display: inline-block; padding: 6px 16px; border: 1px solid #d8d1c2; border-radius: 999px; text-decoration: none; font-size: .95rem; }
.social a:hover { border-color: var(--gold); color: var(--gold-dark); }

/* menu */
.food-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.food-grid figure { overflow: hidden; border-radius: 12px; position: relative; }
.food-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .5s ease; }
.food-grid figure:hover img { transform: scale(1.06); }
.food-grid figcaption {
  position: absolute; inset: auto 0 0; padding: 28px 14px 10px; font-weight: 500; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.signature-list { margin-top: 48px; text-align: center; }
.signature-list ul { list-style: none; padding: 0; margin: 0 auto 32px; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.signature-list li { padding: 6px 16px; border: 1px solid rgba(227,167,74,.45); border-radius: 999px; color: #f3e6cf; font-size: .98rem; }

/* experience */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 40px; }
.feature { background: var(--cream); border-radius: var(--radius); padding: 28px; }
.feature p { color: var(--muted); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--night); margin-bottom: 14px; }
.feature-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mosaic { display: grid; gap: 14px; }
.mosaic figure { overflow: hidden; border-radius: 12px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 2.2 / 1; }
.mosaic-5 figure:first-child { grid-row: span 2; }
.mosaic-4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); aspect-ratio: 1.8 / 1; }
.mosaic-4 figure:first-child { grid-row: span 3; }
.mosaic-3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 2 / 1; }
.mosaic-3 figure:first-child { grid-row: span 2; }
.mosaic-2 { grid-template-columns: 1fr 1fr; }
.mosaic-2 figure, .mosaic-1 figure { aspect-ratio: 3 / 2; }

/* zones */
.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.zone { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.zone img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.zone-body { padding: 20px 24px 24px; }
.zone-body p { margin: 0; color: var(--muted); }

/* reviews (markup comes from the Kanghan Google Reviews plugin) */
.review-summary { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: -24px 0 36px; }
.review-summary .score { font-size: 2.4rem; font-weight: 600; line-height: 1; }
.review-summary .stars { font-size: 1.3rem; margin: 0; }
.review-summary .count { color: var(--muted); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review { border: 1px solid #ebe4d6; border-radius: var(--radius); padding: 22px; background: #fff; display: flex; flex-direction: column; }
.review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; line-height: 1.3; }
.review-top strong { display: block; font-weight: 500; }
.review-top a { text-decoration: none; }
.review-top time { font-size: .85rem; color: var(--muted); }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--night-2); color: var(--gold); font-weight: 500; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.review .g { margin-left: auto; width: 20px; height: 20px; flex: none; }
.stars { color: #f5b301; letter-spacing: 2px; margin-bottom: 6px; }
.stars i { font-style: normal; color: #ddd; }
.review-text { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review-text.open { display: block; }
.review-more { align-self: flex-start; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--gold-dark); font: inherit; font-size: .95rem; cursor: pointer; }
.review-attrib { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 28px; }
.review-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* cta */
.cta-band { position: relative; color: #fff; text-align: center; padding: clamp(80px, 12vw, 150px) 0; overflow: hidden; }
.cta-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-shade { position: absolute; inset: 0; background: rgba(8, 18, 15, .62); }
.cta-inner { position: relative; }
.cta-inner p { color: #dfe7e2; }

/* posts */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { border-radius: var(--radius); overflow: hidden; background: var(--cream); }
.post-thumb { display: block; }
.post-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.post-body { padding: 18px 22px 24px; }
.post-card time { font-size: .85rem; color: var(--muted); }
.post-card h3 { font-size: 1.08rem; margin: 4px 0 0; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--gold-dark); }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid #e3dccd; text-decoration: none; text-align: center; }
.pagination .current { background: var(--night); color: #fff; border-color: var(--night); }

/* inner page header + article */
.page-hero { background: var(--night); color: #fff; padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); text-align: center; }
.page-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); margin: 0; }
.page-hero p:not(.eyebrow), .page-hero-desc { color: #b9c6bf; margin: 12px 0 0; }
.entry-meta { font-size: .95rem; }
.entry-thumb { margin-top: -24px; margin-bottom: 8px; }
.entry-thumb img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.entry-content { padding: 40px 0 24px; font-size: 1.06rem; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-top: 1.6em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.4em; }
.entry-content a { color: var(--gold-dark); }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .98rem; }
.entry-content th, .entry-content td { border: 1px solid #e3dccd; padding: 8px 12px; text-align: left; }
.entry-content iframe { max-width: 100%; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.alignwide { width: min(100vw - 32px, var(--wrap)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.entry-footer { padding-bottom: 56px; }
.tags a { display: inline-block; padding: 4px 12px; margin: 0 6px 6px 0; border-radius: 999px; background: var(--cream); text-decoration: none; font-size: .9rem; }
.entry-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--cream); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0 32px; }
.entry-cta p { margin: 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; text-decoration: none; padding: 16px 18px; border: 1px solid #e3dccd; border-radius: var(--radius); height: 100%; }
.post-navigation span { display: block; font-size: .85rem; color: var(--muted); }
.post-navigation .nav-next { text-align: right; }
.search-form { display: flex; gap: 8px; max-width: 480px; margin: 0 auto 24px; }
.search-form input { flex: 1; padding: 10px 16px; border: 1px solid #d8d1c2; border-radius: 999px; font: inherit; }
.comments { padding-bottom: 56px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .comment-body { padding: 16px 0; border-bottom: 1px solid #eee5d6; }
.comment-form input:not([type=checkbox]):not([type=submit]), .comment-form textarea { width: 100%; padding: 10px 14px; border: 1px solid #d8d1c2; border-radius: 10px; font: inherit; }
.comment-form .submit { background: var(--gold); border: 0; padding: 12px 26px; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 24px 0 32px; }
.info dt { color: var(--gold); font-weight: 500; }
.info dd { margin: 0; }
.info a { text-decoration: none; }
.contact .hero-actions { justify-content: flex-start; }
.map-facade { position: relative; display: block; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; width: 100%; font: inherit; background: var(--night-2); }
.map-facade img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.map-facade span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.2rem; font-weight: 500; }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); }

/* footer */
.site-footer { background: #0a1613; color: #b7c3bd; padding: 64px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid img { width: 170px; margin-bottom: 16px; }
.footer-contact { line-height: 1.9; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.copy { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
.mobile-bar { display: none; }

/* responsive */
@media (max-width: 1080px) {
  .nav-list { gap: 18px; }
  .header-cta { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .brand img { width: 120px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); padding: 8px 16px 16px; box-shadow: 0 12px 20px rgba(0,0,0,.08);
    display: none;
  }
  .nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav a, .site-header:not(.scrolled) .nav a { color: var(--ink); text-shadow: none; padding: 12px 4px; border-bottom: 1px solid #eee5d6; }
  .nav a::after { display: none; }
  .hero-facts { --cols: 2 !important; margin-top: 40px; }
  .intro-grid, .contact-grid { grid-template-columns: 1fr; }
  .food-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .review-grid, .post-grid { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr !important; grid-template-rows: none !important; aspect-ratio: auto !important; }
  .mosaic figure { aspect-ratio: 3 / 2; grid-row: auto !important; }
  .mosaic figure:first-child { grid-column: span 2; }
  .mosaic-5 figure:last-child { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  body { padding-bottom: 60px; }
  .mobile-bar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0; z-index: 60;
    background: var(--night); border-top: 1px solid rgba(255,255,255,.1);
  }
  .mobile-bar a { padding: 14px 0; text-align: center; color: #fff; text-decoration: none; font-weight: 500; }
  .mobile-bar a:first-child { background: var(--gold); color: #1d1406; }
  .mobile-bar .mb-line { background: var(--line); }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-actions .btn { width: 100%; }
  .alignleft, .alignright { float: none; margin: 1em 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
