/* ═══ Home: Teaching Hospitals (extends existing .hosp-card) ═══ */
.home-hospitals {
  --hh-gold: var(--gold-light, #e3c47d);
  --hh-teal: var(--teal, #0e9384);
  --hh-navy: var(--navy, #0b2545);
  --hh-line: rgba(255, 255, 255, .12);
}

/* Card additions */
.hosp-card--rich .hosp-desc {
  flex-grow: 0;
  margin-bottom: 18px;
}

@media (min-width: 992px) {
  .hosp-card--rich .hosp-desc {
    min-height: calc(3 * 1.75em);
  }
}

.hosp-facts {
  display: flex;
  margin: 0 0 16px;
  padding: 14px 0;
  list-style: none;
  border-top: 1px solid var(--hh-line);
  border-bottom: 1px solid var(--hh-line);
}

.hosp-facts li {
  flex: 1;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

.hosp-facts li+li {
  padding-left: 14px;
  border-left: 1px solid var(--hh-line);
}

.hosp-facts strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: #fff;
}

.hosp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-grow: 1;
  align-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hosp-tags li {
  padding: 4px 10px;
  font-family: var(--font-body, 'Quicksand', sans-serif);
  font-size: .74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--hh-line);
  border-radius: 999px;
}

.hosp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.hosp-actions .hosp-link {
  margin-top: 0;
  text-decoration: none;
}

.hosp-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--hh-navy);
  text-decoration: none;
  background: var(--hh-gold);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}

.hosp-more:hover,
.hosp-more:focus-visible {
  color: var(--hh-navy);
  background: #fff;
}

/* ── Detail dialog ── */
.hosp-dialog {
  width: min(1000px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  color: #13233a;
  background: #fff;
  border: 0;
  border-radius: var(--r-lg, 18px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6);
  overflow: hidden;
}

.hosp-dialog[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  animation: hdIn .25s ease both;
}

.hosp-dialog::backdrop {
  background: rgba(6, 18, 36, .6);
  backdrop-filter: blur(3px);
}

@keyframes hdIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) scale(.98);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.hd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 18px;
  color: #fff;
  background: var(--hh-navy);
  border-top: 3px solid var(--hh-gold);
}

.hd-code {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--hh-gold);
}

.hd-head h3 {
  margin: 4px 0 0;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.hd-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.hd-close:hover,
.hd-close:focus-visible {
  background: rgba(255, 255, 255, .22);
}

.hd-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 22px 26px;
  overflow-y: auto;
  background: #f4f7fa;
}

.hd-panel {
  padding: 18px 20px 8px;
  background: #fff;
  border: 1px solid #e3e9f0;
  border-radius: 14px;
}

.hd-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--hh-navy);
}

.hd-panel-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: .9rem;
  color: var(--hh-teal);
  background: rgba(14, 147, 132, .1);
  border-radius: 8px;
}

.hd-panel-head h4 {
  flex: 1;
  margin: 0;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hh-navy);
}

.hd-count {
  min-width: 28px;
  padding: 2px 8px;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
  color: var(--hh-navy);
  background: var(--hh-gold);
  border-radius: 999px;
}

.hd-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-list li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0 8px 16px;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  color: #2a3b52;
  border-bottom: 1px solid #eef2f6;
}

.hd-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  background: var(--hh-teal);
  border-radius: 50%;
}

.hd-list li:last-child,
.hd-list li:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.hd-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 14px 26px;
  font-size: .82rem;
  background: #f6f8fb;
  border-top: 1px solid #e3e9f0;
}

.hd-foot a {
  font-weight: 600;
  color: var(--hh-teal);
  text-decoration: none;
}

.hd-foot a:hover {
  text-decoration: underline;
}

.hd-foot .hd-visit {
  margin-left: auto;
  padding: 8px 16px;
  color: #fff;
  background: var(--hh-navy);
  border-radius: 999px;
}

.hd-foot .hd-visit:hover {
  text-decoration: none;
  background: var(--hh-teal);
}

html.hosp-dialog-open {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .hd-body {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .hd-panel {
    padding: 16px 16px 6px;
  }

  .hd-head,
  .hd-foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hd-foot .hd-visit {
    margin-left: 0;
  }

  .hosp-dialog {
    max-height: 90vh;
  }
}

@media (max-width: 420px) {
  .hd-list {
    grid-template-columns: 1fr;
  }

  .hd-list li:nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid #eef2f6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hosp-dialog[open] {
    animation: none;
  }
}

/* Section heading on navy */
.home-hospitals .sec-eyebrow { color: var(--gold-light); }
.home-hospitals .sec-title { color: #fff; }
.home-hospitals .sec-desc { color: rgba(255, 255, 255, .62); }
