/*
Theme Name: Solar Rayong
Theme URI: https://solarrayong.com
Author: Solar Rayong
Author URI: https://solarrayong.com
Description: Custom Theme สำหรับเว็บไซต์ติดตั้งโซลาร์เซลล์ ระยอง ชลบุรี จันทบุรี
Version: 1.0.6
*/

/* ===== CSS VARIABLES ===== */
:root {
  --sun: #F59E0B;
  --sun-dark: #D97706;
  --green: #16A34A;
  --green-dark: #15803D;
  --line: #06C755;
  --line-dark: #059A42;
  --dark: #1C1917;
  --mid: #44403C;
  --muted: #78716C;
  --bg: #FAFAF9;
  --card: #FFFFFF;
  --border: #E7E5E4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--bg);
  color: var(--dark);
  font-size: 16px;
  line-height: 1.6;
}

/* ===== STICKY CTA BAR (mobile) ===== */
.sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999;
  background: #fff;
  border-top: 2px solid var(--border);
  padding: 10px 12px;
  gap: 8px;
}
.sticky-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 10px;
  font-family: 'Sarabun', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: opacity .15s;
}
.sticky-bar a:active { opacity: .8; }
.sticky-line { background: var(--line); color: #fff; }
.sticky-tel  { background: var(--green); color: #fff; }
.sticky-quote { background: var(--sun); color: var(--dark); }

/* ===== NAV ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 2px solid var(--sun);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: 'Kanit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo span { color: var(--sun); }
.nav-actions { display: flex; gap: 8px; }
.nav-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Sarabun', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: opacity .15s;
}
.nav-btn:active { opacity: .8; }
.btn-line { background: var(--line); color: #fff; }
.btn-tel  { background: var(--green); color: #fff; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1C1917 0%, #292524 60%, #1a2e1a 100%);
  padding: 52px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.4);
  color: var(--sun);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: .5px;
}
.hero h1 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero h1 span { color: var(--sun); }
.hero-sub {
  color: #A8A29E;
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
  margin: 0 auto 28px;
}
.cta-primary {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 17px 28px;
  border-radius: 12px;
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.cta-primary:active { transform: scale(.97); }
.cta-line-big {
  background: var(--line);
  color: #fff;
  box-shadow: 0 4px 20px rgba(6,199,85,.35);
}
.cta-quote {
  background: var(--sun);
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(245,158,11,.35);
}
.cta-tel {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green);
  font-family: 'Kanit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.cta-tel:active { background: var(--green); color: #fff; }
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-trust span {
  color: #A8A29E;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-trust .dot { color: var(--sun); font-size: 16px; }

/* ===== SOCIAL PROOF BAR ===== */
.proof-bar {
  background: var(--sun);
  padding: 14px 20px;
  text-align: center;
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
}

/* ===== SECTION BASE ===== */
section { padding: 48px 20px; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sun-dark);
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 6px;
}
.section-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
}
.center { text-align: center; }

/* ===== WHY US ===== */
.why { background: #fff; }
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.why-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
}
.why-icon { font-size: 32px; margin-bottom: 8px; display: block; }
.why-card h3 {
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark);
}
.why-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ===== SERVICES ===== */
.services { background: var(--bg); }
.svc-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.svc-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--sun);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.svc-icon { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.svc-body h3 {
  font-family: 'Kanit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.svc-body p { font-size: 14px; color: var(--muted); }
.price-note {
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 28px;
}
.price-note strong { color: var(--sun-dark); }

/* ===== FORM (CF7 override) ===== */
.form-section {
  background: linear-gradient(135deg, #1C1917, #292524);
  color: #fff;
}
.form-section .section-title { color: #fff; }
.form-section .section-sub { color: #A8A29E; }
.quote-form-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
}
/* Contact Form 7 overrides */
.quote-form-wrap .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.quote-form-wrap .cf7-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quote-form-wrap .cf7-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quote-form-wrap label {
  font-size: 14px;
  font-weight: 700;
  color: var(--mid);
}
.quote-form-wrap input[type="text"],
.quote-form-wrap input[type="tel"],
.quote-form-wrap select,
.quote-form-wrap textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  color: var(--dark);
  background: var(--bg);
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.quote-form-wrap input:focus,
.quote-form-wrap select:focus,
.quote-form-wrap textarea:focus {
  border-color: var(--sun);
}
.quote-form-wrap textarea { resize: none; min-height: 80px; }
.quote-form-wrap input[type="submit"],
.quote-form-wrap .wpcf7-submit {
  width: 100%;
  padding: 16px;
  background: var(--sun);
  color: var(--dark);
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .15s;
  box-shadow: 0 4px 16px rgba(245,158,11,.3);
}
.quote-form-wrap input[type="submit"]:active,
.quote-form-wrap .wpcf7-submit:active {
  transform: scale(.97);
  background: var(--sun-dark);
}
.wpcf7-not-valid-tip { color: #dc2626; font-size: 12px; }
.wpcf7-response-output {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 8px;
}
.wpcf7-mail-sent-ok {
  background: #DCFCE7;
  border-color: var(--green) !important;
  color: var(--green-dark);
  font-weight: 700;
}
.form-note { font-size: 12px; color: var(--muted); text-align: center; }

/* ===== PROCESS ===== */
.process { background: #fff; }
.steps { display: flex; flex-direction: column; gap: 0; margin-bottom: 28px; }
.step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px; top: 52px;
  width: 2px;
  height: calc(100% - 36px);
  background: var(--border);
}
.step-num {
  width: 38px; height: 38px;
  background: var(--sun);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.step-body h3 {
  font-family: 'Kanit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.step-body p { font-size: 14px; color: var(--muted); }

/* ===== REVIEWS ===== */
.reviews { background: var(--bg); }
.review-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.review-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.review-stars { color: var(--sun); font-size: 16px; margin-bottom: 8px; }
.review-text { font-size: 14px; color: var(--mid); line-height: 1.65; margin-bottom: 10px; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 36px; height: 36px;
  background: var(--sun);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--dark);
}
.review-name { font-weight: 700; font-size: 14px; }
.review-loc  { font-size: 12px; color: var(--muted); }

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--green);
  padding: 36px 20px;
  text-align: center;
}
.cta-band h2 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.cta-band p { color: rgba(255,255,255,.8); font-size: 15px; margin-bottom: 22px; }
.band-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}
.band-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: opacity .15s;
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}
.band-btn:active { opacity: .85; }
.band-line { background: var(--line); color: #fff; box-shadow: 0 4px 16px rgba(6,199,85,.3); }
.band-tel  { background: #fff; color: var(--green-dark); }

/* ===== FAQ ===== */
.faq { background: #fff; }
.faq-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 28px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 0;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-q .arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item.open .arrow { transform: rotate(180deg); }
.faq-a {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding-bottom: 14px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: #A8A29E;
  padding: 32px 20px;
  text-align: center;
}
.footer-logo {
  font-family: 'Kanit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.footer-logo span { color: var(--sun); }
.site-footer p { font-size: 13px; margin-bottom: 4px; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #A8A29E;
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== DESKTOP ===== */
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; flex-wrap: wrap; }
  .cta-primary, .cta-tel { flex: 1; min-width: 150px; }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .band-btns { flex-direction: row; }
}

@media (max-width: 639px) {
  .sticky-bar { display: flex; }
  body { padding-bottom: 76px; }
  .nav-btn.btn-tel { display: none; }
  .cf7-row { grid-template-columns: 1fr !important; }
}

/* ============================================================
   DESKTOP LAYOUT — PC BREAKPOINT (≥1024px)
   - max-width container centered
   - Solar Cell SVG background on body sides
   - Nav เต็ม desktop style
   - Hero 2-column layout
   - Why-grid 4 col, sections 2-col
   ============================================================ */

/* ---- Solar Cell SVG Background Pattern (นอก container) ---- */
@media (min-width: 1024px) {

  /* Body background: solar panel pattern ทั้งสองข้าง */
  body {
    background-color: #0f1a0f;
    background-image:
      /* Solar panel grid pattern ซ้าย-ขวา */
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect width='120' height='120' fill='%230f1a0f'/%3E%3C!-- Solar cell frame --%3E%3Crect x='4' y='4' width='52' height='52' rx='3' fill='%23162616' stroke='%231e3a1e' stroke-width='1.5'/%3E%3Crect x='64' y='4' width='52' height='52' rx='3' fill='%23162616' stroke='%231e3a1e' stroke-width='1.5'/%3E%3Crect x='4' y='64' width='52' height='52' rx='3' fill='%23162616' stroke='%231e3a1e' stroke-width='1.5'/%3E%3Crect x='64' y='64' width='52' height='52' rx='3' fill='%23162616' stroke='%231e3a1e' stroke-width='1.5'/%3E%3C!-- Cell lines horizontal --%3E%3Cline x1='4' y1='21' x2='56' y2='21' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='4' y1='38' x2='56' y2='38' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='64' y1='21' x2='116' y2='21' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='64' y1='38' x2='116' y2='38' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='4' y1='81' x2='56' y2='81' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='4' y1='98' x2='56' y2='98' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='64' y1='81' x2='116' y2='81' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='64' y1='98' x2='116' y2='98' stroke='%23234023' stroke-width='0.8'/%3E%3C!-- Cell lines vertical --%3E%3Cline x1='21' y1='4' x2='21' y2='56' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='38' y1='4' x2='38' y2='56' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='81' y1='4' x2='81' y2='56' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='98' y1='4' x2='98' y2='56' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='21' y1='64' x2='21' y2='116' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='38' y1='64' x2='38' y2='116' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='81' y1='64' x2='81' y2='116' stroke='%23234023' stroke-width='0.8'/%3E%3Cline x1='98' y1='64' x2='98' y2='116' stroke='%23234023' stroke-width='0.8'/%3E%3C!-- Subtle glint dots --%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23F59E0B' opacity='0.12'/%3E%3Ccircle cx='90' cy='30' r='1.5' fill='%23F59E0B' opacity='0.12'/%3E%3Ccircle cx='30' cy='90' r='1.5' fill='%23F59E0B' opacity='0.12'/%3E%3Ccircle cx='90' cy='90' r='1.5' fill='%23F59E0B' opacity='0.12'/%3E%3C/svg%3E");
    background-size: 120px 120px;
  }

  /* ---- Wrapper: content centered, max-width 900px ---- */
  .site-header,
  .hero,
  .proof-bar,
  section,
  .cta-band,
  .site-footer {
    position: relative;
  }

  /* White content column ตรงกลาง */
  .site-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(245,158,11,0.15);
    position: relative;
    z-index: 1;
  }

  /* ---- NAV Desktop ---- */
  .site-header {
    padding: 0 40px;
    height: 68px;
  }
  .nav-logo { font-size: 22px; }
  .nav-actions { gap: 12px; }
  .nav-btn { padding: 10px 20px; font-size: 15px; }
  /* Show desktop nav menu links if added later */

  /* ---- HERO Desktop: 2-column ---- */
  .hero {
    padding: 72px 60px 64px;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 0 48px;
    align-items: center;
  }
  .hero::before {
    width: 600px; height: 600px;
    top: -100px; left: 20%;
  }
  .hero-badge { margin-bottom: 20px; }
  .hero h1 { font-size: 46px; margin-bottom: 18px; }
  .hero-sub {
    font-size: 18px;
    margin-bottom: 32px;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .hero-cta {
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
    margin: 0 0 32px 0;
  }
  .hero .cta-primary { flex: none; width: 100%; }
  .hero-trust {
    justify-content: flex-start;
    gap: 24px;
  }
  .hero-trust span { font-size: 14px; }

  /* Hero right column: Solar panel illustration (SVG inline) */
  .hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 1 / 5;
    grid-column: 2;
  }
  /* Stack hero text items in col 1 */
  .hero-badge,
  .hero h1,
  .hero-sub,
  .hero-cta,
  .hero-trust {
    grid-column: 1;
  }

  /* ---- PROOF BAR ---- */
  .proof-bar { padding: 16px 60px; font-size: 16px; }

  /* ---- SECTIONS: max content width, padding ---- */
  section { padding: 64px 60px; }

  /* Why grid: 4 columns on desktop */
  .why-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
  }
  .why-card { padding: 24px 20px; }

  /* Services: 2 columns */
  .svc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 36px;
  }
  .svc-item { border-radius: 14px; }

  /* Form section: 2-col layout */
  .form-section { padding: 64px 60px; }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }
  .form-intro { color: #A8A29E; }
  .form-intro .section-title { font-size: 32px; }
  .form-intro ul {
    list-style: none;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .form-intro ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #A8A29E;
  }
  .form-intro ul li::before {
    content: '✓';
    color: var(--green);
    font-weight: 800;
    font-size: 16px;
  }
  .quote-form-wrap { padding: 32px 28px; }

  /* Process: horizontal on desktop */
  .steps {
    flex-direction: row;
    gap: 0;
    margin-bottom: 36px;
  }
  .step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px 0;
    gap: 12px;
  }
  .step:not(:last-child)::after {
    left: 50%;
    top: 19px;
    width: calc(100% - 38px);
    height: 2px;
    transform: translateX(19px);
  }
  .step-num { margin-bottom: 4px; }

  /* Reviews: 3-col grid */
  .review-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
  }

  /* CTA band */
  .cta-band { padding: 56px 60px; }
  .band-btns {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 480px;
  }
  .band-btn { width: auto; flex: 0 1 auto; }

  /* FAQ */
  .faq { padding: 64px 60px; }
  .faq-list { max-width: 720px; margin: 0 auto 36px; }
  .faq-q { font-size: 16px; }

  /* Footer */
  .site-footer { padding: 40px 60px; }
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    text-align: left;
    margin-bottom: 24px;
  }
  .footer-col h4 {
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-size: 15px;
  }
  .footer-links {
    justify-content: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
  }
  .footer-copy { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }

  /* Sticky bar hidden on desktop */
  .sticky-bar { display: none !important; }
  body { padding-bottom: 0 !important; }
}

/* ---- Sidebar solar glow effect (wide screens) ---- */
@media (min-width: 1200px) {
  body::before, body::after {
    content: '';
    position: fixed;
    top: 30%;
    width: 180px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(245,158,11,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }
  body::before { left: calc(50% - 650px); }
  body::after  { right: calc(50% - 650px); }
}


/* ============================================================
   CONTENT PAGES — blog, single, archive, page, search
   ============================================================ */

/* ---- Page Hero Banner (ใช้ร่วมกันทุก content page) ---- */
.page-hero {
  background: linear-gradient(135deg, #1C1917 0%, #292524 60%, #1a2e1a 100%);
  padding: 40px 24px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 300px;
  background: radial-gradient(circle, rgba(245,158,11,.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .breadcrumb {
  font-size: 12px;
  color: #78716C;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.page-hero .breadcrumb a { color: #A8A29E; text-decoration: none; }
.page-hero .breadcrumb a:hover { color: var(--sun); }
.page-hero .breadcrumb span { color: #57534E; }
.page-hero h1 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 8px;
}
.page-hero .page-meta {
  color: #78716C;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-hero .page-cat-badge {
  display: inline-block;
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.35);
  color: var(--sun);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ---- Content Layout ---- */
.content-wrap {
  padding: 36px 20px 48px;
  background: var(--bg);
}
.content-inner {
  max-width: 760px;
  margin: 0 auto;
}

/* ---- Blog List (archive, search results, blog page) ---- */
.blog-list-section { background: var(--bg); padding: 36px 20px 48px; }
.blog-list-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.blog-list-header h1 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}
.blog-list-header p { font-size: 14px; color: var(--muted); }
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.post-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.post-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border-color: rgba(245,158,11,.3);
}
.post-thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--border);
}
.post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-thumb img { transform: scale(1.03); }
.post-body { padding: 18px 18px 20px; }
.post-cat-tag {
  display: inline-block;
  background: rgba(245,158,11,.1);
  color: var(--sun-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-decoration: none;
}
.post-cat-tag:hover { background: rgba(245,158,11,.2); }
.post-title {
  font-family: 'Kanit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.post-title a { color: var(--dark); text-decoration: none; }
.post-title a:hover { color: var(--sun-dark); }
.post-excerpt { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.post-date { font-size: 12px; color: var(--muted); }
.post-read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--sun-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-read-more:hover { color: var(--sun); }

/* ---- Pagination ---- */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pagination-wrap .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--mid);
  background: #fff;
  transition: all .15s;
}
.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--dark);
}
.pagination-wrap .page-numbers.dots { border: none; background: none; }

/* ---- Single Post Content ---- */
.single-featured-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 28px;
  display: block;
}
.entry-content { font-size: 15px; line-height: 1.8; color: var(--mid); }
.entry-content h2 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--dark);
  margin: 32px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--sun);
}
.entry-content h3 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 700;
  color: var(--dark);
  margin: 24px 0 10px;
}
.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol {
  padding-left: 20px;
  margin-bottom: 18px;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }
.entry-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}
.entry-content blockquote {
  border-left: 4px solid var(--sun);
  padding: 14px 20px;
  background: rgba(245,158,11,.06);
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--mid);
}
.entry-content a { color: var(--sun-dark); }
.entry-content a:hover { text-decoration: underline; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.entry-content th, .entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.entry-content th {
  background: var(--bg);
  font-weight: 700;
  color: var(--dark);
}

/* ---- Post Tags ---- */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.post-tags span { font-size: 12px; font-weight: 700; color: var(--muted); }
.post-tags a {
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--mid);
  padding: 4px 12px;
  border-radius: 100px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.post-tags a:hover { border-color: var(--sun); color: var(--sun-dark); }

/* ---- Single Post CTA Box ---- */
.single-cta-box {
  background: linear-gradient(135deg, #1C1917, #1a2e1a);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  margin: 36px 0 28px;
}
.single-cta-box .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 8px;
}
.single-cta-box h3 {
  font-family: 'Kanit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.single-cta-box p { color: #A8A29E; font-size: 14px; margin-bottom: 18px; }
.single-cta-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.single-cta-btns .cta-primary {
  /* override hero-context styles that break inside a box */
  flex: 1;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 14px 20px;
  font-size: 16px;
  box-sizing: border-box;
}
@media (min-width: 480px) {
  .single-cta-btns {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  .single-cta-btns .cta-primary {
    flex: 0 1 auto;
    min-width: 160px;
    max-width: 260px;
  }
}

/* ---- Related Posts ---- */
.related-posts { margin-top: 36px; }
.related-posts h3 {
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* ---- Static Page Content ---- */
.page-content-wrap { background: #fff; padding: 36px 20px 48px; }
.page-content-inner { max-width: 760px; margin: 0 auto; }
.page-content { font-size: 15px; line-height: 1.8; color: var(--mid); }
.page-content h2 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(18px,3.5vw,24px);
  font-weight: 800;
  color: var(--dark);
  margin: 28px 0 12px;
  border-left: 4px solid var(--sun);
  padding-left: 14px;
}
.page-content h3 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(16px,3vw,20px);
  font-weight: 700;
  color: var(--dark);
  margin: 22px 0 10px;
}
.page-content p  { margin-bottom: 16px; }
.page-content ul, .page-content ol { padding-left: 20px; margin-bottom: 16px; }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 6px; }
.page-content img { max-width: 100%; border-radius: 10px; margin: 16px 0; }
.page-content a { color: var(--sun-dark); }

/* ---- Search Form (in page) ---- */
.search-form-section {
  background: var(--dark);
  padding: 28px 20px;
  text-align: center;
}
.search-form-section h2 {
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}
.sr-search-form {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
}
.sr-search-form input[type="search"] {
  flex: 1;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: var(--dark);
}
.sr-search-form button[type="submit"] {
  padding: 13px 20px;
  background: var(--sun);
  color: var(--dark);
  border: none;
  border-radius: 10px;
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.sr-search-form button[type="submit"]:hover { background: var(--sun-dark); color: #fff; }
.search-count { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.no-results-box {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid var(--border);
}
.no-results-box .emoji { font-size: 48px; margin-bottom: 12px; }
.no-results-box h2 {
  font-family: 'Kanit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.no-results-box p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* ---- Homepage Blog Preview Section ---- */
.home-blog-section { background: var(--bg); padding: 48px 20px; }
.home-blog-section .section-label { color: var(--sun-dark); }
.home-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.home-post-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  gap: 0;
  transition: box-shadow .2s;
  text-decoration: none;
  color: inherit;
}
.home-post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.home-post-img {
  width: 110px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--border);
}
.home-post-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.home-post-img-placeholder {
  width: 110px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #162616, #1e3a1e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.home-post-body { padding: 14px 16px; flex: 1; min-width: 0; }
.home-post-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--sun-dark);
  margin-bottom: 4px;
}
.home-post-title {
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
  margin-bottom: 4px;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-post-date { font-size: 11px; color: var(--muted); }
.blog-cta-row {
  text-align: center;
}

/* ---- Desktop adjustments for content pages ---- */
@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .home-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .content-wrap { padding: 48px 60px 64px; }
  .blog-list-section { padding: 48px 60px 64px; }
  .page-hero { padding: 52px 60px 44px; text-align: left; }
  .page-hero .breadcrumb { justify-content: flex-start; }
  .page-hero .page-meta { justify-content: flex-start; }
  .home-blog-section { padding: 64px 60px; }
  .home-posts-grid { grid-template-columns: repeat(3, 1fr); }
  .search-form-section { padding: 36px 60px; }
}
.page-content p:has(> img.aligncenter) {
  text-align: center;
  line-height: 0;
}
/* ============================================================
   BLOG PAGE TEMPLATE (page-blog.php)
   ============================================================ */

/* ---- Category Filter Bar ---- */
.blog-filter-bar {
  background: #fff;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 62px;
  z-index: 90;
}
.blog-filter-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.blog-filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.filter-btn:hover  { color: var(--dark); }
.filter-btn.active { color: var(--sun-dark); border-bottom-color: var(--sun); }
.filter-count {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  color: var(--muted);
}
.filter-btn.active .filter-count {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.3);
  color: var(--sun-dark);
}

/* ---- Featured Post Card ---- */
.featured-post-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.featured-post-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.featured-thumb {
  display: block;
  aspect-ratio: 16/7;
  overflow: hidden;
  background: var(--border);
}
.featured-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.featured-post-card:hover .featured-thumb img { transform: scale(1.03); }
.featured-body { padding: 20px 20px 24px; }
.featured-title {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 800;
  line-height: 1.3;
  margin: 8px 0 10px;
}
.featured-title a { color: var(--dark); text-decoration: none; }
.featured-title a:hover { color: var(--sun-dark); }
.featured-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
@media (min-width: 768px) {
  .featured-post-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
  }
  .featured-thumb { aspect-ratio: auto; }
  .featured-body {
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
