/* ─────────────────────────────────────────────
   โรงพยาบาลสมเด็จพระยุพราชสว่างแดนดิน — Blue Care
   ขนาดทั้งหมดเป็น rem เพื่อให้ปุ่มปรับขนาดตัวอักษรขยายได้ทั้งหน้า
   ───────────────────────────────────────────── */

:root {
  --blue: #1659df;
  --blue-700: #0f47b8;
  --blue-900: #102e5a;
  --ink: #142b50;
  --ink-2: #33496b;
  --muted: #56677f;
  --pale: #f0f6ff;
  --pale-2: #f6f9fe;
  --border: #dfe7f2;
  --red: #c4291c;
  --red-50: #fdeeec;
  --green: #127a55;
  --green-50: #e6f5ee;
  --amber: #e39b16;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 46, 90, .05), 0 14px 32px -18px rgba(16, 46, 90, .28);
  --shadow-lg: 0 24px 48px -20px rgba(16, 46, 90, .35);
  --latin: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 16px;
}
html[data-size="1"] { font-size: 18px; }
html[data-size="2"] { font-size: 20px; }

/* ความคมชัดสูง */
html.hc {
  --blue: #0033a0; --blue-700: #001f66; --ink: #000; --ink-2: #000; --muted: #1a1a1a;
  --pale: #fff; --pale-2: #fff; --border: #000;
}
html.hc .hero__shade { background: rgba(255, 255, 255, .94); }
html.hc .vision { background: #001f66; }
html.hc .panel, html.hc .infobar, html.hc .audiences, html.hc .service-links, html.hc .story-card, html.hc .sub, html.hc .mega, html.hc .card { border-width: 2px; }
html.hc a:not(.btn):not(.info):not(.service-link):not(.doc):not(.story-image) { text-decoration: underline; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Noto Sans Thai", sans-serif; font-size: 1rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; }
img { display: block; max-width: 100%; }
svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
[data-icon] { display: inline-flex; }
:focus-visible { outline: 3px solid #efa830; outline-offset: 3px; border-radius: 4px; }
mark { background: #ffe58a; color: inherit; border-radius: 2px; padding: 0 1px; }
[hidden] { display: none !important; }

/* หัวข้อภาษาไทย: ไม่บีบระยะตัวอักษร */
h1, h2, h3 { font-weight: 600; line-height: 1.4; letter-spacing: 0; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }

.wrap { width: min(1240px, 100% - 64px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.show-sm { display: none; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 100; background: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow); font-weight: 600; }
.skip:focus { top: 16px; }
.blue { color: var(--blue); }

.eyebrow { font-family: var(--latin); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.eyebrow--th { font-family: inherit; font-size: .875rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.eyebrow--th::before { content: ""; width: 20px; height: 2px; background: var(--blue); }
.line { width: 24px; height: 2px; background: var(--blue); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 8px; font-weight: 600; font-size: .9375rem; border: 1.5px solid transparent; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-700); transform: translateY(-1px); }
.btn--ghost { background: #fff; border-color: var(--border); color: var(--ink); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }

/* ── แถบบน ── */
.utility { background: var(--blue-900); color: #cfdcf0; font-size: .875rem; }
.utility__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.utility a, .utility button { display: inline-flex; align-items: center; gap: 6px; }
.utility__sos { color: #fff; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.utility__tools { flex: none; }
.utility__sos svg { color: #ff9b90; }
.utility__sos b { color: #ffb8b0; font-family: var(--latin); font-size: 1rem; }
.utility__tools { display: flex; align-items: center; gap: 16px; }
.utility__tools > a:hover { color: #fff; }
.fontsize { display: flex; gap: 2px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .18); }
.fontsize button { width: 32px; height: 30px; justify-content: center; border: 0; border-radius: 6px; background: none; color: #cfdcf0; font-weight: 600; }
.fontsize button:nth-child(1) { font-size: .8125rem; }
.fontsize button:nth-child(2) { font-size: 1rem; }
.fontsize button:nth-child(3) { font-size: 1.1875rem; }
.fontsize button[aria-pressed="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
.contrast { border: 0; background: none; color: #cfdcf0; padding: 4px 8px; border-radius: 6px; }
.contrast:hover { color: #fff; }
.contrast[aria-pressed="true"] { background: #ffd23f; color: #000; }
.contrast__dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* ── Header ── */
.header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-stuck { border-color: var(--border); box-shadow: 0 8px 24px -20px rgba(16, 46, 90, .5); }
.header__inner { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { width: 46px; height: 46px; }
.brand__logo { display: block; width: auto; height: 54px; flex: none; }
.brand--light .brand__logo { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.brand__mark rect { fill: var(--blue); }
.brand__mark path { fill: #fff; stroke: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.brand__text small { font-size: .75rem; color: var(--muted); font-family: var(--latin); font-weight: 500; }
.menu { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--pale); color: var(--blue); align-items: center; justify-content: center; }
.menu svg { width: 24px; height: 24px; }
.header__cta { font-family: var(--latin); }

/* ── เมนูหลัก + เมนูย่อย ── */
.nav { display: flex; align-items: center; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border: 0; border-radius: 8px; background: none; font-size: .9375rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .15s, background .15s; }
.nav__link:hover, .nav__item.open > .nav__link { color: var(--blue); background: var(--pale); }
.nav__item.is-current > .nav__link { color: var(--blue); font-weight: 600; }
.nav__item.is-current > .nav__link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--blue); }
.chev { display: inline-flex; transition: transform .2s; }
.chev svg { width: 16px; height: 16px; }
.nav__item.open .chev { transform: rotate(180deg); }
.nav__call { display: none !important; }

.sub { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; min-width: 290px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* สะพานให้เมาส์เลื่อนลงได้ */
.nav__item.open > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); transition: background .15s; }
.sub a:hover, .sub a:focus-visible { background: var(--pale); }
.sub a:hover b { color: var(--blue); }
.sub b { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.45; }
.sub small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.4; }
/* ไอคอนในเมนูย่อย: กรอบสี่เหลี่ยมขอบบาง (แบบ dub.co) */
.sub__ic, .mega__ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #fff; border: 1px solid var(--border); color: var(--ink-2); box-shadow: 0 1px 2px rgba(16, 46, 90, .06); transition: border-color .15s, color .15s; }
.sub__ic svg, .mega__ic svg { width: 18px; height: 18px; }
.sub a:hover .sub__ic, .mega a:hover .mega__ic { border-color: #b9cbec; color: var(--blue); }
.sub__ext { margin-left: auto; color: #9aabc3; }
.sub__ext svg { width: 16px; height: 16px; }

/* ── Mega menu: หน่วยงานต่างๆ ── */
.header__inner { position: relative; }
.nav__item.has-mega { position: static; }
.mega { position: absolute; top: calc(100% - 6px); left: 0; right: 0; z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; } /* สะพานให้เมาส์เลื่อนลงได้ */
.nav__item.open > .mega { opacity: 1; visibility: visible; transform: none; }
.mega__cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.mega__col { padding: 20px 18px 16px; }
.mega__col + .mega__col { border-left: 1px solid var(--border); }
.mega__h { margin: 0 0 8px 10px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega a { display: flex; align-items: center; gap: 14px; padding: 9px 10px; border-radius: 10px; color: var(--ink); transition: background .15s; }
.mega a:hover, .mega a:focus-visible { background: var(--pale-2); }
.mega b { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.mega a:hover b { color: var(--blue); }
.mega small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.mega__foot { display: flex !important; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 28px !important; border-radius: 0 !important; background: #f7f9fd; border-top: 1px solid var(--border); }
.mega__foot:hover { background: var(--pale) !important; }
.mega__foot-text small { display: inline-flex; align-items: center; gap: 6px; }
.mega__foot-text small svg { width: 14px; height: 14px; }
.mega__badge { margin-left: 6px; font-style: normal; font-size: .6875rem; font-weight: 700; color: var(--blue); background: #e3ecfd; padding: 1px 8px; border-radius: 6px; vertical-align: 2px; }
.mega__chips { display: flex; gap: 8px; flex-wrap: nowrap; }
.mega__chips i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1px solid var(--border); color: var(--blue); box-shadow: 0 2px 6px rgba(16, 46, 90, .08); }
.mega__chips i:nth-child(even) { transform: translateY(6px); }
.mega__chips svg { width: 16px; height: 16px; }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; background: #ebf4ff; min-height: 560px; display: flex; }
.hero__photo { position: absolute; inset: 0 0 0 38%; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; filter: saturate(.85); }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, #edf5ff 0%, #edf5ff 34%, rgba(237, 245, 255, .9) 42%, rgba(237, 245, 255, .35) 60%, rgba(237, 245, 255, 0) 78%), linear-gradient(0deg, rgba(237, 245, 255, .8), transparent 30%); }
.hero__inner { position: relative; display: flex; flex-direction: column; padding: 56px 0 96px; width: min(1240px, 100% - 64px); }
.hero__copy { max-width: 600px; animation: enter .7s both; }
.hero__name { font-size: 1.0625rem; font-weight: 600; color: var(--ink-2); margin: 2px 0 0; line-height: 1.5; }
.hero__title { font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: 1.3; margin: 6px 0 18px; font-weight: 700; color: var(--ink); }
.hero__title span { color: var(--blue); }
.hero__desc { font-size: 1.0625rem; color: var(--ink-2); line-height: 1.85; }
.hero .btn { margin-top: 28px; }
.hero__controls { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 36px; }
.hero__controls > button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #cddcf0; background: rgba(255, 255, 255, .7); color: var(--ink); }
.hero__controls > button:hover { background: #fff; color: var(--blue); }
.slide-count { font: 700 .875rem var(--latin); }
.slide-count i { font-style: normal; color: var(--muted); font-weight: 500; }
.dots { display: flex; gap: 6px; margin-inline: 4px; }
.dots button { width: 10px; height: 10px; border: 0; padding: 0; border-radius: 6px; background: #a9bedb; transition: width .25s; }
.dots button[aria-pressed="true"] { width: 28px; background: var(--blue); }
.photo-credit { position: absolute; right: 0; bottom: 64px; font-size: .6875rem; color: #17304e; background: rgba(255, 255, 255, .8); padding: 3px 10px; border-radius: 4px; }

/* ── Hero แบบภาพเต็มกว้างโทนเข้ม (ใช้กับภาพหลักของโรงพยาบาล) ── */
.hero--dark { background: #0b1d3f; min-height: 600px; color: #fff; }
/* ภาพคงสัดส่วนเดิม ชิดขวา สูงเท่า hero — จอกว้างแค่ไหนก็ไม่ถูกตัดบน-ล่าง และไม่ถูกขยายจนแตก
   จอแคบกว่าภาพ: ภาพล้นไปทางซ้ายและถูกตัดฝั่งซ้ายแทน (คนอยู่ฝั่งขวาจึงยังเห็นเต็ม) */
.hero--dark .hero__photo { inset: 0 0 0 auto; width: auto; height: 100%; aspect-ratio: 1200 / 630; }
.hero--dark .hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b1d3f 0%, rgba(11, 29, 63, .6) 14%, rgba(11, 29, 63, 0) 34%); }
.hero--dark .hero__photo img { object-position: center; filter: none; }
.hero--dark .hero__shade { background:
  linear-gradient(90deg, rgba(8, 22, 52, .92) 0%, rgba(8, 22, 52, .78) 30%, rgba(8, 22, 52, .35) 52%, rgba(8, 22, 52, 0) 68%),
  linear-gradient(0deg, rgba(8, 22, 52, .55), transparent 28%); }
.hero--dark .eyebrow { color: #9fc2ff; }
.hero--dark .line { background: #9fc2ff; }
.hero--dark .hero__name { color: #dbe7ff; }
.hero--dark .hero__title { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero--dark .hero__title span { color: #8fbaff; }
.hero--dark .hero__desc { color: #d3e0f5; }
.hero__lead { display: block; font-size: 2rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.hero--dark .hero__lead { color: #fff; }
.hero--dark .hero__controls > button { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.hero--dark .hero__controls > button:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.hero--dark .slide-count { color: #fff; }
.hero--dark .slide-count i { color: #a9bedf; }
.hero--dark .dots button { background: rgba(255, 255, 255, .4); }
.hero--dark .dots button[aria-pressed="true"] { background: #fff; }
html.hc .hero--dark .hero__shade { background: rgba(0, 0, 0, .82); }

/* ── แถบข้อมูลใต้ hero ── */
.infobar { position: relative; z-index: 2; margin-top: -44px; display: grid; grid-template-columns: 1.1fr 1.3fr 1.2fr 1fr; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.info { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-right: 1px solid var(--border); transition: background .15s; }
.info:last-child { border-right: 0; }
a.info:hover { background: var(--pale-2); }
.info__ic { width: 44px; height: 44px; border-radius: 10px; background: var(--pale); color: var(--blue); display: grid !important; place-items: center; flex: none; }
.info small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.info b { display: block; font-weight: 600; font-size: 1rem; line-height: 1.45; }
.info .num { font-family: var(--latin); font-size: 1.125rem; }
.info--sos { background: var(--red); color: #fff; }
.info--sos:hover { background: #a82014 !important; }
.info--sos .info__ic { background: rgba(255, 255, 255, .16); color: #fff; }
.info--sos small { color: #ffdcd7; }
.info--sos b { font-family: var(--latin); font-size: 1.375rem; font-weight: 800; }
.status { margin-left: auto; font-style: normal; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.status--open { background: var(--green-50); color: var(--green); }
.status--open::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.status--closed { background: #f1f3f6; color: #5b6778; }

/* ── บริการ ── */
.gateway { padding-top: 72px; padding-bottom: 88px; }
.gateway__intro { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.gateway__intro .eyebrow { margin: 0; }
.gateway__intro h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.gateway__intro p { margin-left: auto; color: var(--muted); font-size: .9375rem; }
.audiences { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 12px 12px 0 0; overflow: hidden; }
.audiences button { display: flex; align-items: center; gap: 16px; text-align: left; padding: 22px 24px; background: #fff; border: 0; border-right: 1px solid var(--border); transition: background .2s; }
.audiences button:last-child { border-right: 0; }
.audiences button:hover:not([aria-selected="true"]) { background: var(--pale); }
.audiences button[aria-selected="true"] { background: var(--blue); color: #fff; }
.audiences small { display: block; font-size: .8125rem; opacity: .75; }
.audiences strong { display: block; font-size: 1.1875rem; font-weight: 600; }
.tab-ic svg { width: 30px; height: 30px; }
.service-links { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 12px; background: var(--pale-2); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; }
.service-link { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 10px; background: #fff; border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s, transform .2s; }
.service-link:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.service-link__ic { color: var(--blue); margin-bottom: 8px; }
.service-link__ic svg { width: 28px; height: 28px; }
.service-link strong { font-size: 1.0625rem; font-weight: 600; }
.service-link small { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.service-link__go { position: absolute; top: 18px; right: 18px; color: #9aabc3; transition: color .2s, transform .2s; }
.service-link:hover .service-link__go { color: var(--blue); transform: translateX(2px); }

/* ── Section ── */
.section { padding-block: 88px; }
.section-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-top p:not(.eyebrow) { color: var(--muted); font-size: 1rem; margin-top: 6px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue); font-size: .9375rem; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

/* ── ข่าวประชาสัมพันธ์ (การ์ดเรื่องราว) ── */
.news { background: var(--pale-2); border-block: 1px solid var(--border); }
.news__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.filters { display: flex; gap: 28px; flex-wrap: wrap; }
.filters button { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 12px 0 16px; min-height: 48px; font-size: .9375rem; color: var(--muted); }
.filters button:hover { color: var(--blue); }
.filters button[aria-pressed="true"] { color: var(--blue-700); font-weight: 600; }
.filters button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--blue); }
.filters i { font-style: normal; font: 700 .75rem var(--latin); min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); }
.filters button[aria-pressed="true"] i { background: var(--blue); border-color: var(--blue); color: #fff; }
.news__count { font-size: .8125rem; color: var(--muted); white-space: nowrap; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.story-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e3e9f2; border-radius: 12px; transition: transform .25s, box-shadow .25s; }
.story-card:hover { transform: translateY(-4px); box-shadow: 0 13px 28px rgba(16, 46, 90, .08); }
.story-image { position: relative; display: block; aspect-ratio: 1.6; overflow: hidden; background: #e8eef7; border-bottom: 1px solid #edf1f7; }
.story-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.story-card:hover .story-image img { transform: scale(1.025); }
.story-label { position: absolute; left: 16px; bottom: 13px; background: rgba(255, 255, 255, .95); color: var(--blue-700); font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 5px; box-shadow: 0 2px 12px rgba(16, 46, 90, .08); }
.story-label--activity { color: #8a5a00; }
.story-label--academic { color: #5a3fa6; }
.story-content { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 18px; }
.story-content time { font-size: .8125rem; color: var(--muted); }
.story-content h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.65; margin: 8px 0 8px; color: var(--ink); }
.story-content h3 a:hover { color: var(--blue); }
.story-content p { font-size: .875rem; line-height: 1.8; color: var(--muted); margin-bottom: 14px; }
.story-read { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: auto; padding-top: 12px; border-top: 1px solid #edf1f7; font-size: .875rem; font-weight: 600; color: var(--blue-700); }
.story-read svg { width: 16px; height: 16px; }
.story-read:hover { color: var(--blue); }
.news__empty { grid-column: 1 / -1; padding: 48px 20px; text-align: center; background: #fff; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); }
.news__more { display: flex; justify-content: center; margin-top: 36px; }

/* ── ประกาศ ── */
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 0 16px; min-width: 340px; color: var(--muted); }
.search:focus-within { border-color: var(--blue); outline: 3px solid rgba(22, 89, 223, .2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 13px 0; font-size: .9375rem; color: var(--ink); }
.notice-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; scroll-margin-top: 110px; transition: box-shadow .3s, border-color .3s; }
.panel:focus { outline: none; }
.panel.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 89, 223, .22); } 100% { box-shadow: none; } }
.panel__head { display: flex; align-items: center; gap: 14px; padding: 22px 24px; border-bottom: 1px solid var(--border); background: var(--pale-2); }
.panel__ic { width: 46px; height: 46px; display: grid !important; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--border); color: var(--blue); flex: none; }
.panel__head h3 { font-size: 1.25rem; }
.panel__head small { display: block; font-size: .8125rem; color: var(--muted); }
.panel__count { margin-left: auto; font: 700 .8125rem var(--latin); color: var(--blue); background: #fff; border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.docs { list-style: none; padding: 0; }
.doc { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); transition: background .15s; }
.doc:hover { background: var(--pale-2); }
.doc:hover strong { color: var(--blue); }
.doc__date { font-size: .75rem; color: var(--muted); line-height: 1.3; text-align: center; }
.doc__date b { display: block; font: 700 1.5rem var(--latin); color: var(--ink); line-height: 1.1; }
.doc__date small { font-size: .6875rem; line-height: 1.35; display: block; }
.doc__type { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.doc__type::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b8c6da; }
.doc__type[data-tone="result"]::before { background: var(--blue); }
.doc__type[data-tone="list"]::before { background: var(--amber); }
.doc__type[data-tone="win"]::before { background: var(--green); }
.doc__type[data-tone="contract"]::before { background: #7b5cc9; }
.doc__type[data-tone="open"]::before, .chip__dot[data-tone="open"] { background: #0e9f6e; }
.doc__type[data-tone="cancel"]::before, .chip__dot[data-tone="cancel"] { background: var(--red); }
.doc__type[data-tone="invite"]::before, .chip__dot[data-tone="invite"] { background: #0891b2; }
.doc__type[data-tone="plan"]::before, .chip__dot[data-tone="plan"] { background: #64748b; }
.doc__type[data-tone="tor"]::before, .chip__dot[data-tone="tor"] { background: #c2410c; }
.doc__type[data-tone="monthly"]::before, .chip__dot[data-tone="monthly"] { background: #475569; }
.chip__dot[data-tone="result"] { background: var(--blue); }
.chip__dot[data-tone="list"] { background: var(--amber); }
.chip__dot[data-tone="win"] { background: var(--green); }
.chip__dot[data-tone="contract"] { background: #7b5cc9; }
.new { font-style: normal; font-size: .6875rem; font-weight: 700; color: #fff; background: var(--red); padding: 1px 8px; border-radius: 999px; }
.doc strong { display: block; font-size: 1rem; font-weight: 500; line-height: 1.6; transition: color .15s; }
.doc__go { color: #9aabc3; }
.doc:hover .doc__go { color: var(--blue); }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--border); }
.empty b { display: block; color: var(--ink); }
.panel__more { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; font-weight: 600; font-size: .9375rem; color: var(--blue); }
.panel__more:hover { background: var(--pale); }
.source-note { margin-top: 18px; font-size: .875rem; color: var(--muted); }

/* ── หน้ารายการประกาศ ── */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; scroll-margin-top: 110px; }
.toolbar .search { flex: 1; max-width: 520px; }
.toolbar__result { font-size: .9375rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .875rem; color: var(--ink-2); transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip span { font: 700 .75rem var(--latin); color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip[aria-pressed="true"] span { color: #dbe7ff; }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: #b8c6da; }
.chip[aria-pressed="true"] .chip__dot { box-shadow: 0 0 0 2px #fff; }
.panel--list .docs li:last-child .doc, .panel--list .empty { border-bottom: 0; }
.docs[aria-busy="true"] { opacity: .55; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager__btn { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: 600 .9375rem var(--latin); color: var(--ink-2); }
.pager__btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pager__btn[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager__btn:disabled { opacity: .4; cursor: default; }
.pager__gap { padding: 0 4px; color: var(--muted); }
.list-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 28px; font-size: .9375rem; color: var(--muted); }
.list-note > span { color: var(--blue); }

/* ── หน้ารายละเอียดประกาศ ── */
.notice-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 10px; font-size: .9375rem; }
.notice-meta .doc__type { margin: 0; padding: 3px 12px; background: #fff; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-2); }
.notice-meta__date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.page-hero h1#title { font-size: clamp(1.5rem, 2.8vw, 2.125rem); line-height: 1.5; max-width: 40em; }
.notice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.doc-viewer { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--pale-2); }
.doc-viewer iframe { display: block; width: 100%; height: min(80vh, 900px); border: 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.back-link { margin-top: 24px; }
.side-list { position: sticky; top: 100px; overflow: hidden; }
.side-list__h { font-size: 1.0625rem; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.docs--compact .doc { grid-template-columns: 52px 1fr; padding: 14px 18px; gap: 12px; }
.docs--compact .doc__go { display: none; }
.docs--compact .doc__date b { font-size: 1.25rem; }
.docs--compact strong { font-size: .9375rem; }

/* ── ติดต่อเรา ── */
.contact { background: #fbfcfe; border-top: 1px solid var(--border); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: stretch; }
.contact h2 { font-size: clamp(1.75rem, 3vw, 2.375rem); font-weight: 700; color: var(--blue-900); }
.contact__list { list-style: none; margin: 28px 0 0; padding: 0; }
.contact__list li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact__ic { width: 42px; height: 42px; flex: none; display: grid !important; place-items: center; border-radius: 10px; background: var(--pale); color: var(--blue); }
.contact__list b { display: block; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.contact__list a, .contact__list span:not(.contact__ic) { font-weight: 600; font-size: 1.0625rem; line-height: 1.5; }
.contact__list a:hover { color: var(--blue); text-decoration: underline; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.map { min-height: 400px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--pale); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 400px; border: 0; }

/* ── หน้าย่อย ── */
.page-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #edf5ff, #f6f9fe); border-bottom: 1px solid var(--border); padding: 44px 0 40px; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(22, 89, 223, .1), transparent 70%); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { color: #a9b6c8; }
.page-hero h1 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); font-weight: 700; color: var(--blue-900); }
.page-hero p { margin-top: 8px; color: var(--ink-2); max-width: 44em; }
.page { padding-block: 56px 88px; }
.draft { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; margin-bottom: 32px; border: 1px dashed #e8bf6a; background: #fffaf0; border-radius: 12px; color: #6b4d0a; font-size: .9375rem; }
.draft svg { color: #c88a12; margin-top: 2px; }
.draft b { color: #4d3606; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.prose { max-width: 46em; }
.prose h2 { font-size: 1.5rem; margin: 32px 0 10px; color: var(--blue-900); }
.prose p { color: var(--ink-2); margin-bottom: 14px; }

/* ผู้บริหาร */
.person { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 20px; }
.person__photo { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: var(--pale); color: #9fb3d1; border: 4px solid #fff; box-shadow: 0 0 0 1px var(--border); overflow: hidden; }
.person__photo svg { width: 48px; height: 48px; stroke-width: 1.3; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person b { display: block; margin-top: 16px; font-size: 1.0625rem; }
.person small { display: block; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.person--lead { max-width: 360px; margin: 0 auto 28px; }
.person--lead .person__photo { width: 148px; height: 148px; }
.pending { display: inline-block; margin-top: 4px; font-size: .75rem; color: #8a5a00; background: #fff3dc; padding: 1px 10px; border-radius: 999px; }

/* วิสัยทัศน์ / พันธกิจ */
.vision { position: relative; overflow: hidden; padding: 48px 56px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue) 100%); box-shadow: var(--shadow); }
.vision::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); }
.vision__mark { position: absolute; top: -18px; right: 36px; font: 800 11rem/1 var(--latin); color: rgba(255, 255, 255, .1); }
.vision__label { color: #bcd2ff; margin-bottom: 14px; }
.vision__label::before { background: #bcd2ff; }
.vision__text { position: relative; z-index: 1; margin: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.55; max-width: 26em; }
.missions { margin-top: 56px; }
.missions__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mission { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 24px 26px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.mission:hover { border-color: #b9cbec; box-shadow: var(--shadow); transform: translateY(-2px); }
.mission::before { content: ""; position: absolute; left: 24px; top: 0; width: 36px; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
.mission__no { font: 800 1.75rem/1 var(--latin); color: var(--blue); }
.mission p { font-size: 1.0625rem; font-weight: 500; line-height: 1.65; color: var(--ink); }
.mission__en { display: block; margin-top: 2px; font-size: .9375rem; font-weight: 600; color: var(--blue); }
.history-more { margin-top: 64px; }
.history-more .draft { margin-bottom: 16px; }
.history-more .prose { margin-bottom: 40px; }

/* ทำเนียบผู้บริหาร: คนล่าสุดอยู่บนสุด */
.directors { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 18px; max-width: 860px; }
.directors::before { content: ""; position: absolute; left: 7px; top: 24px; bottom: 24px; width: 2px; background: var(--border); }
.director { position: relative; display: flex; align-items: center; gap: 22px; padding: 20px 24px; }
.director::before { content: ""; position: absolute; left: -28px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid #b9c7dc; }
.director--current { border-color: #b9cbec; background: linear-gradient(90deg, #f3f7ff, #fff 60%); box-shadow: var(--shadow); }
.director--current::before { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px rgba(22, 89, 223, .18); }
.director__photo { width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--pale); color: #9fb3d1; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.director__photo svg { width: 36px; height: 36px; stroke-width: 1.3; }
.director--current .director__photo { width: 108px; height: 108px; box-shadow: 0 0 0 2px var(--blue); }
.director__badge { display: inline-block; margin-bottom: 4px; font-size: .75rem; font-weight: 700; color: #fff; background: var(--blue); padding: 2px 10px; border-radius: 999px; }
.director h2 { font-size: 1.1875rem; line-height: 1.45; color: var(--ink); }
.director--current h2 { font-size: 1.375rem; }
.director__role { color: var(--ink-2); font-size: .9375rem; }
.director__term { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 .875rem var(--latin); color: var(--muted); }
.director__term svg { width: 16px; height: 16px; color: var(--blue); }

/* เส้นเวลา */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 70px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 28px; padding-bottom: 28px; }
.timeline li::before { content: ""; position: absolute; left: 64px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.timeline time { font: 700 1rem var(--latin); color: var(--blue); text-align: right; padding-right: 8px; white-space: nowrap; }
.timeline h3 { font-size: 1.0625rem; }
.timeline p { color: var(--muted); }

/* หมวดความรู้ / หน่วยงาน */
.topic { display: flex; gap: 16px; align-items: flex-start; padding: 22px; transition: border-color .2s, box-shadow .2s; }
.topic__ic { width: 48px; height: 48px; flex: none; display: grid !important; place-items: center; border-radius: 12px; background: var(--pale); color: var(--blue); }
.topic b { display: block; font-size: 1.0625rem; }
.topic small { display: block; color: var(--muted); font-size: .875rem; margin-top: 2px; }
a.topic:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.dept { scroll-margin-top: 110px; display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.dept:target { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 89, 223, .18); }
.dept__head { display: flex; gap: 14px; align-items: center; }
.dept__head b { display: block; font-size: 1rem; line-height: 1.5; }
.dept__head small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.45; }
.dept-group:not(:first-child) { margin-top: 40px; }
.dept__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .875rem; }
.tag-muted { font-size: .75rem; color: var(--muted); background: #f1f3f6; padding: 2px 10px; border-radius: 999px; }
.tag-live { font-size: .75rem; color: var(--green); background: var(--green-50); padding: 2px 10px; border-radius: 999px; }
.empty-state { text-align: center; padding: 56px 24px; border: 1px dashed var(--border); border-radius: 14px; background: var(--pale-2); color: var(--muted); }
.empty-state svg { width: 44px; height: 44px; color: #9fb3d1; stroke-width: 1.3; }
.empty-state b { display: block; margin-top: 10px; color: var(--ink); font-size: 1.0625rem; }
.section-title { font-size: 1.375rem; margin-bottom: 16px; color: var(--blue-900); }

/* ── Footer ── */
.footer { background: var(--blue-900); color: #c2d1e6; font-size: .9375rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; padding-block: 56px 40px; }
.brand--light .brand__mark rect { fill: #fff; }
.brand--light .brand__mark path { fill: var(--blue-900); }
.brand--light .brand__text small { color: #9fb3cf; }
.brand--light .brand__text strong { color: #fff; }
.brand--light .brand__text strong span { color: #81b4ff; }
.footer__brand p { margin-top: 16px; line-height: 1.8; }
.footer__brand a:hover { color: #fff; text-decoration: underline; }
.footer h2 { font-size: 1rem; color: #fff; margin-bottom: 12px; font-weight: 600; }
.footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer nav a:hover { color: #fff; text-decoration: underline; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-block: 20px 28px; border-top: 1px solid #2d4a73; font-size: .8125rem; color: #a9bbd4; }
.footer__bottom a:hover { color: #fff; }

.dock { display: none; }

@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.changing { animation: enter .45s both; }

/* ── Responsive ── */
@media (max-width: 1240px) {
  .header__cta { display: none; }
}
@media (max-width: 1140px) {
  .nav__link { padding: 10px 10px; }
  .infobar { grid-template-columns: 1fr 1fr; }
  .info:nth-child(2) { border-right: 0; }
  .info:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .service-links { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__grid { gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .grid-3, .missions__list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .wrap, .hero__inner { width: calc(100% - 40px); }
  .menu { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; max-height: calc(100vh - 110px); overflow-y: auto; padding: 8px 20px 20px; background: #fff; border-block: 1px solid var(--border); box-shadow: 0 20px 40px -24px rgba(16, 46, 90, .45); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--border); }
  .nav__link { width: 100%; justify-content: space-between; padding: 14px 6px; font-size: 1.0625rem; border-radius: 0; }
  .nav__link:hover, .nav__item.open > .nav__link { background: none; }
  .nav__item.is-current > .nav__link::after { display: none; }
  .sub, .mega { position: static; width: auto; min-width: 0; display: none; padding: 0 0 10px 8px; border: 0; border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .sub::before, .mega::before { display: none; }
  .nav__item.open > .sub, .nav__item.open > .mega { display: block; }
  .nav__item.has-mega { position: relative; }
  .mega__cols { grid-template-columns: 1fr; }
  .mega__col { padding: 6px 0 4px; }
  .mega__col + .mega__col { border-left: 0; }
  .mega__h { margin: 6px 0 4px 10px; }
  .mega__foot { margin-top: 6px; padding: 12px 10px !important; border-radius: 10px !important; border-top: 0; }
  .mega__chips { display: none; }
  .nav__call { display: flex !important; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; min-height: 48px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; }

  .hero { min-height: 0; }
  .hero__photo { inset: auto 0 0 0; height: 300px; }
  .hero__shade { background: linear-gradient(180deg, #edf5ff 0%, #edf5ff calc(100% - 330px), rgba(237, 245, 255, .3) calc(100% - 200px), rgba(237, 245, 255, .1) 100%); }
  .hero__inner { padding: 36px 0 330px; }
  .hero__controls { position: absolute; bottom: 68px; left: 0; padding: 6px 8px; gap: 8px; background: rgba(255, 255, 255, .88); border-radius: 999px; box-shadow: 0 6px 18px -10px rgba(16, 46, 90, .5); }
  .hero__controls > button { width: 34px; height: 34px; border: 0; background: none; }
  .photo-credit { bottom: 76px; font-size: .625rem; }
  .notice-cols, .contact__grid, .notice-layout { grid-template-columns: 1fr; }
  .side-list { position: static; }
  .search { min-width: 0; width: 100%; }
  .audiences strong { font-size: 1.0625rem; }
  .audiences button { padding: 18px; gap: 12px; }
  .news__count { display: none; }
}

@media (max-width: 640px) {
  body { padding-bottom: 68px; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline; }
  .utility { font-size: .8125rem; }
  .fontsize { padding-left: 0; border: 0; }
  .header__inner { min-height: 68px; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__logo { height: 46px; }
  .brand__text strong { font-size: 1.0625rem; }
  .brand__text small { font-size: .6875rem; }
  .hero__title { font-size: 2.5rem; }
  .hero__name { font-size: 1rem; }
  .hero__desc { font-size: 1rem; }
  .hero__desc br { display: none; }
  .photo-credit, .slide-count { display: none; }

  .infobar { grid-template-columns: 1fr; margin-top: -40px; }
  .info { border-right: 0 !important; border-bottom: 1px solid var(--border); padding: 16px 18px; }
  .info:last-child { border-bottom: 0; }

  .gateway { padding-top: 56px; padding-bottom: 60px; }
  .gateway__intro { display: block; }
  .gateway__intro p { margin-top: 4px; }
  .audiences { grid-template-columns: 1fr; }
  .audiences button { border-right: 0; border-bottom: 1px solid var(--border); }
  .audiences button:last-child { border-bottom: 0; }
  .service-links { grid-template-columns: 1fr; }
  .service-link { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 16px 44px 16px 16px; }
  .service-link__ic { margin: 0; }
  .service-link strong { flex: 1; }
  .service-link small { flex-basis: 100%; padding-left: 40px; }
  .service-link__go { top: 50%; transform: translateY(-50%); }
  .service-link:hover .service-link__go { transform: translate(2px, -50%); }

  .section { padding-block: 60px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; gap: 20px; scrollbar-width: none; }
  .filters button { flex: none; }
  .news-grid { grid-template-columns: 1fr; gap: 18px; }
  .story-content { padding: 18px; }

  .panel__head { padding: 18px; }
  .doc { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px; }
  .doc__date { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 6px; }
  .doc__date b { font-size: .875rem; display: inline; }
  .doc__date small br { display: none; }
  .panel__more { padding: 16px 18px; }

  .map, .map iframe { min-height: 320px; }
  .page { padding-block: 40px 60px; }
  .grid-3, .grid-2, .missions__list { grid-template-columns: 1fr; }
  .vision { padding: 32px 24px; border-radius: 16px; }
  .directors { padding-left: 22px; }
  .directors::before { left: 4px; }
  .director { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .director::before { left: -24px; top: 32px; margin-top: 0; }
  .vision__mark { font-size: 8rem; right: 16px; }
  .vision__text br { display: none; }
  .timeline::before { left: 54px; }
  .timeline li { grid-template-columns: 54px 1fr; gap: 24px; }
  .timeline li::before { left: 48px; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; gap: 6px; }

  .dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 24px -18px rgba(16, 46, 90, .5); }
  .dock a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; font-size: .75rem; font-weight: 500; color: var(--ink-2); }
  .dock svg { width: 22px; height: 22px; }
  .dock__sos { color: var(--red) !important; font-weight: 700 !important; }
}

/* hero โทนเข้มบนแท็บเล็ต/มือถือ: ข้อความบนพื้นเข้มด้านบน ภาพอยู่ด้านล่าง */
@media (max-width: 960px) {
  .hero--dark { min-height: 0; }
  .hero--dark .hero__photo { inset: auto 0 0 0; width: auto; height: 340px; aspect-ratio: auto; }
  .hero--dark .hero__photo::after { display: none; }
  .hero--dark .hero__photo img { object-position: 70% 25%; }
  .hero--dark .hero__shade { background: linear-gradient(180deg, #0b1d3f 0%, #0b1d3f calc(100% - 360px), rgba(11, 29, 63, .55) calc(100% - 250px), rgba(11, 29, 63, 0) calc(100% - 150px), rgba(11, 29, 63, .45) 100%); }
  .hero--dark .hero__inner { padding-bottom: 360px; }
  .hero--dark .hero__controls { background: rgba(11, 29, 63, .7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .utility, .header, .dock, .hero__controls, .footer nav { display: none !important; }
  body { padding: 0; }
}

/* ข่าวภายในระบบ (news.html / news-article.html) */
#news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.article__cover { width: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 24px; background: #e8eef7; }
.article__body { margin-bottom: 24px; }
.news-side { list-style: none; margin: 0; padding: 0; }
.news-side li + li { border-top: 1px solid var(--border); }
.news-side a { display: block; padding: 14px 20px; }
.news-side a:hover b { color: var(--blue); }
.news-side time { display: block; font-size: .8125rem; color: var(--muted); }
.news-side b { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.6; color: var(--ink); }

/* Patient shortcuts: retain Blue Care components and colours. */
.hero-quick { display:flex; flex-wrap:wrap; gap:.625rem; margin-top:1.5rem; position:relative; z-index:1; }
.hero-quick a { display:flex; align-items:center; min-height:2.75rem; padding:.625rem 1rem; border:1px solid #cddcf0; border-radius:.5rem; background:#fff; color:var(--blue-900); font-weight:600; }
.patient-guide { display:grid; gap:1.5rem; }
.patient-guide .card { padding:1.5rem; scroll-margin-top:7rem; }
.patient-guide h2 { margin-bottom:1rem; }
.guide-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.5rem; }
.patient-guide ol { padding-left:1.5rem; }
@media(max-width:640px) { .guide-grid { grid-template-columns:1fr; } .hero--dark .hero__photo { height:220px; } .hero--dark .hero__inner { padding-bottom:250px; } .hero--dark .hero__shade { background:linear-gradient(180deg,#0b1d3f 0%,#0b1d3f calc(100% - 250px),rgba(11,29,63,.4) 100%); } .hero-quick { display:grid; grid-template-columns:1fr 1fr; } .hero-quick a { font-size:.875rem; padding:.625rem; } }

/* หน้ารายละเอียดประกาศบนมือถือ: รายการข้างเคียงไม่ให้ชื่อเรื่องถูกบีบ + ไม่ฝัง PDF ในกรอบ */
.doc-note { display: none; }
@media (max-width: 640px) {
  .docs--compact .doc { grid-template-columns: 1fr; padding: 14px 18px; }
  .doc-viewer { display: none; }
  .doc-note { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--pale-2); color: var(--ink-2); font-size: .9375rem; line-height: 1.6; }
  .doc-actions { flex-direction: column; margin-top: 12px; }
  .doc-actions .btn { width: 100%; justify-content: center; min-height: 48px; }
  .back-link { width: 100%; justify-content: center; min-height: 48px; }
}
