/* ==========================================================================
   เทมเพลต: ทุกตัวเลือกเป็น class บน <body> (หลังบ้าน > เทมเพลต)
   ค่าเริ่มต้น (classic, soft, flat, plain, normal, white, gradient) = หน้าตาเดิมของระบบ
   ========================================================================== */

/* ---------- ฟอนต์ ---------- */
h1, h2, h3, h4, h5, h6, .brand-name, .footer-name, .staff-name, .hero-title { font-weight: var(--head-weight, 700); }
.site-nav .nav-link, .bar-nav .nav-link, .side-menu .nav-link { font-family: var(--font-head); font-weight: var(--nav-weight, 500); }

/* ---------- มุม ---------- */
.corner-sharp { --radius-sm: 2px; --radius: 3px; --radius-lg: 4px; }
.corner-round { --radius-sm: 10px; --radius: 14px; --radius-lg: 20px; }
.corner-pill { --radius-sm: 14px; --radius: 20px; --radius-lg: 28px; }
.corner-sharp .btn { border-radius: 3px; }
.corner-round .btn { border-radius: 12px; }
.corner-pill .btn, .corner-pill .chip { border-radius: 999px; }

/* ---------- กล่องเนื้อหา (การ์ด) ---------- */
body { --card-border: 1px solid var(--line); --card-shadow: none; }
.card-outline { --card-border: 1.5px solid var(--line); }
.card-soft { --card-border: 1px solid rgba(15, 30, 40, .06); --card-shadow: 0 6px 20px rgba(15, 30, 40, .07); }
.card-elevated { --card-border: 1px solid rgba(15, 30, 40, .04); --card-shadow: 0 16px 38px rgba(15, 30, 40, .13); }
:is(.card-outline, .card-soft, .card-elevated) :is(.news-lead, .news-stack, .staff-card) {
  background: #fff; border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius-lg);
}
:is(.card-outline, .card-soft, .card-elevated) .news-lead { padding: 1rem 1rem 1.15rem; }
:is(.card-outline, .card-soft, .card-elevated) .news-lead-text { border-left: 4px solid var(--brand); padding: 1.25rem 1.25rem 1.25rem 1.4rem; }
:is(.card-outline, .card-soft, .card-elevated) .news-stack { padding: 1rem 1.1rem; }
:is(.card-outline, .card-soft, .card-elevated) .news-stack .news-row:last-child { padding-bottom: 0; }
:is(.card-outline, .card-soft, .card-elevated) .staff-card { padding: .75rem .75rem 1rem; }
:is(.card-outline, .card-soft, .card-elevated) :is(.doc-grid, .doc-list) { display: grid; gap: .75rem; border-top: 0; }
@media (min-width: 992px) { :is(.card-outline, .card-soft, .card-elevated) .doc-grid { grid-template-columns: 1fr 1fr; column-gap: 1rem; } }
:is(.card-outline, .card-soft, .card-elevated) :is(.doc-grid, .doc-list) .doc-row {
  background: #fff; border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius-lg); padding: .9rem 1rem;
}
:is(.card-soft, .card-elevated) :is(.album-card, .hero-carousel, .hero-welcome, .notice-board, .notice-strip, .side-card, .fb-card, .fbk-card) { box-shadow: var(--card-shadow); }
.card-outline :is(.album-card, .hero-carousel) { outline: 1.5px solid var(--line); outline-offset: -1px; }
:is(.card-outline, .card-soft, .card-elevated) :is(.fb-card, .fbk-card, .side-card) { border: var(--card-border); }

/* ---------- หัวข้อแต่ละส่วน ---------- */
.head-bar .section-head h2 { padding-left: .8rem; border-left: 5px solid var(--brand); line-height: 1.2; }
.head-underline .section-head h2 { position: relative; padding-bottom: .45rem; }
.head-underline .section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.75rem; height: 4px; border-radius: 2px; background: var(--marigold); }
.head-center .section-head { flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
.head-center .section-head h2 { position: relative; padding-bottom: .55rem; }
.head-center .section-head h2::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 3rem; height: 4px; margin-left: -1.5rem; border-radius: 2px; background: var(--marigold); }
.head-center .section-head .section-more { margin-left: 0; }
.head-center .section-head .chip-row { justify-content: center; }
@media (max-width: 767.98px) { .head-center .section-head .chip-row { order: 0; justify-content: flex-start; } }
.head-rule .section-head { border-bottom: 3px double var(--ink); padding-bottom: .55rem; }
.head-rule .section-head h2 { letter-spacing: .01em; }

/* ---------- ระยะห่าง ---------- */
.density-compact .section { padding: clamp(1.5rem, 3.5vw, 2.5rem) 0; }
.density-compact .section-head { margin-bottom: 1rem; }
.density-airy .section { padding: clamp(3rem, 7vw, 5.25rem) 0; }
.density-airy .section-head { margin-bottom: 2rem; }
/* มีภาพพื้นหลัง: เนื้อหาอยู่ในแผง ระยะระหว่างแผงต้องแคบกว่าระยะระหว่างส่วนปกติ */
.has-page-bg.density-airy .section { padding: clamp(.8rem, 2vw, 1.4rem) 0; }
.has-page-bg.density-compact .section { padding: clamp(.45rem, 1.2vw, .75rem) 0; }

/* ---------- สีพื้นหน้า ---------- */
.surface-cream { --paper: #FFFDF7; --mist: #F5F0E6; --line: #E6DCCB; background-color: var(--paper); }
.surface-cool { --paper: #F8FAFC; --mist: #EDF2F7; --line: #D8E1EB; background-color: var(--paper); }
.surface-cream .masthead, .surface-cool .masthead { background: var(--paper); }

/* ---------- ข้อความบนแบนเนอร์ ---------- */
.cap-none .hero-caption { display: none; }
.cap-center .hero-caption { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 3.5rem;
  background: radial-gradient(ellipse at center, rgba(8, 14, 20, .55) 0%, rgba(8, 14, 20, .2) 70%); }
.cap-center .hero-title { font-size: clamp(1.5rem, 4.6vw, 3.2rem); max-width: 22ch; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.cap-center .hero-sub { font-size: clamp(.95rem, 2vw, 1.2rem); }
.cap-card .hero-caption { left: clamp(.75rem, 3vw, 2rem); right: auto; bottom: clamp(.75rem, 3vw, 2rem); max-width: min(34rem, calc(100% - 1.5rem));
  background: rgba(255, 255, 255, .95); color: var(--ink); padding: 1rem 1.25rem; border-radius: var(--radius-lg); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); border-left: 5px solid var(--marigold); }
.cap-card .hero-link { color: var(--ink); }
.cap-card .hero-sub { color: var(--ink-soft); opacity: 1; }
@media (max-width: 575.98px) {
  .cap-card .hero-caption { position: static; max-width: none; border-radius: 0; box-shadow: none; border-left: 0; border-top: 4px solid var(--marigold); }
  .cap-center .hero-caption { padding: 1rem 2.5rem; }
}

/* ==========================================================================
   เมนูด้านบน
   ========================================================================== */
.hdr-sticky .site-header { position: sticky; top: 0; z-index: 1030; }
html:has(body.hdr-sticky) { scroll-padding-top: 96px; }
.hdr-sticky .site-header .dropdown-menu { max-height: 70vh; overflow-y: auto; }

/* ---------- กึ่งกลาง ---------- */
.masthead-center { padding: 1.25rem 0 1rem; }
.masthead-center .container { display: flex; flex-direction: column; align-items: center; gap: .5rem; position: relative; }
.masthead-center .brand { flex-direction: column; text-align: center; gap: .55rem; }
.masthead-center .brand-logo { height: 76px; max-width: 280px; object-position: center; }
.masthead-center .brand-mark { width: 64px; height: 64px; font-size: 1.8rem; }
.masthead-center .brand-name { font-size: clamp(1.25rem, 3vw, 1.85rem); }
.masthead-center .brand-text { align-items: center; }
.site-nav-line { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-nav-line .nav-link { color: var(--ink); }
.site-nav-line .nav-link:hover, .site-nav-line .nav-link:focus, .site-nav-line .nav-link.show { color: var(--brand); background: var(--brand-soft); }
.site-nav-line .nav-link.active { color: var(--brand); border-bottom-color: var(--marigold); }
@media (max-width: 991.98px) {
  .masthead-center { padding: .875rem 0; }
  .masthead-center .container { flex-direction: row; align-items: center; }
  .masthead-center .brand { flex-direction: row; text-align: left; }
  .masthead-center .brand-text { align-items: flex-start; }
  .masthead-center .brand-logo { height: 48px; max-width: 140px; }
  .masthead-center .brand-mark { width: 46px; height: 46px; font-size: 1.35rem; }
  .site-nav-line { border-top: 0; }
  .site-nav-line .nav-link { color: var(--ink); border-bottom: 1px solid var(--line); }
  .site-nav-line .nav-link.active { border-bottom-color: var(--line); }
  .site-nav-line .dropdown-item { color: var(--ink); }
  .site-nav-line .dropdown-item:hover { background: var(--brand-soft); color: var(--brand-dark); }
  .site-nav-line .dropdown-divider { border-color: var(--line); }
  .site-nav-line .nav-search { background: var(--mist); }
}
.nav-search-link .nav-link { font-size: 1.05rem; }

/* ---------- แถวเดียว (inline / dark / floating / overlay) ---------- */
.bar-nav { background: #fff; border-bottom: 1px solid var(--line); padding: .55rem 0; }
.bar-nav > .container { gap: .5rem 1rem; flex-wrap: wrap; }
.bar-nav .brand-logo { height: 48px; }
.bar-nav .brand-mark { width: 44px; height: 44px; font-size: 1.3rem; }
.bar-nav .brand-name { font-size: clamp(1.02rem, 2.2vw, 1.25rem); }
.bar-nav .navbar-nav { gap: .15rem; }
.bar-nav .nav-link { color: var(--ink); padding: .55rem .68rem !important; border-radius: var(--radius); font-size: 1rem; }
@media (min-width: 992px) and (max-width: 1199.98px) { .bar-nav .nav-link { padding: .5rem .45rem !important; font-size: .94rem; } }
.bar-nav .brand { min-width: 0; }
.bar-nav .nav-link:hover, .bar-nav .nav-link:focus, .bar-nav .nav-link.show { color: var(--brand); background: var(--brand-soft); }
.bar-nav .nav-link.active { color: var(--brand); box-shadow: inset 0 -3px 0 var(--marigold); border-radius: var(--radius) var(--radius) 0 0; }
.bar-nav .dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(20, 33, 43, .14); padding: .4rem; font-size: .975rem; }
.bar-nav .dropdown-item { border-radius: var(--radius-sm); padding: .45rem .8rem; }
.bar-nav .dropdown-item:active { background: var(--brand); }
@media (max-width: 991.98px) {
  .bar-nav .navbar-collapse { flex-basis: 100%; padding: .4rem 0 .75rem; }
  .bar-nav .nav-link { border-radius: 0 !important; border-bottom: 1px solid var(--line); padding: .7rem .25rem !important; }
  .bar-nav .nav-link.active { box-shadow: inset 4px 0 0 var(--marigold); padding-left: .9rem !important; }
  .bar-nav .dropdown-menu { border: 0; box-shadow: none; padding: 0 0 .5rem 1rem; background: transparent; }
  .bar-nav .nav-search { margin-top: 1rem; }
}

/* แถบเข้ม */
.hdr-dark .topbar { background: #0B1220; }
.hdr-dark .bar-nav { background: #111827; border-bottom: 3px solid var(--brand); }
.hdr-dark .bar-nav .brand, .hdr-dark .bar-nav .brand-name { color: #fff; }
.hdr-dark .bar-nav .brand-tagline { color: rgba(255, 255, 255, .65); }
.hdr-dark .bar-nav .nav-link { color: rgba(255, 255, 255, .86); }
.hdr-dark .bar-nav .nav-link:hover, .hdr-dark .bar-nav .nav-link:focus, .hdr-dark .bar-nav .nav-link.show { color: #fff; background: rgba(255, 255, 255, .1); }
.hdr-dark .bar-nav .nav-link.active { color: #fff; }
.hdr-dark .bar-nav .nav-toggle { background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; }
@media (max-width: 991.98px) {
  .hdr-dark .bar-nav .nav-link { border-bottom-color: rgba(255, 255, 255, .12); }
  .hdr-dark .bar-nav .dropdown-item { color: rgba(255, 255, 255, .85); }
  .hdr-dark .bar-nav .dropdown-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .hdr-dark .bar-nav .dropdown-divider { border-color: rgba(255, 255, 255, .15); }
}

/* แถบลอย */
.hdr-floating .site-header { padding: .75rem .75rem 0; }
.hdr-floating.hdr-sticky .site-header { padding-top: .6rem; }
.hdr-floating .bar-nav { max-width: 1320px; margin: 0 auto; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; padding: .45rem .5rem;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 10px 30px rgba(15, 30, 40, .12); }
.hdr-floating .bar-nav .nav-link { border-radius: 999px; }
.hdr-floating .bar-nav .nav-link.active { background: var(--brand); color: var(--on-brand); box-shadow: none; border-radius: 999px; }
@media (max-width: 991.98px) {
  .hdr-floating .site-header { padding: .5rem .5rem 0; }
  .hdr-floating .bar-nav { border-radius: 22px; padding: .45rem .35rem; }
  .hdr-floating .bar-nav .nav-link.active { background: transparent; color: var(--brand); box-shadow: inset 4px 0 0 var(--marigold); border-radius: 0; }
}

/* โปร่งใสทับแบนเนอร์เต็มจอ */
.hdr-overlay .site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 1030; }
.hdr-overlay .bar-nav { background: linear-gradient(to bottom, rgba(5, 10, 18, .72), rgba(5, 10, 18, 0)); border-bottom: 0; padding: .9rem 0 2.25rem; }
.hdr-overlay .bar-nav .brand, .hdr-overlay .bar-nav .brand-name { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.hdr-overlay .bar-nav .brand-tagline { color: rgba(255, 255, 255, .78); }
.hdr-overlay .bar-nav .nav-link { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.hdr-overlay .bar-nav .nav-link:hover, .hdr-overlay .bar-nav .nav-link:focus, .hdr-overlay .bar-nav .nav-link.show { color: #fff; background: rgba(255, 255, 255, .14); }
.hdr-overlay .bar-nav .nav-link.active { color: #fff; }
.hdr-overlay .bar-nav .nav-toggle { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .4); color: #fff; }
.hdr-overlay .home-lead.is-full { padding-top: 0; }
@media (max-width: 991.98px) {
  .hdr-overlay .bar-nav { padding-bottom: 1rem; }
  .hdr-overlay .bar-nav .navbar-collapse { background: rgba(10, 16, 28, .96); margin: .5rem -.75rem 0; padding: .5rem 1rem 1rem; border-radius: var(--radius); }
  .hdr-overlay .bar-nav .nav-link { border-bottom-color: rgba(255, 255, 255, .12); text-shadow: none; }
  .hdr-overlay .bar-nav .dropdown-item { color: rgba(255, 255, 255, .85); }
  .hdr-overlay .bar-nav .dropdown-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
}
/* จอเล็ก แบนเนอร์เตี้ย: ไม่ทับ ให้เป็นแถบสีเข้มต่อด้านบนแทน */
@media (max-width: 767.98px) {
  .hdr-overlay .site-header { position: relative; }
  .hdr-overlay .bar-nav { background: var(--brand-dark); padding: .55rem 0; }
  .hdr-overlay .bar-nav .navbar-collapse { margin-top: .4rem; background: transparent; padding: 0 0 .5rem; }
}

/* ---------- เมนูข้าง ---------- */
.side-header { background: #fff; border-bottom: 1px solid var(--line); }
.side-top { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; }
.side-top .brand-logo { height: 46px; }
.side-nav { flex-direction: column; gap: 1rem; padding: 0 1rem 1rem; }
.side-menu, .side-sub { list-style: none; margin: 0; padding: 0; }
.side-menu .nav-link { display: flex; align-items: center; justify-content: space-between; color: var(--ink); padding: .6rem .85rem; border-radius: var(--radius); cursor: pointer; }
.side-menu .nav-link:hover { background: var(--brand-soft); color: var(--brand-dark); }
.side-menu .nav-link.active { background: var(--brand); color: var(--on-brand); }
.side-menu summary { list-style: none; }
.side-menu summary::-webkit-details-marker { display: none; }
.side-menu summary::after { content: "\F282"; font-family: "bootstrap-icons"; font-size: .8rem; transition: transform .2s; }
.side-menu details[open] > summary::after { transform: rotate(180deg); }
.side-sub { margin: .2rem 0 .4rem .85rem; padding-left: .7rem; border-left: 2px solid var(--line); }
.side-sub a { display: block; padding: .4rem .6rem; color: var(--ink-soft); text-decoration: none; border-radius: var(--radius-sm); font-size: .95rem; }
.side-sub a:hover, .side-sub a.active { color: var(--brand-dark); background: var(--brand-soft); }
.side-foot { display: flex; flex-direction: column; gap: .4rem; font-size: .875rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.side-foot a { color: var(--ink-soft); text-decoration: none; display: inline-flex; gap: .45rem; align-items: center; }
.side-foot a:hover { color: var(--brand); }
.side-social { display: flex; gap: .9rem; font-size: 1.1rem; margin-top: .25rem; }
@media (min-width: 992px) {
  body.hdr-sidebar { padding-left: 272px; }
  .side-header { position: fixed; top: 0; bottom: 0; left: 0; width: 272px; z-index: 1030; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--line);
    display: flex; flex-direction: column; }
  .side-top { flex-direction: column; align-items: flex-start; padding: 1.5rem 1.25rem 1rem; }
  .side-top .brand { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .side-top .brand-logo { height: 64px; max-width: 200px; }
  .side-top .brand-name { font-size: 1.2rem; }
  .side-nav { flex: 1; padding: 0 1rem 1.25rem; }
  .side-nav .nav-search { width: 100%; }
  .side-foot { margin-top: auto; }
}

/* ==========================================================================
   ส่วนท้าย
   ========================================================================== */
.site-footer.ftr-light { background: var(--mist); color: var(--ink-soft); border-top-color: var(--brand); }
.site-footer.ftr-light a, .site-footer.ftr-light .footer-name, .site-footer.ftr-light .footer-heading { color: var(--ink); }
.site-footer.ftr-light .footer-links a { color: var(--ink-soft); }
.site-footer.ftr-light .footer-links a:hover { color: var(--brand); }
.site-footer.ftr-light .footer-contact i { color: var(--brand); }
.site-footer.ftr-light .footer-social a { border-color: var(--line); color: var(--ink); background: #fff; }
.site-footer.ftr-light .footer-social a:hover { border-color: var(--brand); color: var(--brand); }
.site-footer.ftr-light .footer-bottom { border-top-color: var(--line); color: var(--ink-soft); }
.site-footer.ftr-light .back-top { color: var(--ink-soft); }
.site-footer.ftr-brand { background: var(--brand-dark); color: rgba(255, 255, 255, .82); border-top-color: var(--marigold); }
.site-footer.ftr-brand .footer-contact i { color: var(--marigold); }
.site-footer.ftr-brand .footer-bottom { border-top-color: rgba(255, 255, 255, .15); }
.site-footer.ftr-min { background: var(--paper); color: var(--ink-soft); border-top: 1px solid var(--line); padding: 2rem 0 1.25rem; font-size: .95rem; }
.site-footer.ftr-min a { color: var(--ink); text-decoration: none; }
.site-footer.ftr-min a:hover { color: var(--brand); text-decoration: underline; }
.site-footer.ftr-min .footer-name { color: var(--ink); margin: 0; }
.ftr-min-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.ftr-min-contact { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .25rem 0 0; font-size: .9rem; }
.ftr-min-contact a { display: inline-flex; gap: .4rem; color: var(--ink-soft); }
.ftr-min-links { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.ftr-min-social { list-style: none; margin: 0; padding: 0; display: flex; gap: .4rem; }
.ftr-min-social a { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); }
.ftr-min-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; }
@media (max-width: 767.98px) { .ftr-min-links { margin-left: 0; flex-basis: 100%; } }

.tpl-preview-badge { position: fixed; left: .75rem; bottom: .75rem; z-index: 2000; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem;
  border-radius: 999px; background: rgba(17, 24, 39, .88); color: #fff; font-size: .85rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); pointer-events: none; }

/* ==========================================================================
   คอลัมน์หลัก + แถบข้าง
   ========================================================================== */
.zone-row { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); }
@media (min-width: 992px) {
  .zone-row { grid-template-columns: minmax(0, 1fr) minmax(0, 330px); }
  .zone-row.side-left { grid-template-columns: minmax(0, 330px) minmax(0, 1fr); }
  .zone-row.side-left .zone-side { order: -1; }
  .zone-row.is-single { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1200px) {
  .zone-row { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
  .zone-row.side-left { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
}
.zone-main, .zone-side { container-type: inline-size; display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 2.75rem); min-width: 0; }
.zone-side > .block { background: #fff; border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius-lg); padding: 1.15rem 1.15rem 1.25rem; }
.zone-side .section-head { margin-bottom: .85rem; }
.zone-side .section-head h2 { font-size: 1.2rem; }
.zone-side .section-more { font-size: .9rem; }
.zone-side :is(.news-stack, .news-lead, .doc-row, .staff-card) { box-shadow: none !important; }
.zone-side .news-stack { padding: 0 !important; border: 0 !important; background: none !important; }
.zone-side .news-row { grid-template-columns: 80px minmax(0, 1fr); gap: .75rem; padding: .75rem 0; }
.zone-side .news-row-title { font-size: .98rem; }
.zone-side .doc-grid, .zone-side .doc-list { display: block; }
.zone-side .doc-grid .doc-row { grid-template-columns: 36px minmax(0, 1fr); gap: .7rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: .7rem 0; background: none; }
.zone-side .doc-grid .doc-row:last-child { border-bottom: 0; }
.zone-side .doc-grid .doc-row:nth-child(-n+2) { border-top: 0; }
.zone-side .doc-badge { width: 36px; height: 36px; font-size: 1.1rem; }
.zone-side .doc-actions { grid-column: 2; }
.zone-side .staff-grid { grid-template-columns: 1fr; gap: .6rem; }
.zone-side .staff-card { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: .8rem; align-items: center; text-align: left; padding: 0; border: 0; background: none; }
.zone-side .staff-card .staff-photo, .zone-side .staff-card .fit-frame, .zone-side .staff-card .img-fallback { margin: 0; aspect-ratio: 1; border-radius: 50%; font-size: 1.4rem; }
.zone-side .staff-bio, .zone-side .staff-contact { display: none; }
.zone-side .album-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.zone-side .album-card-body { padding: 1.75rem .6rem .5rem; }
.zone-side .album-card-title { font-size: .9rem; }
.zone-side .album-card-meta { display: none; }
.zone-side .fbk-cta { padding: 1rem; gap: 1rem; }
.zone-side .fbk-cta h2 { font-size: 1.2rem; }
.zone-side .fb-plugin.is-fill { min-height: 420px; }
@container (max-width: 680px) {
  .doc-grid { display: block; }
  .album-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-mosaic .album-card-feature { grid-column: span 2; grid-row: auto; min-height: 0; }
  .album-mosaic .album-card-feature .album-card-img { position: static; aspect-ratio: 16 / 9; }
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fbk-cta, .contact-block { grid-template-columns: minmax(0, 1fr) !important; }
  .fb-follow-row { grid-template-columns: minmax(0, 1fr) !important; }
}
.news-main { display: grid; gap: 1.5rem; }
@container (min-width: 700px) {
  .news-stack-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .news-stack-2 .news-row:nth-child(2) { border-top: 0; padding-top: 0; }
  .news-main .news-lead:not(.news-lead-text) { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 1.5rem; align-items: start; }
  .news-main .news-lead:not(.news-lead-text) .news-lead-media { grid-row: span 4; margin-bottom: 0; }
}

/* พื้นหลังเต็มหน้า: แต่ละกล่องในคอลัมน์เป็นกล่องลอย */
.has-page-bg .zone-section > .container { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: none; padding: 0 12px; }
.has-page-bg .zone-main > .block, .has-page-bg .zone-side > .block {
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .65);
  border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(15, 30, 40, .10); padding: clamp(1.1rem, 2.5vw, 1.75rem);
}
.has-page-bg.bg-panel-solid .zone-main > .block, .has-page-bg.bg-panel-solid .zone-side > .block { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 575.98px) { .has-page-bg .zone-section > .container { padding: 0 .5rem; } }

/* ==========================================================================
   ส่วนใหม่ของหน้าแรก
   ========================================================================== */
/* ข้อความต้อนรับ */
.intro-block { max-width: 780px; margin: 0 auto; text-align: center; }
.intro-kicker { color: var(--brand); font-weight: 600; letter-spacing: .02em; margin: 0 0 .35rem; }
.intro-title { font-size: clamp(1.6rem, 3.8vw, 2.5rem); margin: 0 0 1rem; }
.intro-text { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 1.5rem; }
.zone-main .intro-block, .zone-side .intro-block { text-align: left; margin: 0; }
.zone-side .intro-title { font-size: 1.3rem; }
.zone-side .intro-text { font-size: 1rem; }

/* ลิงก์ด่วน */
.quick-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .9rem; }
.quick-links a { height: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: 1.15rem .75rem 1rem; background: #fff;
  border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.4;
  transition: transform .15s, border-color .15s; }
.quick-links a:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand-dark); }
.quick-icon { width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 1.45rem; }
.zone-side .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.zone-side .quick-links a { padding: .8rem .5rem .75rem; font-size: .92rem; box-shadow: none; }
.zone-side .quick-icon { width: 2.6rem; height: 2.6rem; font-size: 1.15rem; }

/* ตัวเลขสถิติ */
.stat-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .9rem; }
.stat-tiles li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; padding: 1.1rem 1.25rem;
  background: #fff; border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius-lg); }
.stat-tiles i { grid-row: span 2; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); font-size: 1.35rem; }
.stat-tiles strong { font-family: var(--font-head); font-weight: var(--head-weight, 700); font-size: 1.75rem; line-height: 1.15; color: var(--ink); }
.stat-tiles span { color: var(--ink-soft); font-size: .92rem; line-height: 1.4; }
.zone-side .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.zone-side .stat-tiles li { grid-template-columns: 1fr; padding: .75rem; box-shadow: none; }
.zone-side .stat-tiles i { display: none; }
.zone-side .stat-tiles strong { font-size: 1.35rem; }

/* ติดต่อเรา */
.contact-block { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .contact-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; } .contact-block.no-map { grid-template-columns: minmax(0, 1fr); } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.contact-list li { display: flex; gap: .8rem; line-height: 1.6; }
.contact-list i { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.contact-list a { color: var(--ink); text-decoration: none; align-self: center; }
.contact-list span { align-self: center; }
.contact-map iframe { width: 100%; aspect-ratio: 16 / 10; height: auto; border: 0; border-radius: var(--radius-lg); display: block; }

/* ==========================================================================
   ลูกเล่นเฉพาะบางเทมเพลต
   ========================================================================== */
/* ราชพฤกษ์: หัวเว็บสีหลัก ขอบทอง */
.tpl-royal .masthead-center { background: var(--brand); border-bottom: 3px solid var(--marigold); }
.tpl-royal .masthead-center .brand, .tpl-royal .masthead-center .brand-name { color: var(--on-brand); }
.tpl-royal .masthead-center .brand-tagline { color: var(--marigold); }
.tpl-royal .masthead-center .brand-mark { background: var(--marigold); color: #fff; }
.tpl-royal .masthead-center .nav-toggle { background: transparent; color: var(--on-brand); border-color: rgba(255, 255, 255, .35); }
.tpl-royal .topbar { background: var(--brand-dark); }
/* นิตยสารข่าว */
.tpl-magazine .news-lead-title { font-size: clamp(1.45rem, 3vw, 2.1rem); }
.tpl-magazine .news-cat { text-transform: none; background: var(--brand); color: var(--on-brand); padding: .05rem .55rem; border-radius: 2px; font-size: .78rem; }
/* เทคโนโลยี: ลายตาราง */
.tpl-tech .section-mist { background-color: var(--mist); background-image: linear-gradient(rgba(var(--brand-rgb), .06) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--brand-rgb), .06) 1px, transparent 1px); background-size: 28px 28px; }
.tpl-tech .stat-tiles strong { color: var(--brand); }
/* แลนดิ้ง: แถบตัวเลขสีหลัก */
.tpl-landing section.home-stats { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.tpl-landing section.home-stats .stat-tiles li { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); box-shadow: none; }
.tpl-landing section.home-stats .stat-tiles i { background: rgba(255, 255, 255, .16); color: #fff; }
.tpl-landing section.home-stats .stat-tiles strong, .tpl-landing section.home-stats .stat-tiles span { color: #fff; }
.tpl-landing section.home-intro .intro-title { font-size: clamp(1.9rem, 4.6vw, 3rem); }
/* หนังสือพิมพ์ */
.tpl-newspaper .masthead-center { border-bottom: 1px solid var(--ink); }
.tpl-newspaper .masthead-center .brand-name { font-size: clamp(1.5rem, 4vw, 2.6rem); letter-spacing: .01em; }
@media (max-width: 575.98px) { .tpl-newspaper .masthead-center .brand-name { font-size: 1.3rem; } }
.tpl-newspaper .site-nav-line { border-top: 0; border-bottom: 3px double var(--ink); }
.tpl-newspaper .news-lead-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.tpl-newspaper .news-cat { color: var(--marigold); }
/* อนุบาลสดใส */
.tpl-kids .section-head h2::after { height: 6px; width: 4rem; margin-left: -2rem; background: repeating-linear-gradient(90deg, var(--brand) 0 10px, var(--marigold) 10px 20px); }
.tpl-kids .quick-icon { background: var(--marigold-soft); color: var(--marigold); }
.tpl-kids .quick-links li:nth-child(odd) .quick-icon { background: var(--brand-soft); color: var(--brand); }
/* พอร์ทัลบริการ */
.tpl-portal section.home-quicklinks .quick-links { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.tpl-portal section.home-quicklinks .quick-links a { padding: 1.4rem .75rem 1.2rem; }
