.hospital-interaction{--ink:#0a0c52;--body:#3f5775;--teal:#057993;--pin:#5a5cf4;--pin-centre:#d9e84a;--surface:#f3f8f7;--white:#ffffff;--ease-premium:cubic-bezier(0.22,1,0.36,1)}
.hospital-interaction button{font:inherit}

.hospital-interaction {
  width: 100%;
  padding: clamp(24px, 4vw, 64px) clamp(12px, 2.4vw, 40px) 32px;
  overflow: hidden;
}

.scene {
  width: min(100%, 1540px);
  cursor: default;
  aspect-ratio: 4 / 3;
  position: relative;
  margin: 0 auto;
  isolation: isolate;
}

.hospital-art,
.hotspot-layer {
  position: absolute;
  inset: 0;
}

.hospital-art {
  overflow: hidden;
  border-radius: 32px;
}

.hospital-art::before {
  content: "";
  position: absolute;
  inset: 7% 12%;
  z-index: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 251, 0.96) 0%,
    rgba(255, 255, 251, 0.82) 28%,
    rgba(255, 255, 251, 0.28) 54%,
    rgba(255, 255, 255, 0) 76%
  );
  pointer-events: none;
}

.hospital-outline,
.department,
.department img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hospital-outline {
  z-index: 1;
  object-fit: contain;
  opacity: 0.76;
  user-select: none;
  pointer-events: none;
  transform: translateZ(0);
}

.department {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity 500ms var(--ease-premium);
  will-change: opacity;
  contain: layout paint;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.department::before {
  content: "";
  position: absolute;
  left: var(--origin-x);
  top: var(--origin-y);
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(55, 218, 224, 0.28);
  filter: blur(58px);
  opacity: 0;
  transform: translate(-50%, -50%) translateZ(0);
  transition: opacity 540ms var(--ease-premium);
}

.department img {
  object-fit: contain;
  opacity: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.department.is-active {
  opacity: 1;
}

.department.is-active::before {
  opacity: 0.92;
}

/* Soft masks keep each reveal organic, without rectangular or diagonal crop edges. */
.department--inpatient {
  -webkit-mask-image: radial-gradient(
    ellipse 49% 42% at 27% 25%,
    #000 0%,
    #000 54%,
    rgba(0, 0, 0, 0.78) 68%,
    rgba(0, 0, 0, 0.24) 84%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 49% 42% at 27% 25%,
    #000 0%,
    #000 54%,
    rgba(0, 0, 0, 0.78) 68%,
    rgba(0, 0, 0, 0.24) 84%,
    transparent 100%
  );
}

.department--control {
  -webkit-mask-image: radial-gradient(
    ellipse 31% 29% at 80% 24%,
    #000 0%,
    #000 55%,
    rgba(0, 0, 0, 0.78) 69%,
    rgba(0, 0, 0, 0.22) 85%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 31% 29% at 80% 24%,
    #000 0%,
    #000 55%,
    rgba(0, 0, 0, 0.78) 69%,
    rgba(0, 0, 0, 0.22) 85%,
    transparent 100%
  );
}

.department--billing {
  -webkit-mask-image: radial-gradient(
    ellipse 30% 27% at 80% 49%,
    #000 0%,
    #000 54%,
    rgba(0, 0, 0, 0.76) 68%,
    rgba(0, 0, 0, 0.2) 85%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 30% 27% at 80% 49%,
    #000 0%,
    #000 54%,
    rgba(0, 0, 0, 0.76) 68%,
    rgba(0, 0, 0, 0.2) 85%,
    transparent 100%
  );
}

.department--pharmacy {
  -webkit-mask-image: radial-gradient(
    ellipse 34% 33% at 76% 76%,
    #000 0%,
    #000 55%,
    rgba(0, 0, 0, 0.76) 69%,
    rgba(0, 0, 0, 0.2) 85%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 34% 33% at 76% 76%,
    #000 0%,
    #000 55%,
    rgba(0, 0, 0, 0.76) 69%,
    rgba(0, 0, 0, 0.2) 85%,
    transparent 100%
  );
}

.department--reception {
  -webkit-mask-image: radial-gradient(
    ellipse 47% 41% at 34% 65%,
    #000 0%,
    #000 53%,
    rgba(0, 0, 0, 0.78) 67%,
    rgba(0, 0, 0, 0.22) 84%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 47% 41% at 34% 65%,
    #000 0%,
    #000 53%,
    rgba(0, 0, 0, 0.78) 67%,
    rgba(0, 0, 0, 0.22) 84%,
    transparent 100%
  );
}

.centre-copy {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 47%;
  width: min(58%, 860px);
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  text-wrap: balance;
}

.centre-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -34% -18%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 250, 0.99) 0%,
    rgba(255, 255, 250, 0.92) 38%,
    rgba(255, 255, 250, 0.5) 61%,
    rgba(255, 255, 250, 0) 80%
  );
  filter: blur(4px);
}

.hht-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: clamp(14px, 1.6vw, 24px);
  color: #047596;
  font-size: clamp(10px, 0.85vw, 14px);
  font-weight: 800;
  letter-spacing: 0.22em;
}

.hht-eyebrow-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hht-eyebrow-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.hht-eyebrow-dots i:nth-child(1) { background: #b844a4; }
.hht-eyebrow-dots i:nth-child(2) { background: #efaa27; }
.hht-eyebrow-dots i:nth-child(3) { background: #20a6ad; }
.hht-eyebrow-dots i:nth-child(4) { background: #178ac2; }

.centre-copy h1,.centre-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(31px, 3.35vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.centre-copy .heading-line {
  display: block;
  white-space: nowrap;
}

.centre-copy p {
  max-width: 730px;
  margin: clamp(18px, 2vw, 30px) auto 0;
  color: var(--body);
  font-size: clamp(14px, 1.2vw, 20px);
  font-weight: 500;
  line-height: 1.6;
}

.hotspot-layer {
  z-index: 8;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  left: var(--left);
  top: var(--top);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 58px;
  padding: 10px;
  border: 0;
  background: transparent;
  transform: translate(-19px, -50%);
  cursor: pointer;
  pointer-events: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.hotspot-pin {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(32px, 2.55vw, 42px);
  height: clamp(32px, 2.55vw, 42px);
  border: 5px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: var(--pin);
  box-shadow:
    0 0 0 7px rgba(89, 91, 244, 0.16),
    0 10px 30px rgba(55, 61, 128, 0.18);
  transition:
    transform 360ms var(--ease-premium),
    box-shadow 360ms ease;
}

.hotspot-pin i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--pin-centre);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.hotspot-label {
  position: relative;
  min-width: max-content;
  padding: clamp(9px, 0.85vw, 13px) clamp(15px, 1.4vw, 22px);
  border: 1px solid #dce8e8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  color: #20475c;
  box-shadow:
    0 12px 34px rgba(35, 74, 88, 0.12),
    0 2px 7px rgba(35, 74, 88, 0.07);
  font-size: clamp(11px, 0.9vw, 15px);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform 360ms var(--ease-premium),
    color 240ms ease,
    box-shadow 360ms ease;
}

.hotspot:hover .hotspot-pin,
.hotspot:focus-visible .hotspot-pin,
.hotspot.is-active .hotspot-pin {
  box-shadow:
    0 0 0 10px rgba(89, 91, 244, 0.18),
    0 14px 38px rgba(55, 61, 128, 0.24);
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label,
.hotspot.is-active .hotspot-label {
  color: #0d3d54;
  box-shadow:
    0 16px 42px rgba(35, 74, 88, 0.16),
    0 3px 9px rgba(35, 74, 88, 0.08);
}

.hotspot:focus-visible .hotspot-label {
  outline: 3px solid rgba(90, 92, 244, 0.34);
  outline-offset: 3px;
}


@media (max-width: 980px) {
  .hospital-interaction {
    padding-inline: 8px;
  }

  .hospital-art {
    border-radius: 20px;
  }

  .centre-copy {
    width: 60%;
    top: 48%;
  }

  .centre-copy p {
    line-height: 1.48;
  }

  .hotspot {
    transform: translate(-16px, -50%) scale(0.92);
  }
}

@media (max-width: 760px) {
  .hospital-interaction {
    padding-top: 20px;
  }

  .scene {
    aspect-ratio: auto;
  }

  .hospital-art {
    position: relative;
    aspect-ratio: 4 / 3;
  }

  .centre-copy {
    width: 64%;
    top: 47%;
  }

  .hht-eyebrow {
    gap: 6px;
    margin-bottom: 8px;
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .hht-eyebrow-dots {
    gap: 2px;
  }

  .hht-eyebrow-dots i {
    width: 4px;
    height: 4px;
  }

  .centre-copy h1,.centre-copy h2 {
    font-size: clamp(18px, 5.4vw, 34px);
  }

  .centre-copy p {
    margin-top: 10px;
    font-size: clamp(8px, 2.15vw, 13px);
    line-height: 1.38;
  }

  .hotspot-layer {
    position: relative;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 16px 6px 4px;
  }

  .hotspot {
    position: static;
    transform: none;
    padding: 3px;
  }

  .hotspot-pin {
    width: 30px;
    height: 30px;
    border-width: 4px;
  }

  .hotspot-pin i {
    width: 9px;
    height: 9px;
  }

  .hotspot-label {
    padding: 8px 13px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .department,
  .department::before,
  .hotspot-pin,
  .hotspot-label {
    transition-duration: 1ms !important;
  }
}

.hospital-interaction .scene{transform:scale(1.05);transform-origin:center 48%}
.hospital-interaction .centre-copy p{font-size:clamp(14px,1.15vw,17px);max-width:600px}
.hospital-interaction .centre-copy h1,.hospital-interaction .centre-copy h2{font-size:clamp(30px,3.2vw,56px)}

/* ============================================================
   MOBILE ONLY: render "How it holds together" as a normal
   text section (no interactive hospital art or tags).
   Desktop keeps the full interactive design unchanged.
   ============================================================ */
@media (max-width: 760px){
  .hospital-interaction{padding:56px 0}
  .hospital-interaction .scene{aspect-ratio:auto;width:100%;min-height:0}
  .hospital-interaction .hospital-art{position:static;inset:auto;overflow:visible;border-radius:0;aspect-ratio:auto}
  .hospital-interaction .hospital-art::before{display:none}
  .hospital-interaction .hospital-outline,
  .hospital-interaction .department{display:none}
  .hospital-interaction .hotspot-layer{display:none}
  .hospital-interaction .centre-copy{position:static;transform:none;width:auto;max-width:640px;margin:0 auto;padding:0 20px;pointer-events:auto;text-align:center}
  .hospital-interaction .centre-copy::before{display:none}
  .hospital-interaction .centre-copy h1,.hospital-interaction .centre-copy h2{font-size:clamp(1.7rem,6vw,2.15rem);color:var(--ink)}
  .hospital-interaction .centre-copy p{font-size:1rem;line-height:1.6;margin-top:14px;color:var(--body);max-width:none}
}
