/* Global Hospital, Bidar — built by Cloud Leopards
   Clinical white + care teal + deep navy; red is reserved for emergency.
   Motion is spent on the doctors (entrance, hover, filtering) and the hero pulse line. */

:root {
  /* Brand palette, sampled from the Global Hospital logo */
  --navy: #022664;          /* GLOBAL, descriptor */
  --green: #06886e;         /* HOSPITAL */
  --leaf-blue: #0075de;     /* top-left leaf */
  --leaf-teal: #0192a3;     /* middle leaves */
  --leaf-sea: #028c7f;      /* lower leaves */
  --grad-leaf: linear-gradient(120deg, #0075de 0%, #0192a3 50%, #06886e 100%);

  --ink: #022664;
  --ink-muted: #44557a;
  --care: #067a63;          /* logo green, a shade deeper so white text passes WCAG AA */
  --care-strong: #045a49;
  --care-soft: #e0f3ed;
  --sky: #edf4fd;           /* leaf-blue tint */
  --paper: #ffffff;
  --paper-2: #f5f8fc;
  --line: #d9e3f0;
  --alert: #c62828;
  --alert-strong: #9f1d1d;
  --alert-soft: #fdecec;
  --silver: #b7c4d8;

  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-kn: "Baloo Tamma 2", "Noto Sans Kannada", "Tunga", sans-serif;

  --step--1: 0.889rem;
  --step-0: 1.125rem;
  --step-1: 1.406rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.758rem);
  --step-3: clamp(1.85rem, 1.3rem + 2vw, 2.4rem);
  --step-4: clamp(2.3rem, 1.4rem + 3.6vw, 3.6rem);

  --gutter: clamp(1rem, 4vw, 2rem);
  --max: 76rem;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(2, 38, 100, .06), 0 10px 30px -16px rgba(2, 38, 100, .25);
  --shadow-2: 0 2px 4px rgba(2, 38, 100, .06), 0 24px 48px -20px rgba(2, 38, 100, .38);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.6; }
img, svg, iframe { display: block; max-width: 100%; }
a { color: var(--care); text-underline-offset: .18em; }
a:hover { color: var(--care-strong); }
:focus-visible { outline: 3px solid var(--care); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: var(--step-4); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 66ch; }
.kn { font-family: var(--font-kn); font-weight: 500; letter-spacing: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: .8rem 1.6rem; }
.btn-sm { min-height: 44px; padding: .5rem 1rem; font-size: var(--step--1); }
.btn-care { background: var(--care); color: #fff; box-shadow: 0 8px 20px -10px rgba(6, 122, 99, .7); }
.btn-care:hover { background: var(--care-strong); color: #fff; }
.btn-alert { background: var(--alert); color: #fff; }
.btn-alert:hover { background: var(--alert-strong); color: #fff; }
.btn-ghost-alert { border-color: var(--alert); color: var(--alert); background: var(--paper); }
.btn-ghost-alert:hover { background: var(--alert-soft); color: var(--alert-strong); }
.btn-ghost-care { border-color: var(--care); color: var(--care); background: var(--paper); }
.btn-ghost-care:hover { background: var(--care-soft); color: var(--care-strong); }
.btn-link { background: none; border: 0; padding: .5rem .25rem; min-height: 44px; font: inherit; font-size: var(--step--1); font-weight: 700; color: var(--care); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.btn-link:hover { color: var(--care-strong); }
.link-strong { font-weight: 700; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--ink); color: #d3dcef; font-size: var(--step--1); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; min-height: 2.5rem; }
.topbar p { margin: 0; display: flex; align-items: center; gap: .5rem; }
.topbar a { color: #fff; font-weight: 700; }
.pulse-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #ff6b6b; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .pulse-dot { box-shadow: 0 0 0 0 rgba(255, 107, 107, .7); animation: beat 2s infinite; }
}
@keyframes beat { 70% { box-shadow: 0 0 0 .5rem rgba(255, 107, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); } }
@media (max-width: 760px) { .topbar-opd, .topbar .kn { display: none; } }

.site-header { background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { display: block; height: 50px; width: auto; }
.brand { flex-direction: column; align-items: flex-start; gap: 3px; }
.brand-desc { font-size: .72rem; font-weight: 700; color: var(--navy); letter-spacing: .01em; white-space: nowrap; }

.nav ul { display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); white-space: nowrap; position: relative; }
.nav a::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px; background: var(--care); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover { color: var(--care-strong); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--care); }
.menu-toggle { display: none; }

@media (max-width: 1260px) {
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .9rem; background: none; border: 1px solid var(--line); border-radius: 999px; font: inherit; color: var(--ink); cursor: pointer; }
  .nav { position: absolute; inset: 100% 0 auto; background: var(--paper); border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow-1); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .nav a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--care); padding-left: .9rem; }
}
@media (max-width: 760px) { .header-book { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky), var(--paper)); }
.hero::before { /* faint Bidri inlay texture, a nod to Bidar's craft */
  content: ""; position: absolute; inset: 0 0 0 55%; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' fill='none' stroke='%23cfe2e6' stroke-width='1.2'%3E%3Cpath d='M44 4 84 44 44 84 4 44Z'/%3E%3Cpath d='M44 22c8 8 8 36 0 44-8-8-8-36 0-44ZM22 44c8-8 36-8 44 0-8 8-36 8-44 0Z'/%3E%3Ccircle cx='44' cy='44' r='3'/%3E%3C/svg%3E");
  background-size: 88px 88px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%);
}
.hero-grid { position: relative; display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4.5rem, 8vw, 6.5rem); }
.hero h1 { max-width: 15ch; }
.hero-lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-muted); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 2rem; }
.hero-services { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-services li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: var(--step--1); font-weight: 700; color: var(--ink); }
.hero-services svg { width: 1.15rem; height: 1.15rem; color: var(--care); }
.hero-pulse { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; pointer-events: none; }
.hero-pulse path { fill: none; stroke: var(--care); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .hero-pulse .base { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) .3s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero::before { inset: 0; } }

/* OPD board */
.board { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden; }
.board-head { padding: 1.25rem 1.5rem 1rem; background: var(--care); color: #fff; }
.board-head h2 { color: #fff; font-size: var(--step-2); margin-bottom: .1rem; }
.board-date { margin: 0; color: #d6f1e9; }
.opd-list { list-style: none; margin: 0; padding: .25rem 1.5rem; }
.opd-list li { display: grid; grid-template-columns: 1fr auto; gap: .05rem 1rem; align-items: baseline; padding: .7rem 0; border-top: 1px solid var(--line); }
.opd-list li:first-child { border-top: 0; }
.opd-list .dept { font-weight: 700; }
.opd-list .hours { grid-column: 1; color: var(--ink-muted); font-size: var(--step--1); }
.opd-list .status { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: var(--step--1); font-weight: 700; white-space: nowrap; padding: .2rem .6rem; border-radius: 999px; }
.status-open { color: var(--care-strong); background: var(--care-soft); }
.status-later { color: var(--ink); background: var(--sky); }
.status-closed { color: var(--ink-muted); font-weight: 400 !important; }
.status-open::before { content: ""; display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: currentColor; margin-right: .4em; vertical-align: .05em; }
.opd-list li.is-emergency .dept { color: var(--alert); }
.board-foot { margin: 0; padding: .8rem 1.5rem 1.1rem; font-size: var(--step--1); color: var(--ink-muted); background: var(--paper-2); border-top: 1px solid var(--line); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tint { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin-bottom: .25rem; }
.section-head p { margin: 0; color: var(--ink-muted); }
.page-head { background: linear-gradient(180deg, var(--sky), var(--paper)); border-bottom: 1px solid var(--line); padding-block: clamp(2.25rem, 5vw, 3.75rem); }
.page-head p { color: var(--ink-muted); font-size: var(--step-1); line-height: 1.45; margin: 0; }

/* ---------- Doctor tiles ---------- */
.doc-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip { min-height: 44px; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: var(--step--1); font-weight: 700; color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--care); color: var(--care-strong); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.doc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem; }
.doc-tile[hidden] { display: none; }
.doc-tile article {
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.doc-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; }
.doc-photo img, .doc-silhouette { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.doc-silhouette { padding-top: 10%; fill: rgba(255, 255, 255, .92); }
.doc-silhouette .coat, .doc-silhouette .steth { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.tint-care { background: linear-gradient(160deg, #e3f3ee, #9fd6c6); --tint: #06886e; }
.tint-navy { background: linear-gradient(160deg, #e4ecf8, #a9bfe0); --tint: #022664; }
.tint-sky  { background: linear-gradient(160deg, #e3f0fc, #9ccaf0); --tint: #0075de; }
.tint-sage { background: linear-gradient(160deg, #e2f3f5, #9ed3d9); --tint: #0192a3; }
.doc-silhouette .coat, .doc-silhouette .steth { stroke: var(--tint); }
.doc-photo::after { /* light sweep on hover */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%);
}
.doc-pill { position: absolute; left: .85rem; bottom: .85rem; z-index: 2; margin: 0; padding: .25rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .8rem; font-weight: 700; }
.doc-today { position: absolute; right: .85rem; top: .85rem; z-index: 2; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: var(--care); color: #fff; font-size: .8rem; font-weight: 700; }
.doc-today::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #9ff0df; }
.doc-body { /* the care line runs across the top of the body on hover */
  flex: 1; display: flex; flex-direction: column; padding: 1.15rem 1.25rem 1.25rem;
  background: linear-gradient(var(--care), var(--care)) 0 0 / 0 3px no-repeat;
  transition: background-size .6s var(--ease);
}
.doc-name { font-size: var(--step-1); margin: 0 0 .15rem; }
.doc-name button { all: unset; cursor: pointer; }
.doc-name button:focus-visible { outline: 3px solid var(--care); outline-offset: 3px; border-radius: 3px; }
.doc-name button::after { content: ""; position: absolute; inset: 0; } /* whole tile opens the profile */
.doc-spec { margin: 0; color: var(--care-strong); font-weight: 700; font-size: var(--step--1); }
.doc-qual { margin: .15rem 0 0; color: var(--ink-muted); font-size: var(--step--1); }
.tag-pending, .tag-sample { display: inline-block; margin-top: .45rem; padding: .1rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 700; width: fit-content; }
.tag-pending { background: var(--sky); color: var(--ink-muted); }
.tag-sample { background: #fff3d1; color: #7a5200; border: 1px dashed #d8a93b; vertical-align: middle; }
.doc-when { margin-top: auto; padding-top: 1rem; }
.doc-when p { margin: .35rem 0 0; font-size: var(--step--1); color: var(--ink-muted); }
.week { display: flex; gap: 3px; }
.week span { flex: 1; max-width: 2rem; height: 1.75rem; display: grid; place-items: center; border-radius: 5px; font-size: .75rem; color: var(--ink-muted); border: 1px solid var(--line); }
.week span.on { background: var(--care-soft); border-color: #a8d9cb; color: var(--care-strong); font-weight: 700; }
.week span.today { outline: 2px solid var(--care); outline-offset: 1px; }
.doc-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-top: 1rem; }

.doc-tile article:hover, .doc-tile article:focus-within { border-color: #a8d9cb; box-shadow: var(--shadow-2); }
.doc-tile article:hover .doc-body, .doc-tile article:focus-within .doc-body { background-size: 100% 3px; }
@media (prefers-reduced-motion: no-preference) {
  .doc-tile article:hover, .doc-tile article:focus-within { transform: translateY(-6px); }
  .doc-tile article:hover .doc-photo img, .doc-tile article:hover .doc-silhouette { transform: scale(1.06); }
  .doc-tile article:hover .doc-photo::after { transform: translateX(120%); transition: transform 1s var(--ease); }
  .doc-today::before { animation: blink 1.6s ease-in-out infinite; }
  /* entrance: tiles rise in sequence the first time the grid scrolls into view */
  .doc-grid.reveal .doc-tile { opacity: 0; transform: translateY(28px) scale(.98); }
  .doc-grid.reveal.in-view .doc-tile { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
}
@keyframes blink { 50% { opacity: .35; } }

/* Profile dialog */
.doc-dialog { width: min(100% - 2rem, 40rem); max-height: min(90vh, 46rem); padding: 0; border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-2); color: var(--ink); }
.doc-dialog::backdrop { background: rgba(2, 38, 100, .55); backdrop-filter: blur(3px); }
.doc-dialog-body { padding: 2rem clamp(1.25rem, 4vw, 2.25rem) 2rem; }
.doc-dialog-body .doc-pill { position: static; display: inline-block; background: var(--care-soft); color: var(--care-strong); margin-bottom: .75rem; }
.doc-dialog-body h2 { font-size: var(--step-3); margin-bottom: .2rem; }
.doc-dialog-body h3 { font-size: var(--step-0); margin: 1.5rem 0 .5rem; }
.doc-dialog-body ul { padding-left: 1.2rem; margin: 0; }
.doc-dialog-body .doc-facts { list-style: none; padding: 0; margin: 1.25rem 0 0; border-top: 1px solid var(--line); }
.doc-facts li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.doc-facts strong { display: inline-block; min-width: 7.5rem; }
.doc-dialog-close { position: absolute; top: .75rem; right: .75rem; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--sky); color: var(--ink); cursor: pointer; }
.doc-dialog-close svg { width: 1.2rem; height: 1.2rem; }
@media (prefers-reduced-motion: no-preference) {
  .doc-dialog[open] { animation: pop .45s var(--ease); }
  .doc-dialog[open]::backdrop { animation: fade .3s ease; }
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Circular + events ---------- */
.notices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .notices { grid-template-columns: minmax(0, 1fr); } }
.circular {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.75rem clamp(1.25rem, 4vw, 2.25rem) 1.5rem; box-shadow: var(--shadow-1);
  border-top: 6px double var(--care);
}
.circular .seal { position: absolute; right: 1.25rem; top: 1.25rem; width: 5.5rem; height: 5.5rem; color: var(--care); opacity: .3; transform: rotate(-12deg); }
.circular-head { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; font-size: var(--step--1); font-weight: 700; color: var(--ink-muted); margin-bottom: 1rem; padding-right: 5rem; }
.circular h3 { font-size: var(--step-2); padding-right: 4rem; }
.circular-sign { margin-top: 1.5rem; text-align: right; margin-left: auto; font-weight: 700; color: var(--ink-muted); font-size: var(--step--1); }
.events-title { font-size: var(--step-1); }
.event-list { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 4.75rem 1fr; gap: 1.1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.event[hidden] { display: none; }
.event h3 { font-size: var(--step-0); margin: 0 0 .2rem; }
.event p { margin: 0; color: var(--ink-muted); font-size: var(--step--1); }
.event .event-meta { color: var(--ink); font-weight: 700; margin-bottom: .2rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); padding: .45rem 0; line-height: 1.1; font-size: .8rem; color: var(--ink-muted); }
.event-date strong { font-size: 1.75rem; color: var(--care-strong); line-height: 1.1; }
.event-countdown:not(:empty) { padding: .1rem .55rem; border-radius: 999px; background: var(--care-soft); color: var(--care-strong); font-size: .78rem; }
.event-countdown.soon { background: var(--care); color: #fff; }

/* ---------- Social slide deck ---------- */
.deck-track {
  list-style: none; margin: 0; padding: .25rem .25rem 1rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
}
.deck-track::-webkit-scrollbar { display: none; }
@media (max-width: 900px) { .deck-track { grid-auto-columns: calc((100% - 1.25rem) / 2); } }
@media (max-width: 600px) { .deck-track { grid-auto-columns: 84%; } }
.post { scroll-snap-align: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.post-media { display: block; overflow: hidden; color: inherit; text-decoration: none; }
.post-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .8s var(--ease); }
.post-body { padding: .9rem 1.1rem 1.1rem; }
.post-meta { display: flex; align-items: center; gap: .45rem; margin: 0 0 .35rem; font-size: var(--step--1); font-weight: 700; color: var(--ink); }
.post-meta svg { width: 1.1rem; height: 1.1rem; color: var(--care); }
.post-meta time { color: var(--ink-muted); font-weight: 400; margin-left: auto; }
.post-meta .tag-sample { margin: 0; }
.post-caption { margin: 0; font-size: var(--step--1); color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.poster { aspect-ratio: 1 / 1; display: flex; flex-direction: column; padding: 1.5rem; color: #fff; position: relative; transition: transform .8s var(--ease); }
.poster-care { background: var(--grad-leaf); }
.poster-navy { background: radial-gradient(120% 90% at 100% 0%, #0b4a8c 0%, var(--navy) 60%); }
.poster-alert { background: radial-gradient(120% 90% at 100% 0%, #e04848 0%, var(--alert) 50%, var(--alert-strong) 100%); }
.poster-sky { background: radial-gradient(120% 90% at 100% 0%, #ffffff 0%, #dcebfb 60%, #bcd8f5 100%); color: var(--ink); }
.poster-kicker { align-self: flex-start; padding: .2rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: .8rem; font-weight: 700; }
.poster-sky .poster-kicker { background: var(--care); color: #fff; }
.poster-headline { margin-top: auto; font-size: clamp(1.45rem, 1rem + 1.3vw, 2rem); line-height: 1.1; letter-spacing: -0.01em; }
.poster-sub { margin-top: .5rem; font-size: var(--step--1); opacity: .9; }
.poster-pulse { width: 100%; height: 2rem; margin: .9rem 0 .6rem; opacity: .6; }
.poster-brand { font-size: .78rem; font-weight: 700; opacity: .85; line-height: 1.35; }
@media (prefers-reduced-motion: no-preference) {
  .post:hover .poster, .post:hover .post-media img { transform: scale(1.03); }
}
.deck-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .5rem; }
.deck-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: background-color .2s, border-color .2s; }
.deck-btn:hover:not(:disabled) { border-color: var(--care); color: var(--care); }
.deck-btn:disabled { opacity: .4; cursor: default; }
.deck-btn svg { width: 1.3rem; height: 1.3rem; }
.deck-dots { display: flex; gap: .4rem; }
.deck-dots button { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.deck-dots button::before { content: ""; width: .6rem; height: .6rem; border-radius: 999px; background: var(--silver); transition: width .3s var(--ease), background-color .3s; }
.deck-dots button[aria-current="true"]::before { width: 1.6rem; background: var(--care); }
.deck-play { min-height: 44px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: var(--step--1); color: var(--ink-muted); cursor: pointer; }
.deck-follow { margin-left: auto; display: flex; gap: .5rem; }
@media (max-width: 600px) { .deck-dots { display: none; } .deck-follow { margin-left: 0; width: 100%; } }

/* ---------- Departments (read-only list) ---------- */
.dept-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0 2.5rem; }
.dept-grid li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .95rem 0; border-top: 1px solid var(--line); }
.dept-grid a { color: var(--ink); font-weight: 700; text-decoration: none; }
.dept-grid a::before { content: "+"; display: inline-block; width: 1.1rem; color: var(--care); font-weight: 700; }
.dept-grid a:hover { color: var(--care); }
.dept-grid span { color: var(--ink-muted); font-size: var(--step--1); white-space: nowrap; }

.dept-detail { display: grid; grid-template-columns: 16rem 1fr; gap: 1rem 3rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.dept-detail h2 { font-size: var(--step-2); }
.dept-detail ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.dept-detail .when { color: var(--ink-muted); font-size: var(--step--1); }
@media (max-width: 720px) { .dept-detail { grid-template-columns: 1fr; } }

/* ---------- Visit / info ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.facts { margin: 0 0 1rem; }
.facts > div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts > div { grid-template-columns: 1fr; gap: .1rem; } }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r-lg); background: var(--sky); }
.prose h2 { font-size: var(--step-2); margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; max-width: 66ch; }
.prose li { margin-bottom: .4rem; }
.callout { margin-top: 2.5rem; border-left: 4px solid var(--care); background: var(--sky); padding: 1rem 1.25rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; max-width: none; }
.callout p:last-child { margin: 0; }

.booking { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: var(--shadow-1); }
.booking h2 { font-size: var(--step-2); }
.steps { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.steps li { margin-bottom: .6rem; padding-left: .25rem; }
.steps li::marker { color: var(--care); font-weight: 700; }
.form-note { font-size: var(--step--1); color: var(--ink-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c6d2ea; padding-block: 3rem 1.5rem; font-size: var(--step--1); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-size: var(--step-0); color: #fff; margin-bottom: .6rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); color: #8d9fc4; }
.footer-powered { color: #a6b7da; }
.cl-mark { display: inline-flex; align-items: center; gap: .35rem; color: #8d9fc4 !important; text-decoration: none; }
.cl-mark:hover { color: #fff !important; }
.cl-mark:hover svg { color: #e8912b; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 4.25rem; }
  .action-bar { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1px; position: fixed; inset: auto 0 0; z-index: 30; background: var(--line); box-shadow: 0 -4px 16px rgba(2, 38, 100, .12); }
  .action-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 4.25rem; font-size: .85rem; font-weight: 700; text-decoration: none; background: var(--paper); color: var(--ink); }
  .action-bar a svg { width: 1.35rem; height: 1.35rem; }
  .action-bar .call-emergency { background: var(--alert); color: #fff; }
  .action-bar .book { background: var(--care); color: #fff; }
}

.notfound { text-align: center; padding-block: 6rem; }
.notfound p { margin-inline: auto; }

/* ---------- Hero heartbeat: a monitor sweep that keeps running ---------- */
.hero-pulse .base { opacity: .22; }
.hero-pulse .sweep { opacity: 0; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(6, 122, 99, .55)); }
.hero-pulse .blip { fill: var(--care); opacity: 0; filter: drop-shadow(0 0 8px rgba(6, 122, 99, .9)); }
.hero-pulse.running .sweep, .hero-pulse.running .blip { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-pulse .base { opacity: .55; } }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--care-soft); color: var(--ink); }
.empty-note { color: var(--ink-muted); }

/* ---------- ICU: the hospital's niche ---------- */
.icu { --mon-bg: #03132f; background: radial-gradient(90% 120% at 85% 10%, #0b4a8c 0%, #032d70 45%, #021a4a 100%); color: #d5def0; padding-block: clamp(3.5rem, 8vw, 6rem); position: relative; overflow: hidden; }
.icu h2 { color: #fff; font-size: var(--step-3); max-width: 17ch; }
.icu-lede { font-size: var(--step-1); line-height: 1.5; color: #c3d1ec; max-width: 40ch; }
.icu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 980px) { .icu-grid { grid-template-columns: minmax(0, 1fr); } }

.icu-flow { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; counter-reset: flow; }
.icu-flow li { position: relative; display: flex; flex-direction: column; gap: .25rem; font-size: var(--step--1); color: #b3c3e3; counter-increment: flow; }
.icu-flow strong { color: #fff; font-size: var(--step-0); }
.icu-flow strong::before { content: counter(flow) ". "; color: #3fd3c3; }
.flow-icon { width: 3.25rem; height: 3.25rem; border-radius: 14px; display: grid; place-items: center; background: rgba(63, 211, 195, .12); border: 1px solid rgba(63, 211, 195, .35); color: #3fd3c3; margin-bottom: .5rem; position: relative; z-index: 1; }
.flow-icon svg { width: 1.6rem; height: 1.6rem; }
/* data travelling from bed to doctor */
.icu-flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.6rem; left: 3.75rem; right: -1rem; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(63, 211, 195, .9) 0 6px, transparent 6px 16px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .icu-flow li:not(:last-child)::after { animation: flow-x .9s linear infinite; }
  .flow-icon { animation: glow 2.6s ease-in-out infinite; }
  .icu-flow li:nth-child(2) .flow-icon { animation-delay: .4s; }
  .icu-flow li:nth-child(3) .flow-icon { animation-delay: .8s; }
}
@keyframes flow-x { to { background-position: 16px 0; } }
@keyframes flow-y { to { background-position: 0 16px; } }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(63, 211, 195, .08), 0 0 18px rgba(63, 211, 195, .35); } }
@media (max-width: 640px) {
  .icu-flow { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .icu-flow li { padding-left: 4.25rem; min-height: 3.25rem; }
  .flow-icon { position: absolute; left: 0; top: 0; margin: 0; }
  .icu-flow li:not(:last-child)::after { top: 3.5rem; left: 1.6rem; right: auto; bottom: -1.5rem; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, rgba(63, 211, 195, .9) 0 6px, transparent 6px 16px); -webkit-mask-image: none; mask-image: none; animation-name: flow-y; }
}

.monitor { margin: 0; }
.monitor-screen { background: var(--mon-bg); border-radius: 18px; padding: .9rem 1rem 1rem; border: 1px solid #1f3d6b;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .7), inset 0 0 0 6px #0b1f45, inset 0 0 60px rgba(57, 229, 140, .05); font-variant-numeric: tabular-nums; }
.monitor-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #91a6cf; font-size: .82rem; padding: 0 .2rem .6rem; border-bottom: 1px solid #132f5c; margin-bottom: .4rem; }
.monitor-live { display: inline-flex; align-items: center; gap: .4rem; color: #3fd3c3; font-weight: 700; }
.monitor-live i { width: .5rem; height: .5rem; border-radius: 50%; background: #3fd3c3; box-shadow: 0 0 8px #3fd3c3; }
@media (prefers-reduced-motion: no-preference) { .monitor-live i { animation: blink 1.4s ease-in-out infinite; } }
.monitor-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; align-items: center; gap: .75rem; border-bottom: 1px solid #0f2a52; }
.monitor-row canvas { width: 100%; height: 4.6rem; display: block; }
.monitor-row.is-spo2 canvas, .monitor-row.is-resp canvas { height: 3.6rem; }
.vital { display: flex; flex-direction: column; line-height: 1.05; }
.vital span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; opacity: .85; }
.vital strong { font-size: 2.35rem; font-weight: 700; }
.vital small { font-size: .72rem; opacity: .75; display: inline-flex; align-items: center; gap: .3rem; }
.is-ecg .vital { color: #39e58c; } .is-spo2 .vital { color: #3fd0ff; } .is-resp .vital { color: #ffd166; }
.monitor-foot { display: flex; gap: 2rem; padding: .6rem .2rem 0; }
.monitor-foot .vital strong { font-size: 1.6rem; }
.is-bp { color: #ff8a8a; } .is-temp { color: #e6eef1; }
.heart { width: .9rem; height: .9rem; transition: transform .12s ease-out; }
.heart.beat { transform: scale(1.45); }
.monitor figcaption { margin-top: .7rem; font-size: .8rem; color: #91a6cf; text-align: center; }
@media (max-width: 480px) { .monitor-row { grid-template-columns: minmax(0, 1fr) 5rem; } .vital strong { font-size: 1.8rem; } }

.icu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; margin-top: clamp(2rem, 5vw, 3rem); padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.icu-facts { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin: 0; }
.icu-facts div { display: flex; flex-direction: column-reverse; }
.icu-facts dt { font-size: var(--step--1); color: #a6b7da; max-width: 22ch; }
.icu-facts dd { margin: 0; font-size: var(--step-2); font-weight: 700; color: #fff; }

.faq { border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.4rem; color: var(--care); transition: transform .3s var(--ease); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 1rem; color: var(--ink-muted); }

/* ---------- Gallery ---------- */
.gallery { list-style: none; margin: 0; padding: 0; columns: 3 16rem; column-gap: 1rem; }
.photo { break-inside: avoid; margin-bottom: 1rem; }
.photo[hidden] { display: none; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: var(--sky); border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; }
.photo-open img { width: 100%; height: auto; transition: transform .8s var(--ease); }
@media (prefers-reduced-motion: no-preference) { .photo-open:hover img { transform: scale(1.04); } }
.photo p { margin: .4rem 0 0; font-size: var(--step--1); color: var(--ink-muted); }
.lightbox { width: min(100% - 1.5rem, 72rem); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(6, 18, 25, .9); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--r-md); }
.lightbox figcaption { color: #e6eef1; text-align: center; margin-top: .75rem; }
.lightbox .doc-dialog-close { position: fixed; top: 1rem; right: 1rem; }
.lightbox-nav { position: fixed; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lightbox-nav svg { width: 1.4rem; height: 1.4rem; }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.doc-photo img { object-position: center 20%; }

/* ---------- Doctor achievements ---------- */
:root { --gold: #a86b12; --gold-soft: #fdf4df; }
.emoji, .ach-emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-style: normal; line-height: 1; }
.doc-highlight { display: flex; align-items: center; gap: .5rem; margin: .7rem 0 0; padding: .45rem .7rem; border-radius: 10px;
  background: var(--gold-soft); border: 1px solid #f1dfb3; color: #5f3f0b; font-size: .86rem; font-weight: 700; line-height: 1.35; }
.doc-highlight .emoji { flex: none; font-size: 1.05rem; }
.doc-highlight span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-ach-count { display: inline-flex; align-items: center; gap: .3rem; margin-left: auto; padding: .3rem .75rem; min-height: 36px; border-radius: 999px;
  border: 1px solid #f1dfb3; background: #fff; color: #5f3f0b; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.doc-ach-count:hover { background: var(--gold-soft); }
@media (prefers-reduced-motion: no-preference) {
  .doc-tile article:hover .doc-highlight .emoji, .doc-ach-count:hover span { display: inline-block; animation: wiggle .7s ease-in-out; }
}
@keyframes wiggle { 25% { transform: rotate(-12deg) scale(1.15); } 60% { transform: rotate(10deg) scale(1.15); } }

.ach-list { list-style: none; margin: .25rem 0 0; padding: 0; }
.ach-list li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .75rem; align-items: start; padding: .6rem 0; border-bottom: 1px dashed #eadfc4; }
.ach-list li:last-child { border-bottom: 0; }
.ach-emoji { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--gold-soft); font-size: 1.2rem; }
.ach-year { display: inline-block; font-weight: 700; color: var(--gold); font-size: .82rem; }
.ach-list p { margin: .05rem 0 0; }
.doc-dialog-body h3 .tag-sample { margin: 0 0 0 .35rem; }
.cert-grid { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .6rem; }
.cert-grid .photo-open { display: block; width: 100%; padding: 0; border: 1px solid #eadfc4; border-radius: 10px; overflow: hidden; background: var(--gold-soft); cursor: zoom-in; }
.cert-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
@media (prefers-reduced-motion: no-preference) { .cert-grid .photo-open:hover img { transform: scale(1.06); } }

/* ---------- Testimonials ---------- */
.testimonials-band { background: radial-gradient(80% 120% at 0% 0%, #e4f1fb 0%, var(--paper-2) 60%); border-block: 1px solid var(--line); }
.testimonials .deck-track { grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); }
@media (max-width: 900px) { .testimonials .deck-track { grid-auto-columns: calc((100% - 1.25rem) / 2); } }
@media (max-width: 600px) { .testimonials .deck-track { grid-auto-columns: 88%; } }
.testimonial { background: #fff; border-color: #c9e6dc; }
.testimonial blockquote { margin: 0; padding: 1.5rem 1.5rem 1.25rem; display: flex; flex-direction: column; height: 100%; }
.t-quote { width: 2.2rem; height: 2.2rem; fill: var(--care); opacity: .35; margin-bottom: .5rem; }
.testimonial p { margin: 0 0 1.25rem; font-size: var(--step-0); line-height: 1.55; color: var(--ink); }
.testimonial footer { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: var(--step--1); }
.t-about { padding: .1rem .55rem; border-radius: 999px; background: var(--care-soft); color: var(--care-strong); font-weight: 700; font-size: .78rem; }
.testimonial .tag-sample { margin: 0; }
.lightbox.single .lightbox-nav { display: none; }

/* ---------- Brand accents (logo leaf gradient, used sparingly) ---------- */
.site-header { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--grad-leaf); opacity: .9; }
.nav a::after { background: var(--grad-leaf); }
.doc-body { background-image: var(--grad-leaf); }
.board-head { background: var(--navy); position: relative; }
.board-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--grad-leaf); }
.board-date { color: #c9d6f0; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); }
.hero-tagline { margin: -.15rem 0 1rem; font-style: italic; color: var(--care); font-size: var(--step-1); }
.site-footer { background: #021a4a; }
.footer-brand img { height: 46px; width: auto; display: block; margin-bottom: .6rem; }
.footer-brand .desc { color: #fff; font-weight: 700; margin: 0 0 .2rem; }
.footer-brand .tagline { color: #8fd9c4; font-style: italic; margin: 0 0 1rem; }
.topbar { background: #021a4a; }
@media (max-width: 520px) { .brand img { height: 36px; } .brand-desc { display: none; } }
.hero-pulse path { stroke: url(#pulse-grad); }
.hero-pulse .blip { fill: var(--leaf-teal); filter: drop-shadow(0 0 8px rgba(1, 146, 163, .9)); }

/* ---------- Heart care card (hero) ---------- */
:root { --beat: .857s; } /* 70 beats a minute; JS reads the same value */
.heart-card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden; }

/* The stage: dark, so the heart glows. Heart on the left, the words on the right. */
.heart-stage { position: relative; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: center; gap: .2rem 1.1rem;
  padding: 1rem 1.1rem .9rem; color: #fff; overflow: hidden;
  background: radial-gradient(40% 55% at 18% 38%, rgba(214, 40, 57, .34) 0%, rgba(214, 40, 57, 0) 70%),
              radial-gradient(120% 90% at 30% 0%, #0b3d82 0%, #032a6b 45%, #021a4a 100%); }
.heart-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--grad-leaf); }
.heart-copy h2 { color: #fff; font-size: var(--step-1); line-height: 1.15; margin: 0 0 .25rem; }
.heart-copy p { margin: 0; }
.heart-sub { color: #c9d6f0; font-size: var(--step--1); line-height: 1.4; }

.heart-figure { position: relative; width: 100%; }
.ah { position: relative; z-index: 1; display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); }
/* A portrait clip shows whole: it fills the left column beside the words, ECG and facts, so the card keeps its height */
.heart-stage.has-video { grid-template-columns: 9.5rem minmax(0, 1fr); }
.heart-stage.has-video .heart-figure { grid-row: 1 / span 3; align-self: center; }
.heart-stage.has-video .heart-ecg, .heart-stage.has-video .heart-facts { grid-column: 2; }
.ah-video { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 14px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-composite: intersect; }
.heart-figure.has-video .ah, .heart-figure.has-video .ah-ring { display: none; }
.ah-vent { transform-box: view-box; transform-origin: 190px 225px; }
.ah-atria { transform-box: view-box; transform-origin: 175px 135px; }
.ah-pulm, .ah-vessels { transform-box: view-box; transform-origin: 200px 110px; }
.ah-aorta-flush { opacity: 0; }
.ah-flow, .ah-coronary { stroke-dasharray: 5 21; opacity: .85; }
.ah-ring { position: absolute; left: 50%; top: 56%; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255, 120, 130, .55);
  transform: translate(-50%, -50%) scale(.8); opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .ah-atria { animation: ah-atria var(--beat) ease-in-out infinite; }
  .ah-vent { animation: ah-systole var(--beat) cubic-bezier(.4, 0, .2, 1) infinite; }
  .ah-pulm, .ah-vessels { animation: ah-vessel var(--beat) ease-in-out infinite; }
  .ah-aorta-flush { animation: ah-flush var(--beat) ease-out infinite; }
  .ah-flow { animation: ah-flow calc(var(--beat) * 1) linear infinite; }
  .ah-coronary { animation: ah-flow calc(var(--beat) * 1.5) linear infinite; }
  .ah-ring { animation: ah-ring var(--beat) ease-out infinite; }
  .ah-ring.r2 { animation-delay: calc(var(--beat) * .12); border-color: rgba(63, 211, 195, .4); }
  .heart-ecg-track { animation: ecg-scroll calc(var(--beat) * 4) linear infinite; }
}
/* Reduced motion: the still drawing instead of the clip */
@media (prefers-reduced-motion: reduce) { .heart-figure.has-video .ah-video { display: none; } .heart-figure.has-video .ah { display: block; } }
/* atria squeeze first, then the ventricles (lub), a small recoil (dub), then rest */
@keyframes ah-atria { 0%, 100% { transform: scale(1); } 8% { transform: scale(.9, .92); } 20% { transform: scale(1); } }
@keyframes ah-systole { 0%, 14% { transform: scale(1); } 28% { transform: scale(.92, .945); } 40% { transform: scale(.975); } 50% { transform: scale(.955); } 66%, 100% { transform: scale(1); } }
@keyframes ah-vessel { 0%, 20% { transform: scale(1); } 32% { transform: scale(1.035); } 60%, 100% { transform: scale(1); } }
@keyframes ah-flush { 0%, 18% { opacity: 0; } 30% { opacity: .5; } 60%, 100% { opacity: 0; } }
@keyframes ah-flow { to { stroke-dashoffset: -52; } }
@keyframes ah-ring { 0%, 22% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } 30% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } }
@keyframes ecg-scroll { to { transform: translateX(-400px); } }

.bpm { display: flex; align-items: baseline; gap: .4rem; margin-top: .55rem !important; }
.bpm strong { font-size: 1.9rem; line-height: 1; color: #ff8a93; font-variant-numeric: tabular-nums; }
.bpm span { color: #c9d6f0; font-size: var(--step--1); }
.since { color: #c9d6f0; font-size: .8rem; }
.since strong { color: #fff; font-variant-numeric: tabular-nums; }
.heart-ecg { grid-column: 1 / -1; width: 100%; height: 2.3rem; margin: .1rem 0 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.heart-ecg path { fill: none; stroke: #3fd3c3; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.heart-ecg-track { filter: drop-shadow(0 0 4px rgba(63, 211, 195, .7)); }

.heart-facts { grid-column: 1 / -1; list-style: none; margin: .35rem 0 .2rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; text-align: center; }
.heart-facts li { padding: .4rem .35rem; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.heart-facts strong { display: block; font-size: .95rem; color: #fff; }
.heart-facts span { display: block; font-size: .7rem; line-height: 1.25; color: #b9c8e8; }

.heart-alert { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; margin: .8rem 1.1rem 0; padding: .5rem .85rem; border-radius: var(--r-md); background: var(--alert-soft); border: 1px solid #f3c7c3; color: var(--alert-strong); text-decoration: none; font-size: var(--step--1); }
.heart-alert strong { font-size: .95rem; }
.heart-alert:hover { background: #fbe0de; color: var(--alert-strong); }

/* Services: compact chips; the one-line descriptions live on the Cardiology section */
.heart-services { list-style: none; margin: 0; padding: .7rem 1.1rem .1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.heart-services li { display: flex; align-items: center; gap: .45rem; padding: .4rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); font-size: .76rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.heart-services svg { flex: none; width: 1.75rem; height: 1.75rem; padding: .32rem; border-radius: 50%; background: var(--sky); fill: none; stroke: var(--leaf-blue); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.heart-services li:nth-child(3n+2) svg { stroke: var(--leaf-teal); background: #e3f4f6; }
.heart-services li:nth-child(3n) svg { stroke: var(--green); background: var(--care-soft); }

.heart-doc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-top: .7rem; padding: .65rem 1.1rem .75rem; background: var(--paper-2); border-top: 1px solid var(--line); }
.heart-doc p { margin: 0; }
.heart-doc .label { display: block; font-size: .74rem; font-weight: 700; color: var(--ink-muted); }
.heart-doc .btn-link { padding: 0; min-height: 0; font-size: var(--step-0); color: var(--ink); text-decoration-color: var(--line); }
.heart-opd { display: block; font-size: .8rem; color: var(--ink-muted); }
@media (max-width: 480px) {
  .heart-stage, .heart-stage.has-video { grid-template-columns: 6.5rem minmax(0, 1fr); gap: .2rem .8rem; }
  .heart-stage.has-video .heart-figure { grid-row: auto; }
  .heart-stage.has-video .heart-ecg, .heart-stage.has-video .heart-facts { grid-column: 1 / -1; }
  .heart-sub { display: none; }
  .heart-facts strong { font-size: .85rem; }
  .heart-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
