/* =========================================================
   BMHA Subpage Template v1
   ใช้กับหน้ารองของเว็บ เช่น About / Research / Plan / News Detail
   ไฟล์นี้แยกจาก bmha-template.css เพื่อปรับ subpage ได้ง่ายและไม่กระทบหน้าแรก
   ========================================================= */

body.bmha-subpage-shell .bmha-main {
  background:
    radial-gradient(circle at 8% 0%, rgba(214, 184, 74, .08), transparent 26%),
    radial-gradient(circle at 92% 16%, rgba(23, 54, 87, .08), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f7fafb 48%, #fffdf8 100%);
}

/* ---------- Subpage Masthead ---------- */
body.bmha-subpage-shell .bmha-subpage-masthead {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 4vw, 52px) 0 clamp(26px, 3vw, 38px);
  background:
    linear-gradient(112deg, rgba(255, 253, 248, .98) 0%, rgba(255, 255, 255, .96) 48%, rgba(237, 243, 246, .92) 100%);
  border-bottom: 1px solid rgba(16, 36, 63, .09);
}

body.bmha-subpage-shell .bmha-subpage-masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary), #7ea67a);
  opacity: .92;
}

body.bmha-subpage-shell .bmha-subpage-bg {
  position: absolute;
  inset: 0;
  opacity: .42;
  background-image:
    linear-gradient(135deg, rgba(16, 36, 63, .045) 25%, transparent 25%),
    linear-gradient(225deg, rgba(214, 184, 74, .06) 25%, transparent 25%);
  background-size: 54px 54px;
  pointer-events: none;
}

body.bmha-subpage-shell .bmha-subpage-masthead-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

body.bmha-subpage-shell .bmha-subpage-copy {
  max-width: 980px;
}

body.bmha-subpage-shell .bmha-subpage-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bmha-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bmha-subpage-shell .bmha-subpage-kicker::before {
  content: "";
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: var(--bmha-accent);
}

body.bmha-subpage-shell .bmha-subpage-title {
  margin: 12px 0 10px;
  color: var(--bmha-primary-2);
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.015em;
}

body.bmha-subpage-shell .bmha-subpage-lead {
  max-width: 850px;
  margin: 0;
  color: #36465c;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.75;
  font-weight: 300;
}

body.bmha-subpage-shell .bmha-subpage-breadcrumb {
  display: inline-flex;
  margin-top: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: 0 8px 22px rgba(16, 36, 63, .04);
}

body.bmha-subpage-shell .bmha-subpage-breadcrumb .breadcrumb {
  align-items: center;
  font-size: 13px;
}

body.bmha-subpage-shell .bmha-subpage-breadcrumb .breadcrumb-item,
body.bmha-subpage-shell .bmha-subpage-breadcrumb .breadcrumb-item a {
  color: #526579;
}

body.bmha-subpage-shell .bmha-subpage-breadcrumb .breadcrumb-item a:hover {
  color: var(--bmha-primary-2);
}

body.bmha-subpage-shell .bmha-subpage-breadcrumb .breadcrumb-item.active {
  color: var(--bmha-primary-2);
  font-weight: 600;
}

/* ---------- Content Shell ---------- */
body.bmha-subpage-shell .bmha-subpage-content {
  padding: clamp(28px, 3.5vw, 44px) 0 clamp(58px, 6vw, 86px);
}

body.bmha-subpage-shell .bmha-document-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(16, 36, 63, .10);
  box-shadow: 0 20px 56px rgba(16, 36, 63, .10);
  backdrop-filter: blur(12px);
}

body.bmha-subpage-shell .bmha-document-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary), #7ea67a);
}

body.bmha-subpage-shell .bmha-document-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 30px 32px 22px;
}

body.bmha-subpage-shell .bmha-document-title-group {
  min-width: 0;
}

body.bmha-subpage-shell .bmha-document-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7a671f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bmha-subpage-shell .bmha-document-label::before {
  content: "";
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: var(--bmha-accent);
}

body.bmha-subpage-shell .bmha-document-card-head h2 {
  margin: 10px 0 7px;
  color: var(--bmha-primary-2);
  font-size: clamp(26px, 2.7vw, 40px);
  line-height: 1.22;
  font-weight: 700;
}

body.bmha-subpage-shell .bmha-document-card-head p {
  margin: 0;
  max-width: 760px;
  color: var(--bmha-muted);
  font-size: 15px;
  line-height: 1.72;
}

body.bmha-subpage-shell .bmha-document-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--bmha-primary-2);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(16, 36, 63, .18);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

body.bmha-subpage-shell .bmha-document-action:hover {
  transform: translateY(-1px);
  background: var(--bmha-primary);
  box-shadow: 0 16px 32px rgba(16, 36, 63, .22);
}

body.bmha-subpage-shell .bmha-org-chart-stage {
  padding: 0 32px 32px;
}

body.bmha-subpage-shell .bmha-org-chart-frame {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 184, 74, .09), transparent 26%),
    linear-gradient(180deg, #f8fbfc, #edf3f6);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .62);
  padding: 14px;
}

body.bmha-subpage-shell .bmha-org-chart-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 36, 63, .08);
}

@media (max-width: 991.98px) {
  body.bmha-subpage-shell .bmha-document-card-head {
    display: block;
    padding: 26px 24px 18px;
  }

  body.bmha-subpage-shell .bmha-document-action {
    margin-top: 16px;
  }

  body.bmha-subpage-shell .bmha-org-chart-stage {
    padding: 0 24px 26px;
  }
}

@media (max-width: 767.98px) {
  body.bmha-subpage-shell .bmha-subpage-masthead {
    padding: 28px 0 22px;
  }

  body.bmha-subpage-shell .bmha-subpage-title {
    font-size: 34px;
  }

  body.bmha-subpage-shell .bmha-subpage-breadcrumb {
    width: 100%;
    border-radius: 18px;
  }

  body.bmha-subpage-shell .bmha-document-card {
    border-radius: 24px;
  }

  body.bmha-subpage-shell .bmha-document-card-head {
    padding: 24px 18px 16px;
  }

  body.bmha-subpage-shell .bmha-document-action {
    width: 100%;
  }

  body.bmha-subpage-shell .bmha-org-chart-stage {
    padding: 0 18px 20px;
  }

  body.bmha-subpage-shell .bmha-org-chart-frame {
    overflow-x: auto;
    padding: 10px;
    border-radius: 18px;
  }

  body.bmha-subpage-shell .bmha-org-chart-frame img {
    min-width: 760px;
    border-radius: 14px;
  }
}

/* =========================================================
   BMHA About Page Components
   รวม style ของ About/about2-6 ไว้ใน bmha-subpage.css แล้ว
   ไม่ต้องสร้าง bmha-about.css แยก
   ========================================================= */

body.bmha-about-page .bmha-subpage-content {
  padding: 30px 0 58px;
}

body.bmha-about-page .bmha-document-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(16, 36, 63, .10);
  border-top: 6px solid var(--bmha-accent);
  border-radius: 28px;
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: 0 18px 48px rgba(16, 36, 63, .09);
}

body.bmha-about-page .bmha-document-card::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 184, 74, .16), transparent 68%);
  pointer-events: none;
}

body.bmha-about-page .bmha-document-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

body.bmha-about-page .bmha-document-title-group {
  min-width: 0;
}

body.bmha-about-page .bmha-document-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bmha-leaf);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bmha-about-page .bmha-document-label::before {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--bmha-accent);
}

body.bmha-about-page .bmha-document-title-group h2 {
  margin: 9px 0 7px;
  color: var(--bmha-primary-2);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
  font-weight: 800;
}

body.bmha-about-page .bmha-document-title-group p {
  margin: 0;
  max-width: 880px;
  color: var(--bmha-muted);
  font-size: 15px;
  line-height: 1.7;
}

body.bmha-about-page .bmha-document-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--bmha-primary);
  box-shadow: 0 12px 26px rgba(16, 36, 63, .16);
  font-weight: 700;
  white-space: nowrap;
}

body.bmha-about-page .bmha-document-action:hover {
  background: var(--bmha-primary-2);
  transform: translateY(-1px);
}

/* Image content pages */
body.bmha-about-page .bmha-about-image-stage {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(16, 36, 63, .09);
  background:
    radial-gradient(circle at 8% 12%, rgba(214, 184, 74, .09), transparent 28%),
    linear-gradient(180deg, #f9fcfd, #eef4f7);
  padding: clamp(10px, 1.4vw, 16px);
}

body.bmha-about-page .bmha-about-image-frame {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 36, 63, .08);
}

body.bmha-about-page .bmha-about-image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Document rows */
body.bmha-about-page .bmha-document-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

body.bmha-about-page .bmha-document-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: linear-gradient(180deg, #fff, #fbfcf8);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-about-page .bmha-document-row:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 14px 34px rgba(16, 36, 63, .09);
}

body.bmha-about-page .bmha-document-row-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 20px;
}

body.bmha-about-page .bmha-document-row-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body.bmha-about-page .bmha-document-row-body strong {
  color: var(--bmha-ink);
  font-size: 17px;
  line-height: 1.45;
}

body.bmha-about-page .bmha-document-row-body small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bmha-muted);
  font-size: 13px;
}

body.bmha-about-page .bmha-document-row-action {
  color: var(--bmha-primary);
  font-weight: 700;
  font-size: 14px;
}

/* About menu cards */
body.bmha-about-page .bmha-about-menu-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.bmha-about-page .bmha-about-year-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.bmha-about-page .bmha-about-menu-card {
  position: relative;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: linear-gradient(180deg, #fff, #fbfcf8);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-about-page .bmha-about-menu-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
  opacity: .78;
}

body.bmha-about-page .bmha-about-menu-card:hover {
  transform: translateY(-5px);
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 18px 40px rgba(16, 36, 63, .11);
}

body.bmha-about-page .bmha-about-menu-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 22px;
}

body.bmha-about-page .bmha-about-menu-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.bmha-about-page .bmha-about-menu-body strong {
  color: var(--bmha-primary-2);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
}

body.bmha-about-page .bmha-about-menu-body small {
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.6;
}

body.bmha-about-page .bmha-about-menu-arrow {
  margin-top: auto;
  color: var(--bmha-accent);
}

/* ITA cards */
body.bmha-about-page .bmha-ita-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bmha-mint);
  border: 1px solid rgba(16, 36, 63, .08);
  width: fit-content;
  margin-bottom: 22px;
}

body.bmha-about-page .bmha-ita-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--bmha-primary-2);
  font-weight: 700;
  padding: 10px 16px;
}

body.bmha-about-page .bmha-ita-tabs .nav-link.active {
  background: var(--bmha-primary);
  color: #fff;
}

body.bmha-about-page .bmha-ita-tab-content {
  position: relative;
  z-index: 1;
}

body.bmha-about-page .bmha-ita-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

body.bmha-about-page .bmha-ita-card {
  min-height: 158px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: linear-gradient(180deg, #fff, #fbfcf8);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-about-page .bmha-ita-card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 16px 36px rgba(16, 36, 63, .10);
}

body.bmha-about-page .bmha-ita-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 19px;
}

body.bmha-about-page .bmha-ita-body {
  display: grid;
  gap: 6px;
}

body.bmha-about-page .bmha-ita-body strong {
  color: var(--bmha-primary-2);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

body.bmha-about-page .bmha-ita-body small {
  color: var(--bmha-muted);
  font-size: 12px;
  font-weight: 700;
}

/* Evidence sections */
body.bmha-about-page .bmha-evidence-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

body.bmha-about-page .bmha-evidence-section {
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: linear-gradient(180deg, #fff, #fbfcf8);
  overflow: hidden;
}

body.bmha-about-page .bmha-evidence-heading {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(16, 36, 63, .08);
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 184, 74, .12), transparent 26%),
    #ffffff;
}

body.bmha-about-page .bmha-evidence-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--bmha-primary);
  color: #fff;
  font-weight: 800;
}

body.bmha-about-page .bmha-evidence-title {
  margin: 0;
  color: var(--bmha-primary-2);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
  font-weight: 800;
}

body.bmha-about-page .bmha-evidence-title a {
  color: var(--bmha-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.bmha-about-page .bmha-evidence-body {
  padding: 16px 20px 20px;
}

body.bmha-about-page .bmha-evidence-body .table-responsive {
  margin: 0;
}

body.bmha-about-page .bmha-evidence-body table {
  margin: 0;
  vertical-align: middle;
}

body.bmha-about-page .bmha-evidence-body tbody tr {
  border-color: rgba(16, 36, 63, .08);
}

body.bmha-about-page .bmha-evidence-body td {
  padding: 12px 10px;
  color: var(--bmha-text);
  line-height: 1.55;
}

body.bmha-about-page .bmha-evidence-body a {
  color: var(--bmha-primary-2);
  font-weight: 600;
}

body.bmha-about-page .bmha-evidence-body a:hover {
  color: var(--bmha-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1199.98px) {
  body.bmha-about-page .bmha-about-menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.bmha-about-page .bmha-about-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bmha-about-page .bmha-ita-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.bmha-about-page .bmha-subpage-content {
    padding: 22px 0 42px;
  }

  body.bmha-about-page .bmha-document-card {
    padding: 18px;
    border-radius: 22px;
  }

  body.bmha-about-page .bmha-document-card-head {
    display: grid;
    gap: 14px;
  }

  body.bmha-about-page .bmha-document-action {
    width: fit-content;
  }

  body.bmha-about-page .bmha-document-title-group h2 {
    font-size: 25px;
  }

  body.bmha-about-page .bmha-about-menu-grid,
  body.bmha-about-page .bmha-about-year-grid,
  body.bmha-about-page .bmha-ita-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-about-page .bmha-about-menu-card {
    min-height: auto;
  }

  body.bmha-about-page .bmha-document-row {
    grid-template-columns: 46px 1fr;
  }

  body.bmha-about-page .bmha-document-row-action {
    grid-column: 2;
  }

  body.bmha-about-page .bmha-ita-tabs {
    width: 100%;
    border-radius: 18px;
    flex-direction: column;
  }

  body.bmha-about-page .bmha-ita-tabs .nav-link {
    justify-content: center;
  }

  body.bmha-about-page .bmha-evidence-heading {
    grid-template-columns: 40px 1fr;
    padding: 16px;
  }

  body.bmha-about-page .bmha-evidence-number {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  body.bmha-about-page .bmha-evidence-body {
    padding: 14px 16px 16px;
  }
}


/* Governance subpages: long document row tuning */
body.bmha-governance-subpage .bmha-document-row-body strong {
  overflow-wrap: anywhere;
}

body.bmha-governance-subpage .bmha-document-row-action {
  white-space: nowrap;
}


/* =========================================================
   BMHA Academic Pages
   ใช้กับ Base_Academic/* โดยรวมใน bmha-subpage.css ไฟล์เดียว
   ========================================================= */

body.bmha-academic-page .bmha-subpage-content {
  padding: 30px 0 58px;
}

body.bmha-academic-page .bmha-document-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .93);
  border: 1px solid rgba(16, 36, 63, .10);
  border-top: 6px solid var(--bmha-accent);
  border-radius: 28px;
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: 0 18px 48px rgba(16, 36, 63, .09);
}

body.bmha-academic-page .bmha-document-card::before {
  content: "";
  position: absolute;
  right: -96px;
  top: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 184, 74, .15), transparent 68%);
  pointer-events: none;
}

body.bmha-academic-page .bmha-document-card-head,
body.bmha-academic-page .bmha-academic-menu-grid,
body.bmha-academic-page .bmha-document-list,
body.bmha-academic-page .bmha-academic-video-grid,
body.bmha-academic-page .bmha-academic-table-wrap {
  position: relative;
  z-index: 1;
}

body.bmha-academic-page .bmha-document-card-head {
  margin-bottom: 22px;
}

body.bmha-academic-page .bmha-document-title-group h2 {
  margin: 9px 0 7px;
  color: var(--bmha-primary-2);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.22;
  font-weight: 800;
}

body.bmha-academic-page .bmha-document-title-group p {
  margin: 0;
  max-width: 880px;
  color: var(--bmha-muted);
  font-size: 15px;
  line-height: 1.7;
}

body.bmha-academic-page .bmha-academic-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.bmha-academic-page .bmha-academic-menu-card {
  position: relative;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: linear-gradient(180deg, #fff, #fbfcf8);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-academic-page .bmha-academic-menu-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
  opacity: .82;
}

body.bmha-academic-page .bmha-academic-menu-card:hover {
  transform: translateY(-5px);
  border-color: rgba(214, 184, 74, .58);
  box-shadow: 0 18px 40px rgba(16, 36, 63, .11);
}

body.bmha-academic-page .bmha-academic-menu-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 23px;
}

body.bmha-academic-page .bmha-academic-menu-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.bmha-academic-page .bmha-academic-menu-body strong {
  color: var(--bmha-primary-2);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
}

body.bmha-academic-page .bmha-academic-menu-body small {
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.6;
}

body.bmha-academic-page .bmha-academic-menu-arrow {
  margin-top: auto;
  color: var(--bmha-accent);
}

body.bmha-academic-page .bmha-academic-video-section {
  padding-top: 0;
}

body.bmha-academic-page .bmha-academic-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.bmha-academic-page .bmha-academic-video-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: linear-gradient(180deg, #fff, #fbfcf8);
  box-shadow: 0 12px 30px rgba(16, 36, 63, .07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-academic-page .bmha-academic-video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 18px 40px rgba(16, 36, 63, .11);
}

body.bmha-academic-page .bmha-academic-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

body.bmha-academic-page .bmha-academic-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body.bmha-academic-page .bmha-academic-video-body {
  padding: 16px 18px 18px;
}

body.bmha-academic-page .bmha-academic-video-body h3 {
  margin: 0;
  color: var(--bmha-primary-2);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 700;
}

body.bmha-academic-page .bmha-academic-table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: #fff;
}

body.bmha-academic-page .bmha-academic-table {
  min-width: 960px;
  margin: 0;
  vertical-align: middle;
}

body.bmha-academic-page .bmha-academic-table thead th {
  padding: 14px 16px;
  color: var(--bmha-primary-2);
  background: var(--bmha-mint);
  border-bottom: 1px solid rgba(16, 36, 63, .10);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

body.bmha-academic-page .bmha-academic-table tbody td {
  padding: 13px 16px;
  color: var(--bmha-text);
  border-color: rgba(16, 36, 63, .07);
  font-size: 14px;
  line-height: 1.55;
}

body.bmha-academic-page .bmha-table-link {
  color: var(--bmha-primary-2);
  font-weight: 700;
}

body.bmha-academic-page .bmha-table-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bmha-primary);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body.bmha-academic-page .bmha-table-download:hover {
  background: var(--bmha-primary-2);
}

@media (max-width: 1199.98px) {
  body.bmha-academic-page .bmha-academic-menu-grid,
  body.bmha-academic-page .bmha-academic-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.bmha-academic-page .bmha-subpage-content {
    padding: 22px 0 42px;
  }

  body.bmha-academic-page .bmha-document-card {
    padding: 18px;
    border-radius: 22px;
  }

  body.bmha-academic-page .bmha-academic-menu-grid,
  body.bmha-academic-page .bmha-academic-video-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-academic-page .bmha-academic-menu-card {
    min-height: auto;
  }

  body.bmha-academic-page .bmha-document-row {
    grid-template-columns: 46px 1fr;
  }

  body.bmha-academic-page .bmha-document-row-action {
    grid-column: 2;
  }
}

/* =========================================================
   BMHA Academic Home Tiles - Fix Step 8
   แก้ Base_Academic/Base_home.php ให้ card เป็นลิงก์ทั้งใบ
   และกัน style icon เก่าหรือ CSS อื่นทำให้ icon ใหญ่เกิน
   ========================================================= */

body.bmha-academic-home-page .bmha-academic-home-card {
  max-width: 1280px;
  margin-inline: auto;
}

body.bmha-academic-home-page .bmha-academic-tile-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.bmha-academic-home-page .bmha-academic-tile {
  position: relative;
  min-height: 210px;
  display: grid !important;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  color: var(--bmha-text) !important;
  text-decoration: none !important;
  background: linear-gradient(180deg, #fff 0%, #fbfcf8 100%);
  border: 1px solid rgba(16, 36, 63, .10);
  box-shadow: 0 12px 30px rgba(16, 36, 63, .06);
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-academic-home-page .bmha-academic-tile::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
  opacity: .78;
}

body.bmha-academic-home-page .bmha-academic-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 184, 74, .62);
  box-shadow: 0 18px 42px rgba(16, 36, 63, .12);
}

body.bmha-academic-home-page .bmha-academic-tile-icon {
  width: 56px !important;
  height: 56px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 18px;
  color: var(--bmha-primary-2) !important;
  background: linear-gradient(135deg, #edf3f6, #fffdf8);
  border: 1px solid rgba(16, 36, 63, .08);
}

body.bmha-academic-home-page .bmha-academic-tile-icon i {
  font-size: 23px !important;
  line-height: 1 !important;
  color: inherit !important;
}

body.bmha-academic-home-page .bmha-academic-tile-content {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

body.bmha-academic-home-page .bmha-academic-tile-content strong {
  color: var(--bmha-primary-2);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 800;
}

body.bmha-academic-home-page .bmha-academic-tile-content small {
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.58;
}

body.bmha-academic-home-page .bmha-academic-tile-arrow {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--bmha-primary-2);
  background: rgba(214, 184, 74, .16);
  transition: transform 180ms ease, background 180ms ease;
}

body.bmha-academic-home-page .bmha-academic-tile:hover .bmha-academic-tile-arrow {
  transform: translateX(3px);
  background: rgba(214, 184, 74, .26);
}

body.bmha-academic-home-page .bmha-academic-tile-arrow i {
  font-size: 13px !important;
  line-height: 1 !important;
}

@media (max-width: 1199.98px) {
  body.bmha-academic-home-page .bmha-academic-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.bmha-academic-home-page .bmha-academic-tile-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.bmha-academic-home-page .bmha-academic-tile {
    min-height: auto;
    padding: 18px;
  }
}

/* =========================================================
   BMHA Academic Document Rows - Fix Step 9
   แก้หน้ากลุ่ม Base_Academic/sub_academic-* ให้รายการเอกสารเรียงเป็นแถว
   เดิม CSS .bmha-document-row ผูกกับ body.bmha-about-page จึงไม่ทำงานกับ bmha-academic-page
   ========================================================= */

body.bmha-academic-page .bmha-document-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

body.bmha-academic-page .bmha-document-row {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: linear-gradient(180deg, #fff 0%, #fbfcf8 100%);
  color: var(--bmha-text) !important;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.bmha-academic-page .bmha-document-row:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 184, 74, .55);
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 36, 63, .09);
}

body.bmha-academic-page .bmha-document-row-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 20px;
}

body.bmha-academic-page .bmha-document-row-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body.bmha-academic-page .bmha-document-row-body strong {
  color: var(--bmha-ink);
  font-size: 16px;
  line-height: 1.48;
  font-weight: 750;
  overflow-wrap: anywhere;
}

body.bmha-academic-page .bmha-document-row-body small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bmha-muted);
  font-size: 13px;
  line-height: 1.4;
}

body.bmha-academic-page .bmha-document-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--bmha-primary);
  font-size: 14px;
  font-weight: 750;
}

@media (max-width: 767.98px) {
  body.bmha-academic-page .bmha-document-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  body.bmha-academic-page .bmha-document-row-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  body.bmha-academic-page .bmha-document-row-action {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* =========================================================
   BMHA Subpage Tools: Latest Badge + Static List Pagination
   ใช้ร่วมกับ js/bmha-subpage.js
   ========================================================= */

.bmha-latest-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(214, 184, 74, .16);
  border: 1px solid rgba(214, 184, 74, .38);
  color: #8a6a07;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}

.bmha-latest-badge i {
  font-size: 10px;
}

.bmha-list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: 0 10px 26px rgba(16, 36, 63, .045);
}

.bmha-list-pager-bottom {
  margin: 16px 0 0;
}

.bmha-list-pager-info {
  color: var(--bmha-muted);
  font-size: 14px;
  font-weight: 500;
}

.bmha-list-pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bmha-list-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--bmha-primary), var(--bmha-primary-2));
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.bmha-list-pager-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16, 36, 63, .12);
}

.bmha-list-pager-btn:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.bmha-list-pager-page {
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .bmha-latest-badge {
    margin-left: 0;
    margin-top: 6px;
  }

  .bmha-list-pager {
    align-items: flex-start;
    flex-direction: column;
  }

  .bmha-list-pager-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* =========================================================
   BMHA Subpage Tools v2: Search + Auto Pagination
   ใช้ร่วมกับ js/bmha-subpage.js
   ========================================================= */

.bmha-list-tools {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: 0 12px 30px rgba(16, 36, 63, .055);
}

.bmha-list-search-block {
  display: grid;
  gap: 8px;
}

.bmha-list-search-label {
  margin: 0;
  color: var(--bmha-primary-2);
  font-size: 14px;
  font-weight: 750;
}

.bmha-list-search-field {
  position: relative;
}

.bmha-list-search-field i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bmha-muted);
  font-size: 14px;
  pointer-events: none;
}

.bmha-list-search-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 40px;
  border-radius: 999px;
  border: 1px solid rgba(16, 36, 63, .12);
  background: #fff;
  color: var(--bmha-ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.bmha-list-search-field input:focus {
  border-color: rgba(14, 143, 128, .45);
  box-shadow: 0 0 0 4px rgba(14, 143, 128, .10);
}

.bmha-list-tools-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--bmha-muted);
  font-size: 13px;
}

.bmha-list-tools .bmha-list-pager {
  margin: 0;
  padding: 10px 12px;
  background: rgba(244, 249, 248, .82);
  box-shadow: none;
}

.bmha-list-pager[hidden],
.bmha-list-empty[hidden],
.bmha-document-row[hidden],
.bmha-academic-video-card[hidden],
.bmha-academic-table tbody tr[hidden] {
  display: none !important;
}

.bmha-list-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 16px 0;
  padding: 24px 18px;
  border-radius: 20px;
  border: 1px dashed rgba(16, 36, 63, .18);
  background: rgba(255, 255, 255, .75);
  color: var(--bmha-muted);
  text-align: center;
}

.bmha-list-empty i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
}

.bmha-list-empty strong {
  color: var(--bmha-primary-2);
  font-size: 16px;
}

.bmha-list-empty small {
  color: var(--bmha-muted);
  font-size: 13px;
}

body.bmha-academic-page .bmha-academic-table-wrap {
  position: relative;
}

body.bmha-academic-page .bmha-academic-table {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .bmha-list-tools {
    grid-template-columns: minmax(280px, 1fr) auto;
    align-items: end;
  }

  .bmha-list-tools .bmha-list-pager {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .bmha-list-tools {
    padding: 12px;
    border-radius: 18px;
  }

  .bmha-list-search-field input {
    border-radius: 18px;
  }
}


/* =========================================================
   BMHA Static Service/Manual/Research/International Pages
   ใช้กับหน้ารองแบบ static ที่ไม่ใช่ About/Base_Academic
   - scoped ด้วย body.bmha-static-page เพื่อไม่กระทบหน้าเดิม
   - ใช้ร่วมกับ js/bmha-subpage.js สำหรับ search/latest/pagination
   ========================================================= */

body.bmha-static-page .bmha-subpage-content {
  padding: 32px 0 58px;
}

body.bmha-static-page .bmha-document-card {
  position: relative;
  overflow: hidden;
  border-top: 5px solid var(--bmha-accent);
  padding: clamp(20px, 2.4vw, 30px);
}

body.bmha-static-page .bmha-document-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 8%, rgba(19, 155, 143, .08), transparent 26%),
    radial-gradient(circle at 8% 92%, rgba(214, 184, 74, .10), transparent 30%);
}

body.bmha-static-page .bmha-document-card-head,
body.bmha-static-page .bmha-document-list,
body.bmha-static-page .bmha-static-tile-grid {
  position: relative;
  z-index: 1;
}

body.bmha-static-page .bmha-document-card-head {
  margin-bottom: 20px;
}

body.bmha-static-page .bmha-document-title-group h2 {
  margin: 9px 0 7px;
  color: var(--bmha-primary-2);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.22;
  font-weight: 800;
}

body.bmha-static-page .bmha-document-title-group p {
  margin: 0;
  max-width: 880px;
  color: var(--bmha-muted);
  font-size: 15px;
  line-height: 1.7;
}

body.bmha-static-page .bmha-static-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.bmha-static-page .bmha-static-tile {
  position: relative;
  min-height: 218px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .10);
  background: linear-gradient(180deg, #fff 0%, #fbfcf8 100%);
  color: var(--bmha-text) !important;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(16, 36, 63, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.bmha-static-page .bmha-static-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 18px 42px rgba(16, 36, 63, .10);
}

body.bmha-static-page .bmha-static-tile-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 26px;
}

body.bmha-static-page .bmha-static-tile-icon i {
  font-size: 26px !important;
  line-height: 1;
}

body.bmha-static-page .bmha-static-tile-body {
  display: grid;
  align-content: start;
  gap: 8px;
}

body.bmha-static-page .bmha-static-tile-body strong {
  color: var(--bmha-primary-2);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
}

body.bmha-static-page .bmha-static-tile-body small {
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.65;
}

body.bmha-static-page .bmha-static-tile-arrow {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--bmha-accent);
  background: rgba(214, 184, 74, .12);
  transition: transform .18s ease, background .18s ease;
}

body.bmha-static-page .bmha-static-tile:hover .bmha-static-tile-arrow {
  transform: translateX(4px);
  background: rgba(214, 184, 74, .20);
}

body.bmha-static-page .bmha-document-list {
  display: grid;
  gap: 12px;
}

body.bmha-static-page .bmha-document-row {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: linear-gradient(180deg, #fff 0%, #fbfcf8 100%);
  color: var(--bmha-text) !important;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.bmha-static-page .bmha-document-row:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 184, 74, .55);
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 36, 63, .09);
}

body.bmha-static-page .bmha-document-row-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 20px;
}

body.bmha-static-page .bmha-document-row-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body.bmha-static-page .bmha-document-row-body strong {
  color: var(--bmha-ink);
  font-size: 16px;
  line-height: 1.48;
  font-weight: 750;
  overflow-wrap: anywhere;
}

body.bmha-static-page .bmha-document-row-body small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bmha-muted);
  font-size: 13px;
  line-height: 1.4;
}

body.bmha-static-page .bmha-document-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--bmha-primary);
  font-size: 14px;
  font-weight: 750;
}

body.bmha-static-page .bmha-static-section + .bmha-static-section {
  padding-top: 0;
}

@media (max-width: 991.98px) {
  body.bmha-static-page .bmha-static-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.bmha-static-page .bmha-subpage-content {
    padding: 24px 0 44px;
  }

  body.bmha-static-page .bmha-static-tile-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-static-page .bmha-document-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  body.bmha-static-page .bmha-document-row-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  body.bmha-static-page .bmha-document-row-action {
    grid-column: 2;
    justify-content: flex-start;
  }
}


/* =========================================================
   BMHA Dynamic Root Pages
   ใช้กับหน้าที่มี logic/DB เช่น ข่าว แผน Infographic Contact
   - Scoped ด้วย body.bmha-dynamic-page เพื่อไม่กระทบ About/Base_Academic เดิม
   - ใช้ร่วมกับ js/bmha-subpage.js สำหรับ table search/pagination
   ========================================================= */

body.bmha-dynamic-page .bmha-subpage-content {
  padding: 34px 0 60px;
}

body.bmha-dynamic-page .bmha-data-card,
body.bmha-dynamic-page .bmha-detail-card,
body.bmha-dynamic-page .bmha-contact-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(16, 36, 63, .10);
  border-top: 5px solid var(--bmha-accent);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 46px rgba(16, 36, 63, .08);
}

body.bmha-dynamic-page .bmha-data-card,
body.bmha-dynamic-page .bmha-detail-card {
  padding: 26px;
}

body.bmha-dynamic-page .bmha-data-card::before,
body.bmha-dynamic-page .bmha-detail-card::before,
body.bmha-dynamic-page .bmha-contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 8%, rgba(19, 155, 143, .08), transparent 26%),
    radial-gradient(circle at 8% 92%, rgba(214, 184, 74, .10), transparent 30%);
}

body.bmha-dynamic-page .bmha-data-card > *,
body.bmha-dynamic-page .bmha-detail-card > *,
body.bmha-dynamic-page .bmha-contact-card > * {
  position: relative;
  z-index: 1;
}

body.bmha-dynamic-page .bmha-data-card-head,
body.bmha-dynamic-page .bmha-detail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

body.bmha-dynamic-page .bmha-data-card-kicker,
body.bmha-dynamic-page .bmha-detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bmha-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bmha-dynamic-page .bmha-data-card-kicker::before,
body.bmha-dynamic-page .bmha-detail-kicker::before {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--bmha-accent);
}

body.bmha-dynamic-page .bmha-data-card h2,
body.bmha-dynamic-page .bmha-detail-title {
  margin: 10px 0 8px;
  color: var(--bmha-primary-2);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
  font-weight: 800;
}

body.bmha-dynamic-page .bmha-data-card p,
body.bmha-dynamic-page .bmha-detail-lead {
  margin: 0;
  color: var(--bmha-muted);
  font-size: 15px;
  line-height: 1.75;
}

body.bmha-dynamic-page .bmha-table-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: #fff;
}

body.bmha-dynamic-page .bmha-data-table {
  margin-bottom: 0;
  vertical-align: middle;
}

body.bmha-dynamic-page .bmha-data-table thead th {
  border: 0;
  background: linear-gradient(180deg, #f5faf9, #eef7f5);
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

body.bmha-dynamic-page .bmha-data-table td {
  color: var(--bmha-text);
  font-size: 14px;
  line-height: 1.55;
}

body.bmha-dynamic-page .bmha-data-table a {
  color: var(--bmha-primary-2);
  font-weight: 750;
  text-decoration: none;
}

body.bmha-dynamic-page .bmha-data-table a:hover {
  color: var(--bmha-primary);
  text-decoration: underline;
}

body.bmha-dynamic-page .bmha-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

body.bmha-dynamic-page .bmha-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(19, 155, 143, .08);
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
}

body.bmha-dynamic-page .bmha-detail-body {
  color: var(--bmha-text);
  font-size: 16px;
  line-height: 1.85;
}

body.bmha-dynamic-page .bmha-detail-body img,
body.bmha-dynamic-page .bmha-detail-body iframe {
  max-width: 100%;
}

body.bmha-dynamic-page .bmha-detail-files {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

body.bmha-dynamic-page .bmha-detail-file-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: #fff;
  color: var(--bmha-text) !important;
  text-decoration: none !important;
}

body.bmha-dynamic-page .bmha-detail-file-link:hover {
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 10px 26px rgba(16, 36, 63, .08);
}

body.bmha-dynamic-page .bmha-detail-file-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
}

body.bmha-dynamic-page .bmha-detail-file-text {
  min-width: 0;
  color: var(--bmha-ink);
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

body.bmha-dynamic-page .bmha-detail-file-action {
  color: var(--bmha-primary);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

body.bmha-dynamic-page .bmha-media-panel {
  border-radius: 24px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: #fff;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(16, 36, 63, .08);
}

body.bmha-dynamic-page .bmha-media-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

body.bmha-dynamic-page .bmha-news-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

body.bmha-dynamic-page .bmha-news-thumb-btn,
body.bmha-dynamic-page .bmha-news-main-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.bmha-dynamic-page .bmha-news-thumb-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

body.bmha-dynamic-page .bmha-news-modal-shell {
  background: rgba(8, 15, 26, .96);
  border-radius: 18px;
  overflow: hidden;
}

body.bmha-dynamic-page .bmha-news-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 14px 0;
}

body.bmha-dynamic-page .bmha-news-carousel-area {
  padding: 0 16px 16px;
}

body.bmha-dynamic-page .bmha-news-carousel-item {
  min-height: 78vh;
}

body.bmha-dynamic-page .bmha-news-carousel-image {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
}

body.bmha-dynamic-page .bmha-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.bmha-dynamic-page .bmha-related-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(16, 36, 63, .10);
  background: #fff;
  color: var(--bmha-text) !important;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(16, 36, 63, .055);
}

body.bmha-dynamic-page .bmha-related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

body.bmha-dynamic-page .bmha-related-card strong {
  display: block;
  padding: 14px;
  color: var(--bmha-primary-2);
  font-size: 15px;
  line-height: 1.55;
}

body.bmha-dynamic-page .bmha-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 22px;
}

body.bmha-dynamic-page .bmha-contact-card {
  padding: 24px;
}

body.bmha-dynamic-page .bmha-contact-form .form-control {
  border: 1px solid rgba(16, 36, 63, .14);
  border-radius: 14px;
  padding: 13px 15px;
  background: #fff;
}

body.bmha-dynamic-page .bmha-contact-form .form-control:focus {
  border-color: rgba(19, 155, 143, .55);
  box-shadow: 0 0 0 .22rem rgba(19, 155, 143, .12);
}

body.bmha-dynamic-page .bmha-contact-info-list {
  display: grid;
  gap: 12px;
}

body.bmha-dynamic-page .bmha-contact-info-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 36, 63, .08);
  background: #fff;
}

body.bmha-dynamic-page .bmha-contact-info-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
}

body.bmha-dynamic-page .bmha-contact-map {
  width: 100%;
  min-height: 290px;
  border: 0;
  border-radius: 18px;
}

@media (max-width: 991.98px) {
  body.bmha-dynamic-page .bmha-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bmha-dynamic-page .bmha-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  body.bmha-dynamic-page .bmha-data-card,
  body.bmha-dynamic-page .bmha-detail-card,
  body.bmha-dynamic-page .bmha-contact-card {
    padding: 18px;
    border-radius: 22px;
  }

  body.bmha-dynamic-page .bmha-data-card-head,
  body.bmha-dynamic-page .bmha-detail-card-head {
    display: block;
  }

  body.bmha-dynamic-page .bmha-detail-file-link {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  body.bmha-dynamic-page .bmha-detail-file-action {
    grid-column: 2;
  }

  body.bmha-dynamic-page .bmha-news-thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bmha-dynamic-page .bmha-related-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BMHA News Detail Refinement - Step 19
   แก้ layout หน้า news_reading.php และข่าวที่เกี่ยวข้อง
   Scoped เฉพาะ body.bmha-news-detail-page ไม่กระทบหน้ากลุ่มอื่น
   ========================================================= */

body.bmha-news-detail-page .bmha-news-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: start;
}

body.bmha-news-detail-page .bmha-news-article-card {
  min-width: 0;
}

body.bmha-news-detail-page .bmha-detail-title {
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

body.bmha-news-detail-page .bmha-detail-subtitle {
  color: var(--bmha-primary-2);
  font-size: 19px;
  font-weight: 800;
}

body.bmha-news-detail-page .bmha-detail-body {
  overflow-wrap: anywhere;
}

body.bmha-news-detail-page .bmha-detail-body p:last-child {
  margin-bottom: 0;
}

body.bmha-news-detail-page .bmha-detail-body table {
  width: 100%;
  max-width: 100%;
}

body.bmha-news-detail-page .bmha-detail-body a {
  color: var(--bmha-primary-2);
  font-weight: 700;
}

body.bmha-news-detail-page .bmha-news-media-panel {
  position: sticky;
  top: 96px;
}

body.bmha-news-detail-page .bmha-news-main-image-btn img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #f7faf9;
}

body.bmha-news-detail-page .bmha-news-thumb-btn img {
  background: #f7faf9;
}

body.bmha-news-detail-page .bmha-related-section {
  margin-top: 28px;
}

body.bmha-news-detail-page .bmha-related-news-card {
  padding: 24px;
}

body.bmha-news-detail-page .bmha-related-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body.bmha-news-detail-page .bmha-related-title {
  margin: 8px 0 0;
  color: var(--bmha-primary-2);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.24;
  font-weight: 800;
}

body.bmha-news-detail-page .bmha-related-all-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(19, 155, 143, .10);
  color: var(--bmha-primary-2) !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}

body.bmha-news-detail-page .bmha-related-all-link:hover {
  background: var(--bmha-primary-2);
  color: #fff !important;
}

body.bmha-news-detail-page .bmha-related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.bmha-news-detail-page .bmha-related-list-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(16, 36, 63, .10);
  background: #fff;
  color: var(--bmha-text) !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(16, 36, 63, .055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-news-detail-page .bmha-related-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 184, 74, .55);
  box-shadow: 0 16px 30px rgba(16, 36, 63, .09);
}

body.bmha-news-detail-page .bmha-related-thumb {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #eef7f5;
}

body.bmha-news-detail-page .bmha-related-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

body.bmha-news-detail-page .bmha-related-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

body.bmha-news-detail-page .bmha-related-copy strong {
  color: var(--bmha-primary-2);
  font-size: 15px;
  line-height: 1.48;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.bmha-news-detail-page .bmha-related-copy small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--bmha-muted);
  font-size: 13px;
  font-weight: 600;
}

body.bmha-news-detail-page .bmha-related-empty {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  background: rgba(19, 155, 143, .08);
  color: var(--bmha-muted);
}

body.bmha-news-detail-page .bmha-detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bmha-primary-2);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800;
}

@media (max-width: 1199.98px) {
  body.bmha-news-detail-page .bmha-news-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  }
}

@media (max-width: 991.98px) {
  body.bmha-news-detail-page .bmha-news-detail-layout {
    grid-template-columns: 1fr;
  }

  body.bmha-news-detail-page .bmha-news-media-panel {
    position: relative;
    top: auto;
    order: -1;
  }

  body.bmha-news-detail-page .bmha-related-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  body.bmha-news-detail-page .bmha-related-head {
    display: block;
  }

  body.bmha-news-detail-page .bmha-related-all-link {
    margin-top: 14px;
  }

  body.bmha-news-detail-page .bmha-related-list-item {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 10px;
  }

  body.bmha-news-detail-page .bmha-related-copy strong {
    font-size: 14px;
  }
}


/* =========================================================
   BMHA News Detail Sidebar Layout - Step 20
   ปรับหน้า news_reading.php เป็น layout 9/3: เนื้อหาหลักซ้าย + รูป/ข่าวที่เกี่ยวข้องด้านขวา
   Scoped เฉพาะ body.bmha-news-detail-page ไม่กระทบหน้าอื่น
   ========================================================= */

body.bmha-news-detail-page .bmha-news-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(300px, 3fr);
  gap: 24px;
  align-items: start;
}

body.bmha-news-detail-page .bmha-news-detail-main {
  min-width: 0;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar {
  position: sticky;
  top: 96px;
  min-width: 0;
  display: grid;
  gap: 18px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-news-media-panel {
  position: static;
  top: auto;
  padding: 14px;
  border-radius: 26px;
  border-top: 5px solid rgba(214, 184, 74, .95);
  box-shadow: 0 18px 42px rgba(16, 36, 63, .12);
}

body.bmha-news-detail-page .bmha-news-main-image-btn {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbfc, #eef6f4);
}

body.bmha-news-detail-page .bmha-news-main-image-btn img {
  width: 100%;
  max-height: none;
  min-height: 320px;
  object-fit: contain;
  background: #f7faf9;
  transition: transform 220ms ease;
}

body.bmha-news-detail-page .bmha-news-main-image-btn:hover img {
  transform: scale(1.015);
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-news-thumb-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-news-thumb-btn img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-section {
  margin-top: 0;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-news-card {
  padding: 18px;
  border-radius: 24px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-head {
  display: block;
  margin-bottom: 14px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-title {
  font-size: 24px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-all-link {
  width: 100%;
  margin-top: 12px;
  min-height: 38px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list-item {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(16, 36, 63, .05);
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-thumb {
  border-radius: 12px;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-thumb img {
  aspect-ratio: 1 / 1;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-copy strong {
  font-size: 13.5px;
  line-height: 1.42;
  -webkit-line-clamp: 3;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-copy small {
  font-size: 12px;
}

@media (max-width: 1199.98px) {
  body.bmha-news-detail-page .bmha-news-detail-grid {
    grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
  }

  body.bmha-news-detail-page .bmha-news-main-image-btn img {
    min-height: 280px;
  }
}

@media (max-width: 991.98px) {
  body.bmha-news-detail-page .bmha-news-detail-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-news-detail-page .bmha-news-detail-sidebar {
    position: relative;
    top: auto;
    order: 2;
  }

  body.bmha-news-detail-page .bmha-news-main-image-btn img {
    min-height: 0;
    max-height: 520px;
  }

  body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list {
    grid-template-columns: 1fr;
  }

  body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

/* =========================================================
   BMHA News Detail Inline Media Layout - Step 21
   ปรับให้รูปข่าวอยู่ในกล่องเดียวกับหัวเรื่อง/เนื้อหา
   และคงข่าวที่เกี่ยวข้องไว้ sidebar ขวา พร้อมปุ่มดูทั้งหมดไว้ล่างสุด
   Scoped เฉพาะ body.bmha-news-detail-page ไม่กระทบหน้าอื่น
   ========================================================= */

body.bmha-news-detail-page .bmha-news-detail-grid {
  grid-template-columns: minmax(0, 9fr) minmax(280px, 3fr) !important;
  gap: 24px;
}

body.bmha-news-detail-page .bmha-news-article-card {
  overflow: hidden;
}

body.bmha-news-detail-page .bmha-news-inline-media {
  margin: 22px 0 24px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(16, 36, 63, .08);
  background:
    radial-gradient(circle at 86% 12%, rgba(214, 184, 74, .12), transparent 34%),
    linear-gradient(180deg, #fbfdfc 0%, #f2f8f7 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-main-image-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  padding: 0;
  background: #eef6f4;
  cursor: zoom-in;
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-main-image-btn img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  min-height: 360px;
  object-fit: contain;
  transition: transform 220ms ease, filter 220ms ease;
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-main-image-btn:hover img {
  transform: scale(1.012);
  filter: saturate(1.03);
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #eef6f4;
  cursor: pointer;
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 180ms ease;
}

body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-thumb-btn:hover img {
  transform: scale(1.04);
}

body.bmha-news-detail-page .bmha-news-detail-sidebar {
  align-self: start;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-section {
  margin-top: 0 !important;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-news-card {
  padding: 18px !important;
}

body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-head {
  margin-bottom: 14px !important;
}

body.bmha-news-detail-page .bmha-related-footer-link {
  width: 100%;
  margin-top: 14px !important;
  justify-content: center;
}

@media (max-width: 991.98px) {
  body.bmha-news-detail-page .bmha-news-detail-grid {
    grid-template-columns: 1fr !important;
  }

  body.bmha-news-detail-page .bmha-news-detail-sidebar {
    position: relative;
    top: auto;
  }

  body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-main-image-btn img {
    min-height: 0;
    max-height: 560px;
  }

  body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body.bmha-news-detail-page .bmha-news-inline-media {
    padding: 10px;
    border-radius: 20px;
  }

  body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-main-image-btn {
    border-radius: 16px;
  }

  body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-main-image-btn img {
    max-height: 420px;
  }

  body.bmha-news-detail-page .bmha-news-inline-media .bmha-news-thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.bmha-news-detail-page .bmha-news-detail-sidebar .bmha-related-list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BMHA Reading Detail Pages: Plan + Infographic
   ใช้ class โครงเดียวกับ news_reading แต่ scoped แยกสำหรับหน้ารายละเอียดอื่น
   ========================================================= */
body.bmha-reading-detail-page .bmha-news-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(280px, 3fr);
  gap: 24px;
  align-items: start;
}

body.bmha-reading-detail-page .bmha-news-detail-main,
body.bmha-reading-detail-page .bmha-news-detail-sidebar {
  min-width: 0;
}

body.bmha-reading-detail-page .bmha-news-article-card,
body.bmha-reading-detail-page .bmha-related-news-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(16, 36, 63, .10);
  box-shadow: 0 18px 48px rgba(16, 36, 63, .09);
}

body.bmha-reading-detail-page .bmha-news-article-card {
  padding: clamp(22px, 2.8vw, 34px);
  border-top: 6px solid var(--bmha-accent);
}

body.bmha-reading-detail-page .bmha-detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--bmha-primary-2);
  background: rgba(214, 184, 74, .16);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

body.bmha-reading-detail-page .bmha-detail-title {
  margin: 0 0 12px;
  color: var(--bmha-primary-2);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.28;
  font-weight: 800;
}

body.bmha-reading-detail-page .bmha-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 24px;
  color: var(--bmha-muted);
  font-size: 14px;
}

body.bmha-reading-detail-page .bmha-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

body.bmha-reading-detail-page .bmha-news-media-panel {
  margin: 20px 0 0;
  padding: clamp(12px, 1.6vw, 18px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(214, 184, 74, .14), transparent 28%),
    linear-gradient(180deg, #fff, #f8fbfb);
  border: 1px solid rgba(16, 36, 63, .09);
}

body.bmha-reading-detail-page .news-main-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.bmha-reading-detail-page .news-main-image-btn img {
  display: block;
  width: 100%;
  max-height: 820px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

body.bmha-reading-detail-page .bmha-news-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

body.bmha-reading-detail-page .news-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.bmha-reading-detail-page .news-thumb-btn img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(16, 36, 63, .09);
}

body.bmha-reading-detail-page .bmha-detail-section {
  margin-top: 20px;
}

body.bmha-reading-detail-page .bmha-detail-section h3 {
  margin: 0 0 14px;
  color: var(--bmha-primary-2);
  font-size: 20px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

body.bmha-reading-detail-page .bmha-detail-files {
  display: grid;
  gap: 10px;
}

body.bmha-reading-detail-page .bmha-detail-file-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  color: var(--bmha-text);
  text-decoration: none;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(16, 36, 63, .08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.bmha-reading-detail-page .bmha-detail-file-link:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 184, 74, .45);
  box-shadow: 0 12px 28px rgba(16, 36, 63, .08);
}

body.bmha-reading-detail-page .bmha-detail-file-icon,
body.bmha-reading-detail-page .bmha-related-thumb.is-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: var(--bmha-primary-2);
  background: rgba(214, 184, 74, .16);
}

body.bmha-reading-detail-page .bmha-detail-file-text {
  color: var(--bmha-primary-2);
  font-weight: 700;
  line-height: 1.5;
}

body.bmha-reading-detail-page .bmha-detail-file-action {
  color: var(--bmha-primary);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

body.bmha-reading-detail-page .bmha-detail-empty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 15px;
  border-radius: 16px;
  color: var(--bmha-muted);
  background: rgba(16, 36, 63, .04);
}

body.bmha-reading-detail-page .bmha-related-news-card {
  padding: 16px;
  position: sticky;
  top: 102px;
}

body.bmha-reading-detail-page .bmha-related-head {
  margin-bottom: 14px;
}

body.bmha-reading-detail-page .bmha-related-title {
  display: block;
  color: var(--bmha-primary-2);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
}

body.bmha-reading-detail-page .bmha-related-head small {
  color: var(--bmha-muted);
  font-size: 13px;
}

body.bmha-reading-detail-page .bmha-related-list {
  display: grid;
  gap: 10px;
}

body.bmha-reading-detail-page .bmha-related-list-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  color: var(--bmha-text);
  text-decoration: none;
  background: rgba(248, 251, 250, .88);
  border: 1px solid rgba(16, 36, 63, .06);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.bmha-reading-detail-page .bmha-related-list-item.is-no-thumb {
  grid-template-columns: 46px minmax(0, 1fr);
}

body.bmha-reading-detail-page .bmha-related-list-item:hover {
  transform: translateX(3px);
  background: #fff;
  border-color: rgba(214, 184, 74, .36);
}

body.bmha-reading-detail-page .bmha-related-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 13px;
  background: var(--bmha-mint);
}

body.bmha-reading-detail-page .bmha-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.bmha-reading-detail-page .bmha-related-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body.bmha-reading-detail-page .bmha-related-copy strong {
  color: var(--bmha-primary-2);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.bmha-reading-detail-page .bmha-related-copy small {
  color: var(--bmha-muted);
  font-size: 12px;
  font-weight: 600;
}

body.bmha-reading-detail-page .bmha-related-empty {
  margin: 0;
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.6;
}

body.bmha-reading-detail-page .bmha-related-all-link {
  width: 100%;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--bmha-primary-2);
  background: rgba(214, 184, 74, .16);
  text-decoration: none;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

body.bmha-reading-detail-page .bmha-related-all-link:hover {
  transform: translateY(-2px);
  color: #fff;
  background: var(--bmha-primary);
}

@media (max-width: 1199.98px) {
  body.bmha-reading-detail-page .bmha-news-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.bmha-reading-detail-page .bmha-related-news-card {
    position: static;
  }

  body.bmha-reading-detail-page .bmha-related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.bmha-reading-detail-page .bmha-detail-title {
    font-size: 26px;
  }

  body.bmha-reading-detail-page .bmha-related-list,
  body.bmha-reading-detail-page .bmha-news-thumb-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-reading-detail-page .bmha-detail-file-link {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body.bmha-reading-detail-page .bmha-detail-file-action {
    grid-column: 2;
  }
}

/* =========================================================
   BMHA Reading Detail Refinement: Plan + Infographic
   เฉพาะหน้า plan_reading.php และ info_reading.php
   ========================================================= */
body.bmha-plan-simple-page .bmha-plan-simple-card,
body.bmha-info-poster-page .bmha-info-poster-card {
  max-width: 1040px;
  margin: 0 auto;
}

body.bmha-plan-simple-page .bmha-plan-inline-visual {
  margin: 24px 0 26px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(16, 36, 63, .08);
  background:
    radial-gradient(circle at 20% 0%, rgba(214, 184, 74, .16), transparent 32%),
    linear-gradient(135deg, #f8fbfa, #eef7f5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

body.bmha-plan-simple-page .bmha-plan-inline-visual img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  opacity: .96;
}

body.bmha-plan-simple-page .bmha-detail-section {
  margin-top: 8px;
}

body.bmha-info-poster-page .bmha-info-poster-card {
  padding-bottom: 28px;
}

body.bmha-info-poster-page .bmha-info-poster-head {
  max-width: 980px;
  margin: 0 auto 22px;
  text-align: center;
}

body.bmha-info-poster-page .bmha-info-poster-head .bmha-detail-meta {
  justify-content: center;
}

body.bmha-info-poster-page .bmha-info-poster-stage {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(16, 36, 63, .08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,251,250,.92)),
    radial-gradient(circle at 12% 10%, rgba(214, 184, 74, .18), transparent 26%);
  box-shadow: 0 20px 54px rgba(16, 36, 63, .10);
}

body.bmha-info-poster-page .bmha-info-poster-stage .news-main-image-btn {
  display: block;
  width: 100%;
}

body.bmha-info-poster-page .bmha-info-poster-stage img {
  display: block;
  width: 100%;
  max-height: 900px;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
}

body.bmha-info-poster-page .bmha-info-thumb-grid {
  max-width: 980px;
  margin: 18px auto 0;
}

body.bmha-info-poster-page .bmha-info-related-section {
  max-width: 1120px;
  margin: 28px auto 0;
}

body.bmha-info-poster-page .bmha-info-related-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

body.bmha-info-poster-page .bmha-info-related-head small {
  display: block;
  margin-top: 4px;
  color: var(--bmha-muted, #64748b);
}

body.bmha-info-poster-page .bmha-info-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.bmha-info-poster-page .bmha-info-related-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(16, 36, 63, .09);
  background: rgba(255,255,255,.92);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(16, 36, 63, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.bmha-info-poster-page .bmha-info-related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 143, 134, .24);
  box-shadow: 0 18px 44px rgba(16, 36, 63, .12);
}

body.bmha-info-poster-page .bmha-info-related-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f6faf9;
}

body.bmha-info-poster-page .bmha-info-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.bmha-info-poster-page .bmha-info-related-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

body.bmha-info-poster-page .bmha-info-related-copy strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--bmha-primary-2, #10243f);
  font-size: 15px;
  line-height: 1.45;
}

body.bmha-info-poster-page .bmha-info-related-copy small {
  margin-top: auto;
  color: var(--bmha-muted, #64748b);
  font-size: 13px;
}

@media (max-width: 991.98px) {
  body.bmha-info-poster-page .bmha-info-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body.bmha-plan-simple-page .bmha-plan-inline-visual {
    border-radius: 20px;
  }

  body.bmha-plan-simple-page .bmha-plan-inline-visual img {
    max-height: 260px;
  }

  body.bmha-info-poster-page .bmha-info-poster-head {
    text-align: left;
  }

  body.bmha-info-poster-page .bmha-info-poster-head .bmha-detail-meta {
    justify-content: flex-start;
  }

  body.bmha-info-poster-page .bmha-info-poster-stage {
    padding: 10px;
    border-radius: 22px;
  }

  body.bmha-info-poster-page .bmha-info-poster-stage img {
    border-radius: 16px;
  }

  body.bmha-info-poster-page .bmha-info-related-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.bmha-info-poster-page .bmha-info-related-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BMHA Step 26: Plan Reading + Infographic Reading Refinement
   เพิ่มเฉพาะหน้ารายละเอียดแผนและ Infographic ตาม feedback ล่าสุด
   ========================================================= */

body.bmha-plan-split-page .bmha-plan-split-card {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 38px);
}

body.bmha-plan-split-page .bmha-plan-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
}

body.bmha-plan-split-page .bmha-plan-split-copy {
  min-width: 0;
}

body.bmha-plan-split-page .bmha-plan-split-card .bmha-detail-title {
  max-width: 780px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.18;
}

body.bmha-plan-split-page .bmha-plan-file-section {
  margin-top: clamp(26px, 3vw, 38px);
}

body.bmha-plan-split-page .bmha-plan-split-visual {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 360px;
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 12%, rgba(214, 184, 74, .20), transparent 28%),
    linear-gradient(145deg, #f7fbfa 0%, #eef7f5 100%);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 18px 44px rgba(16, 36, 63, .06);
  overflow: hidden;
}

body.bmha-plan-split-page .bmha-plan-split-visual::before {
  content: "";
  position: absolute;
  inset: auto -22% -34% 8%;
  height: 180px;
  border-radius: 999px;
  background: rgba(13, 143, 134, .10);
  transform: rotate(-8deg);
}

body.bmha-plan-split-page .bmha-plan-split-image-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

body.bmha-plan-split-page .bmha-plan-split-image-frame img {
  display: block;
  width: min(100%, 300px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(16, 36, 63, .10));
}

body.bmha-plan-split-page .bmha-plan-split-caption {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--bmha-primary-2, #10243f);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(16, 36, 63, .08);
  font-size: 13px;
  font-weight: 800;
}

body.bmha-info-showcase-page .bmha-info-wide-container {
  max-width: 1480px;
}

body.bmha-info-showcase-page .bmha-info-showcase-card {
  max-width: none;
  margin: 0 auto;
  padding: clamp(22px, 2.6vw, 36px);
  border-top-color: var(--bmha-accent, #d6b84a);
}

body.bmha-info-showcase-page .bmha-info-showcase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

body.bmha-info-showcase-page .bmha-info-showcase-head .bmha-detail-title {
  max-width: 980px;
  font-size: clamp(28px, 3.4vw, 50px);
}

body.bmha-info-showcase-page .bmha-info-all-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--bmha-primary, #2b6f7f);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 36, 63, .12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

body.bmha-info-showcase-page .bmha-info-all-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(16, 36, 63, .16);
}

body.bmha-info-showcase-page .bmha-info-showcase-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(14px, 2vw, 26px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 14%, rgba(214, 184, 74, .18), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(13, 143, 134, .14), transparent 28%),
    linear-gradient(180deg, #fbfdfc 0%, #eef7f5 100%);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

body.bmha-info-showcase-page .bmha-info-showcase-stage .news-main-image-btn {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.bmha-info-showcase-page .bmha-info-showcase-stage img {
  display: block;
  width: auto;
  max-width: min(100%, 1120px);
  max-height: none;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 36, 63, .14);
}

body.bmha-info-showcase-page .bmha-info-showcase-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

body.bmha-info-showcase-page .bmha-info-showcase-thumbs .news-thumb-btn {
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(16, 36, 63, .08);
}

body.bmha-info-showcase-page .bmha-info-showcase-thumbs img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 13px;
}

body.bmha-info-showcase-page .bmha-info-discovery {
  max-width: none;
  margin: 34px auto 0;
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: 30px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: 0 18px 48px rgba(16, 36, 63, .07);
}

body.bmha-info-showcase-page .bmha-info-discovery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body.bmha-info-showcase-page .bmha-info-discovery-head h3 {
  margin: 8px 0 6px;
  color: var(--bmha-primary-2, #10243f);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.18;
}

body.bmha-info-showcase-page .bmha-info-discovery-head p {
  margin: 0;
  color: var(--bmha-muted, #64748b);
}

body.bmha-info-showcase-page .bmha-info-discovery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.bmha-info-showcase-page .bmha-info-discovery-card {
  position: relative;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 138px;
  padding: 14px;
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(16, 36, 63, .08);
  box-shadow: 0 10px 26px rgba(16, 36, 63, .06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.bmha-info-showcase-page .bmha-info-discovery-card::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: 15px;
  top: 15px;
  border-radius: 999px;
  background: var(--bmha-accent, #d6b84a);
  box-shadow: 0 0 0 6px rgba(214, 184, 74, .16);
}

body.bmha-info-showcase-page .bmha-info-discovery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 143, 134, .26);
  box-shadow: 0 18px 42px rgba(16, 36, 63, .11);
}

body.bmha-info-showcase-page .bmha-info-discovery-order {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 36, 63, .82);
  font-size: 11px;
  font-weight: 800;
}

body.bmha-info-showcase-page .bmha-info-discovery-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #f6faf9;
}

body.bmha-info-showcase-page .bmha-info-discovery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.bmha-info-showcase-page .bmha-info-discovery-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding-right: 16px;
}

body.bmha-info-showcase-page .bmha-info-discovery-copy strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--bmha-primary-2, #10243f);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

body.bmha-info-showcase-page .bmha-info-discovery-copy small {
  color: var(--bmha-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  body.bmha-info-showcase-page .bmha-info-discovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  body.bmha-plan-split-page .bmha-plan-split-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-plan-split-page .bmha-plan-split-visual {
    min-height: auto;
  }

  body.bmha-plan-split-page .bmha-plan-split-image-frame img {
    width: min(100%, 220px);
  }

  body.bmha-info-showcase-page .bmha-info-showcase-head {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  body.bmha-plan-split-page .bmha-plan-split-card,
  body.bmha-info-showcase-page .bmha-info-showcase-card,
  body.bmha-info-showcase-page .bmha-info-discovery {
    border-radius: 24px;
  }

  body.bmha-plan-split-page .bmha-plan-split-card .bmha-detail-title,
  body.bmha-info-showcase-page .bmha-info-showcase-head .bmha-detail-title {
    font-size: 28px;
  }

  body.bmha-info-showcase-page .bmha-info-showcase-stage {
    padding: 10px;
    border-radius: 24px;
  }

  body.bmha-info-showcase-page .bmha-info-showcase-stage img {
    border-radius: 16px;
  }

  body.bmha-info-showcase-page .bmha-info-discovery-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-info-showcase-page .bmha-info-discovery-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

/* =========================================================
   BMHA Info Reading Modal Fit - Step 27
   จำกัดขนาดรูปใน modal ให้พอดีกับหน้าจอ ไม่ต้องเลื่อนดู
   ========================================================= */

body.bmha-info-showcase-page .bmha-info-modal-shell {
  width: min(1180px, 96vw);
  max-height: calc(100vh - 44px);
  margin: 0 auto;
  overflow: hidden;
  background: rgba(8, 18, 28, .96);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(8, 18, 28, .36);
}

body.bmha-info-showcase-page .bmha-info-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 46px;
  padding: 10px 14px 0;
}

body.bmha-info-showcase-page .bmha-info-carousel-area {
  padding: 0 18px 18px;
}

body.bmha-info-showcase-page .bmha-info-carousel-item {
  height: calc(100vh - 118px);
  max-height: 820px;
  min-height: 420px;
}

body.bmha-info-showcase-page .bmha-info-modal-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 124px);
  object-fit: contain;
  margin: 0 auto;
  border-radius: 10px;
}

body.bmha-info-showcase-page .bmha-info-modal-shell .carousel-control-prev,
body.bmha-info-showcase-page .bmha-info-modal-shell .carousel-control-next {
  width: 58px;
  opacity: 1;
}

body.bmha-info-showcase-page .bmha-info-modal-shell .carousel-control-prev-icon,
body.bmha-info-showcase-page .bmha-info-modal-shell .carousel-control-next-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, .18);
  background-size: 52% 52%;
}

@media (max-width: 991.98px) {
  body.bmha-info-showcase-page .bmha-info-modal-shell {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  body.bmha-info-showcase-page .bmha-info-carousel-area {
    padding: 0 12px 14px;
  }

  body.bmha-info-showcase-page .bmha-info-carousel-item {
    height: calc(100vh - 92px);
    min-height: 320px;
  }

  body.bmha-info-showcase-page .bmha-info-modal-image {
    max-height: calc(100vh - 100px);
  }
}

@media (max-width: 575.98px) {
  body.bmha-info-showcase-page .bmha-info-carousel-item {
    height: calc(100vh - 86px);
    min-height: 260px;
  }

  body.bmha-info-showcase-page .bmha-info-modal-image {
    max-height: calc(100vh - 92px);
    border-radius: 8px;
  }
}
