/* =========================================================
   BMHA Frontend Template v5
   โทนโลโก้ BMHA: Navy / Gold / Ivory
   ใช้เป็น CSS กลางของ Frontend ใหม่
   Font: Kanit + Accessibility toolbar
   ========================================================= */

:root {
  --bmha-primary: #173657;
  --bmha-primary-2: #10243f;
  --bmha-primary-3: #4f6d8c;
  --bmha-accent: #d6b84a;
  --bmha-accent-2: #f7e8b1;
  --bmha-leaf: #8a7940;
  --bmha-cream: #fbf7ec;
  --bmha-mint: #edf3f6;
  --bmha-mint-2: #d9e6ee;
  --bmha-sage: #f7f5ef;
  --bmha-ink: #15243a;
  --bmha-text: #314056;
  --bmha-muted: #6b7280;
  --bmha-line: #dce4ea;
  --bmha-line-2: #c8d3dd;
  --bmha-white: #ffffff;
  --bmha-danger: #b54848;
  --bmha-radius-sm: 12px;
  --bmha-radius-md: 18px;
  --bmha-radius-lg: 26px;
  --bmha-radius-xl: 34px;
  --bmha-shadow-sm: 0 8px 24px rgba(16, 36, 63, .08);
  --bmha-shadow-md: 0 18px 48px rgba(16, 36, 63, .13);
  --bmha-shadow-lg: 0 28px 78px rgba(16, 36, 63, .18);
  --bmha-transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body.bmha-public {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Kanit', sans-serif;
  color: var(--bmha-text);
  background: var(--bmha-white);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body.bmha-public a {
  color: inherit;
  text-decoration: none;
}

body.bmha-public img {
  max-width: 100%;
  height: auto;
}

/* Home modal: prevent Bootstrap scrollbar compensation overflow */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

#myModal.modal {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  padding-right: 0 !important;
}

#myModal .modal-dialog {
  max-width: min(920px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

#myModal .modal-content.bmha-home-modal {
  max-height: calc(100dvh - 56px);
  overflow: hidden;
}

#myModal .modal-body {
  overflow: hidden;
}

#myModal .modal-body img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 170px);
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
}

body.bmha-public :focus-visible {
  outline: 3px solid rgba(242, 174, 50, .38);
  outline-offset: 3px;
  border-radius: 10px;
}

.bmha-container {
  width: 100%;
  max-width: 1380px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 46px);
}

.bmha-main {
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(19, 155, 143, .08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fcfa 42%, #ffffff 100%);
}

.bmha-skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100000;
  transform: translateY(-170%);
  padding: 10px 16px;
  background: var(--bmha-primary-2);
  color: #fff !important;
  border-radius: 999px;
  box-shadow: var(--bmha-shadow-md);
}

.bmha-skip-link:focus {
  transform: translateY(0);
}

/* Header */
.bmha-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(22, 92, 83, .1);
}

.bmha-govbar {
  background: linear-gradient(90deg, #0b8178, #139b8f 58%, #52b98f);
  color: rgba(255, 255, 255, .95);
  font-size: 13px;
}

.bmha-govbar-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.bmha-govbar-left,
.bmha-govbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.bmha-govbar a,
.bmha-govbar span {
  color: rgba(255, 255, 255, .95);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.bmha-govbar a:hover {
  color: #fff;
}

.bmha-staff-pill {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .32);
}

.bmha-navbar {
  min-height: 82px;
  padding: 0;
}

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

.bmha-brand-mark {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, var(--bmha-mint));
  box-shadow: inset 0 0 0 1px var(--bmha-line), var(--bmha-shadow-sm);
}

.bmha-brand img {
  max-height: 42px;
  width: auto;
}

.bmha-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.bmha-brand-text strong {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--bmha-primary-2);
  font-weight: 700;
}

.bmha-brand-text small {
  margin-top: 4px;
  color: var(--bmha-muted);
  font-size: 12px;
  letter-spacing: .02em;
}

.bmha-nav-list {
  align-items: center;
  gap: 2px;
}

.bmha-nav-list .nav-link {
  position: relative;
  padding: 29px 13px !important;
  color: var(--bmha-ink);
  font-weight: 500;
  font-size: 15px;
  transition: color var(--bmha-transition);
}

.bmha-nav-list .nav-link::after {
  border: 0;
  margin-left: 7px;
}

.bmha-nav-list .nav-link:hover,
.bmha-nav-list .nav-link.active,
.bmha-nav-list .show>.nav-link {
  color: var(--bmha-primary-2);
}

.bmha-nav-list .nav-link.active::before,
.bmha-nav-list .nav-link:hover::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 19px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
}

.bmha-navbar-toggler {
  width: 46px;
  height: 42px;
  border: 1px solid var(--bmha-line);
  border-radius: 14px;
  padding: 9px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.bmha-navbar-toggler span {
  width: 100%;
  height: 2px;
  background: var(--bmha-primary-2);
  border-radius: 999px;
}

.bmha-dropdown-menu,
.bmha-mega-menu {
  border: 1px solid var(--bmha-line);
  border-radius: 20px;
  padding: 12px;
  box-shadow: var(--bmha-shadow-md);
}

.bmha-dropdown-menu .dropdown-item,
.bmha-mega-links a {
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--bmha-text);
  font-weight: 400;
}

.bmha-dropdown-menu .dropdown-item:hover,
.bmha-mega-links a:hover {
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
}

@media (min-width: 1200px) {
  .bmha-mega-item {
    position: static;
  }

  .bmha-mega-menu {
    left: 50%;
    transform: translateX(-50%);
    width: min(980px, calc(100vw - 72px));
    margin-top: 0;
  }

  .bmha-service-menu {
    width: min(1080px, calc(100vw - 72px));
  }
}

.bmha-mega-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 14px;
}

.bmha-mega-intro {
  min-height: 190px;
  padding: 24px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .28), transparent 26%),
    linear-gradient(135deg, var(--bmha-primary-2), var(--bmha-primary));
}

.bmha-mega-intro-accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .28), transparent 26%),
    linear-gradient(135deg, #5c9b58, var(--bmha-primary));
}

.bmha-mega-intro span {
  color: var(--bmha-accent-2);
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
}

.bmha-mega-intro h3 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 23px;
  line-height: 1.35;
}

.bmha-mega-intro p {
  margin: 0;
  color: rgba(255, 255, 255, .86);
  line-height: 1.75;
}

.bmha-mega-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  align-content: start;
}

.bmha-mega-links-2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Hero */
.bmha-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: clamp(54px, 7vw, 96px) 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(242, 174, 50, .26), transparent 26%),
    radial-gradient(circle at 4% 86%, rgba(19, 155, 143, .18), transparent 30%),
    linear-gradient(135deg, var(--bmha-cream) 0%, #ffffff 44%, var(--bmha-mint) 100%);
  overflow: hidden;
}

.bmha-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent), var(--bmha-leaf));
}

.bmha-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(135deg, rgba(19, 155, 143, .09) 25%, transparent 25%),
    linear-gradient(225deg, rgba(19, 155, 143, .07) 25%, transparent 25%);
  background-size: 42px 42px;
  pointer-events: none;
}

.bmha-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .82fr);
  align-items: center;
  gap: clamp(28px, 5vw, 74px);
}

.bmha-kicker,
.bmha-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.bmha-kicker::before,
.bmha-section-eyebrow::before {
  content: "";
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: var(--bmha-accent);
}

.bmha-hero h1 {
  margin: 16px 0 14px;
  color: var(--bmha-primary-2);
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.02em;
}

.bmha-hero-lead {
  max-width: 720px;
  margin: 0;
  color: var(--bmha-text);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
  font-weight: 300;
}

.bmha-hero-actions,
.bmha-learning-action {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.bmha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 21px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform var(--bmha-transition), box-shadow var(--bmha-transition), background var(--bmha-transition);
}

.bmha-btn:hover {
  transform: translateY(-1px);
}

.bmha-btn-primary {
  background: var(--bmha-primary);
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(19, 155, 143, .26);
}

.bmha-btn-primary:hover {
  background: var(--bmha-primary-2);
}

.bmha-btn-soft {
  background: #fff;
  color: var(--bmha-primary-2) !important;
  border-color: var(--bmha-line);
  box-shadow: var(--bmha-shadow-sm);
}

.bmha-btn-sm {
  min-height: 38px;
  padding: 9px 15px;
  font-size: 14px;
}

.bmha-hero-portal {
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(255, 255, 255, .74);
  box-shadow: var(--bmha-shadow-lg);
  border-radius: var(--bmha-radius-xl);
  padding: clamp(18px, 3vw, 28px);
  backdrop-filter: blur(16px);
}

.bmha-portal-head,
.bmha-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.bmha-portal-head span {
  color: var(--bmha-muted);
  font-size: 14px;
}

.bmha-portal-head strong,
.bmha-panel-title strong {
  color: var(--bmha-primary-2);
  font-size: 18px;
}

.bmha-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bmha-portal-grid a {
  min-height: 138px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, var(--bmha-sage));
  border: 1px solid var(--bmha-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--bmha-transition), box-shadow var(--bmha-transition), border-color var(--bmha-transition);
}

.bmha-portal-grid a:hover {
  transform: translateY(-4px);
  border-color: var(--bmha-primary-3);
  box-shadow: var(--bmha-shadow-md);
}

.bmha-portal-grid i {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--bmha-primary-2);
  background: var(--bmha-mint);
  font-size: 20px;
}

.bmha-portal-grid span {
  margin-top: 18px;
  color: var(--bmha-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.bmha-service-strip {
  position: relative;
  margin-top: -34px;
  z-index: 2;
}

.bmha-service-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--bmha-shadow-md);
  border: 1px solid var(--bmha-line);
  background: #fff;
}

.bmha-service-strip-grid a {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--bmha-primary-2);
  font-weight: 600;
  border-right: 1px solid var(--bmha-line);
  transition: background var(--bmha-transition), color var(--bmha-transition);
}

.bmha-service-strip-grid a:last-child {
  border-right: 0;
}

.bmha-service-strip-grid a:hover {
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
}

.bmha-service-strip-grid i {
  font-size: 24px;
  color: var(--bmha-accent);
}

/* Sections */
.bmha-section {
  padding: clamp(58px, 7vw, 98px) 0;
}

.bmha-section-head {
  max-width: 820px;
  margin-bottom: 34px;
}

.bmha-section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  max-width: none;
}

.bmha-section-head-left {
  margin-bottom: 22px;
}

.bmha-section-head h2 {
  margin: 10px 0 9px;
  color: var(--bmha-ink);
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.2;
  font-weight: 700;
}

.bmha-section-head p {
  margin: 0;
  color: var(--bmha-muted);
  font-size: 16px;
  line-height: 1.75;
}

.bmha-link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bmha-primary-2);
  font-weight: 600;
  white-space: nowrap;
}

.bmha-link-more:hover {
  color: var(--bmha-primary);
}

.bmha-link-more-light {
  color: #fff;
}

/* Service Cards */
.bmha-services {
  background: #fff;
}

.bmha-service-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.bmha-service-card {
  position: relative;
  min-height: 238px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  background: linear-gradient(180deg, #fff, #fbfffd);
  border: 1px solid var(--bmha-line);
  box-shadow: var(--bmha-shadow-sm);
  overflow: hidden;
  transition: transform var(--bmha-transition), box-shadow var(--bmha-transition), border-color var(--bmha-transition);
}

.bmha-service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
}

.bmha-service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--bmha-shadow-md);
  border-color: var(--bmha-primary-3);
}

.bmha-service-tag {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 12px;
  font-weight: 600;
}

.bmha-service-icon {
  margin-top: 20px;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--bmha-primary), var(--bmha-leaf));
  font-size: 23px;
  box-shadow: 0 12px 26px rgba(19, 155, 143, .2);
}

.bmha-service-card strong {
  margin-top: 18px;
  color: var(--bmha-ink);
  font-size: 20px;
  line-height: 1.35;
}

.bmha-service-card small {
  margin-top: 8px;
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.65;
}

.bmha-service-arrow {
  margin-top: auto;
  color: var(--bmha-accent);
  padding-top: 18px;
}

/* News */
.bmha-news-section {
  background: var(--bmha-sage);
}

.bmha-news-portal {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  gap: 22px;
  align-items: stretch;
}

.bmha-news-feature-card,
.bmha-news-list-card,
.bmha-announcement-card,
.bmha-contact-card,
.bmha-video-card {
  background: #fff;
  border: 1px solid var(--bmha-line);
  border-radius: 28px;
  box-shadow: var(--bmha-shadow-sm);
}

.bmha-news-feature-card {
  overflow: hidden;
  height: 100%;
}

.bmha-news-feature-img {
  display: block;
  aspect-ratio: 16/8.6;
  background: var(--bmha-mint);
  overflow: hidden;
}

.bmha-news-feature-img img,
.bmha-news-thumb img,
.bmha-info-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.bmha-news-feature-card:hover .bmha-news-feature-img img,
.bmha-news-list-item:hover .bmha-news-thumb img,
.bmha-info-card:hover .bmha-info-img img {
  transform: scale(1.04);
}

.bmha-news-feature-body {
  padding: 28px;
}

.bmha-news-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--bmha-primary-2);
  background: var(--bmha-mint);
  font-size: 13px;
  font-weight: 600;
}

.bmha-news-feature-body h3 {
  margin: 14px 0 10px;
  color: var(--bmha-ink);
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.35;
}

.bmha-news-feature-body h3 a:hover {
  color: var(--bmha-primary-2);
}

.bmha-news-feature-body time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bmha-muted);
  margin-bottom: 20px;
}

.bmha-news-list-card {
  padding: 22px;
}

.bmha-panel-title a {
  color: var(--bmha-primary-2);
  font-weight: 600;
}

.bmha-news-list {
  display: grid;
  gap: 16px;
}

.bmha-news-list-item {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bmha-line);
}

.bmha-news-list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bmha-news-thumb {
  display: block;
  aspect-ratio: 1.28/1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bmha-mint);
}

.bmha-news-list-item time {
  color: var(--bmha-muted);
  font-size: 13px;
}

.bmha-news-list-item h3 {
  margin: 6px 0 0;
  color: var(--bmha-ink);
  font-size: 16px;
  line-height: 1.52;
}

.bmha-news-list-item h3 a:hover {
  color: var(--bmha-primary-2);
}

.bmha-announcement-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.bmha-announcement-card {
  padding: 22px;
}

.bmha-announcement-list {
  display: grid;
  gap: 10px;
}

.bmha-announcement-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--bmha-sage);
  border: 1px solid transparent;
}

.bmha-announcement-row:hover {
  background: var(--bmha-mint);
  border-color: var(--bmha-line-2);
}

.bmha-announcement-row span {
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 600;
}

.bmha-announcement-row strong {
  color: var(--bmha-ink);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
}

.bmha-procurement-card .bmha-panel-title strong {
  color: #9a6710;
}

/* Learning */
.bmha-learning-banner {
  background: #fff;
}

.bmha-learning-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, .24), transparent 25%),
    linear-gradient(135deg, var(--bmha-primary-2), var(--bmha-primary));
  color: #fff;
  box-shadow: var(--bmha-shadow-md);
}

.bmha-learning-card::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 52px solid rgba(255, 255, 255, .1);
}

.bmha-learning-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.bmha-learning-content .bmha-section-eyebrow {
  color: var(--bmha-accent-2);
}

.bmha-learning-content h2 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
}

.bmha-learning-content p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 17px;
  line-height: 1.75;
}

.bmha-learning-action {
  position: relative;
  z-index: 1;
  margin: 0;
  align-items: center;
  color: var(--bmha-primary-2);
  background: #fff;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
}

/* Knowledge */
.bmha-knowledge {
  color: #fff;
  background:
    radial-gradient(circle at 6% 8%, rgba(255, 255, 255, .14), transparent 28%),
    linear-gradient(135deg, #0b8178, #139b8f 52%, #5c9b58);
}

.bmha-section-head-inverse h2,
.bmha-section-head-inverse p {
  color: #fff;
}

.bmha-section-head-inverse p {
  opacity: .85;
}

.bmha-section-head-inverse .bmha-section-eyebrow {
  color: var(--bmha-accent-2);
}

.bmha-info-swiper {
  overflow: visible;
  padding-bottom: 46px;
}

.bmha-info-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  color: var(--bmha-ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}

.bmha-info-img {
  display: block;
  aspect-ratio: 4/3;
  background: var(--bmha-mint);
  overflow: hidden;
}

.bmha-info-body {
  padding: 18px;
}

.bmha-info-body span {
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
}

.bmha-info-body h3 {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.55;
}

.bmha-info-body h3 a:hover {
  color: var(--bmha-primary-2);
}

.bmha-info-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, .72);
  opacity: 1;
}

.bmha-info-swiper .swiper-pagination-bullet-active {
  background: var(--bmha-accent);
}

/* Contact */
.bmha-contact-section {
  background: var(--bmha-cream);
}

.bmha-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.bmha-video-card,
.bmha-contact-card {
  padding: clamp(22px, 3vw, 34px);
}

.bmha-video-frame {
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16/9;
  box-shadow: var(--bmha-shadow-sm);
}

.bmha-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.bmha-contact-card h2 {
  margin: 10px 0 8px;
  color: var(--bmha-ink);
  font-size: clamp(28px, 3vw, 42px);
}

.bmha-contact-card>p {
  color: var(--bmha-muted);
  line-height: 1.72;
}

.bmha-contact-form {
  margin-top: 22px;
}

.bmha-contact-form .form-label {
  color: var(--bmha-ink);
  font-weight: 600;
}

.bmha-contact-form .form-control {
  min-height: 48px;
  border: 1px solid var(--bmha-line-2);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--bmha-ink);
  background: #fff;
}

.bmha-contact-form .form-control:focus {
  border-color: var(--bmha-primary);
  box-shadow: 0 0 0 .25rem rgba(19, 155, 143, .13);
}

.bmha-contact-form textarea.form-control {
  min-height: 132px;
}

.bmha-honeypot {
  position: absolute;
  left: -5000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: .35rem 0;
}

.bmha-form-state {
  display: none;
  text-align: center;
}

.bmha-form-state.loading {
  color: var(--bmha-primary-2);
}

/* Legacy embeds */
.bmha-legacy-embed {
  padding: 24px 0;
  background: #fff;
}

.bmha-legacy-queen .container,
.bmha-legacy-queen .container-fluid {
  max-width: 1380px;
}

/* Footer */
.bmha-footer {
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, .14), transparent 32%),
    linear-gradient(135deg, #0b8178, #166f69 62%, #4d8c4a);
  padding: 58px 0 0;
}

.bmha-footer-main {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 46px;
}

.bmha-footer-logo {
  width: 74px;
  height: auto;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
}

.bmha-footer-about h2 {
  margin: 16px 0 10px;
  color: #fff;
  font-size: 26px;
}

.bmha-footer-about p {
  color: rgba(255, 255, 255, .82);
  line-height: 1.75;
}

.bmha-footer-contact {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
  color: rgba(255, 255, 255, .88);
}

.bmha-footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bmha-footer-social {
  display: flex;
  gap: 10px;
}

.bmha-footer-social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.bmha-footer-social a:hover {
  background: #fff;
  color: var(--bmha-primary-2);
}

.bmha-footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px 36px;
}

.bmha-footer-links h3 {
  color: var(--bmha-accent-2);
  font-size: 18px;
  margin: 0 0 14px;
}

.bmha-footer-links a {
  display: block;
  color: rgba(255, 255, 255, .84);
  padding: 6px 0;
  line-height: 1.5;
}

.bmha-footer-links a:hover {
  color: #fff;
  transform: translateX(2px);
}

.bmha-footer-bottom {
  margin-top: 44px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

/* Back to top */
.bmha-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--bmha-primary);
  box-shadow: var(--bmha-shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--bmha-transition), transform var(--bmha-transition), visibility var(--bmha-transition);
}

.bmha-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1199.98px) {
  .bmha-navbar {
    min-height: 72px;
    padding: 10px 0;
  }

  .bmha-nav-list {
    align-items: stretch;
    padding: 12px 0;
  }

  .bmha-nav-list .nav-link {
    padding: 12px 0 !important;
  }

  .bmha-nav-list .nav-link.active::before,
  .bmha-nav-list .nav-link:hover::before {
    display: none;
  }

  .bmha-mega-grid {
    grid-template-columns: 1fr;
  }

  .bmha-mega-intro {
    min-height: auto;
  }

  .bmha-mega-links,
  .bmha-mega-links-2col {
    grid-template-columns: 1fr;
  }

  .bmha-hero-grid,
  .bmha-news-portal,
  .bmha-contact-grid {
    grid-template-columns: 1fr;
  }

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

  .bmha-footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .bmha-service-strip {
    margin-top: 0;
  }

  .bmha-service-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 20px;
  }

  .bmha-service-strip-grid a {
    border-bottom: 1px solid var(--bmha-line);
  }

  .bmha-service-strip-grid a:nth-child(2n) {
    border-right: 0;
  }

  .bmha-announcement-columns {
    grid-template-columns: 1fr;
  }

  .bmha-footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .bmha-brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .bmha-brand img {
    max-height: 36px;
  }

  .bmha-brand-text strong {
    font-size: 16px;
  }

  .bmha-brand-text small {
    display: none;
  }

  .bmha-hero {
    min-height: auto;
    padding: 42px 0 58px;
  }

  .bmha-portal-grid,
  .bmha-service-card-grid {
    grid-template-columns: 1fr;
  }

  .bmha-section-head-row {
    display: block;
  }

  .bmha-section-head-row .bmha-link-more {
    margin-top: 14px;
  }

  .bmha-news-list-item {
    grid-template-columns: 96px 1fr;
  }

  .bmha-announcement-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .bmha-learning-card {
    display: block;
  }

  .bmha-learning-action {
    display: inline-flex;
    margin-top: 22px;
  }

  .bmha-footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .bmha-container {
    padding-inline: 14px;
  }

  .bmha-hero h1 {
    font-size: 38px;
  }

  .bmha-service-strip-grid {
    grid-template-columns: 1fr;
  }

  .bmha-service-strip-grid a {
    border-right: 0;
  }

  .bmha-news-list-item {
    grid-template-columns: 1fr;
  }

  .bmha-news-thumb {
    aspect-ratio: 16/9;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* =========================================================
   BMHA Template v4 Overrides
   แก้ตาม feedback: ให้ดูเป็นเว็บไซต์มากขึ้น, ไม่เหมือนระบบ,
   บังคับ Kanit ให้ครบ, เพิ่ม A- A A+, และแก้ Infographic ไม่ให้ layout หลุด
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&display=swap');

html {
  --bmha-font-scale: 1;
}

body.bmha-public,
body.bmha-public :where(h1, h2, h3, h4, h5, h6, p, a, span, strong, small, button, input, textarea, select, label, li, td, th, div) {
  font-family: 'Kanit', sans-serif !important;
}

body.bmha-public :where(.fa, .fas, .far, .fab, .bi, i[class*="fa-"]) {
  font-family: inherit;
}

body.bmha-public :where(.fas, .fa) {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900;
}

body.bmha-public :where(.far) {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 400;
}

body.bmha-public :where(.fab) {
  font-family: "Font Awesome 5 Brands" !important;
}

body.bmha-public :where(.bi) {
  font-family: bootstrap-icons !important;
}

body.bmha-public {
  font-size: 16px;
  background: #fbfcf8;
}

/* Accessibility font tools */
.bmha-font-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
}

.bmha-font-tools span {
  padding: 0 7px 0 9px;
  font-size: 12px;
  color: rgba(255, 255, 255, .88);
  white-space: nowrap;
}

.bmha-font-tools button {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background var(--bmha-transition), color var(--bmha-transition), transform var(--bmha-transition);
}

.bmha-font-tools button:hover,
.bmha-font-tools button[aria-pressed="true"] {
  background: #fff;
  color: var(--bmha-primary-2);
}

.bmha-font-tools button:active {
  transform: translateY(1px);
}

.bmha-mobile-tools {
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--bmha-line);
}

.bmha-mobile-tools .bmha-font-tools {
  background: var(--bmha-mint);
  border-color: var(--bmha-line);
}

.bmha-mobile-tools .bmha-font-tools span {
  color: var(--bmha-primary-2);
}

.bmha-mobile-tools .bmha-font-tools button {
  background: #fff;
  color: var(--bmha-primary-2);
  border: 1px solid var(--bmha-line);
}

.bmha-mobile-tools .bmha-font-tools button[aria-pressed="true"] {
  background: var(--bmha-primary);
  color: #fff;
}

/* Header: ลดความเป็น dashboard ให้เป็นเว็บหน่วยงาน */
.bmha-header {
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid rgba(25, 116, 103, .12);
}

.bmha-govbar {
  background: linear-gradient(90deg, #0d8f80 0%, #12a18c 55%, #79b86d 100%);
}

.bmha-navbar {
  min-height: 76px;
}

.bmha-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: #fff;
  box-shadow: none;
  border: 1px solid var(--bmha-line);
}

.bmha-brand-text strong {
  color: #087b71;
  font-weight: 700;
  letter-spacing: 0;
}

.bmha-brand-text small {
  color: #6d7f79;
}

.bmha-nav-list .nav-link {
  padding: 26px 12px !important;
  font-weight: 500;
}

/* Hero: เปลี่ยนจาก app portal เป็น official website hero */
.bmha-main {
  background: #fbfcf8;
}

.bmha-hero-official {
  min-height: auto;
  padding: clamp(44px, 6vw, 76px) 0 clamp(66px, 7vw, 96px);
  background:
    linear-gradient(90deg, rgba(255, 248, 237, .98) 0%, rgba(255, 255, 255, .94) 42%, rgba(234, 248, 245, .95) 100%),
    radial-gradient(circle at 88% 0%, rgba(242, 174, 50, .22), transparent 32%);
  border-bottom: 1px solid var(--bmha-line);
}

.bmha-hero-official::before {
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary), var(--bmha-leaf));
}

.bmha-hero-pattern {
  opacity: .24;
  background-image:
    linear-gradient(135deg, rgba(19, 155, 143, .08) 25%, transparent 25%),
    linear-gradient(225deg, rgba(19, 155, 143, .07) 25%, transparent 25%);
  background-size: 56px 56px;
}

.bmha-hero-grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .72fr);
  align-items: stretch;
  gap: clamp(26px, 4vw, 56px);
}

.bmha-hero-copy {
  align-self: center;
  max-width: 820px;
}

.bmha-kicker,
.bmha-section-eyebrow {
  color: #0d8f80;
  letter-spacing: .06em;
}

.bmha-hero-title,
.bmha-hero h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  color: #087b71;
  font-size: clamp(42px, 5.2vw, 66px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
}

.bmha-hero-lead {
  max-width: 760px;
  color: #30443f;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.82;
  font-weight: 300;
}

.bmha-hero-news {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: clamp(22px, 3vw, 30px);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(13, 143, 128, .16);
  box-shadow: 0 20px 56px rgba(31, 101, 91, .12);
}

.bmha-hero-news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bmha-line);
}

.bmha-hero-news-head span {
  display: block;
  color: var(--bmha-muted);
  font-size: 14px;
}

.bmha-hero-news-head strong {
  display: block;
  margin-top: 2px;
  color: var(--bmha-primary-2);
  font-size: 21px;
  font-weight: 700;
}

.bmha-hero-news-head a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bmha-mint);
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 600;
}

.bmha-hero-news-list {
  display: grid;
  gap: 0;
  margin-top: 4px;
}

.bmha-hero-news-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--bmha-line-2);
}

.bmha-hero-news-row:last-child {
  border-bottom: 0;
}

.bmha-hero-news-row:hover span {
  color: var(--bmha-primary-2);
}

.bmha-hero-news-row time {
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 600;
}

.bmha-hero-news-row span {
  color: var(--bmha-ink);
  font-size: 15px;
  line-height: 1.55;
  transition: color var(--bmha-transition);
}

.bmha-hero-news-empty {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  background: var(--bmha-sage);
  color: var(--bmha-muted);
}

.bmha-quick-strip {
  position: relative;
  z-index: 3;
  margin-top: -42px;
}

.bmha-quick-strip-card {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--bmha-line);
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 108, 100, .11);
}

.bmha-quick-strip-card a {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  color: var(--bmha-primary-2);
  font-weight: 600;
  border-right: 1px solid var(--bmha-line);
  transition: background var(--bmha-transition), transform var(--bmha-transition);
}

.bmha-quick-strip-card a:last-child {
  border-right: 0;
}

.bmha-quick-strip-card a:hover {
  background: var(--bmha-mint);
}

.bmha-quick-strip-card i {
  color: var(--bmha-accent);
  font-size: 20px;
}

/* Infographic: เปลี่ยนเป็น grid คุมสัดส่วน ไม่ใช้ carousel เพื่อลดอาการ layout หลุด */
.bmha-knowledge {
  background:
    radial-gradient(circle at 6% 8%, rgba(255, 255, 255, .12), transparent 28%),
    linear-gradient(135deg, #0d8178, #119987 52%, #5c9b58);
}

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

.bmha-info-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  color: var(--bmha-ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .14);
  border: 1px solid rgba(255, 255, 255, .18);
}

.bmha-info-img {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--bmha-mint);
  overflow: hidden;
}

.bmha-info-img img,
.bmha-news-thumb img,
.bmha-news-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bmha-info-body {
  flex: 1;
  padding: 16px 17px 18px;
}

.bmha-info-body h3 {
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive refinements */
@media (max-width: 1199.98px) {
  .bmha-govbar-right {
    gap: 10px;
  }

  .bmha-hero-grid {
    grid-template-columns: 1fr;
  }

  .bmha-hero-news {
    min-height: auto;
  }

  .bmha-quick-strip-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bmha-quick-strip-card a:nth-child(3n) {
    border-right: 0;
  }

  .bmha-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .bmha-hero-official {
    padding: 34px 0 72px;
  }

  .bmha-hero-title,
  .bmha-hero h1 {
    font-size: 38px;
  }

  .bmha-hero-news-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .bmha-quick-strip {
    margin-top: -36px;
  }

  .bmha-quick-strip-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bmha-quick-strip-card a {
    min-height: 82px;
    border-bottom: 1px solid var(--bmha-line);
  }

  .bmha-quick-strip-card a:nth-child(3n) {
    border-right: 1px solid var(--bmha-line);
  }

  .bmha-quick-strip-card a:nth-child(2n) {
    border-right: 0;
  }

  .bmha-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 480px) {

  .bmha-hero-title,
  .bmha-hero h1 {
    font-size: 33px;
  }

  .bmha-quick-strip-card {
    grid-template-columns: 1fr;
  }

  .bmha-quick-strip-card a {
    border-right: 0 !important;
  }

  .bmha-info-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BMHA Template v5: Logo Palette + Hero Image Slider
   โทนโลโก้ BMHA: กรมท่า / ทอง / ครีม ลดความเขียวแบบห้าง
   ========================================================= */

:root {
  --bmha-primary: #173657;
  --bmha-primary-2: #10243f;
  --bmha-primary-3: #4f6d8c;
  --bmha-accent: #d6b84a;
  --bmha-accent-2: #f7e8b1;
  --bmha-leaf: #8a7940;
  --bmha-cream: #fbf7ec;
  --bmha-mint: #edf3f6;
  --bmha-mint-2: #d9e6ee;
  --bmha-sage: #f7f5ef;
  --bmha-ink: #15243a;
  --bmha-text: #314056;
  --bmha-muted: #6b7280;
  --bmha-line: #dce4ea;
  --bmha-line-2: #c8d3dd;
  --bmha-shadow-sm: 0 8px 24px rgba(16, 36, 63, .08);
  --bmha-shadow-md: 0 18px 48px rgba(16, 36, 63, .13);
  --bmha-shadow-lg: 0 28px 78px rgba(16, 36, 63, .18);
}

body.bmha-public,
body.bmha-public h1,
body.bmha-public h2,
body.bmha-public h3,
body.bmha-public h4,
body.bmha-public h5,
body.bmha-public h6,
body.bmha-public p,
body.bmha-public a,
body.bmha-public button,
body.bmha-public input,
body.bmha-public textarea,
body.bmha-public select,
body.bmha-public label,
body.bmha-public span,
body.bmha-public strong,
body.bmha-public small,
body.bmha-public li,
body.bmha-public td,
body.bmha-public th {
  font-family: 'Kanit', sans-serif;
}

body.bmha-public .fa,
body.bmha-public .fas,
body.bmha-public .far {
  font-family: "Font Awesome 5 Free";
}

body.bmha-public .fab {
  font-family: "Font Awesome 5 Brands";
}

body.bmha-public .bi {
  font-family: "bootstrap-icons";
}

body.bmha-public {
  color: var(--bmha-text);
  background: #fffdf8;
}

.bmha-main {
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 184, 74, .12), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f7f9fb 48%, #fffdf8 100%);
}

.bmha-header {
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid rgba(16, 36, 63, .11);
}

.bmha-govbar {
  background: linear-gradient(90deg, #10243f 0%, #173657 68%, #776524 100%);
}

.bmha-govbar a,
.bmha-govbar span {
  color: rgba(255, 255, 255, .94);
}

.bmha-font-tools {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(247, 232, 177, .32);
}

.bmha-font-tools button:hover,
.bmha-font-tools button[aria-pressed="true"] {
  background: var(--bmha-accent-2);
  color: var(--bmha-primary-2);
}

.bmha-brand-mark {
  background: #fff;
  border: 1px solid rgba(16, 36, 63, .12);
  box-shadow: 0 8px 24px rgba(16, 36, 63, .08);
}

.bmha-brand img {
  max-height: 46px;
}

.bmha-brand-text strong {
  color: var(--bmha-primary-2);
  font-weight: 600;
}

.bmha-brand-text small {
  color: var(--bmha-muted);
}

.bmha-nav-list .nav-link,
.bmha-dropdown-menu .dropdown-item,
.bmha-mega-links a {
  color: var(--bmha-ink);
}

.bmha-nav-list .nav-link:hover,
.bmha-nav-list .nav-link.active,
.bmha-nav-list .show>.nav-link,
.bmha-dropdown-menu .dropdown-item:hover,
.bmha-mega-links a:hover {
  color: var(--bmha-primary-2);
}

.bmha-nav-list .nav-link.active::before,
.bmha-nav-list .nav-link:hover::before {
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary));
}

.bmha-dropdown-menu .dropdown-item:hover,
.bmha-mega-links a:hover {
  background: var(--bmha-sage);
}

.bmha-mega-intro,
.bmha-mega-intro-accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(247, 232, 177, .30), transparent 28%),
    linear-gradient(135deg, var(--bmha-primary-2), var(--bmha-primary));
}

.bmha-mega-intro span {
  color: var(--bmha-accent-2);
}

/* Hero logo palette */
.bmha-hero-logo,
.bmha-hero-official {
  min-height: auto;
  padding: clamp(46px, 6vw, 82px) 0 clamp(70px, 8vw, 108px);
  background:
    radial-gradient(circle at 92% 8%, rgba(214, 184, 74, .22), transparent 30%),
    radial-gradient(circle at 10% 88%, rgba(23, 54, 87, .10), transparent 32%),
    linear-gradient(112deg, #fffdf8 0%, #f8f4e9 46%, #edf3f6 100%);
  border-bottom: 1px solid rgba(16, 36, 63, .10);
}

.bmha-hero-logo::before,
.bmha-hero-official::before {
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary), var(--bmha-accent));
}

.bmha-hero-pattern {
  opacity: .24;
  background-image:
    linear-gradient(135deg, rgba(16, 36, 63, .055) 25%, transparent 25%),
    linear-gradient(225deg, rgba(214, 184, 74, .08) 25%, transparent 25%);
  background-size: 56px 56px;
}

.bmha-hero-grid-slider,
.bmha-hero-grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(22px, 3.5vw, 48px);
  align-items: center;
  min-width: 0;
}

.bmha-kicker,
.bmha-section-eyebrow {
  color: var(--bmha-primary);
  letter-spacing: .07em;
}

.bmha-kicker::before,
.bmha-section-eyebrow::before {
  background: var(--bmha-accent);
}

.bmha-hero-title,
.bmha-hero h1 {
  color: var(--bmha-primary-2);
  font-weight: 600;
  letter-spacing: -.01em;
}

.bmha-hero-lead {
  color: #35435a;
  font-weight: 300;
}

.bmha-btn-primary {
  background: var(--bmha-primary-2);
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(16, 36, 63, .22);
}

.bmha-btn-primary:hover {
  background: var(--bmha-primary);
}

.bmha-btn-soft {
  background: rgba(255, 255, 255, .88);
  color: var(--bmha-primary-2) !important;
  border-color: rgba(16, 36, 63, .12);
}

.bmha-btn-soft:hover {
  border-color: var(--bmha-accent);
}

/* Hero image slider */
.bmha-hero-slider {
  position: relative;
  min-height: 430px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(16, 36, 63, .12);
  background: linear-gradient(135deg, #fff, #f7f5ef);
  box-shadow: 0 28px 78px rgba(16, 36, 63, .18);
}

.bmha-hero-slider-track,
.bmha-hero-slide,
.bmha-hero-slide-link {
  position: absolute;
  inset: 0;
}

.bmha-hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 520ms ease, transform 720ms ease;
}

.bmha-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 2;
}

.bmha-hero-slide-link {
  display: block;
  color: #fff !important;
}

.bmha-hero-slide-image {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 78% 10%, rgba(214, 184, 74, .36), transparent 26%),
    linear-gradient(135deg, var(--bmha-primary-2), var(--bmha-primary));
}

.bmha-hero-slide-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 36, 63, .82) 0%, rgba(16, 36, 63, .50) 46%, rgba(16, 36, 63, .16) 100%),
    linear-gradient(180deg, rgba(16, 36, 63, .08), rgba(16, 36, 63, .38));
}

.bmha-hero-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bmha-hero-slide-overlay {
  position: relative;
  z-index: 2;
  width: min(520px, 78%);
  height: 100%;
  padding: clamp(26px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bmha-hero-slide-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(247, 232, 177, .16);
  border: 1px solid rgba(247, 232, 177, .34);
  color: var(--bmha-accent-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
}

.bmha-hero-slide-overlay strong {
  max-width: 520px;
  color: #fff;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.22;
  font-weight: 600;
  text-wrap: balance;
}

.bmha-hero-slide-overlay small {
  max-width: 500px;
  margin-top: 12px;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.75;
  font-weight: 300;
}

.bmha-hero-slide-cta {
  width: fit-content;
  margin-top: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bmha-accent);
  color: var(--bmha-primary-2);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bmha-hero-slide.is-image-missing .bmha-hero-slide-image::before {
  content: "BMHA";
  position: absolute;
  right: clamp(24px, 5vw, 62px);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(247, 232, 177, .20);
  font-size: clamp(74px, 11vw, 150px);
  font-weight: 700;
  letter-spacing: .03em;
  z-index: 1;
}

.bmha-hero-slider-controls {
  position: absolute;
  left: clamp(20px, 4vw, 44px);
  right: clamp(20px, 4vw, 44px);
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: none;
}

.bmha-hero-slider-arrow,
.bmha-hero-slider-dots button {
  pointer-events: auto;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.bmha-hero-slider-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: var(--bmha-primary-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(16, 36, 63, .14);
}

.bmha-hero-slider-arrow:hover {
  background: var(--bmha-accent-2);
}

.bmha-hero-slider-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(10px);
}

.bmha-hero-slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(16, 36, 63, .32);
  transition: width 180ms ease, background 180ms ease;
}

.bmha-hero-slider-dots button.is-active {
  width: 26px;
  background: var(--bmha-accent);
}

.bmha-quick-strip-card {
  border-color: rgba(16, 36, 63, .12);
  box-shadow: 0 18px 42px rgba(16, 36, 63, .12);
}

.bmha-quick-strip-card a {
  color: var(--bmha-primary-2);
  border-color: var(--bmha-line);
}

.bmha-quick-strip-card i {
  color: var(--bmha-accent);
}

.bmha-quick-strip-card a:hover {
  background: var(--bmha-sage);
}

/* Cards / sections logo palette */
.bmha-services,
.bmha-news-section {
  background: #fffdf8;
}

.bmha-service-card,
.bmha-news-feature-card,
.bmha-news-list-card,
.bmha-announcement-card,
.bmha-contact-card,
.bmha-video-card {
  border-color: rgba(16, 36, 63, .12);
  box-shadow: 0 16px 42px rgba(16, 36, 63, .09);
}

.bmha-service-card:hover,
.bmha-news-feature-card:hover,
.bmha-news-list-item:hover,
.bmha-announcement-row:hover,
.bmha-info-card:hover {
  border-color: rgba(214, 184, 74, .55);
}

.bmha-service-icon,
.bmha-news-pill,
.bmha-panel-title a,
.bmha-link-more,
.bmha-info-body span,
.bmha-announcement-row span,
.bmha-news-list-item time,
.bmha-news-feature-body time {
  color: var(--bmha-primary);
}

.bmha-service-tag,
.bmha-news-pill {
  background: var(--bmha-sage);
  border-color: rgba(214, 184, 74, .35);
}

.bmha-service-arrow,
.bmha-contact-submit {
  background: var(--bmha-primary-2);
}

.bmha-contact-submit:hover {
  background: var(--bmha-primary);
}

.bmha-knowledge {
  background:
    radial-gradient(circle at 10% 8%, rgba(247, 232, 177, .18), transparent 26%),
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .10), transparent 28%),
    linear-gradient(135deg, #10243f, #173657 58%, #66571f);
}

.bmha-info-card {
  box-shadow: 0 18px 46px rgba(0, 0, 0, .20);
}

.bmha-learning-panel {
  background: linear-gradient(135deg, #10243f, #173657 68%, #756424);
}

.bmha-footer {
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 184, 74, .18), transparent 28%),
    linear-gradient(135deg, #0f213a, #10243f 72%, #5d501f);
}

.bmha-back-to-top {
  background: var(--bmha-primary-2);
  color: #fff;
}

.bmha-back-to-top:hover {
  background: var(--bmha-accent);
  color: var(--bmha-primary-2);
}

@media (max-width: 1199.98px) {

  .bmha-hero-grid-slider,
  .bmha-hero-grid {
    grid-template-columns: 1fr;
  }

  .bmha-hero-slider {
    min-height: 390px;
  }
}

@media (max-width: 767.98px) {

  .bmha-hero-logo,
  .bmha-hero-official {
    padding: 34px 0 78px;
  }

  .bmha-hero-slider {
    min-height: 360px;
    border-radius: 26px;
  }

  .bmha-hero-slide-overlay {
    width: 100%;
    padding: 24px;
  }

  .bmha-hero-slide-image::after {
    background:
      linear-gradient(180deg, rgba(16, 36, 63, .26) 0%, rgba(16, 36, 63, .78) 100%);
  }

  .bmha-hero-slider-controls {
    left: 18px;
    right: 18px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .bmha-hero-slider {
    min-height: 330px;
  }

  .bmha-hero-slide-overlay strong {
    font-size: 25px;
  }

  .bmha-hero-slide-overlay small {
    font-size: 14px;
  }
}

/* =========================================================
   BMHA Template v6: Soft Mist Palette
   ปรับลดน้ำเงินเข้ม เหลือฟ้าเทาหม่น + ครีม + ทองจากโลโก้
   ใช้ block นี้ override v5 โดยไม่แตะ logic / markup เดิม
   ========================================================= */

:root {
  --bmha-primary: #6f9bb2;
  /* ฟ้าเทาหม่น ใช้แทนน้ำเงินเดิม */
  --bmha-primary-2: #4f778d;
  /* สีหลักสำหรับปุ่ม/หัวข้อที่ต้องเข้มขึ้น */
  --bmha-primary-3: #a9c2cf;
  /* สีอ่อนสำหรับพื้น/เส้น */
  --bmha-accent: #d7bb4b;
  /* ทองจากโลโก้ */
  --bmha-accent-2: #fff1b8;
  --bmha-leaf: #9b8a42;
  --bmha-cream: #fff9ee;
  --bmha-mint: #f2f7f8;
  --bmha-mint-2: #e3eef2;
  --bmha-sage: #fbf7ed;
  --bmha-ink: #243447;
  --bmha-text: #34465a;
  --bmha-muted: #728091;
  --bmha-line: #dfe9ee;
  --bmha-line-2: #cbdce4;
  --bmha-shadow-sm: 0 8px 24px rgba(79, 119, 141, .08);
  --bmha-shadow-md: 0 18px 48px rgba(79, 119, 141, .12);
  --bmha-shadow-lg: 0 28px 78px rgba(79, 119, 141, .16);
}

body.bmha-public {
  background: #fffaf1;
  color: var(--bmha-text);
}

.bmha-main {
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 187, 75, .13), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(111, 155, 178, .16), transparent 30%),
    linear-gradient(180deg, #fffaf1 0%, #f6fafb 46%, #fffaf1 100%);
}

.bmha-header {
  background: rgba(255, 255, 255, .985);
  border-bottom: 1px solid rgba(79, 119, 141, .14);
  box-shadow: 0 1px 0 rgba(79, 119, 141, .05);
}

.bmha-govbar {
  background: linear-gradient(90deg, #6f9bb2 0%, #84abba 52%, #d7bb4b 100%);
  color: #ffffff;
}

.bmha-govbar a,
.bmha-govbar span {
  color: rgba(255, 255, 255, .96);
}

.bmha-staff-pill,
.bmha-font-tools {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .38);
}

.bmha-font-tools button:hover,
.bmha-font-tools button[aria-pressed="true"] {
  background: #fff8d9;
  color: var(--bmha-primary-2);
}

.bmha-brand-mark {
  background: linear-gradient(135deg, #ffffff 0%, #f2f7f8 100%);
  border-color: rgba(79, 119, 141, .15);
  box-shadow: 0 8px 22px rgba(79, 119, 141, .08);
}

.bmha-brand-text strong,
.bmha-hero-title,
.bmha-hero h1,
.bmha-nav-list .nav-link:hover,
.bmha-nav-list .nav-link.active,
.bmha-nav-list .show>.nav-link,
.bmha-dropdown-menu .dropdown-item:hover,
.bmha-mega-links a:hover {
  color: #2f5268;
}

.bmha-nav-list .nav-link.active::before,
.bmha-nav-list .nav-link:hover::before {
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary));
}

.bmha-dropdown-menu .dropdown-item:hover,
.bmha-mega-links a:hover,
.bmha-quick-strip-card a:hover,
.bmha-service-card:hover,
.bmha-news-list-item:hover,
.bmha-announcement-row:hover {
  background: #fffaf0;
}

.bmha-mega-intro,
.bmha-mega-intro-accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 241, 184, .38), transparent 30%),
    linear-gradient(135deg, #5e8da6 0%, #6f9bb2 68%, #c8ad43 100%);
}

.bmha-hero-logo,
.bmha-hero-official {
  background:
    radial-gradient(circle at 92% 8%, rgba(215, 187, 75, .20), transparent 30%),
    radial-gradient(circle at 8% 88%, rgba(111, 155, 178, .16), transparent 32%),
    linear-gradient(112deg, #fffaf1 0%, #f7fbfc 50%, #fff5d8 100%);
  border-bottom-color: rgba(79, 119, 141, .12);
}

.bmha-hero-logo::before,
.bmha-hero-official::before {
  background: linear-gradient(90deg, var(--bmha-accent), #9fb9c7, var(--bmha-accent));
}

.bmha-hero-pattern {
  opacity: .18;
  background-image:
    linear-gradient(135deg, rgba(111, 155, 178, .11) 25%, transparent 25%),
    linear-gradient(225deg, rgba(215, 187, 75, .10) 25%, transparent 25%);
}

.bmha-kicker,
.bmha-section-eyebrow,
.bmha-service-icon,
.bmha-news-pill,
.bmha-panel-title a,
.bmha-link-more,
.bmha-info-body span,
.bmha-announcement-row span,
.bmha-news-list-item time,
.bmha-news-feature-body time {
  color: var(--bmha-primary-2);
}

.bmha-hero-lead {
  color: #3d4d5d;
}

.bmha-btn-primary,
.bmha-contact-submit,
.bmha-service-arrow,
.bmha-back-to-top {
  background: #5f8fa7;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(95, 143, 167, .22);
}

.bmha-btn-primary:hover,
.bmha-contact-submit:hover,
.bmha-back-to-top:hover {
  background: #d7bb4b;
  color: #26374a !important;
}

.bmha-btn-soft {
  background: rgba(255, 255, 255, .90);
  color: #385d73 !important;
  border-color: rgba(95, 143, 167, .18);
}

.bmha-hero-slider {
  border-color: rgba(95, 143, 167, .17);
  background: linear-gradient(135deg, #ffffff, #f8fbfc);
  box-shadow: 0 28px 74px rgba(95, 143, 167, .16);
}

.bmha-hero-slide-image {
  background:
    radial-gradient(circle at 78% 10%, rgba(215, 187, 75, .30), transparent 26%),
    linear-gradient(135deg, #789fb3, #5f8fa7);
}

.bmha-hero-slide-image::after {
  background:
    linear-gradient(90deg, rgba(48, 76, 92, .72) 0%, rgba(86, 125, 145, .42) 48%, rgba(86, 125, 145, .10) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(47, 82, 104, .30));
}

.bmha-hero-slide-label {
  background: rgba(255, 241, 184, .22);
  border-color: rgba(255, 241, 184, .42);
  color: #fff4be;
}

.bmha-hero-slide-cta,
.bmha-hero-slider-dots button.is-active {
  background: var(--bmha-accent);
  color: #26374a;
}

.bmha-hero-slider-arrow {
  color: #385d73;
  box-shadow: 0 10px 22px rgba(95, 143, 167, .18);
}

.bmha-hero-slider-dots button {
  background: rgba(95, 143, 167, .35);
}

.bmha-quick-strip-card,
.bmha-service-card,
.bmha-news-feature-card,
.bmha-news-list-card,
.bmha-announcement-card,
.bmha-contact-card,
.bmha-video-card,
.bmha-info-card {
  border-color: rgba(95, 143, 167, .15);
  box-shadow: 0 16px 42px rgba(95, 143, 167, .08);
}

.bmha-service-card:hover,
.bmha-news-feature-card:hover,
.bmha-news-list-item:hover,
.bmha-announcement-row:hover,
.bmha-info-card:hover {
  border-color: rgba(215, 187, 75, .55);
}

.bmha-service-tag,
.bmha-news-pill {
  background: #fffaf0;
  border-color: rgba(215, 187, 75, .36);
}

.bmha-learning-panel {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 241, 184, .22), transparent 28%),
    linear-gradient(135deg, #6f9bb2 0%, #5f8fa7 66%, #c6aa3d 100%);
}

/* ลดโทนเข้มของคลังความรู้ ให้ยังเป็นเว็บไซต์วิชาการ ไม่เป็น block สีจัด */
.bmha-knowledge {
  color: var(--bmha-text);
  background:
    radial-gradient(circle at 8% 10%, rgba(215, 187, 75, .14), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(111, 155, 178, .14), transparent 30%),
    linear-gradient(135deg, #fffaf1 0%, #f4f8fa 100%);
}

.bmha-section-head-inverse h2,
.bmha-section-head-inverse p {
  color: var(--bmha-text);
}

.bmha-section-head-inverse p {
  opacity: 1;
  color: var(--bmha-muted);
}

.bmha-section-head-inverse .bmha-section-eyebrow {
  color: var(--bmha-primary-2);
}

.bmha-info-card {
  background: #ffffff;
  color: var(--bmha-ink);
  box-shadow: 0 16px 42px rgba(95, 143, 167, .10);
}

.bmha-footer {
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 187, 75, .20), transparent 28%),
    linear-gradient(135deg, #4f778d 0%, #5f8fa7 70%, #a58d36 100%);
}

.bmha-contact-form .form-control:focus {
  border-color: #6f9bb2;
  box-shadow: 0 0 0 .25rem rgba(111, 155, 178, .16);
}

@media (max-width: 767.98px) {
  .bmha-hero-slide-image::after {
    background: linear-gradient(180deg, rgba(70, 103, 122, .22) 0%, rgba(55, 83, 101, .72) 100%);
  }
}

/* =========================================================
   BMHA Frontend Template v7 - Clear Academic Sky
   ปรับจาก v6: สีเข้มขึ้นเล็กน้อย ไม่หม่นเทา, แก้ service card/arrow ที่ดูเป็นแถบแปลก ๆ
   ========================================================= */
:root {
  --bmha-primary: #4f8398;
  --bmha-primary-2: #2f647a;
  --bmha-primary-3: #7ea4b4;
  --bmha-accent: #d2ad3f;
  --bmha-accent-2: #fff1bd;
  --bmha-leaf: #6f866c;
  --bmha-cream: #fbf8ef;
  --bmha-mint: #edf5f7;
  --bmha-mint-2: #dcebef;
  --bmha-sage: #f7f7f1;
  --bmha-ink: #193348;
  --bmha-text: #34495a;
  --bmha-muted: #607080;
  --bmha-line: #d8e4e9;
  --bmha-line-2: #c3d5dd;
  --bmha-shadow-sm: 0 10px 28px rgba(47, 100, 122, .10);
  --bmha-shadow-md: 0 18px 48px rgba(47, 100, 122, .15);
  --bmha-shadow-lg: 0 28px 78px rgba(47, 100, 122, .18);
}

body.bmha-public {
  background: #fffdf7;
  color: var(--bmha-text);
}

.bmha-main {
  background:
    radial-gradient(circle at 12% 0%, rgba(210, 173, 63, .09), transparent 26%),
    radial-gradient(circle at 92% 12%, rgba(79, 131, 152, .10), transparent 30%),
    linear-gradient(180deg, #fffdf7 0%, #f8fbfb 44%, #ffffff 100%);
}

.bmha-govbar {
  background: linear-gradient(90deg, #2f647a 0%, #4f8398 62%, #d2ad3f 160%);
}

.bmha-header {
  box-shadow: 0 1px 0 rgba(47, 100, 122, .16), 0 10px 28px rgba(47, 100, 122, .05);
}

.bmha-brand-text strong,
.bmha-hero-title,
.bmha-hero h1,
.bmha-section-head h2 {
  color: var(--bmha-ink);
}

.bmha-brand-text small,
.bmha-section-head p,
.bmha-service-card small {
  color: var(--bmha-muted);
}

.bmha-nav-list .nav-link:hover,
.bmha-nav-list .nav-link.active,
.bmha-nav-list .show>.nav-link,
.bmha-link-more,
.bmha-panel-title a,
.bmha-kicker,
.bmha-section-eyebrow {
  color: var(--bmha-primary-2);
}

.bmha-nav-list .nav-link.active::before,
.bmha-nav-list .nav-link:hover::before,
.bmha-service-card::before {
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
}

.bmha-hero-logo,
.bmha-hero-official {
  background:
    radial-gradient(circle at 92% 8%, rgba(210, 173, 63, .18), transparent 28%),
    radial-gradient(circle at 8% 88%, rgba(79, 131, 152, .16), transparent 32%),
    linear-gradient(112deg, #fff9ea 0%, #f6fbfc 52%, #fff2c9 100%);
  border-bottom-color: rgba(47, 100, 122, .14);
}

.bmha-hero-logo::before,
.bmha-hero-official::before {
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary-3), var(--bmha-accent));
}

.bmha-hero-lead {
  color: #3b4d5b;
}

.bmha-btn-primary,
.bmha-contact-submit,
.bmha-back-to-top {
  background: linear-gradient(135deg, #3f758b 0%, #5d91a6 100%);
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(47, 100, 122, .24);
}

.bmha-btn-primary:hover,
.bmha-contact-submit:hover,
.bmha-back-to-top:hover {
  background: linear-gradient(135deg, #d2ad3f 0%, #e1c86b 100%);
  color: var(--bmha-ink) !important;
}

.bmha-btn-soft {
  background: rgba(255, 255, 255, .92);
  color: var(--bmha-primary-2) !important;
  border-color: rgba(79, 131, 152, .26);
}

.bmha-hero-slider {
  border-color: rgba(79, 131, 152, .22);
  background: linear-gradient(135deg, #ffffff, #f4f9fb);
  box-shadow: 0 28px 74px rgba(47, 100, 122, .18);
}

.bmha-hero-slide-image {
  background:
    radial-gradient(circle at 78% 10%, rgba(210, 173, 63, .28), transparent 26%),
    linear-gradient(135deg, #7ca5b6, #4f8398);
}

.bmha-hero-slide-image::after {
  background:
    linear-gradient(90deg, rgba(38, 79, 97, .70) 0%, rgba(79, 131, 152, .43) 48%, rgba(79, 131, 152, .08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(47, 100, 122, .28));
}

/* Services: แก้หน้าตาการ์ดที่ดูเหมือนระบบ และแก้ arrow ที่กลายเป็นแถบสีเต็มใบ */
.bmha-services {
  background:
    radial-gradient(circle at 12% 0%, rgba(210, 173, 63, .10), transparent 24%),
    linear-gradient(180deg, #fffdf7 0%, #f7fbfb 100%);
}

.bmha-service-card-grid {
  gap: 22px;
}

.bmha-service-card {
  min-height: 226px;
  padding: 26px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(250, 253, 253, .98) 100%);
  border: 1px solid rgba(79, 131, 152, .18);
  box-shadow: 0 16px 40px rgba(47, 100, 122, .09);
}

.bmha-service-card::before {
  height: 4px;
  opacity: .95;
}

.bmha-service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(210, 173, 63, .62);
  box-shadow: 0 22px 52px rgba(47, 100, 122, .14);
  background: #ffffff;
}

.bmha-service-tag {
  padding: 6px 12px;
  background: #fff8df;
  border: 1px solid rgba(210, 173, 63, .28);
  color: var(--bmha-primary-2);
  font-size: 12px;
  letter-spacing: .01em;
}

.bmha-service-icon {
  margin-top: 20px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: var(--bmha-primary-2);
  background:
    radial-gradient(circle at 70% 20%, rgba(210, 173, 63, .22), transparent 34%),
    linear-gradient(135deg, #eef7f8 0%, #dcebef 100%);
  box-shadow: 0 14px 28px rgba(79, 131, 152, .13);
}

.bmha-service-card strong {
  margin-top: 18px;
  color: var(--bmha-ink);
  font-weight: 700;
}

.bmha-service-arrow {
  /* override v6 ที่ทำให้ arrow เป็นแถบสีเต็มการ์ด */
  margin-top: auto;
  padding: 0;
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  border-radius: 999px;
  background: rgba(79, 131, 152, .12) !important;
  color: var(--bmha-primary-2) !important;
  box-shadow: none !important;
  transition: transform var(--bmha-transition), background var(--bmha-transition), color var(--bmha-transition);
}

.bmha-service-card:hover .bmha-service-arrow {
  transform: translateX(4px);
  background: var(--bmha-accent) !important;
  color: var(--bmha-ink) !important;
}

.bmha-quick-strip-card,
.bmha-service-card,
.bmha-news-feature-card,
.bmha-news-list-card,
.bmha-announcement-card,
.bmha-contact-card,
.bmha-video-card,
.bmha-info-card {
  border-color: rgba(79, 131, 152, .18);
  box-shadow: 0 16px 42px rgba(47, 100, 122, .09);
}

.bmha-news-section,
.bmha-contact-section {
  background: #f7fbfb;
}

.bmha-learning-panel {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 241, 184, .22), transparent 28%),
    linear-gradient(135deg, #4f8398 0%, #6da0b2 66%, #c7a239 100%);
}

.bmha-knowledge {
  background:
    radial-gradient(circle at 8% 10%, rgba(210, 173, 63, .16), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(79, 131, 152, .17), transparent 30%),
    linear-gradient(135deg, #fff8e7 0%, #eef6f8 100%);
}

.bmha-footer {
  background:
    radial-gradient(circle at 12% 0%, rgba(210, 173, 63, .22), transparent 28%),
    linear-gradient(135deg, #356d83 0%, #4f8398 72%, #a98a2f 100%);
}

.bmha-footer a:hover {
  color: #fff1bd;
}

.bmha-contact-form .form-control:focus {
  border-color: var(--bmha-primary);
  box-shadow: 0 0 0 .25rem rgba(79, 131, 152, .16);
}

@media (max-width: 991.98px) {
  .bmha-service-card {
    min-height: 210px;
  }
}

@media (max-width: 575.98px) {
  .bmha-service-card {
    padding: 22px;
    min-height: auto;
  }
}

/* =========================================================
   BMHA Frontend Template v8 - Poster News + E-Book Infographic
   ปรับระยะ section ให้กระชับขึ้น และรองรับรูปข่าว/อินโฟกราฟิกแนวตั้ง A4
   ========================================================= */
body.bmha-public .bmha-section {
  padding: clamp(42px, 5vw, 72px) 0;
}

body.bmha-public .bmha-section+.bmha-section {
  margin-top: 0;
}

body.bmha-public .bmha-section-head-compact {
  margin-bottom: clamp(22px, 3vw, 30px);
}

body.bmha-public .bmha-section-head h2 {
  margin-top: 8px;
  margin-bottom: 6px;
}

body.bmha-public .bmha-section-head p {
  max-width: 720px;
}

body.bmha-public .bmha-news-section-v8 {
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 173, 63, .08), transparent 24%),
    linear-gradient(180deg, #fffdf7 0%, #f5fafb 100%);
}

body.bmha-public .bmha-pr-layout {
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: stretch;
}

body.bmha-public .bmha-pr-feature-card,
body.bmha-public .bmha-pr-mini-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(79, 131, 152, .18);
  box-shadow: 0 16px 42px rgba(47, 100, 122, .09);
  transition: transform var(--bmha-transition), box-shadow var(--bmha-transition), border-color var(--bmha-transition);
}

body.bmha-public .bmha-pr-feature-card:hover,
body.bmha-public .bmha-pr-mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(210, 173, 63, .50);
  box-shadow: 0 22px 56px rgba(47, 100, 122, .14);
}

body.bmha-public .bmha-pr-feature-card {
  display: grid;
  grid-template-columns: minmax(170px, 44%) 1fr;
  gap: 0;
  min-height: 440px;
  border-radius: 28px;
  overflow: hidden;
}

body.bmha-public .bmha-pr-poster {
  position: relative;
  display: block;
  aspect-ratio: 210 / 297;
  padding: 10px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f8f9 100%);
  overflow: hidden;
  isolation: isolate;
}

body.bmha-public .bmha-pr-poster::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(79, 131, 152, .12);
  pointer-events: none;
  z-index: 2;
}

body.bmha-public .bmha-pr-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(25, 51, 72, .08);
  transition: transform 300ms ease;
}

body.bmha-public .bmha-pr-feature-card:hover .bmha-pr-poster img,
body.bmha-public .bmha-pr-mini-card:hover .bmha-pr-poster img {
  transform: scale(1.018);
}

body.bmha-public .bmha-pr-poster-lg {
  height: 100%;
  min-height: 440px;
}

body.bmha-public .bmha-pr-feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3vw, 38px);
}

body.bmha-public .bmha-pr-feature-body h3 {
  margin: 14px 0 10px;
  color: var(--bmha-ink);
  font-size: clamp(24px, 2.35vw, 38px);
  line-height: 1.32;
  font-weight: 700;
}

body.bmha-public .bmha-pr-feature-body h3 a:hover,
body.bmha-public .bmha-pr-mini-body h3 a:hover,
body.bmha-public .bmha-info-book-body h3 a:hover {
  color: var(--bmha-primary-2);
}

body.bmha-public .bmha-pr-feature-body time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--bmha-muted);
}

body.bmha-public .bmha-pr-poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

body.bmha-public .bmha-pr-mini-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
}

body.bmha-public .bmha-pr-mini-body {
  flex: 1;
  padding: 14px 15px 16px;
}

body.bmha-public .bmha-pr-mini-body time {
  color: var(--bmha-primary-2);
  font-size: 12px;
  font-weight: 600;
}

body.bmha-public .bmha-pr-mini-body h3 {
  margin: 7px 0 0;
  color: var(--bmha-ink);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.bmha-public .bmha-announcement-columns-v8 {
  margin-top: 24px;
  gap: 20px;
}

body.bmha-public .bmha-announcement-card {
  border-radius: 24px;
}

body.bmha-public .bmha-announcement-row {
  padding: 12px 14px;
}

body.bmha-public .bmha-learning-banner {
  padding-top: clamp(34px, 4vw, 56px);
  padding-bottom: clamp(34px, 4vw, 56px);
}

body.bmha-public .bmha-knowledge-v8 {
  color: var(--bmha-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 173, 63, .11), transparent 25%),
    radial-gradient(circle at 90% 8%, rgba(79, 131, 152, .13), transparent 28%),
    linear-gradient(180deg, #fffdf7 0%, #eef7f8 100%);
}

body.bmha-public .bmha-knowledge-v8 .bmha-section-head-inverse h2,
body.bmha-public .bmha-knowledge-v8 .bmha-section-head-inverse p {
  color: var(--bmha-ink);
}

body.bmha-public .bmha-knowledge-v8 .bmha-link-more {
  color: var(--bmha-primary-2);
}

body.bmha-public .bmha-info-book-shell {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 252, 252, .96));
  border: 1px solid rgba(79, 131, 152, .18);
  box-shadow: 0 24px 66px rgba(47, 100, 122, .11);
  overflow: hidden;
}

body.bmha-public .bmha-info-book-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary), var(--bmha-accent));
}

body.bmha-public .bmha-info-book-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body.bmha-public .bmha-info-book-top span {
  display: block;
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.bmha-public .bmha-info-book-top strong {
  display: block;
  margin-top: 3px;
  color: var(--bmha-ink);
  font-size: 22px;
  font-weight: 700;
}

body.bmha-public .bmha-info-controls {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

body.bmha-public .bmha-info-nav {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79, 131, 152, .24);
  border-radius: 999px;
  background: #ffffff;
  color: var(--bmha-primary-2);
  transition: background var(--bmha-transition), color var(--bmha-transition), transform var(--bmha-transition);
}

body.bmha-public .bmha-info-nav:hover {
  background: var(--bmha-primary-2);
  color: #ffffff;
  transform: translateY(-2px);
}

body.bmha-public .bmha-info-swiper {
  overflow: hidden;
  padding: 4px 4px 42px;
}

body.bmha-public .bmha-info-swiper .swiper-slide {
  height: auto;
}

body.bmha-public .bmha-info-book-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(79, 131, 152, .15);
  box-shadow: 0 18px 42px rgba(47, 100, 122, .10);
  overflow: hidden;
  transition: transform var(--bmha-transition), box-shadow var(--bmha-transition), border-color var(--bmha-transition);
}

body.bmha-public .bmha-info-book-card:hover {
  transform: translateY(-5px);
  border-color: rgba(210, 173, 63, .46);
  box-shadow: 0 24px 58px rgba(47, 100, 122, .15);
}

body.bmha-public .bmha-info-book-cover {
  position: relative;
  display: block;
  aspect-ratio: 210 / 297;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(25, 51, 72, .06) 0 2px, transparent 2px 100%),
    linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
  overflow: hidden;
}

body.bmha-public .bmha-info-book-cover::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bmha-accent), var(--bmha-primary-3));
  opacity: .75;
  z-index: 2;
}

body.bmha-public .bmha-info-book-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 51, 72, .08);
  transition: transform 300ms ease;
}

body.bmha-public .bmha-info-book-card:hover .bmha-info-book-cover img {
  transform: scale(1.018);
}

body.bmha-public .bmha-info-book-body {
  flex: 1;
  padding: 16px 18px 18px;
}

body.bmha-public .bmha-info-book-body span {
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
}

body.bmha-public .bmha-info-book-body h3 {
  margin: 8px 0 0;
  color: var(--bmha-ink);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.bmha-public .bmha-info-swiper .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  background: rgba(79, 131, 152, .38);
  opacity: 1;
}

body.bmha-public .bmha-info-swiper .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 999px;
  background: var(--bmha-accent);
}

@media (max-width: 1399.98px) {
  body.bmha-public .bmha-pr-layout {
    grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr);
  }

  body.bmha-public .bmha-pr-poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  body.bmha-public .bmha-pr-layout {
    grid-template-columns: 1fr;
  }

  body.bmha-public .bmha-pr-feature-card {
    grid-template-columns: 280px 1fr;
    min-height: 380px;
  }

  body.bmha-public .bmha-pr-poster-lg {
    min-height: 380px;
  }
}

@media (max-width: 991.98px) {
  body.bmha-public .bmha-section {
    padding: 42px 0;
  }

  body.bmha-public .bmha-pr-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.bmha-public .bmha-announcement-columns-v8 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  body.bmha-public .bmha-pr-feature-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.bmha-public .bmha-pr-poster-lg {
    min-height: auto;
  }

  body.bmha-public .bmha-pr-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  body.bmha-public .bmha-info-book-top {
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  body.bmha-public .bmha-section {
    padding: 34px 0;
  }

  body.bmha-public .bmha-pr-poster-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-public .bmha-pr-mini-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: stretch;
  }

  body.bmha-public .bmha-pr-mini-card .bmha-pr-poster {
    height: 100%;
  }

  body.bmha-public .bmha-pr-mini-body h3 {
    -webkit-line-clamp: 4;
  }

  body.bmha-public .bmha-info-book-shell {
    border-radius: 24px;
    padding: 16px;
  }

  body.bmha-public .bmha-info-book-top {
    display: block;
  }

  body.bmha-public .bmha-info-controls {
    margin-top: 12px;
  }
}

/* =========================================================
   BMHA Frontend Template v9 - News layout fix + New badges
   แก้ข่าว A4 ไม่ให้การ์ดด้านขวาแคบเป็นแท่ง และเพิ่ม badge ลงใหม่
   ========================================================= */
body.bmha-public .bmha-news-section-v9 {
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 173, 63, .08), transparent 24%),
    linear-gradient(180deg, #fffdf8 0%, #f3fafb 100%);
}

body.bmha-public .bmha-news-editorial {
  display: grid;
  grid-template-columns: minmax(340px, .92fr) minmax(420px, 1.08fr);
  gap: clamp(18px, 2.2vw, 28px);
  align-items: stretch;
}

body.bmha-public .bmha-news-hero-card,
body.bmha-public .bmha-news-latest-card {
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(79, 131, 152, .18);
  border-radius: 28px;
  box-shadow: 0 16px 42px rgba(47, 100, 122, .09);
  overflow: hidden;
}

body.bmha-public .bmha-news-hero-card {
  display: grid;
  grid-template-columns: minmax(220px, 45%) 1fr;
  min-height: 430px;
}

body.bmha-public .bmha-news-hero-poster {
  display: block;
  position: relative;
  height: 100%;
  min-height: 430px;
  padding: 14px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
  border-right: 1px solid rgba(79, 131, 152, .13);
}

body.bmha-public .bmha-news-hero-poster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(79, 131, 152, .14);
  pointer-events: none;
  z-index: 2;
}

body.bmha-public .bmha-news-hero-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(25, 51, 72, .09);
  transition: transform 280ms ease;
}

body.bmha-public .bmha-news-hero-card:hover .bmha-news-hero-poster img,
body.bmha-public .bmha-news-latest-row:hover .bmha-news-latest-thumb img {
  transform: scale(1.018);
}

body.bmha-public .bmha-news-hero-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 2.7vw, 36px);
}

body.bmha-public .bmha-news-hero-body h3 {
  margin: 14px 0 10px;
  color: var(--bmha-ink);
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1.34;
  font-weight: 700;
}

body.bmha-public .bmha-news-hero-body h3 a:hover,
body.bmha-public .bmha-news-latest-row:hover strong {
  color: var(--bmha-primary-2);
}

body.bmha-public .bmha-news-hero-body time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--bmha-muted);
}

body.bmha-public .bmha-news-latest-card {
  padding: clamp(18px, 2vw, 24px);
}

body.bmha-public .bmha-panel-title-v9 {
  margin-bottom: 14px;
}

body.bmha-public .bmha-news-latest-list {
  display: grid;
  gap: 12px;
}

body.bmha-public .bmha-news-latest-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(79, 131, 152, .14);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
  transition: transform var(--bmha-transition), border-color var(--bmha-transition), box-shadow var(--bmha-transition), background var(--bmha-transition);
}

body.bmha-public .bmha-news-latest-row:hover {
  transform: translateY(-2px);
  border-color: rgba(210, 173, 63, .45);
  box-shadow: 0 12px 28px rgba(47, 100, 122, .10);
  background: #ffffff;
}

body.bmha-public .bmha-news-latest-thumb {
  display: block;
  aspect-ratio: 210 / 297;
  padding: 5px;
  border-radius: 14px;
  background: #f4f8f9;
  overflow: hidden;
}

body.bmha-public .bmha-news-latest-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  background: #fff;
  transition: transform 280ms ease;
}

body.bmha-public .bmha-news-latest-text {
  min-width: 0;
}

body.bmha-public .bmha-news-latest-text time {
  display: block;
  color: var(--bmha-primary-2);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

body.bmha-public .bmha-news-latest-text strong {
  display: -webkit-box;
  color: var(--bmha-ink);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--bmha-transition);
}

body.bmha-public .bmha-announcement-columns-v9 {
  margin-top: clamp(18px, 2.2vw, 26px);
}

body.bmha-public .bmha-announcement-row-v9 {
  display: block;
  padding: 12px 14px;
}

body.bmha-public .bmha-announcement-row-v9 strong {
  display: block;
  margin-top: 6px;
}

body.bmha-public .bmha-announcement-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
}

body.bmha-public .bmha-announcement-meta time {
  color: inherit;
  font: inherit;
}

body.bmha-public .bmha-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e85545 0%, #c83c32 100%);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(200, 60, 50, .18);
}

body.bmha-public .bmha-new-badge-gold {
  background: linear-gradient(135deg, var(--bmha-accent) 0%, #bd8e20 100%);
  color: #17283b;
  box-shadow: 0 8px 18px rgba(189, 142, 32, .20);
}

@media (max-width: 1199.98px) {
  body.bmha-public .bmha-news-editorial {
    grid-template-columns: 1fr;
  }

  body.bmha-public .bmha-news-latest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.bmha-public .bmha-news-hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.bmha-public .bmha-news-hero-poster {
    min-height: auto;
    aspect-ratio: 210 / 297;
    border-right: 0;
    border-bottom: 1px solid rgba(79, 131, 152, .13);
  }

  body.bmha-public .bmha-news-latest-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  body.bmha-public .bmha-news-latest-row {
    grid-template-columns: 78px 1fr;
    gap: 12px;
  }

  body.bmha-public .bmha-news-hero-body {
    padding: 20px;
  }
}

/* =========================================================
   BMHA Frontend Template v10 - 4-column news cards + queen spacing fix
   ========================================================= */
body.bmha-public .bmha-news-section-v10 {
  background:
    radial-gradient(circle at 8% 0%, rgba(210, 173, 63, .08), transparent 24%),
    linear-gradient(180deg, #fffdf8 0%, #f4fafb 100%);
}

body.bmha-public .bmha-news-four-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
  align-items: stretch;
}

body.bmha-public .bmha-news-poster-card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(79, 131, 152, .18);
  box-shadow: 0 14px 34px rgba(47, 100, 122, .09);
  transition: transform var(--bmha-transition), border-color var(--bmha-transition), box-shadow var(--bmha-transition);
}

body.bmha-public .bmha-news-poster-card:hover {
  transform: translateY(-4px);
  border-color: rgba(210, 173, 63, .48);
  box-shadow: 0 22px 52px rgba(47, 100, 122, .14);
}

body.bmha-public .bmha-news-poster-media {
  position: relative;
  display: block;
  aspect-ratio: 210 / 297;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(25, 51, 72, .055) 0 2px, transparent 2px 100%),
    linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
  border-bottom: 1px solid rgba(79, 131, 152, .12);
  overflow: hidden;
}

body.bmha-public .bmha-news-poster-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(25, 51, 72, .08);
  transition: transform 300ms ease;
}

body.bmha-public .bmha-news-poster-card:hover .bmha-news-poster-media img {
  transform: scale(1.018);
}

body.bmha-public .bmha-news-corner-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #17283b;
  background: linear-gradient(135deg, #f5d77a 0%, var(--bmha-accent) 100%);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(189, 142, 32, .22);
}

body.bmha-public .bmha-news-poster-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}

body.bmha-public .bmha-news-poster-body time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bmha-primary-2);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 9px;
}

body.bmha-public .bmha-news-poster-body h3 {
  margin: 0;
  color: var(--bmha-ink);
  font-size: clamp(16px, 1.12vw, 19px);
  line-height: 1.48;
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.bmha-public .bmha-news-poster-body h3 a:hover {
  color: var(--bmha-primary-2);
}

body.bmha-public .bmha-news-read-link {
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bmha-primary-2);
  font-size: 14px;
  font-weight: 700;
}

body.bmha-public .bmha-news-read-link:hover {
  color: var(--bmha-accent-2);
}

body.bmha-public .bmha-announcement-columns-v10 {
  margin-top: clamp(18px, 2.2vw, 28px);
}

/* ลดช่องว่างขาวก่อน section queen และทำให้พื้นหลังต่อเนื่องกับภาพ/พื้นดำของ queen */
body.bmha-public .bmha-legacy-queen {
  padding: 0 !important;
  margin: 0 !important;
  background: #111416 !important;
  overflow: hidden;
}

body.bmha-public .bmha-legacy-queen>.container,
body.bmha-public .bmha-legacy-queen>.container-fluid {
  max-width: none !important;
}

body.bmha-public .bmha-legacy-queen .container-fluid:first-child {
  margin-top: 0 !important;
}

@media (max-width: 1199.98px) {
  body.bmha-public .bmha-news-four-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body.bmha-public .bmha-news-four-grid {
    grid-template-columns: 1fr;
  }

  body.bmha-public .bmha-news-poster-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    align-items: stretch;
  }

  body.bmha-public .bmha-news-poster-media {
    height: 100%;
    min-height: 174px;
    padding: 8px;
    border-bottom: 0;
    border-right: 1px solid rgba(79, 131, 152, .12);
  }

  body.bmha-public .bmha-news-poster-body {
    padding: 14px;
  }

  body.bmha-public .bmha-news-poster-body h3 {
    -webkit-line-clamp: 4;
  }
}

/* =========================================================
   BMHA Frontend Template v11
   - Fix queen top gap / dark band rhythm
   - New blinking badge
   - Light performance refinements
   ========================================================= */

/* ให้แถบเมนูใต้ Hero ไม่ดูชนกับ section ถัดไป และลดความรู้สึกเป็นกล่องลอยบนพื้นดำ */
body.bmha-public .bmha-quick-strip {
  margin-bottom: clamp(22px, 3vw, 38px);
}

/* Queen section: ลดช่องดำด้านบน แต่ยังคงฟีลพื้นหลังเข้มของภาพพระราชดำรัส */
body.bmha-public .bmha-legacy-queen {
  margin-top: 0 !important;
  padding: 0 !important;
  background: #111416 !important;
  overflow: hidden;
}

body.bmha-public .bmha-legacy-queen>.container-fluid,
body.bmha-public .bmha-legacy-queen>.container {
  max-width: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.bmha-public .bmha-legacy-queen>.container-fluid>.container,
body.bmha-public .bmha-legacy-queen>.container>.container,
body.bmha-public .bmha-legacy-queen .container.py-5 {
  padding-top: clamp(30px, 3.6vw, 54px) !important;
  padding-bottom: clamp(38px, 4.2vw, 66px) !important;
}

body.bmha-public .bmha-legacy-queen h1,
body.bmha-public .bmha-legacy-queen h2,
body.bmha-public .bmha-legacy-queen h3,
body.bmha-public .bmha-legacy-queen h4 {
  margin-top: 0 !important;
}

/* Badge New: ใช้คำสั้น อ่านง่าย และมีจังหวะกระพริบแบบสุภาพ ไม่แสบตา */
body.bmha-public .bmha-new-badge {
  position: relative;
  isolation: isolate;
  min-height: 21px;
  padding: 3px 9px 3px 18px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #f05a4a 0%, #c9362f 100%);
  color: #fff;
  animation: bmhaNewBlink 1.25s ease-in-out infinite;
}

body.bmha-public .bmha-new-badge::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .68);
  animation: bmhaNewDot 1.25s ease-in-out infinite;
}

body.bmha-public .bmha-new-badge-gold {
  background: linear-gradient(135deg, #f4cf61 0%, #c99a2d 100%);
  color: #17283b;
}

body.bmha-public .bmha-new-badge-gold::before {
  background: #17283b;
}

@keyframes bmhaNewBlink {

  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }

  50% {
    transform: translateY(-1px);
    filter: brightness(1.17);
  }
}

@keyframes bmhaNewDot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .45);
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
    opacity: .72;
  }
}

/* ลดภาระ repaint ตอน scroll โดยเฉพาะ card/slider ที่มี shadow และรูปเยอะ */
body.bmha-public .bmha-hero-slider,
body.bmha-public .bmha-info-swiper,
body.bmha-public .bmha-news-poster-card,
body.bmha-public .bmha-announcement-card,
body.bmha-public .bmha-service-card,
body.bmha-public .bmha-info-book {
  transform: translateZ(0);
  backface-visibility: hidden;
}

body.bmha-public .bmha-news-section,
body.bmha-public .bmha-knowledge,
body.bmha-public .bmha-contact-section {
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}

@media (prefers-reduced-motion: reduce) {

  body.bmha-public .bmha-new-badge,
  body.bmha-public .bmha-new-badge::before {
    animation: none !important;
  }
}

@media (max-width: 767.98px) {
  body.bmha-public .bmha-quick-strip {
    margin-bottom: 18px;
  }

  body.bmha-public .bmha-legacy-queen>.container-fluid>.container,
  body.bmha-public .bmha-legacy-queen>.container>.container,
  body.bmha-public .bmha-legacy-queen .container.py-5 {
    padding-top: 28px !important;
    padding-bottom: 42px !important;
  }
}

/* =========================================================
   BMHA v20: Navigation states / desktop hover / mobile submenu
   - แยกสถานะปกติ, hover, active ให้ชัด
   - desktop: เอาเมาส์ชี้แล้วเปิด dropdown
   - mobile: กดเพื่อเปิด accordion พร้อมลูกศร
   ========================================================= */

.bmha-nav-list .nav-link,
.bmha-nav-list button.nav-link,
.bmha-nav-dropdown-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font-family: 'Kanit', sans-serif !important;
  text-align: left;
  cursor: pointer;
}

.bmha-nav-list .nav-link {
  isolation: isolate;
}

.bmha-nav-list .nav-link.active,
.bmha-nav-list .nav-link.is-current {
  color: var(--bmha-primary) !important;
  font-weight: 600;
}

.bmha-nav-list .nav-link.active::before,
.bmha-nav-list .nav-link.is-current::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bmha-accent), var(--bmha-primary));
  opacity: .9;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1200px) {

  .bmha-nav-list .nav-link:hover,
  .bmha-nav-list .nav-item.dropdown:hover>.nav-link {
    color: var(--bmha-primary) !important;
  }

  .bmha-nav-list .nav-link:hover::before,
  .bmha-nav-list .nav-item.dropdown:hover>.nav-link::before,
  .bmha-nav-list .nav-item.dropdown:focus-within>.nav-link::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 18px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
    opacity: 1;
  }
}

@media (min-width: 1200px) {
  .bmha-nav-list .nav-item.dropdown {
    position: relative;
  }

  .bmha-nav-list .dropdown-menu,
  .bmha-nav-list .bmha-dropdown-menu,
  .bmha-nav-list .bmha-mega-menu {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .bmha-nav-list .nav-item.dropdown:hover>.dropdown-menu,
  .bmha-nav-list .nav-item.dropdown:focus-within>.dropdown-menu,
  .bmha-nav-list .nav-item.dropdown.is-open>.dropdown-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .bmha-nav-list .bmha-dropdown-menu {
    top: 100%;
    left: 0;
    right: auto;
    min-width: 250px;
    margin-top: 0;
  }

  .bmha-nav-list .bmha-mega-menu {
    top: 100%;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, 10px) !important;
    width: min(980px, calc(100vw - 72px));
    margin-top: 0;
  }

  .bmha-nav-list .nav-item.dropdown:hover>.bmha-mega-menu,
  .bmha-nav-list .nav-item.dropdown:focus-within>.bmha-mega-menu,
  .bmha-nav-list .nav-item.dropdown.is-open>.bmha-mega-menu {
    transform: translate(-50%, 0) !important;
  }

  .bmha-nav-list .bmha-service-menu {
    width: min(1080px, calc(100vw - 72px));
  }

  .bmha-nav-list .dropdown-menu[data-bs-popper] {
    margin-top: 0;
  }

  .bmha-nav-list .dropdown-toggle::after,
  .bmha-nav-list .bmha-nav-dropdown-toggle::after {
    content: "\f107";
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
    border: 0 !important;
    margin-left: 8px;
    vertical-align: 0;
    font-size: 12px;
    color: currentColor;
    opacity: .75;
    transition: transform 160ms ease;
  }

  .bmha-nav-list .nav-item.dropdown:hover>.dropdown-toggle::after,
  .bmha-nav-list .nav-item.dropdown:focus-within>.dropdown-toggle::after,
  .bmha-nav-list .nav-item.dropdown.is-open>.dropdown-toggle::after {
    transform: rotate(180deg);
  }
}

@media (max-width: 1199.98px) {
  .bmha-navbar .navbar-collapse {
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 0 0 22px;
    scrollbar-width: thin;
  }

  .bmha-nav-list {
    gap: 0;
    padding: 8px 0 22px;
  }

  .bmha-nav-list .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--bmha-line);
  }

  .bmha-nav-list .nav-link,
  .bmha-nav-list button.nav-link {
    position: relative;
    width: 100%;
    min-height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px !important;
    color: var(--bmha-ink) !important;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0;
  }

  .bmha-nav-list .nav-link.active,
  .bmha-nav-list .nav-link.is-current {
    color: var(--bmha-primary) !important;
    background: transparent;
  }

  .bmha-nav-list .nav-link.active::before,
  .bmha-nav-list .nav-link.is-current::before,
  .bmha-nav-list .nav-link:hover::before {
    display: none !important;
  }

  .bmha-nav-list .nav-item.dropdown>.dropdown-toggle::after,
  .bmha-nav-list .nav-item.dropdown>.bmha-nav-dropdown-toggle::after {
    content: "\f107";
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900;
    border: 0 !important;
    margin: 0 !important;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--bmha-primary);
    background: rgba(22, 163, 148, .10);
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
  }

  .bmha-nav-list .nav-item.dropdown.is-open>.dropdown-toggle::after,
  .bmha-nav-list .nav-item.dropdown.is-open>.bmha-nav-dropdown-toggle::after {
    transform: rotate(180deg);
    color: #fff;
    background: var(--bmha-primary);
  }

  .bmha-nav-list .dropdown-menu,
  .bmha-nav-list .bmha-dropdown-menu,
  .bmha-nav-list .bmha-mega-menu {
    position: static !important;
    float: none !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 12px 14px !important;
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    border: 0 !important;
    border-left: 3px solid rgba(22, 163, 148, .18) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .bmha-nav-list .nav-item.dropdown.is-open>.dropdown-menu,
  .bmha-nav-list .dropdown-menu.show {
    display: block !important;
  }

  .bmha-mega-grid,
  .bmha-mega-links,
  .bmha-mega-links-2col {
    display: block !important;
  }

  .bmha-mega-intro {
    display: none !important;
  }

  .bmha-nav-list .dropdown-menu .dropdown-item,
  .bmha-nav-list .bmha-mega-links a {
    display: block;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 12px;
    color: var(--bmha-text);
    font-size: 15px;
    font-weight: 400;
  }

  .bmha-nav-list .dropdown-menu .dropdown-item:hover,
  .bmha-nav-list .bmha-mega-links a:hover,
  .bmha-nav-list .dropdown-menu .dropdown-item:focus,
  .bmha-nav-list .bmha-mega-links a:focus {
    background: rgba(22, 163, 148, .08);
    color: var(--bmha-primary);
  }
}

/* =========================================================
   BMHA Home Final Layout: Services + Knowledge Hub
   เพิ่มสำหรับหน้า index.php หลังจัดลดความซ้ำของเมนูบริการ
   ========================================================= */
body.bmha-public .bmha-home-services {
  position: relative;
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 173, 63, .10), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f7fbfb 100%);
}

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

body.bmha-public .bmha-home-service-card {
  position: relative;
  min-height: 148px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  gap: 16px;
  align-items: start;
  padding: 22px;
  color: var(--bmha-text);
  text-decoration: none;
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(79, 131, 152, .14);
  box-shadow: 0 16px 42px rgba(47, 100, 122, .08);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-public .bmha-home-service-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bmha-primary), var(--bmha-accent));
  opacity: .76;
}

body.bmha-public .bmha-home-service-card:hover,
body.bmha-public .bmha-home-service-card:focus {
  color: var(--bmha-text);
  transform: translateY(-4px);
  border-color: rgba(210, 173, 63, .44);
  box-shadow: 0 22px 52px rgba(47, 100, 122, .12);
}

body.bmha-public .bmha-home-service-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: var(--bmha-primary-2);
  background:
    radial-gradient(circle at 30% 15%, rgba(255, 255, 255, .9), transparent 38%),
    linear-gradient(135deg, rgba(79, 131, 152, .16), rgba(210, 173, 63, .13));
  font-size: 23px;
}

body.bmha-public .bmha-home-service-body {
  display: grid;
  gap: 8px;
}

body.bmha-public .bmha-home-service-body strong {
  color: var(--bmha-primary-2);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
}

body.bmha-public .bmha-home-service-body small {
  color: var(--bmha-muted);
  font-size: 14px;
  line-height: 1.65;
}

body.bmha-public .bmha-home-service-arrow {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--bmha-primary-2);
  background: rgba(79, 131, 152, .10);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

body.bmha-public .bmha-home-service-card:hover .bmha-home-service-arrow {
  transform: translateX(3px);
  color: #fff;
  background: var(--bmha-primary);
}

body.bmha-public .bmha-home-spotlight {
  position: relative;
  padding: clamp(46px, 5vw, 68px) 0;
  background:
    radial-gradient(circle at 8% 20%, rgba(79, 131, 152, .13), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(210, 173, 63, .18), transparent 34%),
    linear-gradient(180deg, #fbfcf8 0%, #eef7f8 100%);
  overflow: hidden;
}

body.bmha-public .bmha-home-spotlight::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(79, 131, 152, .10);
  border-radius: 34px;
  pointer-events: none;
}

body.bmha-public .bmha-home-spotlight-head {
  position: relative;
  max-width: 860px;
  margin-bottom: 28px;
}

body.bmha-public .bmha-home-spotlight-head h2 {
  margin: 8px 0 8px;
  color: var(--bmha-primary-2);
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.18;
  font-weight: 800;
}

body.bmha-public .bmha-home-spotlight-head p {
  max-width: 780px;
  margin: 0;
  color: var(--bmha-muted);
  font-size: 16px;
  line-height: 1.75;
}

body.bmha-public .bmha-home-spotlight-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(260px, .8fr);
  gap: 18px;
  align-items: stretch;
}

body.bmha-public .bmha-home-spotlight-card,
body.bmha-public .bmha-home-spotlight-links {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(79, 131, 152, .14);
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(47, 100, 122, .09);
  backdrop-filter: blur(10px);
}

body.bmha-public .bmha-home-spotlight-card {
  position: relative;
  min-height: 292px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  color: var(--bmha-text);
  text-decoration: none;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.bmha-public .bmha-home-spotlight-card::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -54px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(79, 131, 152, .10);
}

body.bmha-public .bmha-home-spotlight-card.is-elearning::after {
  background: rgba(210, 173, 63, .17);
}

body.bmha-public .bmha-home-spotlight-card:hover,
body.bmha-public .bmha-home-spotlight-card:focus {
  color: var(--bmha-text);
  transform: translateY(-4px);
  border-color: rgba(210, 173, 63, .44);
  box-shadow: 0 24px 56px rgba(47, 100, 122, .13);
}

body.bmha-public .bmha-home-spotlight-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: #fff;
  font-size: 26px;
  background: linear-gradient(135deg, var(--bmha-primary), var(--bmha-primary-2));
  box-shadow: 0 14px 30px rgba(79, 131, 152, .22);
}

body.bmha-public .bmha-home-spotlight-card.is-elearning .bmha-home-spotlight-icon {
  background: linear-gradient(135deg, var(--bmha-accent), #b98821);
  box-shadow: 0 14px 30px rgba(210, 173, 63, .25);
}

body.bmha-public .bmha-home-spotlight-kicker {
  color: var(--bmha-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bmha-public .bmha-home-spotlight-card strong {
  margin-top: 8px;
  color: var(--bmha-primary-2);
  font-size: clamp(23px, 2vw, 31px);
  line-height: 1.25;
  font-weight: 800;
}

body.bmha-public .bmha-home-spotlight-desc {
  margin-top: 12px;
  color: var(--bmha-muted);
  font-size: 15px;
  line-height: 1.72;
}

body.bmha-public .bmha-home-spotlight-more {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 22px;
  color: var(--bmha-primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.bmha-public .bmha-home-spotlight-links {
  padding: 14px;
  display: grid;
  gap: 10px;
}

body.bmha-public .bmha-home-spotlight-links a {
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  color: var(--bmha-text);
  text-decoration: none;
  background: rgba(248, 251, 250, .92);
  border: 1px solid rgba(79, 131, 152, .08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.bmha-public .bmha-home-spotlight-links a:hover,
body.bmha-public .bmha-home-spotlight-links a:focus {
  transform: translateX(3px);
  color: var(--bmha-primary-2);
  background: #fff;
  border-color: rgba(210, 173, 63, .34);
}

body.bmha-public .bmha-home-spotlight-links i {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--bmha-primary);
  background: rgba(79, 131, 152, .10);
}

body.bmha-public .bmha-home-spotlight-links span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 1199.98px) {

  body.bmha-public .bmha-home-services-grid,
  body.bmha-public .bmha-home-spotlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bmha-public .bmha-home-spotlight-links {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {

  body.bmha-public .bmha-home-services-grid,
  body.bmha-public .bmha-home-spotlight-grid,
  body.bmha-public .bmha-home-spotlight-links {
    grid-template-columns: 1fr;
  }

  body.bmha-public .bmha-home-service-card {
    min-height: auto;
    grid-template-columns: 52px minmax(0, 1fr);
  }

  body.bmha-public .bmha-home-service-arrow {
    display: none;
  }

  body.bmha-public .bmha-home-spotlight {
    padding: 42px 0 46px;
  }

  body.bmha-public .bmha-home-spotlight-card {
    min-height: auto;
    padding: 24px;
  }
}

/* =========================================================
   BMHA Home Final Refinement Step 30
   - Hero banner slider
   - Contact video/card balance
   - Scoped royal mourning tone is in queen.php
   ========================================================= */

/* Hero banner slider */
.bmha-hero-banner-mode {
  padding-top: clamp(46px, 5vw, 78px);
  padding-bottom: clamp(72px, 7vw, 110px);
}

.bmha-hero-banner-mode .bmha-hero-grid-banner {
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(22px, 3.2vw, 46px);
  min-width: 0;
}

.bmha-hero-banner-mode .bmha-hero-copy {
  max-width: 760px;
}

.bmha-hero-banner-mode .bmha-hero-banner-slider {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: clamp(310px, 28vw, 430px);
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #10243f;
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow:
    0 24px 60px rgba(16, 36, 63, .18),
    0 0 0 1px rgba(16, 36, 63, .06);
}

.bmha-hero-banner-mode .bmha-hero-banner-link {
  overflow: hidden;
}

.bmha-hero-banner-mode .bmha-hero-banner-image::after {
  background:
    linear-gradient(90deg, rgba(16, 36, 63, .74) 0%, rgba(16, 36, 63, .44) 38%, rgba(16, 36, 63, .08) 70%, rgba(16, 36, 63, .18) 100%),
    linear-gradient(180deg, rgba(16, 36, 63, .10) 0%, rgba(16, 36, 63, .52) 100%);
}

.bmha-hero-banner-mode .bmha-hero-banner-image img {
  transform: scale(1.02);
  transition: transform 4200ms ease;
}

.bmha-hero-banner-mode .bmha-hero-banner-slide.is-active .bmha-hero-banner-image img {
  transform: scale(1.075);
}

.bmha-hero-banner-mode .bmha-hero-banner-caption {
  width: min(560px, 78%);
  padding: clamp(28px, 4vw, 52px);
  justify-content: center;
}

.bmha-hero-banner-mode .bmha-hero-slide-label {
  background: rgba(247, 232, 177, .18);
  border-color: rgba(247, 232, 177, .36);
}

.bmha-hero-banner-mode .bmha-hero-banner-caption strong {
  font-size: clamp(28px, 3.2vw, 46px);
}

.bmha-hero-banner-mode .bmha-hero-banner-caption small {
  max-width: 520px;
}

.bmha-hero-banner-mode .bmha-hero-slider-controls {
  left: auto;
  right: clamp(18px, 3vw, 36px);
  bottom: clamp(16px, 2vw, 24px);
}

.bmha-hero-banner-mode .bmha-hero-slider-arrow {
  background: rgba(255, 255, 255, .92);
}

.bmha-hero-banner-mode .bmha-hero-slider-dots {
  background: rgba(255, 255, 255, .80);
}

/* Contact: make video card visually balance with the form card */
.bmha-contact-grid {
  align-items: stretch;
}

.bmha-contact-grid>.bmha-video-card,
.bmha-contact-grid>.bmha-contact-card {
  min-height: 100%;
}

.bmha-video-card {
  display: flex;
  flex-direction: column;
}

.bmha-video-card .bmha-section-head {
  margin-bottom: 20px;
}

.bmha-video-support {
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 184, 74, .18), transparent 28%),
    linear-gradient(180deg, #fbfffd 0%, #f7f5ef 100%);
  border: 1px solid rgba(16, 36, 63, .10);
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
}

.bmha-video-support-copy span {
  display: inline-flex;
  color: var(--bmha-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bmha-video-support-copy strong {
  display: block;
  margin-top: 7px;
  color: var(--bmha-ink);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
}

.bmha-video-support-copy p {
  margin: 8px 0 0;
  color: var(--bmha-muted);
  line-height: 1.72;
}

.bmha-video-links {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.bmha-video-links a {
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(16, 36, 63, .10);
  color: var(--bmha-primary-2);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform var(--bmha-transition), border-color var(--bmha-transition), background var(--bmha-transition);
}

.bmha-video-links a:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(214, 184, 74, .52);
}

.bmha-video-links i {
  color: var(--bmha-accent);
}

@media (max-width: 1199.98px) {
  .bmha-hero-banner-mode .bmha-hero-grid-banner {
    grid-template-columns: 1fr;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slider {
    min-height: auto;
    aspect-ratio: 16 / 8.4;
  }
}

@media (max-width: 767.98px) {
  .bmha-hero-banner-mode .bmha-hero-banner-slider {
    aspect-ratio: 4 / 3;
    border-radius: 24px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-caption {
    width: 100%;
    justify-content: flex-end;
    padding: 24px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-caption small {
    display: none;
  }

  .bmha-hero-banner-mode .bmha-hero-slider-controls {
    left: 18px;
    right: 18px;
    justify-content: space-between;
  }

  .bmha-hero-banner-mode .bmha-hero-slider-dots {
    order: 2;
  }

  .bmha-video-support {
    padding: 18px;
  }
}

/* =========================================================
   BMHA Loader Clean Single
   ใช้กับ includes/page_loader.php
   ========================================================= */

.bmha-page-loader {
  --bmha-loader-bg-1: #fffdf7;
  --bmha-loader-bg-2: #f6faf8;
  --bmha-loader-bg-3: #eef7f6;
  --bmha-loader-card-bg: rgba(255, 255, 255, .90);
  --bmha-loader-card-border: rgba(16, 36, 63, .10);
  --bmha-loader-gold: var(--bmha-accent, #d6b84a);
  --bmha-loader-navy: var(--bmha-primary, #173657);
  --bmha-loader-mint: #75b99f;

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  color: var(--bmha-primary-2, #10243f);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .34) 34%, transparent 62%),
    radial-gradient(circle at 18% 18%, rgba(214, 184, 74, .15), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(23, 54, 87, .10), transparent 32%),
    radial-gradient(circle at 76% 78%, rgba(117, 185, 159, .14), transparent 36%),
    linear-gradient(125deg, var(--bmha-loader-bg-1) 0%, var(--bmha-loader-bg-2) 52%, var(--bmha-loader-bg-3) 100%);
  opacity: 1;
  visibility: visible;
  transition:
    opacity .48s cubic-bezier(.22, .61, .36, 1),
    visibility .48s cubic-bezier(.22, .61, .36, 1);
}

.bmha-page-loader::before {
  content: "";
  position: absolute;
  inset: -18%;
  opacity: .30;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, rgba(16, 36, 63, .045) 25%, transparent 25%),
    linear-gradient(225deg, rgba(214, 184, 74, .055) 25%, transparent 25%);
  background-size: 58px 58px;
}

/* เส้นวิ่งด้านล่างจอ */
.bmha-page-loader::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 2;
  background:
    linear-gradient(90deg,
      transparent 0%,
      var(--bmha-loader-gold) 18%,
      var(--bmha-loader-navy) 48%,
      var(--bmha-loader-mint) 72%,
      transparent 100%);
  background-size: 240% 100%;
  animation: bmhaLoaderScreenLineClean 1.55s cubic-bezier(.45, 0, .2, 1) infinite;
  box-shadow: 0 -8px 24px rgba(16, 36, 63, .13);
}

.bmha-page-loader.is-hidden,
body.bmha-loaded .bmha-page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bmha-page-loader.is-hidden::after,
body.bmha-loaded .bmha-page-loader::after {
  animation: none;
}

.bmha-page-loader-card {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: min(380px, calc(100vw - 48px));
  min-width: 0;
  padding: 18px 20px 28px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bmha-loader-card-bg);
  border: 1px solid var(--bmha-loader-card-border);
  box-shadow:
    0 22px 70px rgba(16, 36, 63, .14),
    inset 0 1px 0 rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
}

.bmha-loader-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 14px);
  grid-template-rows: repeat(2, 14px);
  gap: 6px;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.bmha-loader-mark span {
  display: block;
  border-radius: 999px;
  background: var(--bmha-loader-navy);
  animation: bmhaLoaderDotClean 1.12s cubic-bezier(.45, 0, .2, 1) infinite;
}

.bmha-loader-mark span:nth-child(2) {
  background: var(--bmha-loader-gold);
  animation-delay: .12s;
}

.bmha-loader-mark span:nth-child(3) {
  background: var(--bmha-loader-mint);
  animation-delay: .24s;
}

.bmha-loader-mark span:nth-child(4) {
  background: var(--bmha-primary-2, #10243f);
  animation-delay: .36s;
}

.bmha-loader-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}

.bmha-loader-text strong {
  color: var(--bmha-primary-2, #10243f);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .08em;
}

.bmha-loader-text small {
  color: var(--bmha-muted, #64748b);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* เส้นวิ่งในกล่อง BMHA */
.bmha-loader-progress {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 12px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 36, 63, .08);
}

.bmha-loader-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background:
    linear-gradient(90deg,
      var(--bmha-loader-gold),
      var(--bmha-loader-navy),
      var(--bmha-loader-mint));
  transform: translateX(-115%);
  animation: bmhaLoaderCardLineClean 1.28s cubic-bezier(.45, 0, .2, 1) infinite;
}

/* กัน pseudo เก่ากลับมาชน ถ้ามีหลุดมาจาก block อื่น */
.bmha-loader-progress::before,
.bmha-loader-progress::after {
  display: none;
  content: none;
}

@keyframes bmhaLoaderDotClean {

  0%,
  100% {
    transform: scale(.80);
    opacity: .55;
  }

  48%,
  55% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bmhaLoaderCardLineClean {
  0% {
    transform: translateX(-115%);
    opacity: .38;
  }

  18% {
    opacity: 1;
  }

  78% {
    opacity: 1;
  }

  100% {
    transform: translateX(260%);
    opacity: .38;
  }
}

@keyframes bmhaLoaderScreenLineClean {
  0% {
    background-position: 120% 0;
    opacity: .50;
  }

  45% {
    opacity: 1;
  }

  100% {
    background-position: -120% 0;
    opacity: .50;
  }
}

@media (max-width: 575.98px) {
  .bmha-page-loader-card {
    width: min(330px, calc(100vw - 32px));
    gap: 13px;
    padding: 16px 17px 27px;
    border-radius: 22px;
  }

  .bmha-loader-text strong {
    font-size: 16px;
  }

  .bmha-loader-text small {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .bmha-page-loader::after,
  .bmha-loader-progress span,
  .bmha-loader-mark span {
    animation: none !important;
  }
}

/* =========================================================
   BMHA Home Hero Banner Final Polish
   ========================================================= */

.bmha-hero-banner-slider {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 24px 64px rgba(16, 36, 63, .16);
  background: #10243f;
}

.bmha-hero-banner-slide {
  min-height: 360px;
}

.bmha-hero-banner-image {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.bmha-hero-banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 6s ease;
}

.bmha-hero-banner-slide.is-active .bmha-hero-banner-image img {
  transform: scale(1.055);
}

.bmha-hero-banner-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10, 31, 52, .62) 0%, rgba(10, 31, 52, .28) 42%, rgba(10, 31, 52, .10) 100%),
    linear-gradient(180deg, rgba(10, 31, 52, .04) 0%, rgba(10, 31, 52, .38) 100%);
  pointer-events: none;
}

.bmha-hero-banner-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  z-index: 2;
  max-width: 560px;
  padding: 0;
  background: transparent;
  color: #ffffff;
}

.bmha-hero-banner-caption .bmha-hero-slide-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff4c6;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
}

.bmha-hero-banner-caption strong {
  display: block;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.3vw, 2.15rem);
  line-height: 1.18;
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .34);
}

.bmha-hero-banner-caption small {
  display: block;
  max-width: 520px;
  margin-top: 8px;
  color: rgba(255, 255, 255, .88);
  font-size: .95rem;
  line-height: 1.55;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .28);
}

.bmha-hero-banner-caption .bmha-hero-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bmha-accent, #d6b84a);
  color: #10243f;
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.bmha-hero-slider-controls {
  z-index: 5;
}

/* =========================================================
   BMHA Hero Banner Refine
   ปรับ hero ฝั่งขวาให้ไม่แน่น/ไม่ล้นเกิน
   ========================================================= */

.bmha-hero-banner-mode .bmha-hero-grid-banner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: center;
}

.bmha-hero-banner-mode .bmha-hero-copy {
  max-width: 560px;
  min-width: 0;
}

.bmha-hero-banner-mode .bmha-hero-title {
  max-width: 10ch;
  line-height: 1.06;
}

.bmha-hero-banner-mode .bmha-hero-lead {
  max-width: 30ch;
  line-height: 1.72;
}

.bmha-hero-banner-mode .bmha-hero-banner-slider {
  width: 100%;
  max-width: 840px;
  min-width: 0;
  min-height: 415px;
  margin-left: auto;
  border-radius: 32px;
  overflow: hidden;
}

.bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption {
  width: min(560px, calc(100% - 72px));
  padding: 34px 34px 92px;
  justify-content: flex-end;
}

.bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-slide-label {
  margin-bottom: 12px;
  font-size: 13px;
  padding: 7px 13px;
}

.bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption strong {
  max-width: 12.5ch;
  font-size: clamp(38px, 3.35vw, 54px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption small {
  max-width: 46ch;
  margin-top: 11px;
  font-size: 15px;
  line-height: 1.62;
  color: rgba(255, 255, 255, .9);
}

.bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-slide-cta {
  margin-top: 17px;
  padding: 9px 16px;
  font-size: 15px;
}
.bmha-hero-banner-mode .bmha-hero-slider-controls {
  left: 24px;
  right: 24px;
  bottom: 18px;
  justify-content: flex-end;
}

.bmha-hero-banner-mode .bmha-hero-slider-arrow {
  width: 34px;
  height: 34px;
}

.bmha-hero-banner-mode .bmha-hero-slider-dots {
  padding: 8px 10px;
  gap: 6px;
}

.bmha-hero-banner-mode .bmha-hero-slider-dots button {
  width: 8px;
  height: 8px;
}

.bmha-hero-banner-mode .bmha-hero-slider-dots button.is-active {
  width: 24px;
}

.bmha-hero-banner-mode .bmha-hero-slide-image::after {
  background:
    linear-gradient(90deg, rgba(11, 31, 54, .82) 0%, rgba(11, 31, 54, .58) 44%, rgba(11, 31, 54, .22) 74%, rgba(11, 31, 54, .08) 100%),
    linear-gradient(180deg, rgba(11, 31, 54, .10), rgba(11, 31, 54, .34));
}

/* ---------- Tablet ---------- */
@media (max-width: 1199.98px) {
  .bmha-hero-banner-mode .bmha-hero-grid-banner {
    grid-template-columns: 1fr;
    gap: 28px;
    min-width: 0;
  }

  .bmha-hero-banner-mode .bmha-hero-copy,
  .bmha-hero-banner-mode .bmha-hero-slider,
  .bmha-hero-banner-mode .bmha-hero-banner-slider {
    max-width: 100%;
    min-width: 0;
  }

  .bmha-hero-banner-mode .bmha-hero-title,
  .bmha-hero-banner-mode .bmha-hero-lead {
    max-width: 100%;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slider {
    width: 100%;
    min-height: 390px;
    margin-left: 0;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide {
    min-height: 390px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
  .bmha-hero-banner-mode .bmha-hero-banner-slider {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 320px;
    border-radius: 24px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide {
    min-height: 320px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption {
    width: auto;
    max-width: none;
    padding: 20px 18px 74px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption strong {
    max-width: 100%;
    font-size: 24px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption small {
    display: none;
  }

  .bmha-hero-banner-mode .bmha-hero-slider-controls {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .bmha-hero-banner-mode .bmha-hero-banner-slider {
    min-height: 260px;
    border-radius: 22px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide {
    min-height: 260px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption {
    width: auto;
    max-width: none;
    padding: 18px 14px 66px;
  }

  .bmha-hero-banner-mode .bmha-hero-banner-slide .bmha-hero-banner-caption strong {
    font-size: 1.25rem;
  }
}

/* =========================================================
   BMHA: Hero wide layout เฉพาะหน้าแรก
   กว้างขึ้นแบบมีเพดาน ไม่ให้ banner ใหญ่เกิน
   ========================================================= */
@media (min-width: 1200px) {
  body.bmha-public .bmha-hero-banner-mode>.bmha-container {
    max-width: 1640px;
    width: 100%;
    padding-inline: clamp(24px, 3vw, 56px);
  }

  body.bmha-public .bmha-hero-banner-mode .bmha-hero-grid-banner {
    grid-template-columns: minmax(340px, 440px) minmax(640px, 960px);
    justify-content: center;
    gap: clamp(16px, 1.6vw, 26px);
  }

  body.bmha-public .bmha-hero-banner-mode .bmha-hero-copy {
    max-width: 440px;
  }

  body.bmha-public .bmha-hero-banner-mode .bmha-hero-banner-slider {
    width: 100%;
    max-width: 960px;
  }
}