/* DNSC – ธีมใหม่ (คงโทนเขียวและโครงเมนูซ้ายของเว็บเดิม) */
:root {
  --brand: #0f6b4e;
  --brand-dark: #0a4b37;
  --brand-ink: #083828;
  --lime: #70d628;
  --lime-soft: #eef9e5;
  --ink: #1d2a24;
  --muted: #5f6d66;
  --line: #e2e8e4;
  --bg: #f4f7f3;
  --card: #fff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 4px 16px rgba(16, 40, 28, .06);
  --shadow-lg: 0 10px 30px rgba(16, 40, 28, .12);
  --space: 20px;
  --header-h: 76px;
  --heading: "Anuphan", system-ui, sans-serif;
  --body: "Sarabun", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
iframe { max-width: 100%; border: 0; }
a { color: var(--brand); text-decoration: none; transition: color .2s, background-color .2s, box-shadow .2s, transform .2s; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading); font-weight: 600; line-height: 1.3; color: var(--brand-ink); margin: 0 0 .6em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
b, strong { font-weight: 700; }
table { border-collapse: collapse; max-width: 100%; }
td, th { padding: 4px 6px; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 9999; background: #fff; padding: 8px 12px; }

.s-container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--space); }

.button, .search-modal form button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 22px;
  font-family: var(--heading); font-weight: 600; font-size: 1rem;
  color: #fff; background: var(--brand);
  border: 0; border-radius: 999px; cursor: pointer;
}
.button:hover, .search-modal form button:hover { background: var(--brand-dark); color: #fff; }

/* ---------- top bar ---------- */
.topbar { background: var(--brand-ink); color: #cfe6d9; font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar-right { display: flex; gap: 18px; align-items: center; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; color: #cfe6d9; white-space: nowrap; }
.topbar a.topbar-item:hover { color: var(--lime); }
.topbar svg { opacity: .8; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(16, 40, 28, .08); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.site-title { font-family: var(--heading); font-weight: 700; font-size: 1.22rem; line-height: 1.2; color: var(--brand-ink); }
.site-tagline { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

.site-nav-d { margin-left: auto; }
.site-nav-d .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav-d .menu > li { position: relative; }
.site-nav-d .menu > li > a {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  font-family: var(--heading); font-weight: 500; color: var(--ink);
}
.site-nav-d .menu > li > a:hover { background: var(--lime-soft); color: var(--brand); }
.site-nav-d .menu > .current-menu-item > a,
.site-nav-d .menu > li:has(.current-menu-item) > a { background: var(--brand); color: #fff; }
.site-nav-d .menu-item-has-children > a::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .6;
}
.site-nav-d .sub-menu {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s ease;
  z-index: 90;
}
.site-nav-d .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.site-nav-d li:hover > .sub-menu,
.site-nav-d li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav-d .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-family: var(--heading); }
.site-nav-d .sub-menu a:hover, .site-nav-d .sub-menu .current-menu-item > a { background: var(--lime-soft); color: var(--brand); }

.search-toggle, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--ink);
}
.search-toggle:hover { background: var(--lime-soft); color: var(--brand); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: .25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav-m { display: none; max-height: calc(100vh - 64px); overflow-y: auto; border-top: 1px solid var(--line); background: #fff; }
.site-nav-m ul { list-style: none; margin: 0; padding: 0; }
.site-nav-m a { display: block; padding: 11px 4px; color: var(--ink); border-bottom: 1px solid var(--line); font-family: var(--heading); }
.site-nav-m .current-menu-item > a { color: var(--brand); font-weight: 700; }
.site-nav-m .sub-menu { padding-left: 16px; }
.nav-m-group { margin: 18px 0 2px; font-family: var(--heading); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.site-header.nav-open .site-nav-m { display: block; }

/* search modal */
.search-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 40, 28, .55); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 18vh;
}
.search-modal[hidden] { display: none; }
.search-modal form {
  display: flex; gap: 10px; width: min(640px, 92vw);
  padding: 10px; background: #fff; border-radius: 999px; box-shadow: var(--shadow-lg);
}
.search-modal input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 8px 16px; border: 0; background: transparent; outline: none; }
.search-close { position: absolute; top: 18px; right: 24px; font-size: 40px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---------- banner / page head ---------- */
.home-banner { padding-top: 22px; }
.home-banner img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.page-head {
  background:
    radial-gradient(1200px 200px at 85% -40%, rgba(112, 214, 40, .35), transparent 70%),
    linear-gradient(120deg, var(--brand-ink), var(--brand));
  color: #fff;
  padding: 28px 0 30px;
}
.page-title { color: #fff; margin: 4px 0 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: rgba(255,255,255,.75); }
.breadcrumb a { color: rgba(255,255,255,.9); }
.breadcrumb a:hover { color: var(--lime); }

/* ---------- layout ---------- */
.site-content { padding: 26px 0 56px; }
.main-body { display: flex; gap: 26px; align-items: flex-start; }
.main-body.-leftbar { flex-direction: row-reverse; }
.content-area { flex: 1; min-width: 0; }
#leftbar { flex: 0 0 260px; width: 260px; position: sticky; top: calc(var(--header-h) + 16px); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; }

/* sidebar */
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.widget-title {
  position: relative; margin: 0; padding: 12px 18px 12px 30px;
  font-size: 1rem; font-weight: 700; color: var(--brand-ink);
  background: linear-gradient(90deg, var(--lime-soft), #fff);
  border-bottom: 1px solid var(--line);
}
.widget-title::before { content: ""; position: absolute; left: 16px; top: 50%; width: 5px; height: 18px; margin-top: -9px; border-radius: 3px; background: var(--lime); }
.widget_nav_menu ul { list-style: none; margin: 0; padding: 6px; }
.widget_nav_menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 8px;
  font-family: var(--heading); font-size: .95rem; color: var(--ink);
}
.widget_nav_menu a::after { content: "›"; color: var(--muted); font-size: 1.1rem; transition: transform .2s; }
.widget_nav_menu a:hover { background: var(--lime-soft); color: var(--brand); }
.widget_nav_menu a:hover::after { transform: translateX(3px); color: var(--brand); }
.widget_nav_menu .current-menu-item > a { background: var(--brand); color: #fff; font-weight: 600; }
.widget_nav_menu .current-menu-item > a::after { color: #fff; }
.widget_html { padding: 12px; }

/* ---------- page content ---------- */
.entry-content > :last-child { margin-bottom: 0; }
.entry-content::after { content: ""; display: block; clear: both; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content h1, .entry-content h2 { position: relative; padding-bottom: 10px; }
.entry-content h1::after, .entry-content h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; border-radius: 2px; background: var(--lime);
}
.entry-content ul { list-style: none; padding: 0; margin: 0 0 1.2em; }
.entry-content ul li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.entry-content ul li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f6b4e' stroke-width='3.5'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.entry-content li[style*="list-style-type: none"] { padding-left: 0; }
.entry-content li[style*="list-style-type: none"]::before { display: none; }
.entry-content iframe { border-radius: var(--radius-sm); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.entry-content table[align="center"] { margin-inline: auto; }
.entry-content h3[style*="text-align: right"] {
  text-align: left !important; font-size: 1rem; font-weight: 400; line-height: 1.8;
  padding: 18px 22px; border-radius: var(--radius-sm); background: var(--lime-soft); border-left: 5px solid var(--lime);
}

/* home: service bullets as cards */
.home .entry-content > ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.home .entry-content > ul > li {
  margin: 0; padding: 16px 18px 16px 52px;
  background: #fafcf9; border: 1px solid var(--line); border-radius: 12px; line-height: 1.6;
}
.home .entry-content > ul > li::before { left: 16px; top: 18px; width: 24px; height: 24px; background-size: 14px; }

/* rows/columns */
.row { display: flex; gap: 28px; margin-bottom: 26px; }
.row > .col { flex: 1 1 0; min-width: 0; }
.row:empty, .row > .col:empty { display: none; }
.row.media-left { align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fafcf9; }
.row.media-left > .col:first-child { flex: 0 0 30%; text-align: center; }
.row.media-left h3 { margin-bottom: .4em; }

/* product grid */
.row.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.row.products > .col {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 20px 16px 16px; font-size: .95rem; line-height: 1.6;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.row.products > .col:empty { display: block; visibility: hidden; padding: 0; border: 0; }
.row.products > .col:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfe3d6; }
.row.products img { height: 150px; width: auto; object-fit: contain; margin-bottom: 12px; border-radius: 0; }
.row.products p { margin: 0 0 6px; color: var(--muted); }
.row.products p:first-of-type { color: var(--brand-ink); font-family: var(--heading); font-size: 1rem; }

/* ---------- slider ---------- */
.slider { position: relative; overflow: hidden; margin-bottom: 30px; border-radius: 12px; background: #5dbb2a; }
.slide { display: none; }
.slide.is-active { display: block; animation: fadein .7s ease; }
.slide img { display: block; width: 100%; border-radius: 0; }
@keyframes fadein { from { opacity: .2; } to { opacity: 1; } }
.slider-prev, .slider-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.85); color: var(--brand-ink);
  border: 0; font-size: 26px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .2s, background .2s;
}
.slider:hover .slider-prev, .slider:hover .slider-next, .slider-prev:focus-visible, .slider-next:focus-visible { opacity: 1; }
.slider-prev:hover, .slider-next:hover { background: #fff; }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.slider-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.6); cursor: pointer; transition: width .25s, background .25s; }
.slider-dots button.is-active { width: 24px; background: #fff; }

/* ---------- search results ---------- */
.search-item { display: block; padding: 14px 16px; margin: 0 -16px; border-radius: 10px; color: var(--ink); }
.search-item:hover { background: var(--lime-soft); color: var(--ink); }
.search-item strong { display: block; font-family: var(--heading); color: var(--brand); font-size: 1.1rem; }
.search-item span { color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-ink); color: #c3d8cc; font-size: .95rem; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr .8fr 1.2fr; gap: 36px; padding-top: 48px; padding-bottom: 36px; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #c3d8cc; }
.site-footer a:hover { color: var(--lime); }
.brand-footer { margin-bottom: 14px; }
.brand-footer .site-title { color: #fff; }
.brand-footer .brand-logo { background: #fff; }
.footer-col.contact p { display: flex; gap: 10px; margin-bottom: 10px; }
.footer-col.contact svg { flex: none; margin-top: 5px; color: var(--lime); }
.footer-bar { padding: 14px 0; font-size: .8rem; text-align: center; color: #0a2a1e; background: var(--lime); }
.footer-bar a { color: #0a2a1e; text-decoration: underline; }

/* floating buttons */
.call-fab, .to-top {
  position: fixed; right: 18px; z-index: 800;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; box-shadow: var(--shadow-lg);
}
.call-fab { bottom: 82px; background: var(--lime); color: var(--brand-ink); display: none; }
.call-fab svg { width: 22px; height: 22px; }
.to-top { bottom: 22px; background: var(--brand); color: #fff; font-size: 20px; }
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--brand-dark); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  :root { --header-h: 64px; }
  .topbar { display: none; }
  .site-nav-d { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { gap: 8px; }
  .brand { flex: 1; justify-content: center; }
  .brand-logo { width: 40px; height: 40px; }
  .site-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-tagline { display: none; }
  .main-body, .main-body.-leftbar { flex-direction: column; align-items: stretch; }
  #leftbar { position: static; flex: none; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  #leftbar .widget { margin: 0; }
  .widget_html { display: none; }
  .call-fab { display: flex; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .card { padding: 20px 18px; border-radius: 12px; }
  .site-content { padding-top: 16px; }
  .home-banner { padding-top: 12px; }
  .row { flex-direction: column; gap: 14px; }
  .row.media-left > .col:first-child { flex: none; }
  .row.products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .row.products > .col:empty { display: none; }
  .row.products img { height: 110px; }
  .home .entry-content > ul { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; padding-top: 36px; }
  .slider-prev, .slider-next { opacity: 1; width: 34px; height: 34px; font-size: 22px; }
}
@media (max-width: 420px) {
  .row.products { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
