/* =========================================================
   Beranda PPID - bagian "Layanan" & "Galeri" (desain modern)
   Semua selector berawalan .bm- agar tidak memengaruhi gaya situs lama.
   ========================================================= */

.bm-section {
  --bm-navy: var(--ui-navy, #234974);
  --bm-navy-d: #183556;
  --bm-teal: var(--ui-teal, #47a88e);
  --bm-teal-d: var(--ui-teal-d, #2c8a71);
  --bm-amber: var(--ui-amber, #eb8423);
  --bm-red: #d64545;
  --bm-ink: #1b2a3b;
  --bm-mut: #64748b;
  --bm-line: #e3eaf1;
  --bm-bg: #f5f9fa;
  position: relative;
  padding: 72px 0;
  color: var(--bm-ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  text-align: left;
}
.bm-section *, .bm-section *::before, .bm-section *::after { box-sizing: border-box; }
.bm-soft { background: var(--bm-bg); }
.bm-white { background: #fff; }

/* timpa gaya global situs hanya di dalam komponen ini */
.bm-section p { font-size: 15px; line-height: 1.6; color: var(--bm-mut); margin: 0; }
.bm-section a, .bm-section a:hover, .bm-section a:focus { font-size: inherit; font-weight: 700; color: inherit; transition: color .2s, background .2s, box-shadow .2s, transform .2s; }
.bm-section h2, .bm-section h3, .bm-section h4 { color: var(--bm-navy); font-family: inherit; }
.bm-section button { font-family: inherit; }

.bm-section [hidden], .bm-lb[hidden] { display: none !important; }

.bm-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- judul bagian ---------- */
.bm-head { text-align: center; margin-bottom: 44px; }
.bm-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--bm-teal-d); }
.bm-title { margin: 8px 0 10px; font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; letter-spacing: .01em; text-transform: uppercase; line-height: 1.25; }
.bm-title::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; margin: 14px auto 0; background: linear-gradient(90deg, var(--bm-teal), var(--bm-amber)); }
.bm-section .bm-sub { max-width: 620px; margin: 0 auto; text-align: center; }

/* ---------- kartu ---------- */
.bm-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.bm-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--bm-line); border-radius: 22px; box-shadow: 0 12px 34px rgba(35, 73, 116, .08); overflow: hidden; }
.bm-card-h { display: flex; align-items: center; gap: 14px; padding: 22px 26px 16px; }
.bm-ico { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--bm-navy), var(--bm-teal)); box-shadow: 0 8px 18px rgba(35, 73, 116, .22); }
.bm-ico svg { width: 24px; height: 24px; }
.bm-card-t { flex: 1 1 auto; min-width: 0; }
.bm-card-t h3 { margin: 0; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.bm-card-t span { display: block; margin-top: 2px; font-size: 13px; color: var(--bm-mut); font-weight: 400; }
.bm-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--bm-teal-d); background: #e7f5f0; white-space: nowrap; }
.bm-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bm-teal); animation: bm-pulse 1.8s ease-out infinite; }
.bm-card-f { margin-top: auto; padding: 16px 26px 22px; border-top: 1px solid var(--bm-line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bm-note { font-size: 12.5px; color: var(--bm-mut); font-weight: 400; }
.bm-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: 14px !important; color: #fff !important; background: var(--bm-navy); box-shadow: 0 8px 18px rgba(35, 73, 116, .22); }
.bm-link:hover { background: var(--bm-teal-d); transform: translateY(-1px); }
.bm-link svg { width: 16px; height: 16px; }

/* ---------- jadwal dokter ---------- */
.bm-days { display: flex; gap: 8px; padding: 0 26px 14px; overflow-x: auto; scrollbar-width: none; }
.bm-days::-webkit-scrollbar { display: none; }
.bm-day { position: relative; flex: 1 0 auto; min-width: 56px; padding: 9px 14px; border: 1px solid var(--bm-line); border-radius: 13px; background: #fff; color: var(--bm-mut); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.bm-day:hover { border-color: var(--bm-teal); color: var(--bm-navy); }
.bm-day[aria-selected="true"] { background: var(--bm-navy); border-color: var(--bm-navy); color: #fff; box-shadow: 0 8px 18px rgba(35, 73, 116, .24); }
.bm-day.is-today::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--bm-teal); box-shadow: 0 0 0 2px #fff; }
.bm-day:focus-visible, .bm-tab:focus-visible, .bm-vid:focus-visible, .bm-fig:focus-visible, .bm-rbtn:focus-visible, .bm-lb button:focus-visible { outline: 3px solid rgba(71, 168, 142, .55); outline-offset: 2px; }

.bm-searchbox { position: relative; margin: 0 26px 6px; }
.bm-searchbox svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--bm-mut); pointer-events: none; }
.bm-search { width: 100%; height: 46px; padding: 0 16px 0 44px; border: 1px solid var(--bm-line); border-radius: 14px; background: #f8fbfc; font-size: 15px; color: var(--bm-ink); outline: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.bm-search:focus { border-color: var(--bm-teal); background: #fff; box-shadow: 0 0 0 4px rgba(71, 168, 142, .15); }

.bm-scroll { max-height: 430px; overflow-y: auto; padding: 0 26px 6px; scrollbar-width: thin; scrollbar-color: #c5d3df transparent; }
.bm-poli { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 0 8px; background: #fff; }
.bm-poli h4 { margin: 0; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.bm-poli em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--bm-teal-d); background: #e7f5f0; padding: 3px 10px; border-radius: 999px; }
.bm-doc { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 12px; margin: 0 -12px; border-radius: 14px; transition: background .2s; }
.bm-doc:hover { background: #f3f8fa; }
.bm-av { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .04em; background: var(--c, var(--bm-navy)); }
.bm-av svg { width: 22px; height: 22px; }
.bm-doc-n { min-width: 0; font-size: 15.5px; font-weight: 700; color: var(--bm-ink); line-height: 1.3; overflow-wrap: anywhere; }
.bm-time { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--bm-navy); background: #eaf1f8; }
.bm-time.is-live { color: #17745b; background: #e2f5ee; }
.bm-time.is-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bm-teal); animation: bm-pulse 1.8s ease-out infinite; }
.bm-empty { padding: 34px 10px; text-align: center; color: var(--bm-mut); font-size: 15px; }
.bm-empty svg { display: block; width: 44px; height: 44px; margin: 0 auto 10px; color: #b7c6d4; }

/* ---------- ketersediaan kamar ---------- */
.bm-bed-top { display: flex; align-items: center; gap: 26px; padding: 4px 26px 20px; }
.bm-donut { position: relative; flex: 0 0 auto; width: 132px; height: 132px; }
.bm-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bm-donut circle { fill: none; stroke-width: 12; }
.bm-donut .bg { stroke: #e8eef4; }
.bm-donut .fg { stroke: var(--bm-teal); stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.bm-donut .fg.is-hi { stroke: var(--bm-amber); }
.bm-donut .fg.is-full { stroke: var(--bm-red); }
.bm-donut b { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 28px; line-height: 1; color: var(--bm-navy); }
.bm-donut small { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bm-mut); }
.bm-kpis { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bm-kpi { padding: 12px 10px; border-radius: 16px; text-align: center; background: #f3f8fa; }
.bm-kpi b { display: block; font-size: 26px; line-height: 1.1; color: var(--bm-navy); }
.bm-kpi span { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--bm-mut); font-weight: 700; }
.bm-kpi.ok b { color: var(--bm-teal-d); }
.bm-kpi.use b { color: var(--bm-amber); }

.bm-kelas { padding: 0 26px 14px; }
.bm-kelas-row { padding: 10px 0; }
.bm-kelas-row + .bm-kelas-row { border-top: 1px dashed var(--bm-line); }
.bm-kelas-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--bm-ink); }
.bm-kelas-hd span { font-size: 13px; color: var(--bm-mut); font-weight: 400; }
.bm-bar { height: 9px; margin-top: 8px; border-radius: 999px; background: #e8eef4; overflow: hidden; }
.bm-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bm-teal), #6cc7ad); }
.bm-bar i.is-hi { background: linear-gradient(90deg, var(--bm-amber), #f3a95a); }
.bm-bar i.is-full { background: linear-gradient(90deg, var(--bm-red), #ea7b7b); }

.bm-rooms-h { padding: 4px 26px 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bm-mut); }
.bm-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 250px; overflow-y: auto; padding: 0 26px 10px; scrollbar-width: thin; scrollbar-color: #c5d3df transparent; }
.bm-room { display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--bm-line); background: #fff; min-width: 0; }
.bm-room strong { font-size: 13.5px; line-height: 1.25; color: var(--bm-ink); overflow-wrap: anywhere; }
.bm-room span { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.bm-room.is-ok { border-color: #bfe5d8; background: #f2fbf8; }
.bm-room.is-ok span { color: #17745b; }
.bm-room.is-full { border-color: #f1c4c4; background: #fff6f6; }
.bm-room.is-full span { color: #b83a3a; }
.bm-room.is-off { background: #f6f8fa; }
.bm-room.is-off strong, .bm-room.is-off span { color: #98a6b5; }

/* ---------- galeri ---------- */
.bm-tabs { display: flex; justify-content: center; margin-bottom: 34px; }
.bm-tabs-in { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: #eaf1f6; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.bm-tabs-in::-webkit-scrollbar { display: none; }
.bm-tab { display: inline-flex; align-items: center; gap: 9px; padding: 11px 24px; border: 0; border-radius: 999px; background: transparent; color: var(--bm-mut); font-size: 14.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: all .2s; }
.bm-tab svg { width: 18px; height: 18px; }
.bm-tab:hover { color: var(--bm-navy); }
.bm-tab[aria-selected="true"] { background: #fff; color: var(--bm-navy); box-shadow: 0 6px 16px rgba(35, 73, 116, .16); }
.bm-pane[hidden] { display: none; }
.bm-pane { animation: bm-fade .35s ease; }
.bm-more { display: flex; justify-content: center; margin-top: 34px; }

.bm-igrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bm-fig { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #dfe8ef; cursor: zoom-in; box-shadow: 0 12px 30px rgba(35, 73, 116, .14); text-align: left; transition: transform .35s, box-shadow .35s; }
.bm-fig img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .7s ease; }
.bm-fig::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24, 53, 86, 0) 42%, rgba(24, 53, 86, .88) 100%); }
.bm-fig:hover { transform: translateY(-5px); box-shadow: 0 20px 42px rgba(35, 73, 116, .24); }
.bm-fig:hover img { transform: scale(1.07); }
.bm-fig-c { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 18px 20px; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .05em; line-height: 1.3; text-transform: uppercase; }
.bm-fig-z { position: absolute; z-index: 2; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--bm-navy); background: rgba(255, 255, 255, .92); opacity: 0; transform: scale(.8); transition: all .3s; }
.bm-fig-z svg { width: 18px; height: 18px; }
.bm-fig:hover .bm-fig-z, .bm-fig:focus-visible .bm-fig-z { opacity: 1; transform: scale(1); }

.bm-vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bm-vcard { min-width: 0; }
.bm-vid { position: relative; display: grid; place-items: center; width: 100%; padding: 0; border: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; cursor: pointer; background: linear-gradient(135deg, var(--bm-navy-d), var(--bm-navy) 55%, var(--bm-teal-d)); box-shadow: 0 12px 30px rgba(35, 73, 116, .16); transition: transform .35s, box-shadow .35s; }
.bm-vid::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 12%, rgba(255, 255, 255, .18), transparent 45%); }
.bm-vid:hover { transform: translateY(-5px); box-shadow: 0 20px 42px rgba(35, 73, 116, .26); }
.bm-play { position: relative; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; color: var(--bm-navy); background: #fff; box-shadow: 0 0 0 10px rgba(255, 255, 255, .18); transition: transform .3s, box-shadow .3s; }
.bm-play svg { width: 26px; height: 26px; margin-left: 3px; }
.bm-vid:hover .bm-play { transform: scale(1.1); box-shadow: 0 0 0 14px rgba(255, 255, 255, .22); }
.bm-vsize { position: absolute; z-index: 1; top: 14px; right: 14px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: #fff; background: rgba(0, 0, 0, .34); }
.bm-vid video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.bm-vid.is-on { cursor: default; transform: none; }
.bm-vt { margin: 14px 4px 0; font-size: 16.5px; line-height: 1.35; letter-spacing: .02em; }

.bm-rail-w { position: relative; }
.bm-rail { display: flex; gap: 22px; padding: 6px 4px 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #c5d3df transparent; }
.bm-ig { position: relative; flex: 0 0 min(340px, 84vw); scroll-snap-align: start; display: flex; flex-direction: column; border: 1px solid var(--bm-line); border-radius: 20px; background: #fff; overflow: hidden; box-shadow: 0 12px 30px rgba(35, 73, 116, .1); }
.bm-ig iframe { display: block; width: 100%; height: 470px; border: 0; background: #fff; }
.bm-ig-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--bm-line); font-size: 13px; color: var(--bm-mut); }
.bm-ig-f a { color: var(--bm-teal-d) !important; font-size: 13px !important; }
.bm-rbtn { position: absolute; top: 44%; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--bm-navy); background: #fff; box-shadow: 0 8px 22px rgba(35, 73, 116, .28); cursor: pointer; z-index: 2; transition: transform .2s, background .2s, color .2s; }
.bm-rbtn:hover { background: var(--bm-navy); color: #fff; transform: scale(1.08); }
.bm-rbtn svg { width: 20px; height: 20px; }
.bm-rbtn.prev { left: -14px; }
.bm-rbtn.next { right: -14px; }

/* ---------- lightbox ---------- */
.bm-lb { position: fixed; inset: 0; z-index: 100001; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 18, 32, .9); }
.bm-lb.is-on { display: flex; animation: bm-fade .25s ease; }
.bm-lb figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bm-lb img { max-width: 100%; max-height: calc(100vh - 150px); border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.bm-lb figcaption { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.bm-lb button { position: absolute; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .14); cursor: pointer; transition: background .2s; }
.bm-lb button:hover { background: rgba(255, 255, 255, .3); }
.bm-lb button svg { width: 22px; height: 22px; }
.bm-lb .x { top: 18px; right: 18px; }
.bm-lb .p { left: 18px; top: 50%; margin-top: -25px; }
.bm-lb .n { right: 18px; top: 50%; margin-top: -25px; }

@keyframes bm-pulse { 0% { box-shadow: 0 0 0 0 rgba(71, 168, 142, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(71, 168, 142, 0); } }
@keyframes bm-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- responsif ---------- */
@media (max-width: 1099px) {
  .bm-igrid, .bm-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .bm-section { padding: 56px 0; }
  .bm-grid { grid-template-columns: 1fr; }
  .bm-rbtn.prev { left: 4px; }
  .bm-rbtn.next { right: 4px; }
}
@media (max-width: 575px) {
  .bm-wrap { padding: 0 14px; }
  .bm-head { margin-bottom: 30px; }
  .bm-card-h, .bm-bed-top, .bm-kelas, .bm-rooms-h, .bm-rooms, .bm-scroll, .bm-days, .bm-card-f { padding-left: 18px; padding-right: 18px; }
  .bm-searchbox { margin-left: 18px; margin-right: 18px; }
  .bm-card-h { flex-wrap: wrap; }
  .bm-card-f { flex-direction: column; align-items: flex-start; }
  .bm-bed-top { flex-direction: column; align-items: stretch; }
  .bm-donut { margin: 0 auto; }
  .bm-igrid, .bm-vgrid { grid-template-columns: 1fr; gap: 18px; }
  .bm-tab { padding: 10px 16px; font-size: 13px; }
  .bm-doc { grid-template-columns: 38px minmax(0, 1fr); }
  .bm-doc .bm-time { grid-column: 2; justify-self: start; }
  .bm-av { width: 38px; height: 38px; }
  .bm-av svg { width: 20px; height: 20px; }
  .bm-rbtn { display: none; }
  .bm-lb .p { left: 8px; } .bm-lb .n { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bm-section *, .bm-lb * { animation: none !important; transition: none !important; }
}

/* pratinjau video (gambar diambil dari frame video) */
.bm-vthumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.bm-vid.has-thumb::before { z-index: 1; }
.bm-vid.has-thumb::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(23, 48, 79, .28) 0%, rgba(23, 48, 79, .12) 45%, rgba(23, 48, 79, .5) 100%); }
.bm-vid.has-thumb .bm-play, .bm-vid.has-thumb .bm-vsize { z-index: 2; }
.bm-vid.has-thumb .bm-play { box-shadow: 0 0 0 10px rgba(255, 255, 255, .28), 0 10px 28px rgba(10, 25, 45, .4); }
.bm-vid.is-on::before, .bm-vid.is-on::after { display: none; }
