* { box-sizing: border-box; }
:root {
  --navy: #0d3f76;
  --blue: #1776c9;
  --light: #f4f8fc;
  --text: #18334f;
  --muted: #5d6c7b;
  --border: #e4ebf2;
  --white: #fff;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
}
a { color: inherit; text-decoration: none; }

.topbar {
  min-height: 36px;
  padding: 0 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: white;
  font-size: 12px;
}
.navbar {
  height: 74px;
  padding: 0 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 14px; }
.hospital-logo { width: 210px; max-width: 52vw; height: auto; display: block; }
.audio-badge {
  width: 62px; height: 62px; border-radius: 50%;
  object-fit: contain; display: block;
}

.hero {
  min-height: 470px;
  padding: 65px 5.5% 50px;
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
  background: linear-gradient(90deg, #f5faff 0%, #f5faff 43%, transparent 68%);
  overflow: hidden;
}
.hero-copy { z-index: 1; max-width: 620px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
}
.hero h1 {
  margin: 0 0 17px;
  font-size: clamp(39px, 4.3vw, 67px);
  line-height: 1.03;
  letter-spacing: -2px;
}
.hero h1 span { color: var(--blue); }
.hero-copy > p:last-child { max-width: 430px; line-height: 1.6; color: #4c5c6d; }
.hero-image {
  min-height: 430px;
  margin-left: -5%;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #f5faff 0%, rgba(245,250,255,.25) 18%, rgba(245,250,255,0) 35%),
    url("assets/hero.jpg") center/cover no-repeat,
    linear-gradient(135deg, #d9e8f4, #f8fbfd);
}

.values {
  width: 89%;
  margin: -15px auto 65px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border-radius: 17px;
  box-shadow: 0 8px 28px rgba(20,50,80,.10);
  padding: 25px 20px;
}
.values article { display: flex; gap: 14px; padding: 0 22px; border-right: 1px solid var(--border); }
.values article:last-child { border-right: 0; }
.icon { color: var(--blue); font-size: 34px; line-height: 1; }
.values h3, .values p { margin: 0; }
.values h3 { font-size: 14px; margin-bottom: 7px; }
.values p { font-size: 11px; line-height: 1.45; color: var(--muted); }

.services { width: 89%; margin: 0 auto 80px; }
.section-heading { text-align: center; }
.section-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 32px); }
.heading-line { width: 55px; height: 2px; background: var(--blue); margin: 14px auto 28px; }

.service-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.service-card {
  min-height: 270px;
  padding: 25px 15px 18px;
  display: flex; flex-direction: column;
  border: 1px solid #edf1f5;
  border-radius: 9px;
  background: white;
  box-shadow: 0 4px 16px rgba(20,50,80,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 25px rgba(20,50,80,.12); }
.service-icon { height: 64px; font-size: 46px; line-height: 1; color: #111; }
.service-card h3 { margin: 7px 0 9px; color: #4f74a4; font-size: 13px; }
.service-card p { margin: 0; font-size: 11px; line-height: 1.42; color: #222; }
.learn { margin-top: auto; padding-top: 20px; text-align: center; color: #6c83a3; font-size: 11px; }

.stats {
  padding: 38px 7%;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(135deg, #1684d4, #176dbb);
  color: white;
}
.stats > div { text-align: center; border-right: 1px solid rgba(255,255,255,.25); }
.stats > div:last-child { border-right: 0; }
.stats strong { display: block; font-size: 26px; margin-bottom: 5px; }
.stats span { font-size: 12px; opacity: .9; }

.about {
  width: 89%;
  margin: 0 auto;
  min-height: 300px;
  padding: 65px 0 85px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.about h2 { margin: 0 0 14px; font-size: 30px; }
.about p { max-width: 470px; color: #536273; font-size: 12px; line-height: 1.55; }
.about-seal {
  justify-self: end;
  width: 250px;
  height: 250px;
  object-fit: contain;
  display: block;
}

.modal { position: fixed; inset: 0; display: none; z-index: 20; }
.modal.open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,25,45,.55); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; z-index: 1;
  width: min(620px, 90vw);
  max-height: 85vh; overflow: auto;
  padding: 36px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  border: 0; background: transparent; font-size: 30px; cursor: pointer;
}
.modal-panel h2 { margin: 0 0 20px; }
.modal-panel p { line-height: 1.6; color: #526273; }
.portal-form { display: grid; gap: 12px; }
.portal-form label { font-weight: 700; color: #17324d; }
.portal-form small { min-height: 20px; font-weight: 800; letter-spacing: .08em; }
.portal-status.granted { color: #16734a; }
.portal-status.denied { color: #b42318; }
.portal-video-wrap {
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 14px 40px rgba(5,25,45,.18);
}
.portal-video {
  display: block;
  width: 100%;
  max-height: 72vh;
  background: #000;
}

.portal-form input {
  width: 100%; padding: 13px 14px;
  border: 1px solid #ccd8e4; border-radius: 8px;
  font-size: 15px;
}
.portal-form button {
  padding: 13px; border: 0; border-radius: 8px;
  background: var(--navy); color: white; font-weight: 700; cursor: pointer;
}
.locked { padding: 20px; border: 1px dashed #aebdcc; border-radius: 10px; background: #f7fafc; }




.visitation-record {
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fbfd;
}
.visitation-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e9f0;
  font-size: 13px;
  line-height: 1.5;
}
.visitation-row:last-child { border-bottom: 0; }
.visitation-row strong { color: #315579; }
.visitation-row span { color: #24384b; }
.status-active {
  font-weight: 800;
  color: #16805f !important;
}

.discharge-record {
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fbfd;
}
.discharge-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e9f0;
  font-size: 13px;
  line-height: 1.5;
}
.discharge-row:last-child { border-bottom: 0; }
.discharge-row strong { color: #315579; }
.discharge-row span { color: #24384b; }
.destination-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.destination-link:hover { opacity: .75; }

.records-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.record-document {
  min-height: 175px;
  padding: 20px;
  text-align: left;
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  background: #f8fbfd;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.record-document:hover {
  transform: translateY(-3px);
  border-color: #9fb9d2;
  box-shadow: 0 10px 22px rgba(20,50,80,.10);
}
.record-label {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.record-title {
  margin-top: 32px;
  font-size: 17px;
  font-weight: 800;
}
.record-action {
  margin-top: auto;
  padding-top: 20px;
  color: #6c83a3;
  font-size: 11px;
  font-weight: 700;
}
.records-note {
  margin: 18px 0 0;
  color: #6a7887;
  font-size: 12px;
}
.record-preview {
  width: 100%;
  max-height: 68vh;
  overflow: auto;
  border: 1px solid #dfe6ed;
  background: #f4f6f8;
  border-radius: 8px;
}
.record-preview img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 1000px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero-image { min-height: 320px; margin: 25px 0 0; }
}


.visitation-record {
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fbfd;
}
.visitation-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e9f0;
  font-size: 13px;
  line-height: 1.5;
}
.visitation-row:last-child { border-bottom: 0; }
.visitation-row strong { color: #315579; }
.visitation-row span { color: #24384b; }
.status-active {
  font-weight: 800;
  color: #16805f !important;
}

.discharge-record {
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fbfd;
}
.discharge-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e9f0;
  font-size: 13px;
  line-height: 1.5;
}
.discharge-row:last-child { border-bottom: 0; }
.discharge-row strong { color: #315579; }
.discharge-row span { color: #24384b; }
.destination-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.destination-link:hover { opacity: .75; }

.records-grid { grid-template-columns: 1fr; }

@media (max-width: 720px) {
  .discharge-row { grid-template-columns: 1fr; gap: 5px; }
  .visitation-row { grid-template-columns: 1fr; gap: 5px; }

  .topbar { gap: 10px; font-size: 10px; }
  .topbar-location { display: none; }
  .instagram-link { font-size: 10px; }
  .values, .stats, .about { grid-template-columns: 1fr 1fr; }
  .values { gap: 20px; }
  .values article:nth-child(2) { border-right: 0; }
  .values article { padding: 0 10px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .about { gap: 35px; }
  .about-seal { justify-self: center; }
}
@media (max-width: 470px) {
  .service-grid, .values, .stats, .about { grid-template-columns: 1fr; }
  .values article { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
  .values article:last-child { border-bottom: 0; }
  .stats { gap: 24px; }
  .stats > div { border-right: 0; }
  .about { text-align: left; }
}

/* Mobile polish pass */
body.modal-open { overflow: hidden; }
.service-card, .record-document, .portal-form button, .modal-close { -webkit-tap-highlight-color: transparent; }
.service-card:focus-visible,
.record-document:focus-visible,
.portal-form button:focus-visible,
.portal-form input:focus-visible,
.modal-close:focus-visible,
.instagram-link:focus-visible {
  outline: 3px solid rgba(23,118,201,.35);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  body { overflow-x: hidden; }

  .topbar {
    min-height: 34px;
    padding: 0 18px;
    gap: 14px;
    font-size: 10px;
    white-space: nowrap;
  }
  .topbar-location { display: none; }
  .instagram-link { font-size: 10px; margin-left: auto; }

  .navbar {
    height: 68px;
    padding: 0 18px;
  }
  .hospital-logo { width: 180px; max-width: 66vw; }
  .audio-badge { width: 50px; height: 50px; }

  .hero {
    min-height: 0;
    padding: 42px 20px 28px;
    grid-template-columns: 1fr;
    background: #f5faff;
  }
  .hero-copy { max-width: 100%; }
  .hero h1 {
    margin-bottom: 15px;
    font-size: clamp(37px, 11.2vw, 52px);
    line-height: 1.01;
    letter-spacing: -1.7px;
  }
  .hero-copy > p:last-child {
    margin-bottom: 0;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.55;
  }
  .hero-image {
    width: calc(100% + 40px);
    min-height: 260px;
    margin: 30px -20px 0;
    border-radius: 0;
    background:
      linear-gradient(180deg, #f5faff 0%, rgba(245,250,255,.05) 18%, rgba(245,250,255,0) 34%),
      url("assets/hero.jpg") center/cover no-repeat;
  }

  .values {
    width: calc(100% - 32px);
    margin: -4px auto 52px;
    padding: 20px 16px;
    gap: 0;
    grid-template-columns: 1fr 1fr;
    border-radius: 14px;
  }
  .values article {
    min-height: 102px;
    padding: 14px 12px;
    gap: 10px;
  }
  .values article:nth-child(odd) { border-right: 1px solid var(--border); }
  .values article:nth-child(even) { border-right: 0; }
  .values article:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .icon { font-size: 27px; }
  .values h3 { font-size: 13px; }
  .values p { font-size: 10.5px; }

  .services { width: calc(100% - 32px); margin-bottom: 58px; }
  .section-heading { padding: 0 8px; }
  .section-heading h2 { font-size: 26px; line-height: 1.15; }
  .heading-line { margin-bottom: 24px; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .service-card {
    min-height: 218px;
    padding: 20px 14px 16px;
    border-radius: 10px;
    touch-action: manipulation;
  }
  .service-card:hover { transform: none; box-shadow: 0 4px 16px rgba(20,50,80,.06); }
  .service-card:active { transform: scale(.985); }
  .service-icon { height: 51px; font-size: 38px; }
  .service-card h3 { margin: 7px 0 8px; font-size: 13px; line-height: 1.22; }
  .service-card p { font-size: 10.5px; line-height: 1.4; }
  .learn { padding-top: 15px; font-size: 10px; }

  .stats {
    padding: 30px 20px;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stats > div { padding: 15px 8px; }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.25); }
  .stats strong { font-size: 23px; }

  .about {
    width: calc(100% - 40px);
    min-height: 0;
    padding: 52px 0 58px;
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about h2 { font-size: 28px; }
  .about p { max-width: 100%; font-size: 13px; line-height: 1.6; }
  .about-seal { width: 190px; height: 190px; justify-self: center; }

  .modal.open {
    place-items: end center;
  }
  .modal-backdrop { backdrop-filter: blur(2px); }
  .modal-panel {
    width: 100%;
    max-height: min(88dvh, 760px);
    padding: 30px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .modal-close {
    top: 8px;
    right: 10px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
  }
  .modal-panel h2 {
    margin: 0 38px 18px 0;
    font-size: 26px;
    line-height: 1.15;
  }
  .modal-panel > .eyebrow { margin-right: 38px; }

  .portal-form { gap: 13px; }
  .portal-form input {
    min-height: 48px;
    padding: 13px 14px;
    font-size: 16px; /* prevents iOS input zoom */
  }
  .portal-form button { min-height: 48px; font-size: 15px; touch-action: manipulation; }
  .portal-video-wrap { border-radius: 10px; }
  .portal-video {
    width: 100%;
    max-height: 70dvh;
    object-fit: contain;
  }

  .records-grid { grid-template-columns: 1fr; gap: 10px; }
  .record-document {
    min-height: 128px;
    padding: 17px;
    touch-action: manipulation;
  }
  .record-document:hover { transform: none; box-shadow: none; }
  .record-title { margin-top: 20px; font-size: 16px; }
  .record-action { padding-top: 14px; }
  .record-preview {
    max-height: 70dvh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .discharge-row,
  .visitation-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 15px;
    font-size: 13px;
  }
  .locked { padding: 17px; }
}

@media (max-width: 470px) {
  .topbar { padding: 0 14px; }
  .navbar { padding: 0 14px; }
  .hospital-logo { width: 170px; }
  .audio-badge { width: 47px; height: 47px; }

  .hero { padding: 38px 18px 24px; }
  .hero h1 { font-size: clamp(35px, 11vw, 46px); }
  .hero-image { width: calc(100% + 36px); min-height: 225px; margin: 28px -18px 0; }

  .values {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }
  .values article {
    min-height: auto;
    padding: 16px 8px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border);
  }
  .values article:last-child { border-bottom: 0; }

  .services { width: calc(100% - 28px); }
  .section-heading h2 { font-size: 24px; }
  .service-grid { grid-template-columns: 1fr; gap: 11px; }
  .service-card {
    min-height: 170px;
    padding: 19px 17px 15px;
  }
  .service-icon { height: 45px; font-size: 35px; }
  .service-card p { font-size: 11px; }

  .stats { grid-template-columns: 1fr 1fr; gap: 0; }
  .stats > div { border-right: 0; }
  .stats > div:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.25); }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.25); }

  .about { width: calc(100% - 36px); }
  .about-seal { width: 165px; height: 165px; }

  .modal-panel { padding-left: 17px; padding-right: 17px; }
  .modal-panel h2 { font-size: 24px; }
}

@supports not (height: 100dvh) {
  @media (max-width: 720px) {
    .modal-panel { max-height: 88vh; }
    .portal-video { max-height: 70vh; }
    .record-preview { max-height: 70vh; }
  }
}
