/*
Theme Name: Kurusurin Coop
Description: ธีมสหกรณ์ออมทรัพย์คุรุสัมพันธ์จังหวัดสุรินทร์ — เลย์เอาต์ 3 คอลัมน์ตามเว็บเดิม (ซ้ายเมนู / กลางข่าว / ขวาผู้บริหาร+ดอกเบี้ย)
Author: Kurusurin Web Team
Version: 2.0.0
Text Domain: kurusurin
*/

:root {
  --navy: #0d2b5e;
  --navy-2: #16407e;
  --gold: #f0b323;
  --gold-soft: #ffd34d;
  --line: #dfe7f1;
  --blue-soft: #eaf3fc;
  --ink: #22303f;
  --muted: #5c6b7a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Noto Sans Thai', 'Prompt', 'Sarabun', 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink); background: #eef3f9; font-size: 16.5px; line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: #1a7fc1; text-decoration: none; }
a:hover { color: var(--navy); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 14px; }
.center { text-align: center; }

/* ---------- แถบบน ---------- */
.topbar { background: var(--navy); color: #cfe0f5; font-size: 12.5px; padding: 5px 0; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar .item { margin-right: 14px; }

/* ---------- หัวเว็บ (โลโก้ + ชื่อ 2 ภาษา) ---------- */
.site-header { background: #fff; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; width: 100%; }
.brand-logo { max-height: 64px; width: auto; flex-shrink: 0; }
.brand-text { min-width: 0; flex: 1; container-type: inline-size; }
.site-title { font-size: min(26px, 4.1cqi); font-weight: 700; color: var(--navy); line-height: 1.5; font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif; white-space: nowrap; }
.site-title-en { font-size: min(12px, 2cqi); color: #456; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; line-height: 1.65; margin-top: 3px; }

/* ---------- แถบเมนูน้ำเงิน (แถวเดียว เลื่อนดูได้ ไม่ตกบรรทัด) ---------- */
.main-nav-wrap { background: var(--navy); position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 10px rgba(13,43,94,.25); }
.main-nav { list-style: none; display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav li { flex: 0 0 auto; }
.main-nav a {
  display: block; padding: 11px 18px; color: #fff; font-weight: 600; font-size: 15.5px;
  border-right: 1px solid rgba(255,255,255,.12); white-space: nowrap;
}
.main-nav a:hover { background: var(--navy-2); color: var(--gold-soft); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-post-parent > a { background: var(--gold); color: #123; }
.main-nav ul.sub-menu, .main-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: var(--navy-2);
  list-style: none; z-index: 1000; box-shadow: 0 10px 18px rgba(0,0,0,.2);
}
.main-nav li:hover > ul.sub-menu { display: block; }
.main-nav ul.sub-menu a, .main-nav .sub-menu a { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding: 9px 14px; font-size: 14.5px; }

/* ---------- ปุ่ม ☰ เมนูมือถือ (โชว์เฉพาะจอแคบ กางดูได้ครบทุกรายการ) ---------- */
.nav-toggle {
  display: none; align-items: center; gap: 10px;
  width: 100%; padding: 10px 4px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; color: #fff;
}
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; }
.nav-toggle-bars i { width: 22px; height: 2.5px; border-radius: 2px; background: var(--gold); transition: transform .25s ease, opacity .2s ease; }
.nav-toggle-label { color: var(--gold-soft); font-weight: 600; letter-spacing: .5px; }
.main-nav-wrap.nav-open .nav-toggle-bars i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.main-nav-wrap.nav-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.main-nav-wrap.nav-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* กลุ่ม "หน่วยงานของเรา / บริการของเรา" ในเมนูมือถือ — จอใหญ่ซ่อน */
.nav-mobile-groups { display: none; }
.nav-group-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 12px 16px; margin: 0;
  background: var(--navy-2); color: var(--gold-soft);
  border: 0; border-top: 1px solid rgba(255,255,255,.18);
  font-family: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer;
}
.nav-group-toggle .chev { transition: transform .25s ease; }
.nav-group-toggle.open .chev { transform: rotate(180deg); }
.nav-group-list { list-style: none; margin: 0; padding: 0; display: none; background: rgba(0,0,0,.22); }
.nav-group-toggle.open + .nav-group-list { display: block; }
.nav-group-list a {
  display: block; padding: 10px 16px 10px 30px; color: #fff;
  font-size: 14.5px; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08); text-align: left;
}
.nav-group-list a::before { content: "•"; color: var(--gold); margin-right: 9px; }
.nav-group-list a:hover { background: var(--navy); color: var(--gold-soft); }

/* ---------- สไลด์หน้าแรก (1 รูปต่อ 1 สไลด์ เห็นเต็มใบ ไม่ตัด) ---------- */
.slideshow-wrap { padding: 12px 0 0; }
.slideshow {
  position: relative; background: #fff; border: 3px double var(--gold);
  border-radius: 10px; padding: 8px; box-shadow: 0 6px 18px rgba(13,43,94,.10);
}
.slide-frame { position: relative; overflow: hidden; border-radius: 6px; background: var(--navy); height: clamp(210px, 30vw, 350px); }
.slide-item {
  position: absolute; inset: 0; width: 100%; height: 100%;
  min-width: 0; min-height: 0;
  object-fit: cover; object-position: center 55%; background: var(--navy);
  opacity: 0; transition: opacity .6s ease;
}
.slide-item.active { opacity: 1; }
.slide-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; z-index: 3; }
.slide-dot {
  width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff;
  background: rgba(13,43,94,.45); cursor: pointer; padding: 0;
}
.slide-dot.on { background: var(--gold); border-color: #fff; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff;
  background: var(--navy); color: var(--gold-soft); font-size: 22px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 12px rgba(13,43,94,.35);
}
.slide-btn:hover { background: var(--gold); color: var(--navy); }
.slide-btn.prev { left: -14px; }
.slide-btn.next { right: -14px; }

/* Compact editable caption overlay; photographs share one fixed frame. */
.slideshow .slide-caption { position: absolute; z-index: 3; bottom: 10px; left: 10px; right: 10px; background: rgba(13,43,94,.66); color: #fff0bc; padding: 8px 14px; margin: 0; border-radius: 6px; font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif; font-size: clamp(14px, 1.4vw, 18px); line-height: 1.5; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slideshow .slide-caption[hidden] { display: none; }
.slideshow .slide-controls { display:flex; align-items:center; justify-content:center; gap:14px; padding:6px 8px 0; }
.slideshow .slide-dots { position:static; gap:5px; flex-wrap:wrap; }
.slideshow .slide-dot { width:28px; height:28px; border:7px solid #fff; background:var(--navy); }
.slideshow .slide-dot.on { background:var(--gold); border-color:#fff; }
.slide-pause { border:1px solid var(--navy); border-radius:6px; background:#fff; color:var(--navy); padding:7px 12px; min-height:36px; font:inherit; font-size:14px; cursor:pointer; }
.slide-pause[hidden] { display:none; }
.slideshow button:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
@media(max-width:600px) { .slide-frame { height: 230px; } .slideshow .slide-caption { padding:7px 10px; bottom:6px; left:6px; right:6px; } .slideshow .slide-btn { width:44px; height:44px; } }
@media(prefers-reduced-motion:reduce) { .slide-item { transition:none; } }

/* ---------- โครง 3 คอลัมน์ ---------- */
.layout {
  display: grid; grid-template-columns: 218px minmax(0, 1fr) 245px;
  gap: 14px; align-items: start; padding-top: 14px; padding-bottom: 10px;
}
/* หน้าข่าวเดี่ยว: เนื้อหาเต็มคอลัมน์เดียว ไม่มีแถบข้าง */
.layout-solo { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-left: auto; margin-right: auto; }
/* หน้าย่อย: เมนูซ้าย + เนื้อหา (กล่องข้อมูล/คณะบริหาร มีเฉพาะหน้าแรก) */
.layout-two { grid-template-columns: 218px minmax(0, 1fr); }
.col-left, .col-right { display: flex; flex-direction: column; gap: 14px; }

/* ---------- กล่องเมนูซ้าย (พื้นน้ำเงิน ตัวทอง) ---------- */
.side-box { background: #fff; border: 1px solid #e8d193; border-radius: 9px; overflow: hidden; box-shadow: 0 3px 10px rgba(13,43,94,.07); }
.nav-box { background: var(--navy); border: 1px solid var(--navy-2); }
.side-box-title {
  padding: 9px 13px; font-weight: 700; font-size: 15px; font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif;
  border-bottom: 2px solid rgba(255,255,255,.18); color: var(--gold-soft);
}
.side-box-title.gold { color: var(--navy); border-bottom: 2px solid var(--gold); }
.side-box-title.blue { color: var(--navy); border-bottom: 2px solid var(--blue-soft); }
.side-box-title.red  { color: #7b1a1a; border-bottom: 2px solid #fdf0ec; }
.side-box-title.green{ color: #0a7a3d; border-bottom: 2px solid #eafbf1; }
.side-box-body { padding: 12px 13px; font-size: 14px; color: #3a4a5a; }
.side-box-body.center { text-align: center; }

.side-menu { list-style: none; padding: 4px 0 6px; }
.side-menu li { border-bottom: 1px dotted rgba(255,255,255,.22); }
.side-menu li:last-child { border-bottom: none; }
.side-menu a { display: block; padding: 7px 13px 7px 24px; color: #eaf2fd; font-size: 14px; position: relative; }
.side-menu a::before { content: "•"; position: absolute; left: 12px; color: var(--gold-soft); }
.side-menu a:hover { background: var(--navy-2); color: var(--gold-soft); }

.member-head { text-align: center; font-size: 14.5px; color: var(--navy); margin-bottom: 10px; line-height: 1.5; }
.member-form { display: flex; flex-direction: column; gap: 8px; }
.member-form input[type="text"],
.member-form input[type="password"] {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 2px solid #49648d; border-radius: 9px;
  background: linear-gradient(120deg, rgba(38,68,114,.94), rgba(13,43,94,.94)); font-size: 14px; font-family: inherit; color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 10px rgba(13,43,94,.12);
  caret-color: var(--gold); transition: border-color .25s, box-shadow .25s;
}
/* Nebula Glow Input inspired by risabbir / Uiverse: https://uiverse.io/risabbir/clever-panda-6 */
.member-form input::placeholder { color: #dce6f5; opacity: 1; }
.member-form input:hover { border-color: #8eafd8; }
.member-form input:focus { border-color: var(--gold); outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 3px rgba(241,181,24,.18), 0 0 20px rgba(78,132,208,.35), inset 0 1px 0 rgba(255,255,255,.15); }
.member-form input:autofill { -webkit-text-fill-color: #fff; caret-color: var(--gold); box-shadow: inset 0 0 0 100px var(--navy); }
@media(prefers-reduced-motion:reduce) { .member-form input[type="text"], .member-form input[type="password"] { transition: none; } }
@media(forced-colors:active) { .member-form input[type="text"], .member-form input[type="password"] { background: Canvas; color: CanvasText; border-color: ButtonText; box-shadow: none; } .member-form input::placeholder { color: GrayText; } .member-form input:focus { outline-color: Highlight; } }
.member-btn {
  display: block; width: 100%; background: var(--gold); color: #123 !important; font-weight: 700;
  text-align: center; padding: 9px 10px; border-radius: 8px; font-size: 14.5px; border: none; cursor: pointer;
  box-shadow: 0 4px 10px rgba(240,179,35,.4); font-family: inherit;
}
.member-btn:hover { background: var(--gold-soft); color: #000 !important; }
.member-howto { text-align: center; margin-top: 10px; font-size: 13.5px; }
.member-howto a { color: #1a7fc1; font-weight: 600; }
.div-year { text-align: center; font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.div-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.hit-counter { text-align: center; font-size: 21px; font-weight: 700; color: var(--navy); letter-spacing: .5px; }

/* ---------- ลิสต์เอกสารในหน้า (ระเบียบ ฯลฯ) ---------- */
.kuru-doclist { list-style: none; margin: 0 0 1em; padding: 0; }
.kuru-doclist li { border-bottom: 1px dashed var(--line); }
.kuru-doclist li:last-child { border-bottom: none; }
.kuru-doclist a { display: block; padding: 9px 6px; color: var(--navy); font-weight: 600; font-size: 15.5px; }
.kuru-doclist a:hover { background: var(--blue-soft); color: #1a7fc1; }
.kuru-doclist a::before { content: "📄 "; }

.member-btn {
  display: block; background: var(--gold); color: #123 !important; font-weight: 700;
  text-align: center; padding: 9px 10px; border-radius: 8px; font-size: 14.5px;
  box-shadow: 0 4px 10px rgba(240,179,35,.4);
}
.member-btn:hover { background: var(--gold-soft); color: #000 !important; }

/* ---------- ตารางอัตราดอกเบี้ย ---------- */
.rate-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rate-sub { text-align: center; font-weight: 700; font-size: 13.5px; color: var(--navy); margin: 0 0 8px; }
.rate-note { padding: 7px 12px 10px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 4px; }
.rate-table td { padding: 6px 11px; border-bottom: 1px solid #eef2f8; color: #2c3a48; }
.rate-table tr:last-child td { border-bottom: none; }
.rate-table .pct { text-align: center; font-weight: 700; color: var(--navy); white-space: nowrap; }
.rate-table .rate-head td { background: var(--blue-soft); font-weight: 700; color: var(--navy); font-size: 13.5px; }
.line-qr { width: 150px; border-radius: 10px; border: 3px solid var(--blue-soft); }

/* ---------- กรอบรูปผู้บริหาร ---------- */
.exec-box { text-align: center; padding: 14px 12px 12px; }
.exec-photo {
  width: 112px; height: 146px; object-fit: cover; object-position: top center;
  border-radius: 50% / 42%; border: 4px solid var(--gold);
  box-shadow: 0 6px 14px rgba(13,43,94,.22); background: #f7f9fd;
}
.exec-name { margin-top: 10px; font-weight: 700; font-size: 15.5px; color: var(--navy); font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif; }
.exec-pos { font-size: 13.5px; color: var(--muted); }

/* ---------- ป้ายนำทาง (Breadcrumb) แบบมืออาชีพ: ชิป + ตัวคั่นทอง ---------- */
.exec-portrait { position: relative; display: inline-block; width: 112px; height: 146px; vertical-align: bottom; transition: transform .35s ease; }
.exec-portrait .exec-photo { display: block; }
.portrait-ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.portrait-ring rect { fill: none; stroke: var(--gold); stroke-width: 4; }

/* หน้าแรก: เส้นทองบอกระยะอ่าน และจังหวะข่าว/ผู้บริหารโดยไม่ซ่อนข้อความ */
.scroll-progress {
  position: fixed; inset: 0 0 auto; height: 3px; z-index: 1100;
  background: var(--gold); pointer-events: none; transform: scaleX(0); transform-origin: left center;
}
.admin-bar .scroll-progress { top: 32px; }
.home .news-tab { position: relative; }
.home .news-tab::after {
  content: ''; position: absolute; left: 18px; right: 18px; bottom: 3px; height: 2px;
  background: var(--gold); transform-origin: left center;
}
.home.scroll-motion .news-tab::after { transform: scaleX(0); transition: transform .65s cubic-bezier(.16,1,.3,1); }
.home.scroll-motion .news-tab.scroll-arrived::after { transform: scaleX(1); }
.home.scroll-motion .news-table tr.scroll-arrived td { animation: kuru-news-arrive .38s cubic-bezier(.16,1,.3,1) var(--news-delay,0ms) both; }
.home.scroll-motion .exec-photo { border-color: rgba(240,179,35,.2); }
.home.scroll-motion .portrait-ring { opacity: 1; }
.home.scroll-motion .portrait-ring rect { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .8s cubic-bezier(.16,1,.3,1); }
.home.scroll-motion .exec-box.scroll-arrived .portrait-ring rect { stroke-dashoffset: 0; }
.home.scroll-motion .exec-box.scroll-arrived .exec-name { animation: kuru-name-arrive .3s ease-out .12s both; }
.home.scroll-motion .exec-box.scroll-arrived .exec-pos { animation: kuru-name-arrive .3s ease-out .2s both; }
@keyframes kuru-news-arrive { from { opacity: .65; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes kuru-name-arrive { from { opacity: .7; } to { opacity: 1; } }
@media (max-width: 782px) { .admin-bar .scroll-progress { top: 46px; } }
@media (max-width: 760px) {
  .scroll-progress { height: 2px; }
  .home.scroll-motion .news-table tr.scroll-arrived td,
  .home.scroll-motion .exec-box.scroll-arrived .exec-name,
  .home.scroll-motion .exec-box.scroll-arrived .exec-pos { animation: none; }
  .home.scroll-motion .news-tab::after { transition-duration: .3s; }
  .home.scroll-motion .portrait-ring rect { transition-duration: .4s; }
}
@media (prefers-reduced-motion: reduce) {
  .home.scroll-motion .news-tab::after { transform: none; transition: none; }
  .home.scroll-motion .news-table tr.scroll-arrived td,
  .home.scroll-motion .exec-box.scroll-arrived .exec-name,
  .home.scroll-motion .exec-box.scroll-arrived .exec-pos { animation: none; }
  .home.scroll-motion .portrait-ring { opacity: 0; }
  .home.scroll-motion .exec-photo { border-color: var(--gold); }
}
.breadcrumb-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  background: linear-gradient(135deg, #ffffff, #f3f8fe);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 9px 14px; margin-bottom: 12px;
  font-size: 13.5px; color: var(--muted);
  box-shadow: 0 2px 8px rgba(13,43,94,.06);
}
.bc-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 999px;
  background: var(--blue-soft); color: var(--navy); font-weight: 600;
  text-decoration: none; transition: background .18s ease, color .18s ease, transform .18s ease;
}
.bc-crumb:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.bc-crumb svg { flex: 0 0 auto; }
.bc-sep { color: var(--gold); font-weight: 700; font-size: 15px; line-height: 1; }
.bc-current { color: var(--navy); font-weight: 700; padding: 3px 4px; }

.news-block { background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; box-shadow: 0 3px 10px rgba(13,43,94,.07); }
.news-tab {
  display: inline-block; background: var(--navy); color: var(--gold-soft); font-weight: 700;
  font-size: 15px; padding: 7px 18px; border-radius: 0 10px 0 0; font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif;
}
.no-news { padding: 20px; text-align: center; color: var(--muted); }

/* ตารางข่าว: ลาย 2 สี ฟ้า-ขาว + ลูกเล่นชี้แถว */
.news-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.news-table th { background: var(--navy); color: #fff; font-size: 14.5px; padding: 10px 12px; text-align: left; }
.news-table .th-meta { width: 118px; text-align: center; }
.news-table td { padding: 9px 12px; vertical-align: middle; transition: background .18s ease; }
.news-table tbody tr { border-bottom: 2px solid #fff; }
.news-table tbody tr:nth-child(odd) td  { background: #ffffff; }
.news-table tbody tr:nth-child(even) td { background: var(--blue-soft); }
.news-table tbody tr td:first-child { border-left: 4px solid transparent; transition: border-color .18s ease, background .18s ease; }
.news-table tbody tr:hover td  { background: #fff3d1; }
.news-table tbody tr:hover td:first-child { border-left-color: var(--gold); }
.td-title { font-size: 15px; text-wrap: balance; }
.td-title a { color: var(--ink); text-wrap: balance; }
.td-title a:hover { color: #1a7fc1; }
.badge-new {
  display: inline-block; background: #e02b2b; color: #fff; font-size: 9.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 3px; margin-right: 7px; vertical-align: 2px; letter-spacing: .5px;
}
.td-meta { text-align: center; }
.meta-date { display: block; font-weight: 700; font-size: 13.5px; color: var(--navy); }
.meta-views { display: block; font-size: 12px; color: #8a99a8; margin-top: 1px; }

.pagebar { padding: 12px; text-align: center; font-size: 14px; border-top: 1px solid #eef2f8; }
.pagebar .page-numbers {
  display: inline-block; padding: 4px 10px; margin: 0 2px; border: 1px solid var(--line);
  border-radius: 5px; background: #fff; color: var(--ink); font-weight: 600;
}
.pagebar .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagebar .page-info { margin-left: 12px; color: var(--muted); }

.all-news-btn {
  display: inline-block; margin: 0 12px 14px; background: var(--navy); color: #fff !important;
  font-weight: 600; font-size: 14.5px; padding: 8px 18px; border-radius: 999px;
}
.all-news-btn:hover { background: var(--navy-2); }

/* ---------- กล่องประกาศโอนเงิน (ใต้ตารางข่าว) ---------- */
.transfer-box { background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 14px; box-shadow: 0 3px 10px rgba(13,43,94,.07); }
.transfer-title { background: var(--navy); color: #fff; padding: 9px 14px; font-weight: 700; font-size: 15.5px; font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif; }
.transfer-box > p { padding: 10px 14px 0; font-size: 13.5px; color: #3a4a5a; }
.transfer-table { margin: 6px 14px 6px; border-collapse: collapse; }
.transfer-table td { padding: 3px 0; font-size: 15px; }
.t-label { width: 175px; color: var(--muted); }
.t-acc { font-weight: 700; color: var(--navy); font-size: 18px; letter-spacing: 1px; }
.transfer-note { padding: 0 14px 14px !important; font-size: 14px; color: #7b1a1a; }
.transfer-notice { margin: 10px 14px 0; padding: 10px 12px; background: #fff7e6; border-left: 4px solid var(--gold); border-radius: 6px; font-size: 14.5px; color: #3a4a5a; line-height: 1.6; }
.transfer-notice b { color: #7b1a1a; }
.transfer-phones { display: flex; gap: 10px; padding: 10px 14px 16px; flex-wrap: wrap; }
.phone-btn {
  flex: 1 1 140px; text-align: center; padding: 10px 14px; border-radius: 8px;
  color: #fff; font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.phone-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(13,43,94,.22); filter: brightness(1.06); }
.phone-btn:active { transform: translateY(0); }
.phone-navy { background: linear-gradient(135deg, #0d2b5e, #1a5276); }
.phone-teal { background: linear-gradient(135deg, #08a5b7, #2d6a9f); }

/* ---------- แถบแจ้งคุกกี้ (ตามนโยบายคุกกี้ของสหกรณ์) ---------- */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
  display: flex; align-items: center; gap: 18px;
  max-width: 1060px; margin: 0 auto; padding: 15px 22px;
  background: #fff; border: 1px solid #e3e9f2; border-radius: 18px;
  box-shadow: 0 12px 36px rgba(13, 43, 94, .28);
  opacity: 0; transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease;
}
.cookie-bar.show { opacity: 1; transform: none; }
.cookie-text { flex: 1; font-size: 15px; line-height: 1.7; color: #2b3a4a; }
.cookie-text b { color: var(--navy); font-size: 16px; }
.cookie-text a { color: #1a5276; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cookie-text a:hover { color: #08a5b7; }
.cookie-accept {
  flex: 0 0 auto; border: 0; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #0d2b5e, #1a5276);
  color: #fff; font-weight: 700; font-size: 15.5px;
  padding: 12px 28px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.cookie-accept:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(13,43,94,.3); filter: brightness(1.12); }
.cookie-accept:active { transform: translateY(0); }
@media (max-width: 640px) {
  .cookie-bar { flex-direction: column; text-align: center; gap: 10px; padding: 12px 14px; }
  .cookie-text { font-size: 13.5px; line-height: 1.55; }
  .cookie-text b { font-size: 14.5px; }
  .cookie-accept { width: 100%; padding: 12px 18px; }
}
/* แก้บั๊ก: hidden attribute ถูก display:flex ทับ ทำให้แถบโปร่งใสกินการแตะตลอดเวลา
   + ก่อนแสดง (.show) ห้ามดัก pointer ด้วย */
.cookie-bar[hidden] { display: none !important; }
.cookie-bar:not(.show) { pointer-events: none; }


/* ---------- ปุ่มเปิดเอกสาร PDF ในบทความ (อ่านง่ายเหมือนหน้าระเบียบ) ---------- */
.entry-content a[href$=".pdf"],
.entry-content a[href$=".pdf"]:visited {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 12px 0 4px; padding: 12px 24px;
  background: linear-gradient(135deg, #0d2b5e, #1a5276); color: #fff !important;
  border-radius: 999px; font-weight: 700; font-size: 15px;
  text-decoration: none; box-shadow: 0 6px 14px rgba(13,43,94,.22);
  transition: transform .16s ease, filter .16s ease;
}
.entry-content a[href$=".pdf"]:hover { transform: translateY(-2px); filter: brightness(1.12); }
.entry-content a[href$=".pdf"]:active { transform: translateY(0); }
/* เนื้อหาบทความหลังทำความสะอาด: หัวข้อกลางชิดซ้ายอ่านง่าย */
.single-post .entry-content { line-height: 1.85; font-size: 15.5px; }
.single-post .entry-content h2 { margin: 4px 0 10px; }

/* ---------- กล่องวารสาร (ปก + ปุ่มเปิด) ---------- */
.journal-link { display: block; }
.journal-cover {
  width: 100%; max-width: 175px; display: block; margin: 0 auto;
  border-radius: 8px; box-shadow: 0 4px 12px rgba(13,43,94,.18);
  transition: transform .25s ease, box-shadow .25s ease;
}
.journal-link:hover .journal-cover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 22px rgba(13,43,94,.28); }
.journal-cap { text-align: center; font-size: 13px; font-weight: 700; color: var(--navy); margin: 9px 0 9px; }
.journal-btn {
  display: block; text-align: center; padding: 8px 12px; border-radius: 20px;
  background: linear-gradient(135deg, #0d2b5e, #1a5276); color: #fff;
  font-weight: 700; font-size: 13px; text-decoration: none;
  transition: transform .16s ease, filter .18s ease, box-shadow .2s ease;
}
.journal-btn:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 6px 14px rgba(13,43,94,.25); }
.journal-btn:active { transform: translateY(0); }

/* ---------- บทความ/หน้า ---------- */
.content-area { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 26px 30px; box-shadow: 0 3px 10px rgba(13,43,94,.07); }
/* บังคับเนื้อหาที่ย้ายมา (ฝัง font-family เก่ามาเอง) ให้ใช้ฟอนต์ของเว็บเป็นเอกภาพ */
.content-area, .content-area * { font-family: inherit !important; }
/* การ์ดบุคลากรที่ย้ายมา (กลุ่ม flex-wrap): จอแคบกองเป็นแถวเดียวต่อคน กึ่งกลางเสมอ ไม่มี "คนตก" */
@media (max-width: 700px) {
  .content-area div[style*="flex-wrap: wrap"] { flex-direction: column !important; align-items: center !important; }
}
.entry-title { color: var(--navy); font-size: 23px; line-height: 1.4; margin-bottom: 10px; font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif; text-wrap: balance; }
/* แถวรายละเอียด (วันที่/หมวด/ผู้อ่าน) แบบชิป */
.post-meta {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
  background: linear-gradient(135deg, #f8fbff, #eef5fc);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; margin-bottom: 20px;
}
.pm-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid #dde8f4; border-radius: 999px;
  padding: 6px 15px; font-size: 13px; font-weight: 500; color: #3a4a5a;
  text-decoration: none; transition: transform .16s ease, box-shadow .18s ease, background .18s ease;
}
.pm-chip b { color: var(--navy); font-weight: 700; }
a.pm-chip:hover { background: var(--navy); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 12px rgba(13,43,94,.2); }
a.pm-chip:hover b { color: var(--gold-soft); }
.pm-date::before { content: ""; }
.entry-content { font-size: 17px; }
/* ปุ่มเปิดเอกสาร PDF (จากลิงก์ รายละเอียด ที่ย้ายมา) */
.entry-content a.doc-btn {
  display: inline-flex; align-items: center; gap: 11px;
  background: linear-gradient(135deg, #0d2b5e, #1a5276);
  color: #fff; font-weight: 700; font-size: 15.5px;
  padding: 12px 14px 12px 12px; border-radius: 16px; text-decoration: none;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 6px 16px rgba(13,43,94,.25);
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.entry-content a.doc-btn .doc-btn-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.16); font-size: 18px; flex: 0 0 auto;
}
.entry-content a.doc-btn .doc-btn-arr {
  margin-left: auto; font-size: 22px; font-weight: 700; color: var(--gold);
  transition: transform .2s ease;
}
.entry-content a.doc-btn:hover {
  /* กันกฎกลาง .entry-content a:hover ทับสีพื้น/ตัวอักษร (ต้นเหตุข้อความขาวหาย) */
  background: linear-gradient(135deg, #12366e, #1f6391);
  color: #fff; transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(13,43,94,.35), 0 0 0 4px rgba(240,179,35,.28);
}
.entry-content a.doc-btn:hover .doc-btn-arr { transform: translateX(4px); }
.entry-content a.doc-btn:active { transform: translateY(0); }
.doc-spacer { height: 22px; }
.entry-content p { margin-bottom: 1em; }
.entry-content img { border-radius: 8px; }
.entry-content h1, .entry-content h2, .entry-content h3 { color: var(--navy); margin: 1.2em 0 .5em; }
.entry-content ul, .entry-content ol { margin: 0 0 1em 1.4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.2em; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 7px 11px; }
.entry-content th { background: var(--blue-soft); color: var(--navy); }
.post-thumb { border-radius: 9px; margin-bottom: 18px; }
/* กันเนื้อหาเก่า (รูป/ตาราง/div กว้างตายังไง) ล้นจอมือถือ */
.content-area, .entry-title { overflow-wrap: break-word; }
.entry-content { overflow-x: auto; }
.entry-content * { max-width: 100%; }
.post-thumb { overflow: hidden; }
.post-thumb img { width: 100%; }

.center-more { text-align: left; }

/* ---------- ท้ายเว็บ ---------- */
.site-footer { background: var(--navy); color: #c9d9ee; margin-top: 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1.4fr; gap: 30px; padding: 40px 0 34px; }
.site-footer h4 { color: var(--gold-soft); font-size: 16.5px; margin-bottom: 12px; font-weight: 700; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; font-size: 14.5px; }
.site-footer a { color: #c9d9ee; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 14px 0; font-size: 13.5px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- จอเล็ก ---------- */
@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .col-center { order: -1; }
  .col-left, .col-right { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
/* Keep homepage priorities consistent whenever the side columns collapse. */
.home .layout > .homepage-calendar { grid-column: 1 / -1; order: 7; min-width: 0; }
@media (max-width: 1020px) {
  .home .layout { grid-template-columns: minmax(0, 1fr); }
  .home .col-center, .home .col-left, .home .col-right { display: contents; }
  .home .col-center > *, .home .col-left > *, .home .col-right > * { order: 6; min-width: 0; }
  .home .breadcrumb-bar { order: 0; grid-column: 1 / -1; }
  .home .news-block:not(.ruay-block) { order: 2; grid-column: 1 / -1; }
  .home .col-right > .exec-box { order: 3; }
  .home .layout > .homepage-calendar { order: 3; margin-bottom: 0; }
  .home .transfer-box { order: 4; grid-column: 1 / -1; }
  .home .ruay-block { order: 5; grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .col-left, .col-right { grid-template-columns: 1fr; }
  .brand { gap: 10px; }
  .brand-logo { max-height: 42px; }
  .site-title { font-size: min(19px, 4.1cqi); }
  .site-title-en { font-size: min(10px, 2cqi); }
  .main-nav a { padding: 10px 12px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .content-area { padding: 18px 16px; }
}
/* เมนูมือถือ: ซ่อนแถวเลื่อน ใช้ปุ่ม ☰ กางเป็นรายการแนวตั้งครบทุกปุ่ม */
@media (max-width: 1020px) {
  .nav-toggle { display: flex; justify-content: center; }
  .main-nav { display: none; flex-direction: column; overflow: visible; }
  .main-nav-wrap.nav-open .main-nav { display: flex; }
  .main-nav li { width: 100%; flex: 1 1 auto; }
  .main-nav a { white-space: normal; border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); text-align: center; }
  .main-nav li:last-child > a { border-bottom: none; }
  .main-nav .sub-menu { position: static; min-width: 0; box-shadow: none; }
  .main-nav .sub-menu a { padding-left: 26px; text-align: left; }
  .main-nav-wrap.nav-open .nav-mobile-groups { display: block; }
  /* กล่องเมนูซ้ายซ้ำกับใน ☰ แล้ว — จอแคบซ่อน จอใหญ่แสดงตามปกติ */
  .col-left .side-box.nav-box { display: none; }
  /* เมนูกางยาวเกินจอ: ให้เลื่อนในตัวเองได้ ปุ่ม ✕ ติดหัวตลอด */
  .main-nav-wrap.nav-open {
    /* เต็มจอตัวเอง เลื่อนได้ถึงรายการสุดท้าย (แก้เลื่อนไม่สุดตอนกางทั้ง 2 กลุ่ม) */
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    height: 100vh; height: 100dvh; max-height: none;
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; padding-bottom: 90px; background: var(--navy);
    z-index: 1300; /* เหนือแถบคุกกี้ (1200) — กันแถบคุกกี้บังเมนูจนกดกลุ่มล่างไม่ได้ */
  }
  .main-nav-wrap.nav-open .nav-toggle { position: sticky; top: 0; z-index: 2; background: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
}

/* ล็อกชื่อสหกรณ์ทุกความกว้าง: บรรทัดเดียวเสมอ แม้เลือก ใหญ่ 1/ใหญ่ 2 (ระบบขยายจะไม่จับหัวเว็บ)
   จอกว้างใช้ min(26px, 4.1cqi) — ย่ออัตโนมัติตามพื้นที่; จอ ≤900 ถูก override เป็น 13px ด้านล่าง */
.mobile-header-shell .site-header .brand-text .site-title { font-size: min(26px, 4.1cqi) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: clip; }
/* บรรทัดชื่ออังกฤษก็ล็อกเช่นกัน — กันโหมดขยายทำหัวเว็บสูงเกิน */
.mobile-header-shell .site-header .brand-text .site-title-en { font-size: min(12px, 2cqi) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: clip; }

/* หัวเว็บจอแคบ (≤900px) = แถวเดียวเสมอ: โลโก้ | ชื่อสหกรณ์ (บรรทัดเดียว ไม่ตัด) | ปุ่มขนาดอักษร
   ขนาดชื่อจะถูก JS (micro.js) ย่อลงให้พอดีคอลัมน์กลางพอดีเป๊ะ — จอยิ่งแคบยิ่งเล็กลงตามที่ผู้ใช้รับได้
   ล็อกด้วย !important ทุกจุดให้ชนะกฎขยายของ reading-size (ปุ่มใหญ่ 1/2 ขยายเฉพาะเนื้อหาในหน้า) */
@media (max-width: 900px) {
  .mobile-header-shell .site-header { padding: 5px 0; }
  .mobile-header-shell .site-header .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; }
  .mobile-header-shell .site-header .brand-logo { grid-column: 1; grid-row: 1; max-height: 30px; }
  .mobile-header-shell .site-header .brand-text { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; }
  .mobile-header-shell .site-header .text-size-bar { grid-column: 3; grid-row: 1; justify-self: end; }
  .mobile-header-shell .site-header .brand-text .site-title { font-size: 13px !important; line-height: 1.55; white-space: nowrap !important; overflow: hidden !important; text-overflow: clip; }
  .mobile-header-shell .site-header .site-title-en { display: none !important; }
  .mobile-header-shell .site-header .text-size-bar .text-size-control { gap: 4px; }
  .mobile-header-shell .site-header .text-size-bar .text-size-control button { min-width: 40px; min-height: 36px; padding: 5px 6px; font-size: 13px !important; line-height: 1.4; }
  .mobile-header-shell .site-header .text-size-bar .text-size-label { font-size: 13px !important; margin-right: 2px; }
}
/* จอแคบ: ซ่อนคำ "ขนาดอักษร" เหลือแต่ปุ่ม — ให้ชื่อสหกรณ์ได้พื้นที่บรรทัดเดียวมากขึ้น */
@media (max-width: 640px) {
  .mobile-header-shell .site-header .text-size-bar .text-size-label { display: none; }
}
/* จอมือถือจริง (≤480): กระชับปุ่ม/โลโก้อีกเกลียว เพื่อให้ชื่อบรรทัดเดียวได้พื้นที่พอ ไม่โดนตัดขอบ */
@media (max-width: 480px) {
  .mobile-header-shell .site-header .header-inner { gap: 2px 8px; }
  .mobile-header-shell .site-header .brand-logo { max-height: 26px; }
  .mobile-header-shell .site-header .text-size-bar .text-size-control { gap: 3px; }
  .mobile-header-shell .site-header .text-size-bar .text-size-control button { min-width: 30px; min-height: 34px; padding: 4px 4px; font-size: 12px !important; }
}

/* ==========================================================
   Micro interactions — ความรู้สึกพรีเมียมทั่วทั้งเว็บ
   ========================================================== */

/* โผล่เนียน ๆ เมื่อเลื่อนถึง (ทำงานเมื่อ JS พร้อมเท่านั้น กันหน้าขาว) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* แถบเมนู: เงาเพิ่มมิติเมื่อเลื่อนลง */
.main-nav-wrap { transition: box-shadow .3s ease, background-color .22s ease; }
.main-nav-wrap.scrolled { box-shadow: 0 6px 18px rgba(13, 43, 94, .28); }

/* เมนูซ้าย: ข้อความเลื่อน + จุดขยาย */
.side-menu a { transition: padding-left .22s ease, background .22s ease, color .22s ease; }
.side-menu a::before { transition: transform .22s ease; }
.side-menu a:hover { padding-left: 30px; }
.side-menu a:hover::before { transform: scale(1.5); }

/* กล่อง: เงาลอยเบา ๆ */
.side-box { transition: transform .25s ease, box-shadow .25s ease; }
.side-box:hover { box-shadow: 0 10px 22px rgba(13, 43, 94, .13); }
.exec-box:hover { transform: translateY(-4px); }

/* กรอบรูปผู้บริหาร: ซูมเบา + วงแหวนทองเรือง */
.exec-photo { transition: transform .35s ease, box-shadow .35s ease; }
.exec-box:hover .exec-photo { transform: scale(1.045); box-shadow: 0 12px 24px rgba(13, 43, 94, .3), 0 0 0 4px rgba(240, 179, 35, .25); }
.exec-box:hover .exec-portrait { transform: scale(1.045); }
.exec-box:hover .exec-portrait .exec-photo { transform: none; }
.exec-name { transition: color .25s ease; }
.exec-box:hover .exec-name { color: #1a5276; }

/* ปุ่ม: ยกลอย + กดยุบ */
.member-btn, .all-news-btn, .slide-btn, #toTop { transition: transform .16s ease, box-shadow .22s ease, background .2s ease, color .2s ease; }
.member-btn:hover, .all-news-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(240, 179, 35, .45); }
.member-btn:active, .all-news-btn:active { transform: translateY(0) scale(.97); box-shadow: 0 4px 10px rgba(240, 179, 35, .35); }
.slide-btn:hover { transform: translateY(-50%) scale(1.1); }
.slide-btn:active { transform: translateY(-50%) scale(.94); }

/* ตารางข่าว: ชื่อข่าวไหล + ลูกศรโผล่ (พื้นแถวจัดการในกฎตารางด้านบน) */
.td-title a { transition: color .2s ease, padding-left .2s ease; display: inline-block; }
.news-table tbody tr:hover .td-title a { color: #1a7fc1; padding-left: 3px; }
.td-title a::after { content: " ›"; opacity: 0; transition: opacity .2s ease, margin-left .2s ease; margin-left: -8px; }
.news-table tbody tr:hover .td-title a::after { opacity: 1; margin-left: 2px; }

/* ป้าย NEW เต้นเบา ๆ ทุก 2.6 วิ */
.badge-new { animation: newPulse 2.6s ease-in-out infinite; }
@keyframes newPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 43, 43, 0); }
  50% { box-shadow: 0 0 0 4px rgba(224, 43, 43, .14); }
}

/* สไลด์: แสดงรูปเต็มใบ (ไม่ใช้ซูม Ken Burns ที่ตัดขอบ) + จุดขยายเมื่อชี้ */
.slide-dot { transition: transform .2s ease, background .2s ease; }
.slide-dot:hover { transform: scale(1.3); }
.slide-dot.on { transform: scale(1.25); }

/* ตารางอัตราดอกเบี้ย: ไฮไลต์แถวที่ชี้ */
.rate-table tr { transition: background .18s ease; }
.rate-table tr:hover td { background: #f4f8fe; }

/* ลิงก์ในเนื้อหาไฮไลต์พื้นเบา ๆ */
.entry-content a { transition: color .18s ease, background .18s ease; }
.entry-content a:hover { background: var(--blue-soft); }

/* ตัวนับเลขชัดคม (กันตัวเลขกระตุกตอนวิ่ง) */
.hit-counter { font-variant-numeric: tabular-nums; }

/* ปุ่มกลับขึ้นด้านบน */
#toTop {
  position: fixed; right: 18px; bottom: 18px; z-index: 1200;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: var(--gold-soft); font-size: 20px; line-height: 1;
  box-shadow: 0 10px 24px rgba(13, 43, 94, .35);
  opacity: 0; pointer-events: none; transform: translateY(14px);
}
#toTop.show { opacity: 1; pointer-events: auto; transform: none; }
#toTop:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }

/* แถบ breadcrumb เงาเบา ๆ ตอนชี้ */
.breadcrumb-bar { transition: box-shadow .25s ease; }
.breadcrumb-bar:hover { box-shadow: 0 3px 10px rgba(13, 43, 94, .08); }

/* เคารพผู้ใช้ที่ตั้งค่าลดการเคลื่อนไหวในระบบ */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .badge-new { animation: none; }
  html { scroll-behavior: auto !important; }
}

/* โลโก้ WordPress (ตัว W) แถบด้านบนฝั่งหน้าเว็บ → โลโก้สหกรณ์ */
#wpadminbar #wp-toolbar #wp-admin-bar-wp-logo > .ab-item .ab-icon {
  background-image: url(images/logo.png) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  width: 26px !important;
  height: 24px !important;
}
#wp-admin-bar-wp-logo > .ab-item .ab-icon::before {
  content: "" !important;
  display: none;
}
#wp-admin-bar-wp-logo > .ab-item {
  padding: 0 6px 0 4px;
}

/* ── การ์ดบริการสมาชิก: คำนวณเงินกู้ (LoanCalc portal) ── */
.member-service-box { background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 14px; box-shadow: 0 3px 10px rgba(13,43,94,.07); }
.member-service-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none;
  background: linear-gradient(135deg, var(--navy) 0%, #16407e 100%); color: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.member-service-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(13,43,94,.3); color: #fff; }
.msb-icon { font-size: 26px; }
.msb-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msb-text strong { font-size: 15.5px; font-weight: 600; color: #ffd34d; }
.msb-text small { font-size: 12px; color: #dbe6f5; line-height: 1.4; }
.msb-arrow { font-size: 22px; color: #ffd34d; transition: transform .2s ease; }
.member-service-btn:hover .msb-arrow { transform: translateX(4px); }

/* Solid at the top; navy translucency appears only after scrolling. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .main-nav-wrap.scrolled {
    background: rgba(13, 43, 94, .82);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    backdrop-filter: blur(16px) saturate(125%);
  }
  @media (max-width: 1020px) {
    body .mobile-header-shell { background: transparent; }
    .mobile-header-shell .main-nav-wrap.scrolled { background: rgba(13, 43, 94, .88); }
    .mobile-header-shell .main-nav-wrap.nav-open {
      background: var(--navy);
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
  }
}
@media (prefers-reduced-transparency: reduce) {
  .mobile-header-shell .main-nav-wrap.scrolled {
    background: var(--navy);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .main-nav-wrap { transition: none; }
}
/* Text shine inspired by neerajbaniwal / Uiverse (MIT): https://uiverse.io/neerajbaniwal/hungry-mule-59 */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .brand-text .site-title, .brand-text .site-title-en {
    background-color: var(--navy);
    background-image: linear-gradient(110deg, var(--navy) 0%, var(--navy) 44%, #31598a 50%, var(--navy) 56%, var(--navy) 100%);
    background-size: 250% 100%;
    background-repeat: repeat-x;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: kuru-title-shine 4s linear infinite;
  }
}
@keyframes kuru-title-shine {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-text .site-title, .brand-text .site-title-en { animation: none; background-image: none; color: var(--navy); -webkit-text-fill-color: currentColor; }
}
@media (forced-colors: active) {
  .brand-text .site-title, .brand-text .site-title-en { animation: none; background-image: none; color: CanvasText; -webkit-text-fill-color: currentColor; }
}
/* Holographic ticket inspired by dexter-st: https://uiverse.io/dexter-st/slippery-bird-76 */
.side-box.line-ticket {
 position:relative;isolation:isolate;border:1px solid #bfdcd5;border-radius:18px;
 background:linear-gradient(125deg,#e0f9ea 0%,#e9efff 25%,#fce9f3 48%,#fff7dc 70%,#e0f9ea 100%);
 background-size:240% 240%;background-position:0% 50%;
 box-shadow:0 8px 24px rgba(32,79,72,.12),inset 0 0 0 3px rgba(255,255,255,.7);
 transition:background-position 1.1s ease,box-shadow .3s ease;
}
.line-ticket .side-box-title.green {background:transparent;color:#08783e;border-bottom:1px solid rgba(8,120,62,.15);text-align:center;padding:16px 10px;font-size:17px;}
.line-ticket .line-ticket-body {padding:20px 14px 18px;}
.line-ticket .line-ticket-qr-link {display:block;width:fit-content;max-width:100%;margin:auto;padding:10px;background:#fff;border:1px solid #d8e7df;border-radius:14px;box-shadow:0 5px 16px rgba(39,81,67,.1);}
.line-ticket .line-qr {display:block;width:160px;max-width:100%;height:auto;border:0;border-radius:0;background:#fff;}
.line-ticket .line-ticket-note {color:#314a52;font-size:13px;line-height:1.7;margin:16px 0 0;}
.line-ticket-footer {position:relative;border-top:2px dashed rgba(43,105,77,.3);padding:18px 14px;text-align:center;}
.line-ticket-footer::before,.line-ticket-footer::after {content:"";position:absolute;top:-11px;width:20px;height:20px;border-radius:50%;background:#eef3f9;border:1px solid #bfdcd5;pointer-events:none;}
.line-ticket-footer::before {left:-11px;}.line-ticket-footer::after {right:-11px;}
.line-ticket .line-ticket-action {display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid #08783e;border-radius:10px;background:#08783e;color:#fff;font-weight:600;font-size:14px;text-decoration:none;}
.line-ticket .line-ticket-action:hover {background:#065e31;}
.line-ticket a:focus-visible {outline:3px solid var(--navy);outline-offset:3px;}
@media(hover:hover) and (pointer:fine) {.side-box.line-ticket:hover {background-position:100% 50%;box-shadow:0 10px 28px rgba(32,79,72,.2),inset 0 0 0 3px rgba(255,255,255,.7);}}
@media(prefers-reduced-motion:reduce) {.side-box.line-ticket {transition:none;}}
