/* ==========================================================
   งานวิจัย วิทยาลัยพยาบาลบรมราชชนนี จักรีรัช
   ========================================================== */
:root {
  --sky-50: #f3fafd;
  --sky-100: #e4f5fa;
  --sky-200: #c8ecf5;      /* ตรงกับพื้นหลังภาพประกอบ hero */
  --sky-300: #a6dcec;
  --sky-400: #6fc2dc;
  --brand: #2588b0;
  --brand-600: #1c7096;
  --brand-700: #175b7b;
  --brand-900: #0e3448;
  --ink: #102a37;
  --ink-2: #3b5562;
  --muted: #627a86;
  --line: #d7e8ef;
  --surface: #ffffff;
  --bg: #f7fbfd;
  --gold: #e9a91c;
  --gold-soft: #fdf3dc;
  --rose: #c4392f;
  --green: #2f8a5b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 55, .06), 0 1px 1px rgba(16, 42, 55, .04);
  --shadow: 0 10px 30px -12px rgba(16, 52, 72, .22), 0 2px 6px rgba(16, 42, 55, .05);
  --font-head: "Prompt", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", "Prompt", system-ui, sans-serif;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .5em; color: var(--brand-900); font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--brand-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 52px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-title { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; color: var(--brand-900); white-space: nowrap; }
.brand-sub { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-head); font-size: .93rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--sky-100); color: var(--brand-700); }
.nav a[aria-current="page"] { background: var(--brand); color: #fff; }
/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(37, 136, 176, .8); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .75); color: var(--brand-700); border-color: rgba(37, 136, 176, .35); }
.btn-ghost:hover { background: #fff; color: var(--brand-700); }
.btn-sm { padding: 7px 14px; font-size: .9rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-family: var(--font-head); font-size: .82rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-700); background: rgba(255, 255, 255, .7); padding: 5px 12px; border-radius: 999px;
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero { position: relative; background: var(--sky-200); overflow: hidden; padding: 48px 0 56px; }
.page-hero::before, .page-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.page-hero::before { right: -120px; top: -140px; width: 380px; height: 380px; background: var(--sky-300); opacity: .55; }
.page-hero::after { left: -90px; bottom: -150px; width: 300px; height: 300px; background: var(--sky-400); opacity: .25; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: .25em; }
.page-hero .lead { font-size: 1.08rem; color: var(--ink-2); max-width: 46em; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--brand-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head p { color: var(--muted); margin: 0; max-width: 40em; }
.section-head h2 { margin-bottom: .2em; }
.kicker { font-family: var(--font-head); color: var(--brand); font-weight: 500; font-size: .9rem; letter-spacing: .04em; margin-bottom: 4px; display: block; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 500; text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ---------- Service cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.service-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sky-300); color: var(--ink); }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 10px;
  background: var(--sky-100); color: var(--brand-600);
}
.service-icon .icon { width: 26px; height: 26px; stroke-width: 1.8; }
.service-card h3 { margin: 0; font-size: 1.08rem; }
.service-card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.6; }
.service-card .go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: .9rem; color: var(--brand-600); font-weight: 500; }
.service-card.featured { background: linear-gradient(160deg, #fff 0%, var(--sky-50) 100%); border-color: var(--sky-300); }
.service-card.featured .service-icon { background: var(--brand); color: #fff; }
.tag-ext { position: absolute; top: 18px; right: 18px; font-size: .74rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; background: var(--sky-50); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.tag-ext .icon { width: 12px; height: 12px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.stat-num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 600; color: var(--brand-700); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .94rem; margin-top: 4px; }
.stats-band { background: linear-gradient(135deg, var(--brand-700), var(--brand) 70%, #3aa3c8); color: #fff; border-radius: 24px; padding: 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 28px; align-items: center; position: relative; overflow: hidden; }
.stats-band::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.stats-band h2 { color: #fff; }
.stats-band p { color: rgba(255, 255, 255, .85); margin: 0 0 18px; }
.stats-band .stat { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.stats-band .stat-num { color: #fff; }
.stats-band .stat-label { color: rgba(255, 255, 255, .82); }
.stats-band .btn-ghost { background: #fff; border-color: #fff; }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.news-card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.news-cover { position: relative; aspect-ratio: 16 / 10; background: var(--sky-100); overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-cover img { transform: scale(1.04); }
.photo-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; background: rgba(14, 52, 72, .78); color: #fff; font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.photo-count .icon { width: 14px; height: 14px; }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; background: var(--sky-100); color: var(--brand-700); font-family: var(--font-head); }
.chip-gold { background: var(--gold-soft); color: #8a5a00; }
.news-card h3 { font-size: 1.04rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- News article (news page) ---------- */
.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.news-list { display: flex; flex-direction: column; gap: 28px; }
.news-article {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px;
  box-shadow: var(--shadow-sm); scroll-margin-top: 96px;
}
.news-article:target { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 136, 176, .15), var(--shadow); }
.news-article .news-meta { margin-bottom: 10px; }
.news-article h2 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); margin-bottom: .6em; }
.news-article .project { font-family: var(--font-head); color: var(--brand); font-weight: 500; font-size: .95rem; margin-bottom: 4px; }
.news-text { color: var(--ink-2); max-width: 62em; }
.news-text p { text-indent: 2em; }
.gallery-block + .gallery-block { margin-top: 22px; }
.gallery-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 500; color: var(--brand-900); font-size: 1rem; margin: 18px 0 10px; }
.gallery-title .icon { color: var(--brand); }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery-item {
  position: relative; display: block; padding: 0; border: 0; margin: 0; cursor: zoom-in;
  aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--sky-100);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .35s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .more {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14, 52, 72, .62);
  color: #fff; font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
}
.gallery-item.is-hidden { display: none; }
.gallery.expanded .gallery-item.is-hidden { display: block; }
.gallery.expanded .gallery-item .more { display: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6, 22, 31, .94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); max-height: 86vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #0b2633; transition: opacity .2s; }
.lightbox img.loading { opacity: 0; }
.lightbox figcaption { color: rgba(255, 255, 255, .85); font-size: .92rem; text-align: center; padding: 0 60px; }
.lb-btn {
  position: absolute; border: 0; cursor: pointer; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; transition: background .15s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .24); }
.lb-btn .icon { width: 24px; height: 24px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
body.lb-lock { overflow: hidden; }

/* ---------- Publication page ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-sm); }
.about-card p { color: var(--ink-2); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; background: var(--sky-50); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 500; }
.check-list .icon { color: var(--green); margin-top: 4px; }
.about-art { border-radius: 24px; overflow: hidden; background: #fbeee6; aspect-ratio: 1 / 1; max-width: 420px; justify-self: center; width: 100%; }
.about-art img { width: 100%; height: 100%; object-fit: cover; }

.pub-toolbar {
  position: sticky; top: 72px; z-index: 20; background: rgba(247, 251, 253, .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 14px 0; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.year-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.year-tab {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
  padding: 7px 14px; border-radius: 999px; font-family: var(--font-head); font-size: .9rem; font-weight: 500;
  display: inline-flex; gap: 6px; align-items: center; transition: all .15s;
}
.year-tab .count { font-size: .76rem; color: var(--muted); background: var(--sky-100); padding: 0 7px; border-radius: 999px; }
.year-tab:hover { border-color: var(--sky-400); }
.year-tab[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.year-tab[aria-pressed="true"] .count { background: rgba(255, 255, 255, .22); color: #fff; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.search-box { position: relative; flex: 1 1 280px; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search-box input, .select {
  width: 100%; font: inherit; font-size: .96rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; min-height: 44px;
}
.search-box input { padding-left: 42px; }
.search-box input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 136, 176, .15); }
.select { flex: 0 1 220px; width: auto; cursor: pointer; }
.result-info { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }

.pub-year-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 12px; }
.pub-year-head h2, .pub-year-head h3 { margin: 0; font-size: 1.2rem; }
.pub-year-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pub-list { display: flex; flex-direction: column; gap: 12px; }
.pub-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; box-shadow: var(--shadow-sm);
}
.pub-year-badge { font-family: var(--font-head); font-weight: 600; color: var(--brand-700); background: var(--sky-100); border-radius: 12px; height: 56px; display: grid; place-items: center; font-size: .92rem; }
.pub-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.badge { font-family: var(--font-head); font-size: .74rem; font-weight: 500; padding: 2px 9px; border-radius: 6px; background: var(--sky-100); color: var(--brand-700); }
.badge-tci1 { background: #e3f4ea; color: #1f6e45; }
.badge-tci2 { background: #e6eefc; color: #2f55a4; }
.badge-intl { background: var(--gold-soft); color: #8a5a00; }
.badge-conf { background: #f3e9f7; color: #74408d; }
.badge-type { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.pub-title { font-family: var(--font-head); font-weight: 500; font-size: 1.02rem; line-height: 1.5; color: var(--ink); margin: 0 0 6px; }
.pub-title a { color: var(--brand-900); text-decoration: none; }
.pub-title a:hover { color: var(--brand); text-decoration: underline; }
.pub-title .icon { width: 14px; height: 14px; vertical-align: -1px; margin-left: 4px; color: var(--brand); }
.pub-meta { display: grid; gap: 2px; font-size: .93rem; color: var(--ink-2); }
.pub-meta b { font-weight: 600; color: var(--muted); margin-right: 4px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }

.innov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.innov-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; }
.innov-card h4 { font-size: 1rem; line-height: 1.5; margin: 0; font-weight: 500; }
.innov-card h4 a { color: var(--brand-900); text-decoration: none; }
.innov-card h4 a:hover { color: var(--brand); text-decoration: underline; }
.innov-img { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--sky-100); aspect-ratio: 16 / 10; }
.innov-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.innov-img:hover img { transform: scale(1.04); }
.innov-adv { font-size: .93rem; color: var(--ink-2); }
.innov-adv b { color: var(--muted); font-weight: 600; }
.innov-card details { font-size: .92rem; color: var(--ink-2); }
.innov-card summary { cursor: pointer; color: var(--brand-600); font-family: var(--font-head); font-weight: 500; font-size: .88rem; }
.innov-card details ul { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 20px; }
.innov-card details li { break-inside: avoid; }

/* ---------- Journals page ---------- */
.journal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.journal-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.journal-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent, var(--brand)); }
.journal-logo { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--accent, var(--brand)); letter-spacing: .02em; }
.journal-card h2 { font-size: 1.25rem; margin: 6px 0 0; }
.journal-card p { color: var(--muted); margin: 0; font-size: .96rem; }
.journal-links { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.journal-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--sky-50); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  font-weight: 500; transition: border-color .15s, background .15s;
}
.journal-link:hover { border-color: var(--sky-400); background: #fff; color: var(--ink); }
.journal-link .icon { color: var(--brand); }
.journal-link .arrow { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.note { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; padding: 18px 20px; color: var(--ink-2); }
.note .icon { color: var(--gold); margin-top: 3px; }
.note p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .82); margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 48px 24px 32px; align-items: start; }
.footer-contact { display: grid; gap: 10px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 64px; height: auto; flex: none; background: #fff; border-radius: 16px; padding: 6px; }
.footer-brand h2 { color: #fff; font-size: 1.1rem; margin: 0 0 4px; }
.footer-brand p { margin: 0; font-size: .95rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.contact-line { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.contact-line .icon { margin-top: 4px; color: var(--sky-400); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 24px; font-size: .86rem; color: rgba(255, 255, 255, .6); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer .admin-link { color: rgba(255, 255, 255, .55); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .nav a { padding: 8px 10px; font-size: .88rem; }
  .brand-sub { display: none; }
}
@media (max-width: 920px) {
  .brand-sub { display: block; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band { grid-template-columns: 1fr; padding: 28px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-art { max-width: 300px; }
  .journal-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { min-height: 64px; gap: 12px; }
  .brand img { width: 42px; }
  .brand-title { font-size: .95rem; }
  .brand-sub { font-size: .76rem; }
  .pub-toolbar { position: static; background: transparent; padding-top: 0; }
  .nav a { padding: 7px 12px; font-size: .86rem; }
  .section { padding: 52px 0; }
  .page-hero { padding: 36px 0 40px; }
  .news-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 16px; align-items: start; }
  .service-icon { grid-row: 1 / span 2; width: 44px; height: 44px; margin: 0; border-radius: 12px; }
  .service-icon .icon { width: 22px; height: 22px; }
  .service-card h3, .service-card p { grid-column: 2; }
  .service-card h3 { padding-right: 96px; }
  .service-card .go { display: none; }
  .tag-ext { top: 12px; right: 12px; }
  .news-article { padding: 22px 18px; border-radius: 16px; }
  .news-text p { text-indent: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pub-item { grid-template-columns: 1fr; gap: 6px; padding: 16px; }
  .pub-year-badge { display: none; }
  .select { flex: 1 1 140px; }
  .innov-grid { grid-template-columns: 1fr; }
  .innov-card details ul { columns: 1; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 44px 16px 28px; }
  .footer-bottom { padding: 16px; }
  .stats-band { padding: 24px 20px; border-radius: 20px; }
  .stat-num { font-size: 1.7rem; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lightbox figcaption { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.badge .icon { width: 12px; height: 12px; vertical-align: -2px; }

/* ---------- หน้าหลัก: พื้นหลังส่วนบริการ ---------- */
.section-sky { background: linear-gradient(180deg, var(--sky-200) 0%, var(--sky-100) 55%, var(--bg) 100%); position: relative; overflow: hidden; }
.section-sky::before { content: ""; position: absolute; right: -140px; top: -180px; width: 420px; height: 420px; border-radius: 50%; background: var(--sky-300); opacity: .45; pointer-events: none; }
.section-sky .container { position: relative; }

/* ---------- Publication: แผงเลือกปี ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cat-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.cat-head { display: flex; gap: 16px; align-items: flex-start; }
.cat-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.cat-icon .icon { width: 28px; height: 28px; stroke-width: 1.8; }
.cat-panel h2 { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); margin: 0 0 2px; }
.cat-sub { margin: 0; color: var(--muted); font-size: .95rem; }
.cat-hint { margin: 20px 0 10px; font-family: var(--font-head); font-size: .88rem; color: var(--brand-700); font-weight: 500; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.year-btn {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 12px 36px 12px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--sky-50); text-decoration: none; color: var(--ink);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.year-btn:hover { border-color: var(--brand); background: #fff; transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.year-btn .y { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--brand-900); }
.year-btn .c { font-size: .86rem; color: var(--muted); }
.year-btn .go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--brand); width: 18px; height: 18px; }
.cat-all { align-self: flex-start; margin-top: auto; }

/* ---------- หน้ารายละเอียดผลงาน ---------- */
.page-hero-sm { padding: 36px 0 40px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-head); font-weight: 500; font-size: .93rem; text-decoration: none; margin-bottom: 8px; }
.back-link:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .cat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cat-panel { padding: 22px 18px; }
  .cat-icon { width: 48px; height: 48px; }
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero-sm { padding: 28px 0 32px; }
}
