:root {
  --paper: #ffffff;
  --paper-soft: #f6fbf8;
  --ink: #082443;
  --ink-2: #14324f;
  --muted: #62768b;
  --line: #dce7ee;
  --line-soft: rgba(8, 36, 67, .09);
  --bma: #006a3d;
  --bma-dark: #004f2e;
  --bma-soft: #eaf7ef;
  --red: #f0533d;
  --red-dark: #d8412d;
  --blue: #1c86df;
  --blue-soft: #edf7ff;
  --orange: #ef870f;
  --orange-soft: #fff6eb;
  --pink: #cf2b6a;
  --pink-soft: #fff1f7;
  --green-soft: #f0faf4;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(8, 36, 67, .08), 0 0 0 1px rgba(8, 36, 67, .04);
  --shadow-md: 0 10px 28px rgba(8, 36, 67, .12);
  --shadow-lg: 0 18px 48px rgba(8, 36, 67, .16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Anuphan", "Noto Sans Thai", "Sukhumvit Set", "Th Sarabun New", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 64px, 1396px);
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  /* No backdrop-filter here: it creates a containing block for
     position:fixed descendants (the nav drawer + backdrop), trapping
     them inside this short header box instead of the full viewport.
     Background is already 96% opaque, so the blur added little. */
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #d8e2ea;
  box-shadow: 0 1px 6px rgba(8, 36, 67, .03);
}

/* Shortcut links (phone / contact / staff) — used to live in a
   separate green utility bar; now folded into the masthead row,
   right of the logo, so there's one header row instead of two. */
.masthead__right {
  display: flex;
  align-items: center;
  gap: 26px;
}

.masthead__shortcuts {
  display: flex;
  align-items: center;
  gap: 24px;
}

.masthead__shortcuts a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .15s;
}

.masthead__shortcuts a + a {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.masthead__shortcuts a:hover {
  color: var(--bma-dark);
}

.masthead__shortcuts svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: .8;
}

.masthead {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.brand span,
.brand b,
.brand small {
  display: block;
}

.brand span {
  min-width: 0;
}

.brand b {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
}

.brand small {
  margin-top: 5px;
  color: #3c526c;
  font-size: 13px;
  font-weight: 700;
}

/* Desktop: dedicated full-width bar below the logo row, classic flat
   horizontal menu (familiar to government-site users), left-aligned.
   Mobile (@media max-width:980px below): hamburger → off-canvas
   drawer, since a long flat bar doesn't fit a phone screen. ------- */
.nav-bar {
  border-top: 1px solid var(--line);
  background: #fff;
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.primary-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(20px, 2.2vw, 40px);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  /* 9 flat items no longer always fit above the 980px mobile-drawer
     breakpoint (e.g. ~1000px wide) — scroll horizontally instead of
     clipping/overflowing the header. */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.primary-nav a {
  position: relative;
  min-height: 60px;
  display: flex;
  align-items: center;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--bma);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--bma-dark);
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-home svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.icon-button,
.nav-toggle {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.nav-toggle {
  display: none;
  gap: 4px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
}

/* "บริการข้อมูล" + its submenu: on desktop both wrapper divs collapse
   via `display:contents` so every link (parent + 4 children) renders
   flat, inline, as its own item in the bar — same look as before the
   submenu existed. Mobile below turns this into a real accordion. */
.primary-nav .nav-item {
  display: contents;
}

.nav-item__toggle {
  display: none;
}

.nav-submenu {
  display: contents;
}

.nav-panel-head,
.nav-backdrop,
.nav-close {
  display: none;
}

.hero {
  position: relative;
  min-height: 340px;
  padding: 28px 0 14px;
  overflow: hidden;
  background: linear-gradient(90deg, #f5fbff 0%, #fff 36%, #edf8ff 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #fff 0 33%, rgba(255, 255, 255, .82) 42%, rgba(255, 255, 255, .18) 58%, rgba(255, 255, 255, .02) 100%),
    radial-gradient(circle at 43% 58%, rgba(255, 183, 86, .16), rgba(255, 183, 86, 0) 18%),
    radial-gradient(circle at 45% 55%, rgba(8, 57, 72, .08), rgba(8, 57, 72, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .22));
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 58px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 86%);
  pointer-events: none;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 52%;
  filter: saturate(1.02) contrast(1.03) brightness(.94);
}

.hero__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.hero__grid > * {
  min-width: 0;
}

.hero__content {
  padding-top: 2px;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 3.25vw, 50px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero h1 span {
  display: block;
}

.hero h1 .hero-title-main span {
  display: inline;
}

.hero p {
  max-width: 558px;
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.52;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.search-panel {
  margin-top: 14px;
  width: min(100%, 548px);
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr 126px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .95);
  border: 1px solid #c9d9e5;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.search-panel svg {
  width: 21px;
  height: 21px;
  margin-left: 18px;
  fill: #60758a;
}

.search-panel input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.search-panel input::placeholder {
  color: #8092a5;
}

.search-panel button {
  align-self: stretch;
  border: 0;
  background: var(--bma);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.search-panel button:hover {
  background: var(--bma-dark);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 18px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: var(--shadow-md);
}

.button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.button i {
  font-style: normal;
  font-size: 25px;
  line-height: 1;
}

.button--primary {
  background: linear-gradient(180deg, #007a45, #005c35);
}

.button--secondary {
  background: linear-gradient(180deg, #ff6247, #e84431);
}

.hero-visual {
  position: relative;
  min-height: 298px;
}

.metric-card {
  position: absolute;
  z-index: 2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.metric-card strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.28;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.metric-card__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.metric-card__tools {
  display: flex;
  gap: 18px;
  padding-top: 3px;
}

.metric-card__tools span {
  width: 13px;
  height: 13px;
  border: 2px solid #698094;
  border-radius: 2px;
  opacity: .8;
}

.metric-card__tools span:first-child {
  width: 12px;
  height: 2px;
  margin-top: 6px;
  border: 0;
  background: #698094;
}

.metric-card--wide {
  top: 2px;
  right: 0;
  width: min(100%, 444px);
  padding: 10px 12px 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.metric-grid div {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  text-align: center;
}

.metric-grid svg {
  width: 14px;
  height: 14px;
  fill: var(--bma);
}

.metric-grid b {
  color: var(--bma);
  font-size: 20px;
  line-height: 1.05;
  font-weight: 900;
}

.metric-grid span,
.metric-grid small {
  display: block;
  font-size: 9.5px;
  line-height: 1.18;
}

.metric-grid small {
  color: var(--muted);
}

.chart-card {
  left: 18px;
  top: 154px;
  bottom: auto;
  width: 348px;
  padding: 11px 14px 9px;
}

.line-chart {
  width: 100%;
  height: 68px;
  margin-top: 4px;
  overflow: visible;
}

.grid-line {
  fill: none;
  stroke: rgba(8, 36, 67, .09);
  stroke-width: 1;
}

.chart-fill {
  fill: url("#unused");
  fill: rgba(0, 106, 61, .12);
}

.chart-line {
  fill: none;
  stroke: #006572;
  stroke-width: 4;
  stroke-linecap: round;
}

.chart-dots {
  fill: #fff;
  stroke: #006572;
  stroke-width: 4;
}

.chart-years {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  color: #71849a;
  font-size: 10px;
}

.map-card {
  right: 0;
  top: 154px;
  bottom: auto;
  width: 284px;
  padding: 11px 13px 7px;
}

.map-card img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  object-position: center;
  margin-top: 6px;
  border-radius: 7px;
  opacity: .82;
  filter: hue-rotate(44deg) saturate(.74) brightness(1.08) contrast(.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 252, 248, .9));
}

.map-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
  color: #52687d;
  font-size: 10px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #9ad3b5;
}

.map-legend i:nth-of-type(2) {
  background: #78c59b;
}

.map-legend i:nth-of-type(3) {
  background: #55b481;
}

.map-legend i:nth-of-type(4) {
  background: #218f57;
}

.service-band {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 15px;
}

.service-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 74px 1fr 18px;
  gap: 14px;
  align-items: center;
  padding: 12px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: currentColor;
}

.service-card__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
}

.service-card__icon svg {
  width: 39px;
  height: 39px;
  fill: currentColor;
}

.service-card b {
  display: block;
  line-height: 1.1;
  font-weight: 900;
}

.service-card__en,
.service-card__title {
  display: block;
}

.service-card__en {
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  opacity: .92;
}

.service-card__title {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.12;
  font-weight: 900;
}

.service-card small {
  display: block;
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.38;
}

.service-card > i {
  align-self: center;
  font-style: normal;
  font-size: 31px;
  line-height: 1;
}

.service-card--data {
  color: var(--blue);
  background: linear-gradient(110deg, #fff 0%, var(--blue-soft) 100%);
}

.service-card--business {
  color: var(--bma);
  background: linear-gradient(110deg, #fff 0%, var(--green-soft) 100%);
}

.service-card--career {
  color: var(--orange);
  background: linear-gradient(110deg, #fff 0%, var(--orange-soft) 100%);
}

.service-card--media {
  color: var(--pink);
  background: linear-gradient(110deg, #fff 0%, var(--pink-soft) 100%);
}

.service-card--data .service-card__icon {
  background: var(--blue);
}

.service-card--business .service-card__icon {
  background: var(--bma);
}

.service-card--career .service-card__icon {
  background: var(--orange);
}

.service-card--media .service-card__icon {
  background: var(--pink);
}

.content-grid {
  display: grid;
  grid-template-columns: .94fr 1.06fr;
  gap: 24px;
  margin-top: 14px;
}

.panel {
  min-width: 0;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 13px 16px 15px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.section-head a {
  color: var(--bma);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.section-head a::after {
  content: " ›";
  font-size: 19px;
  line-height: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 104px 1fr 54px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 3px 0;
  border-top: 1px solid var(--line-soft);
}

.news-item > * {
  min-width: 0;
}

.news-item:first-of-type {
  border-top: 0;
}

.news-item img {
  width: 104px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.news-item img.is-fallback {
  object-fit: contain;
  background: var(--bma-soft);
  padding: 9px 30px;
  box-sizing: border-box;
  box-shadow: none;
}

.tag {
  display: inline-flex;
  min-width: 50px;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--bma);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}

.tag--green {
  background: #3b945e;
}

.tag--blue {
  background: #0b8566;
}

.news-item h3 {
  margin: 3px 0 1px;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.15;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-item p,
.news-item time {
  display: block;
  margin: 0;
  color: #546a7f;
  font-size: 10px;
  line-height: 1.12;
}

.news-item p {
  display: none;
}

.view-count {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: #687d91;
  font-size: 12px;
  white-space: nowrap;
}

.view-count svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  opacity: .72;
}

/* Plain link list (ประชาสัมพันธ์ panel on the homepage — same pattern
   used for the "ข่าวประชาสัมพันธ์" section on news/index.php) ------ */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background .15s;
}

button.news-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.news-item-link {
  display: contents;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.news-row:first-child {
  border-top: 1px solid var(--line);
}

.news-row:hover {
  background: var(--bma-soft);
  border-radius: 8px;
}

.news-row__num {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--bma);
  opacity: .6;
}

.news-row__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--bma-soft);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-row__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-row__body {
  flex: 1;
  min-width: 0;
}

.news-row__title {
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-row:hover .news-row__title {
  color: var(--bma);
}

.news-row__date {
  font-size: .74rem;
  color: var(--ink-2);
  margin-top: 2px;
}

.news-row__badge {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--bma-soft);
  color: var(--bma);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-2);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  stroke: #cbd5e1;
  stroke-width: 1.5;
  fill: none;
  display: block;
  margin: 0 auto 10px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.report-card {
  min-height: 146px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 13px 12px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  box-shadow: 0 1px 1px rgba(8, 36, 67, .02);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.report-card:hover {
  transform: translateY(-2px);
  border-color: currentColor;
  box-shadow: var(--shadow-md);
}

.report-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
  color: currentColor;
}

.report-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.report-card b {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.32;
  font-weight: 900;
}

.report-card small {
  margin-top: 5px;
  color: #55708a;
  font-size: 11px;
  font-weight: 700;
}

.report-card em {
  min-width: 122px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid #9ec0d3;
  border-radius: 5px;
  color: #074d86;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.report-card em svg {
  width: 15px;
  height: 15px;
  fill: var(--bma);
}

.report-card--blue {
  color: #2588d9;
}

.report-card--green {
  color: #70b3a7;
}

.report-card--orange {
  color: #ef870f;
}

.report-card--purple {
  color: #72609e;
}

.support-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 62px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #d8e8df;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #fbfffc, #eef9f1, #fbfffc);
}

.support-strip a {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 10px 14px;
  border-left: 1px solid #d4e5db;
}

.support-strip a:first-child {
  border-left: 0;
}

.support-strip svg {
  width: 37px;
  height: 37px;
  fill: none;
  stroke: var(--bma);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-strip b,
.support-strip small {
  display: block;
}

.support-strip b {
  color: var(--bma-dark);
  font-size: 13px;
  line-height: 1.22;
  font-weight: 900;
}

.support-strip small {
  margin-top: 2px;
  color: #2d5163;
  font-size: 10.5px;
  line-height: 1.35;
}

/* ===== ลิงก์ที่เกี่ยวข้อง (partner banner จากหลังบ้าน module_cms MenuID=35) ===== */
.partner-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 62px;
  margin-top: 14px;
}

.partner-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 200px;
  max-width: 260px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #d8e8df;
  border-radius: var(--radius);
  transition: box-shadow .15s, transform .15s;
}

.partner-links a:hover {
  box-shadow: 0 3px 12px rgba(0,106,61,.12);
  transform: translateY(-2px);
}

.partner-links img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
}

.site-footer {
  margin-top: 0;
  background:
    radial-gradient(circle at 78% -12%, rgba(30, 133, 75, .55), transparent 34%),
    linear-gradient(115deg, #00653b 0%, #004b2c 56%, #003a24 100%);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.55fr;
  gap: 22px;
  min-height: 82px;
  padding: 8px 0 4px;
}

.footer-grid > div {
  min-width: 0;
}

.footer-grid > div + div {
  border-left: 1px solid rgba(255, 255, 255, .48);
  padding-left: 22px;
}

.footer-brand {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 12px;
  align-items: start;
}

.footer-brand img {
  grid-row: 1 / 4;
  width: 54px;
  height: 54px;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .12));
}

.footer-brand p,
.footer-brand small,
.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, .93);
}

.footer-brand p {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.footer-brand small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 500;
}

.social-links {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.social-links a {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--bma-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  line-height: 0;
}

.social-links svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.social-links a[aria-label="Email"] svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-grid h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.25;
  font-weight: 900;
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0 0 3px;
  font-size: 10px;
  line-height: 1.22;
}

.footer-grid .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 0;
}

.footer-grid .social-links svg {
  margin: 0;
}

.footer-grid p b {
  color: #fff;
  font-weight: 900;
}

.footer-address {
  max-width: 43ch;
}

.footer-contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 22px;
  margin-top: 4px;
}

.footer-contact-row p {
  margin-bottom: 0;
}

.footer-grid a::before {
  content: "› ";
  font-weight: 900;
}

.social-links a::before {
  content: none;
}

.visit-stats {
  margin: 0;
}

.visit-stats div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.visit-stats dt,
.visit-stats dd {
  margin: 0;
}

.visit-stats dt {
  color: rgba(255, 255, 255, .88);
  font-size: 10.5px;
  line-height: 1.35;
}

.visit-stats dd {
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.footer-visit-detail {
  overflow-x: auto;
}

.visit-detail-table {
  border-collapse: collapse;
  font-size: 11px;
  width: auto;
  max-width: 100%;
}

.visit-detail-table caption {
  caption-side: top;
  margin-bottom: 6px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
}

.visit-detail-table th,
.visit-detail-table td {
  padding: 4px 0 4px 20px;
  color: rgba(255, 255, 255, .93);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.visit-detail-table th:first-child,
.visit-detail-table td:first-child {
  padding-left: 0;
}

.visit-detail-table thead th {
  color: #fff;
  font-weight: 900;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
}

.visit-detail-table thead th:first-child,
.visit-detail-table tbody th {
  text-align: left;
  font-weight: 700;
  color: rgba(255, 255, 255, .93);
}

.visit-detail-table tbody td {
  color: #fff;
  font-weight: 700;
}

.visit-detail-table tfoot td {
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .75);
  font-size: 10px;
  font-weight: 500;
}

.visit-detail-table tfoot td:first-child {
  text-align: left;
}

.copyright {
  padding: 0 0 5px;
  color: rgba(255, 255, 255, .9);
  font-size: 10px;
}

.accessibility-widget {
  position: fixed;
  right: 38px;
  bottom: 4px;
  z-index: 45;
  height: 25px;
  min-width: 132px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  padding: 0 13px;
  border-radius: 7px;
  background: #fff;
  color: var(--bma-dark);
  box-shadow: var(--shadow-md);
  font-weight: 900;
}

.accessibility-widget button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  border-radius: 4px;
}

.accessibility-widget button:hover,
.accessibility-widget button:focus-visible {
  color: var(--bma);
  outline: 0;
  text-decoration: underline;
}

.accessibility-widget button[data-font-scale="down"] { font-size: 11px; }
.accessibility-widget button[data-font-scale="reset"] { font-size: 13px; }
.accessibility-widget button[data-font-scale="up"] { font-size: 15px; }

.accessibility-person {
  position: fixed;
  right: 6px;
  bottom: 6px;
  z-index: 46;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4db245;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.accessibility-person svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: 120px 24px 24px;
  background: rgba(8, 36, 67, .55);
  backdrop-filter: blur(6px);
}

.search-modal[hidden] {
  display: none;
}

.search-modal__panel {
  position: relative;
  width: min(100%, 620px);
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.search-modal__panel h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.search-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef4f7;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.search-panel--modal {
  width: 100%;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 36, 67, .55);
  backdrop-filter: blur(6px);
}

.detail-modal[hidden] {
  display: none;
}

.detail-modal__panel {
  position: relative;
  width: min(100%, 720px);
  max-height: min(100%, 85vh);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.detail-modal__head {
  padding: 22px 60px 16px 28px;
  border-bottom: 1px solid var(--line);
}

.detail-modal__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.detail-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef4f7;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.detail-modal__body {
  padding: 24px 28px 28px;
  overflow-y: auto;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--ink);
}

.detail-modal__body img { max-width: 100%; height: auto; border-radius: 8px; }
.detail-modal__body p { margin: 0 0 12px; }
.detail-modal__body p:last-child { margin-bottom: 0; }

@media (max-width: 1240px) {
  .container {
    width: min(100% - 40px, 1100px);
  }

  .brand b {
    font-size: 21px;
  }

  .primary-nav {
    gap: 18px;
    font-size: 15px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 450px) minmax(510px, 1fr);
  }

  .metric-card--wide {
    width: 404px;
  }

  .chart-card {
    left: 0;
  }

  .map-card {
    right: 0;
  }
}

@media (max-width: 980px) {
  /* Shortcut links need room this width no longer has — the drawer
     (via nav-toggle) covers "ติดต่อเรา" already; phone/staff are one
     tap away from there or the footer. */
  .masthead__shortcuts {
    display: none;
  }

  .masthead {
    min-height: 78px;
  }

  /* NOT display:none — .primary-nav (position:fixed drawer) lives
     inside .nav-bar, and display:none on an ancestor would remove the
     whole subtree from rendering, drawer included. Just zero out its
     own visible footprint instead. */
  .nav-bar {
    border-top: 0;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  .brand b {
    font-size: 17px;
  }

  .brand small {
    font-size: 10px;
  }

  .nav-toggle {
    display: grid;
  }

  /* Off-canvas side drawer (slides in from the right) — the flat bar
     from desktop doesn't fit here, so this is the one place the
     hamburger + drawer pattern is used. */
  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    width: min(86vw, 340px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 20px 16px;
    background: #fff;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(8, 36, 67, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 4px;
  }

  .nav-panel-head__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
  }

  .nav-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 0;
    border-radius: 999px;
    background: var(--paper-soft);
    color: var(--ink);
    cursor: pointer;
  }

  .nav-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
  }

  .primary-nav a {
    min-height: 46px;
    border-bottom: 1px solid var(--line-soft);
  }

  .primary-nav a::after {
    bottom: 0;
  }

  .primary-nav .nav-item {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line-soft);
  }

  .primary-nav .nav-item .nav-item__link {
    flex: 1;
    min-height: 46px;
    border-bottom: 0;
  }

  .nav-item__toggle {
    display: grid;
    place-items: center;
    width: 46px;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  .nav-item__toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform .2s ease;
  }

  .nav-item__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .nav-submenu {
    display: block;
    flex-basis: 100%;
    width: 100%;
    padding: 0 0 8px 16px;
  }

  .nav-submenu[hidden] {
    display: none;
  }

  .nav-submenu a {
    display: flex;
    align-items: center;
    min-height: 40px;
    font-size: 14px;
    font-weight: 700;
    color: #3c526c;
    border-bottom: 0;
  }

  .nav-submenu a:hover,
  .nav-submenu a.is-active {
    color: var(--bma-dark);
  }

  .hero {
    min-height: 0;
    padding: 32px 0 20px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .76)),
      linear-gradient(180deg, rgba(255, 255, 255, .1), #fff 100%);
  }

  .hero__bg {
    object-position: 62% center;
  }

  .hero h1 {
    font-size: clamp(36px, 10vw, 52px);
  }

  .hero p {
    max-width: 620px;
  }

  .hero-visual {
    min-height: 360px;
  }

  .metric-card--wide {
    top: 0;
    left: 0;
    right: auto;
    width: min(100%, 560px);
  }

  .chart-card {
    left: 0;
    top: 176px;
    bottom: auto;
  }

  .map-card {
    right: 0;
    top: 176px;
    bottom: auto;
  }

  .service-band,
  .content-grid,
  .dashboard-grid,
  .support-strip,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-strip a:nth-child(odd) {
    border-left: 0;
  }

  .footer-grid > div + div {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .container {
    width: min(100% - 28px, 560px);
  }

  .masthead {
    min-height: 74px;
    gap: 8px;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    width: 50px;
    height: 50px;
  }

  .brand b {
    font-size: 14px;
  }

  .brand small {
    display: none;
  }

  .hero {
    padding: 28px 0 18px;
  }

  .hero h1 {
    font-size: clamp(30px, 9.5vw, 36px);
    line-height: 1.15;
  }

  .hero h1 .hero-title-main span {
    display: block;
  }

  .hero p {
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.58;
  }

  .search-panel {
    grid-template-columns: 25px 1fr;
    min-height: 50px;
  }

  .search-panel button {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .hero__actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: space-between;
  }

  .hero-visual {
    display: grid;
    gap: 12px;
    min-height: 0;
  }

  .metric-card {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-card,
  .map-card,
  .metric-card--wide {
    width: 100%;
  }

  .service-band,
  .content-grid,
  .dashboard-grid,
  .support-strip,
  .footer-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 58px 1fr 18px;
  }

  .service-card__icon {
    width: 52px;
    height: 52px;
  }

  .service-card__icon svg {
    width: 32px;
    height: 32px;
  }

  .news-item {
    grid-template-columns: 94px 1fr;
  }

  .news-item img {
    width: 94px;
    height: 62px;
  }

  .view-count {
    grid-column: 2;
    justify-content: flex-start;
  }

  .support-strip a,
  .support-strip a:nth-child(odd) {
    border-left: 0;
    border-top: 1px solid #d4e5db;
  }

  .support-strip a:first-child {
    border-top: 0;
  }

  .footer-brand img {
    width: 52px;
    height: 52px;
  }

  .accessibility-widget,
  .accessibility-person {
    display: none;
  }
}

/* ============================================================
   HERO SLIDER  (prototype2)
   ============================================================ */

.hero-slider {
  position: relative;
  overflow: hidden;
  background: #082443;
}

/* Track — slides lay side-by-side, track translates */
.slider-track {
  display: flex;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* Individual slide */
.slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background image */
.slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transition: filter .55s ease;
}

/* Subtle gradient overlay — readable text without hiding photo */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(4,28,56,.55) 0%,
    rgba(4,28,56,.30) 45%,
    rgba(4,28,56,.04) 100%
  );
  z-index: 1;
}

/* Content wrapper */
.slide__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0,580px) 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 100px;
}

/* Left content */
.slide__content {
  color: #fff;
}

.slide__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #b8e8ff;
  margin-bottom: 20px;
}

.slide__content h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 3.2vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.28);
}

.slide__content h1 em {
  font-style: normal;
  color: #5de0a0;
}

.slide__content p {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,.85);
  max-width: 520px;
}

.slide__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button--white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  background: #fff;
  color: #082443;
  font-size: 15px;
  font-weight: 800;
  transition: background .15s, transform .12s;
}
.button--white svg { width:18px; height:18px; fill:currentColor; }
.button--white:hover { background: #e8f8ef; transform: translateY(-1px); }

.button--outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.55);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: border-color .15s, background .15s;
}
.button--outline-white:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* Right panel variants */
/* Slide 1 — KPI row */
.slide__kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kpi-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 18px 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-card svg { width:22px; height:22px; fill: #5de0a0; }
.kpi-card b { font-size: 26px; font-weight: 900; line-height: 1; }
.kpi-card span { font-size: 12px; color: rgba(255,255,255,.75); }

/* Slide 2 — Chart box */
.slide__stat-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 22px 24px 18px;
  color: #fff;
}
.slide__stat-box strong { display:block; font-size:16px; font-weight:800; margin-bottom:2px; }
.slide__stat-box span { display:block; font-size:12px; color:rgba(255,255,255,.65); margin-bottom:12px; }

.slide__stat-box .line-chart { width:100%; border-radius:6px; overflow:hidden; }
.slide__stat-box .grid-line { stroke:rgba(255,255,255,.15); stroke-width:1; fill:none; }
.slide__stat-box .chart-fill { fill:rgba(93,224,160,.2); }
.slide__stat-box .chart-line { fill:none; stroke:#5de0a0; stroke-width:2.5; }
.slide__stat-box .chart-dots circle { fill:#5de0a0; }

.slide__stat-box .chart-years {
  display:flex; justify-content:space-between;
  font-size:11px; color:rgba(255,255,255,.55); margin-top:8px;
}

/* Slide 3 — Report list */
.slide__report-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slide-report-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 14px 18px;
  color: #fff;
  transition: background .15s;
}
.slide-report-item:hover { background: rgba(255,255,255,.18); }
.slide-report-item div { flex:1; min-width:0; }
.slide-report-item b { display:block; font-size:14px; font-weight:700; line-height:1.3; }
.slide-report-item small { display:block; font-size:12px; color:rgba(255,255,255,.6); margin-top:3px; }
.slide-report-item svg { width:18px; height:18px; fill:rgba(255,255,255,.6); flex-shrink:0; }
.slide-report-item__dot {
  width:10px; height:10px; border-radius:50%; flex-shrink:0;
}
.slide-report-item__dot--blue   { background:#4da6ff; }
.slide-report-item__dot--green  { background:#5de0a0; }
.slide-report-item__dot--orange { background:#ffa040; }

/* Prev / Next buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  margin-top: -30px;
}
.slider-btn svg { width:22px; height:22px; fill:#fff; }
.slider-btn:hover { background: rgba(0,0,0,.5); border-color: rgba(255,255,255,.8); }
.slider-btn--prev { left: 20px; }
.slider-btn--next { right: 20px; }

/* Search bar — overlays bottom of slider */
.slider-search {
  position: absolute;
  bottom: 42px;
  left: 0;
  right: 0;
  z-index: 5;
}

.slider-search .search-panel {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border-radius: 10px;
  box-shadow: 0 4px 32px rgba(0,0,0,.22);
}

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}
.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .2s, width .2s, border-radius .2s;
}
.slider-dots button.is-active {
  background: #fff;
  border-color: #fff;
  width: 24px;
  border-radius: 4px;
}

/* Progress bar */
.slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,.15);
  z-index: 10;
}
.slider-progress__bar {
  height: 100%;
  background: #5de0a0;
  width: 0%;
  transition: width linear;
}

/* Responsive */
@media (max-width: 900px) {
  .slide__inner {
    grid-template-columns: 1fr;
    padding: 48px 0 110px;
  }
  .slide__kpi-row,
  .slide__stat-box,
  .slide__report-list {
    display: none;
  }
  .slide { min-height: 440px; }
}

@media (max-width: 600px) {
  .slide__content h1 { font-size: 30px; }
  .slider-btn { display: none; }
}

/* Slides ที่ไม่มี inner content — รูปเต็ม */
.slide__link-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}

/* สไลด์แรก: text overlay ด้านซ้าย */
.slide__inner--text-only {
  grid-template-columns: minmax(0,580px);
  padding-bottom: 110px;
}

/* Power BI Section (two side-by-side dashboard blocks) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 48px auto;
}

.powerbi-block {
  min-width: 0;
}

.powerbi-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #f0f4f8;
}

.powerbi-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   STATISTIC PAGE
   ============================================================ */

/* Page Hero */
.page-hero {
  background: linear-gradient(135deg, #004d2d 0%, #006a3d 60%, #008a50 100%);
  color: #fff;
  padding: 48px 0 40px;
}
.page-hero__inner { }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-bottom: 16px;
}
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.1;
}
.page-hero p {
  margin: 0;
  font-size: 16px;
  color: rgba(255,255,255,.85);
  max-width: 600px;
}

/* Quick links */
.stat-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px auto 0;
}
.stat-ql {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: border-color .15s, background .15s, color .15s;
}
.stat-ql svg { width:18px; height:18px; fill:var(--bma); flex-shrink:0; }
.stat-ql:hover { border-color: var(--bma); color: var(--bma); background: var(--bma-soft); }

/* Banner */
.stat-banner {
  margin: 32px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 280px;
  object-fit: cover;
  object-position: center 30%;
}

/* Stat section */
.stat-section { margin-bottom: 56px; }

/* Card grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  transition: box-shadow .15s, border-color .15s, transform .12s;
  position: relative;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card__icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stat-card__title { flex: 1; line-height: 1.3; }
.stat-card__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--muted);
  transition: fill .15s;
}
.stat-card:hover .stat-card__arrow { fill: currentColor; }

.stat-card--blue   { border-color: #d0e8ff; }
.stat-card--blue   .stat-card__icon { background: #edf7ff; }
.stat-card--blue:hover   { border-color: var(--blue); color: var(--blue); }

.stat-card--green  { border-color: #c8eed8; }
.stat-card--green  .stat-card__icon { background: var(--bma-soft); }
.stat-card--green:hover  { border-color: var(--bma); color: var(--bma); }

.stat-card--orange { border-color: #ffe5c0; }
.stat-card--orange .stat-card__icon { background: var(--orange-soft); }
.stat-card--orange:hover { border-color: var(--orange); color: var(--orange); }

.stat-card--purple { border-color: #e8d8f5; }
.stat-card--purple .stat-card__icon { background: #f5eeff; }
.stat-card--purple:hover { border-color: #8b40c8; color: #8b40c8; }

@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-quicklinks { gap: 8px; }
  .stat-ql { font-size: 13px; padding: 7px 14px; }
}

/* Stat list (row layout) */
.stat-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  transition: background .12s, color .12s;
  font-size: 15px;
  font-weight: 600;
}
.stat-list li:last-child .stat-row { border-bottom: none; }
.stat-row:hover { background: var(--bma-soft); color: var(--bma-dark); }

.stat-row__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--paper-soft);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.stat-row:hover .stat-row__num { background: var(--bma); border-color: var(--bma); color: #fff; }

.stat-row__title { flex: 1; line-height: 1.45; }

.stat-row__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--muted);
  transition: fill .12s, transform .12s;
}
.stat-row:hover .stat-row__arrow { fill: var(--bma); transform: translateX(3px); }

@media (max-width: 600px) {
  .stat-row { padding: 14px 16px; font-size: 14px; }
}

/* Accordion stat list */
.stat-row {
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  background: var(--paper);
  font-family: inherit;
}
.stat-item--has-children .stat-row:hover { background: var(--bma-soft); color: var(--bma-dark); }
.stat-item--has-children .stat-row:hover .stat-row__num { background: var(--bma); border-color: var(--bma); color: #fff; }

.stat-row__count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 8px;
}

.stat-row__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  transition: transform .22s ease, stroke .12s;
}
.stat-row[aria-expanded="true"] .stat-row__chevron { transform: rotate(180deg); stroke: var(--bma); }
.stat-row[aria-expanded="true"] { background: var(--bma-soft); color: var(--bma-dark); }
.stat-row[aria-expanded="true"] .stat-row__num { background: var(--bma); border-color: var(--bma); color: #fff; }

/* Children panel */
.stat-children {
  border-top: 1px solid var(--line-soft);
  background: var(--paper-soft);
  padding: 12px 16px 12px 64px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-children[hidden] { display: none; }

.stat-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background .12s;
}
.stat-child:hover { background: #fff; }

.stat-child__icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-style: normal;
}
.stat-child__icon--pdf   { background: #fff0ee; }
.stat-child__icon--excel { background: #edfdf4; }
.stat-child__icon--word  { background: #edf3ff; }
.stat-child__icon--ppt   { background: #fff6eb; }
.stat-child__icon--zip   { background: #f4f0ff; }
.stat-child__icon--link  { background: var(--bma-soft); }

.stat-child__label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.stat-child__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bma);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .12s;
}
.stat-child__btn svg { width:14px; height:14px; fill:currentColor; }
.stat-child__btn:hover { background: var(--bma-dark); }

/* Smooth height animation */
.stat-children-wrap {
  overflow: hidden;
  transition: height .25s cubic-bezier(.4,0,.2,1);
}

@media (max-width: 600px) {
  .stat-children { padding-left: 16px; }
  .stat-child { flex-wrap: wrap; }
  .stat-child__btn { width: 100%; justify-content: center; }
}
