/* Home page (/) */

/* ---------- Shared rail controls (services and doctors) ---------- */
.home-rail-controls { display: flex; gap: 10px; }
.home-rail-controls[hidden] { display: none; }
.home-rail-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 3px;
  border: 1px solid #b9ddd1;
  border-radius: 50%;
  background: #fff;
  color: #176c62;
  font-size: 1.65rem;
  line-height: 1;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.home-rail-controls button:hover { transform: translateY(-2px); background: #176c62; color: #fff; }

/* ---------- Hero slideshow ---------- */
.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 700px;
  overflow: hidden;
  background: var(--vc-deep);
  color: #fff;
}
.home-hero-slides, .home-hero-slide { position: absolute; inset: 0; }
.home-hero-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.home-hero-slide.is-active { opacity: 1; }
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: min(60%, 800px);
  background: linear-gradient(90deg, rgba(10, 63, 58, .96) 0%, rgba(10, 63, 58, .84) 40%, rgba(15, 90, 82, .48) 62%, rgba(15, 90, 82, 0) 100%);
}
.home-hero .container { position: relative; z-index: 2; padding-block: 64px 120px; }
.home-hero-content { max-width: 630px; }
.home-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 100px;
  background: rgba(255, 255, 255, .13);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.home-hero-pulse { width: 8px; height: 8px; border-radius: 50%; background: #5ce0b8; animation: home-pulse 1.6s infinite; }
@keyframes home-pulse {
  0% { box-shadow: 0 0 0 0 rgba(92, 224, 184, .6); }
  70% { box-shadow: 0 0 0 9px rgba(92, 224, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(92, 224, 184, 0); }
}
.home-hero h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 4.8vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.home-hero-sub { max-width: 500px; margin: 20px 0 0; color: #dff2ec; font-size: 1.08rem; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home-hero-actions .btn { min-height: 46px; }
.home-hero-actions .btn-light { --bs-btn-color: var(--vc-ocean); --bs-btn-border-color: #fff; --bs-btn-hover-bg: var(--vc-ocean); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--vc-ocean); }
.home-hero-dots { display: flex; gap: 9px; margin-top: 44px; }
.home-hero-dots[hidden] { display: none; }
.home-hero-dots button {
  width: 34px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  transition: background-color .2s ease;
}
.home-hero-dots button[aria-pressed="true"] { background: var(--vc-coral); }

/* ---------- Floating trust panel ---------- */
.home-trust { position: relative; z-index: 3; width: calc(100% - 48px); max-width: 1130px; margin: -58px auto 0; }
.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 26px 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 44px -18px rgba(10, 63, 58, .28);
}
.home-trust-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 108px;
  padding: 0 18px;
  text-align: center;
}
.home-trust-item + .home-trust-item { border-left: 1px solid var(--vc-line); }
.home-trust-num {
  margin: 0;
  color: var(--vc-ocean);
  font-family: var(--vc-font-display);
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.home-trust-num small { font-size: .46em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.home-trust-word { color: var(--vc-deep); }
.home-trust-label { margin: 10px 0 0; color: #4b615c; font-size: .8rem; line-height: 1.55; }

/* ---------- Services carousel ---------- */
.home-services { position: relative; overflow: hidden; margin-top: -58px; padding: 168px 0 88px; background: #f7f9fc; }
.home-services::before,
.home-services::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.home-services::before { width: 300px; height: 300px; right: -120px; top: 40px; background: rgba(28, 133, 119, .08); }
.home-services::after { width: 220px; height: 220px; left: -120px; bottom: -110px; background: rgba(232, 90, 59, .06); }
.home-services .container { position: relative; z-index: 1; max-width: 1180px; }
.home-services-head { position: relative; }
.home-services-head .vc-section-head { max-width: 820px; margin-bottom: 0; }
.home-services-head h2 { color: #173f3a; font-size: clamp(2.1rem, 4vw, 3.55rem); letter-spacing: -.045em; }
.home-services-head p { margin-top: 16px; color: #68778a; font-size: clamp(.98rem, 1.5vw, 1.14rem); line-height: 1.7; }
.home-services-head .home-rail-controls { position: absolute; right: 0; bottom: 0; }
.home-service-rail {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.home-service-rail::-webkit-scrollbar { display: none; }
.home-service-card {
  position: relative;
  flex: 0 0 min(30vw, 360px);
  min-height: 340px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--vc-deep);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  scroll-snap-align: start;
}
.home-service-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.home-service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 45, 41, .04) 18%, rgba(8, 45, 41, .88) 100%);
}
.home-service-card:hover { color: #fff; }
.home-service-card:hover img { transform: scale(1.06); }
.home-service-copy { position: absolute; right: 0; bottom: 0; left: 0; display: block; padding: 26px; }
.home-service-title { display: block; font-family: var(--vc-font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.home-service-summary { display: block; max-width: 29ch; margin: 9px 0 16px; color: rgba(255, 255, 255, .9); font-size: .91rem; line-height: 1.5; }
.home-service-cta { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 800; }
.home-service-cta::after { content: "→"; transition: transform .2s ease; }
.home-service-card:hover .home-service-cta::after { transform: translateX(4px); }

/* ---------- Care team ---------- */
.home-doctors { padding: 88px 0; background: var(--vc-deep); color: #fff; }
.home-doctors .container { max-width: 1112px; }
.home-doctors-head { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.home-doctors-head .vc-section-head { margin: 0; }
.home-doctors .vc-eyebrow { color: #72e2c4; }
.home-doctors h2 { color: #fff; }
.home-doctors-head p { color: #dff2ec; font-size: 1.05rem; }
.home-view-all { flex: 0 0 auto; --bs-btn-border-radius: 999px; --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: .75rem; box-shadow: 0 12px 26px -12px rgba(232, 90, 59, .7); }

.home-doctor-finder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
}
.home-doctor-finder .form-label { color: #173f3a; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.home-doctor-finder .form-control,
.home-doctor-finder .form-select { height: 44px; border-color: var(--vc-line); font-size: .9rem; }

.home-doctors-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 20px; }
.home-doctor-count { margin: 0 0 22px; color: #b9d9d0; font-size: .84rem; }
.home-doctors-bar .home-rail-controls { margin-bottom: 10px; }

.home-doctor-rail {
  display: flex;
  gap: 20px;
  padding: 4px 24px 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 24px;
  scrollbar-width: none;
}
.home-doctor-rail::-webkit-scrollbar { display: none; }
.home-doctor-item { flex: 0 0 clamp(214px, 15vw, 280px); scroll-snap-align: start; }
.home-doctor-item[hidden] { display: none; }
.home-doctor-rail:has(.home-doctor-item:not([hidden]):only-of-type) { justify-content: center; }
.home-doctor-rail .doc-photo { aspect-ratio: auto; height: 250px; }
.home-doctor-rail .doc-photo img { object-position: top center; }
.home-doctor-rail .doc-photo img[src$="doctor-placeholder.svg"] { object-fit: contain; padding: 38px; background: #eef7f4; }
.home-doctor-rail .doc-content { padding: 17px 17px 20px; }
.home-doctor-rail .doc-actions { margin-top: auto; padding-top: 14px; }
.home-doctor-empty {
  margin: 10px 0 0;
  padding: 24px;
  border: 1px dashed rgba(207, 233, 223, .32);
  border-radius: 14px;
  color: #d7eee8;
  text-align: center;
}
.home-doctor-empty[hidden] { display: none; }

/* ---------- Locations ---------- */
.home-locations { background: #f3faf7; }
.home-locations .container,
.home-insurance .container,
.home-blog .container { max-width: 1180px; }
.home-location-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 52px; }
.home-location {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 24px 24px;
  border: 1px solid #e1f0ea;
  border-radius: 16px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-location:hover { transform: translateY(-6px); border-color: #a6d8c9; box-shadow: var(--vc-shadow); }
.home-location h3 { margin: 0 0 6px; font-size: 1.1rem; }
.home-location p { margin: 0; color: #4b615c; font-size: .9rem; }
.home-location .home-location-services { margin-top: 14px; color: var(--vc-teal); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.home-location-contacts { display: grid; gap: 10px; margin-top: 16px; }
.home-location-group { display: grid; gap: 8px; }
.home-location-group + .home-location-group { padding-top: 10px; border-top: 1px solid #e0eee9; }
.home-location-group strong { grid-column: 1 / -1; color: #4b615c; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.home-location-contacts { margin-bottom: 16px; }
.home-location .vc-contact-buttons { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px; }
.home-location .vc-contact-btn { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; text-align: center; }
.home-location .vc-contact-text { justify-items: center; }
.home-location .vc-contact-text b { font-size: .7rem; }
.home-location .vc-contact-text small { font-size: .64rem; }
.home-location-directions { width: 100%; margin-top: auto; --bs-btn-font-size: .78rem; --bs-btn-padding-y: .65rem; }

/* ---------- Reviews marquee ---------- */
.home-reviews { overflow: hidden; background: #fff; }
.home-reviews .vc-section-head { margin-bottom: 52px; }
.home-rating { color: #4b615c; }
.home-rating span, .home-review-stars { color: var(--vc-coral); letter-spacing: 2px; }
.home-review-viewport { overflow-x: auto; padding: 0 24px 6px; scrollbar-width: thin; }
.home-review-track { display: flex; gap: 20px; width: max-content; }
.home-review {
  flex: 0 0 auto;
  width: 340px;
  margin: 0;
  padding: 28px;
  border: 1px solid #dceee7;
  border-radius: 16px;
  background: #f3faf7;
}
.home-review blockquote { margin: 15px 0; }
.home-review blockquote p { margin: 0; color: #4b615c; font-size: .94rem; }
.home-review figcaption { color: var(--vc-ocean); font-size: .84rem; font-weight: 700; }
.home-review-viewport.is-marquee { overflow: hidden; padding-inline: 0; }
.is-marquee .home-review-track { padding-left: 88px; animation: home-marquee 110s linear infinite; will-change: transform; }
.is-marquee .home-review-track:hover,
.is-marquee .home-review-track:focus-within { animation-play-state: paused; }
@keyframes home-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 10px)); } }

/* ---------- Videos ---------- */
.home-videos { overflow: hidden; background: #f3faf7; }
.home-video-viewport { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.home-video-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.home-video {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid #dceee7;
  border-radius: 18px;
  background: var(--vc-deep);
  box-shadow: 0 12px 30px -24px rgba(10, 63, 58, .45);
}
.home-video video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ---------- Insurance ---------- */
.home-insurance { background: #fff; }
.home-insurance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 52px 0 0; padding: 0; list-style: none; }
.home-insurance-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 20px;
  border: 1px solid var(--vc-line);
  border-radius: 18px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-insurance-grid li:hover { transform: translateY(-4px); border-color: #a6d8c9; box-shadow: var(--vc-shadow); }
.home-insurance-grid img { width: 100%; height: 100%; max-width: 174px; max-height: 106px; object-fit: contain; }

/* ---------- Blog ---------- */
.home-blog { background: #fff; }
.home-blog .vc-section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.home-blog .vc-section-head p { color: #4b615c; font-size: 1.05rem; }
.home-news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 52px; }
.home-news {
  display: block;
  overflow: hidden;
  border: 1px solid #dceee7;
  border-radius: 16px;
  background: #fff;
  color: #173f3a;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(10, 63, 58, .06);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-news:hover { transform: translateY(-4px); border-color: #9ed1c3; box-shadow: 0 14px 30px rgba(10, 63, 58, .12); color: #173f3a; }
.home-news img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid #dceee7; background: var(--vc-mint); }
.home-news img[src$="vitalcare-logo.png"] { object-fit: contain; padding: 28px; }
.home-news h3 { margin: 0; padding: 20px; font-size: 1.04rem; line-height: 1.55; text-align: right; }

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .home-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .home-trust-item:nth-child(3) { border-left: 0; }
  .home-service-card { flex-basis: min(44vw, 350px); }
  .home-location-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-insurance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .home-news-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Phone (matches Bootstrap's md breakpoint used by the View All button) ---------- */
@media (max-width: 767.98px) {
  .home-hero { min-height: 442px; }
  .home-hero::after { width: 100%; background: linear-gradient(90deg, rgba(6, 45, 41, .7) 0%, rgba(6, 45, 41, .43) 63%, rgba(6, 45, 41, .16) 100%); }
  .home-hero .container { padding-block: 32px 92px; }
  .home-hero-tag { font-size: .72rem; }
  .home-hero h1 { max-width: 19ch; font-size: clamp(2.04rem, 9.5vw, 2.58rem); }
  .home-hero-sub { max-width: 34ch; margin-top: 12px; font-size: .98rem; line-height: 1.55; }
  .home-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
  .home-hero-actions .btn { padding-inline: 9px; font-size: .84rem; }
  .home-hero-dots { margin-top: 18px; }

  .home-trust { width: calc(100% - 28px); margin-top: -48px; }
  .home-trust-grid { gap: 9px; padding: 12px 8px; }
  .home-trust-item { min-height: 96px; padding: 12px 7px; }
  .home-trust-item + .home-trust-item { border-left: 0; }
  .home-trust-num { font-size: clamp(1.3rem, 6.9vw, 1.85rem); white-space: normal; }
  .home-trust-num small { display: block; margin-top: 3px; font-size: .48em; letter-spacing: .06em; }
  .home-trust-label { margin-top: 6px; font-size: .68rem; line-height: 1.3; }

  .home-services { padding: 120px 0 42px; background: #fff; }
  .home-services::before, .home-services::after { display: none; }
  .home-services-head h2 { font-size: 2rem; }
  .home-services-head p { font-size: .88rem; line-height: 1.6; }
  .home-services-head .home-rail-controls { display: none; }
  .home-service-rail { gap: 12px; margin-top: 16px; padding-bottom: 6px; }
  .home-service-card { flex-basis: 82vw; min-height: 268px; }
  .home-service-copy { padding: 17px; }
  .home-service-title { font-size: 1.05rem; }
  .home-service-summary { margin: 6px 0 11px; font-size: .8rem; }

  .home-doctors { padding: 42px 0; }
  .home-doctors-head p { font-size: .9rem; }
  .home-doctor-finder { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 7px; margin: 14px 0 0; padding: 8px 10px; border-radius: 12px; }
  .home-doctor-finder .form-label { margin-bottom: 4px; font-size: .61rem; }
  .home-doctor-finder .form-control,
  .home-doctor-finder .form-select { height: 36px; min-height: 36px; padding-block: 0; font-size: .78rem; }
  .home-doctors-bar { margin-top: 11px; }
  .home-doctor-count { margin-bottom: 8px; font-size: .78rem; }
  .home-doctors-bar .home-rail-controls { display: none; }
  .home-doctor-rail { gap: 12px; padding: 2px 14px 10px; scroll-padding-inline: 14px; }
  .home-doctor-item { flex-basis: min(76vw, 286px); }
  .home-doctor-rail .doc-photo { height: 255px; aspect-ratio: auto; }
  .home-doctor-rail .doc-content { padding: 12px 13px 14px; }
  .home-doctor-rail .doc-card h3 { font-size: .95rem; }
  .home-doctor-rail .doc-focus { font-size: .7rem; }
  .home-doctor-rail .doc-qual { font-size: .72rem; }
  .home-doctor-rail .doc-actions { display: flex; flex-wrap: nowrap; }
  .home-doctor-rail .doc-btn { min-height: 38px; flex: 1; font-size: .76rem; }

  .home-location-grid { gap: 10px; margin-top: 18px; }
  .home-location { padding: 13px; border-radius: 14px; }
  .home-location h3 { margin-bottom: 3px; font-size: .9rem; }
  .home-location p { font-size: .72rem; line-height: 1.35; }
  .home-location .home-location-services { margin-top: 8px; font-size: .59rem; line-height: 1.25; }
  .home-location-contacts { gap: 7px; margin: 10px 0 10px; }
  .home-location-group { gap: 6px; }
  .home-location-group strong { font-size: .56rem; line-height: 1.2; }
  /* Phones: icon-only buttons (the number stays in each button's accessible name) */
  .home-location .vc-contact-buttons { grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); gap: 6px; }
  .home-location .vc-contact-btn { justify-content: center; min-height: 42px; padding: 5px; border-radius: 10px; }
  .home-location .vc-contact-icon { width: 30px; height: 30px; }
  .home-location .vc-contact-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .home-location-directions { --bs-btn-font-size: .63rem; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: .4rem; }

  .home-reviews .vc-section-head { margin-bottom: 28px; }
  .home-review { width: min(82vw, 340px); padding: 22px; }
  .is-marquee .home-review-track { padding-left: 14px; }

  .home-video-viewport { padding: 0 14px; }
  .home-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .home-video-viewport.is-marquee { padding: 0; }
  .is-marquee .home-video-grid { display: flex; width: max-content; animation: home-marquee-right 45s linear infinite; will-change: transform; }
  .is-marquee .home-video { flex: 0 0 196px; }
  .is-marquee .home-video-grid:focus-within,
  .is-marquee .home-video-grid.is-paused { animation-play-state: paused; }

  .home-insurance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
  .home-insurance-grid li { height: 118px; padding: 14px; border-radius: 15px; }
  .home-insurance-grid img { max-width: 142px; max-height: 86px; }

  .home-news-grid { gap: 12px; margin-top: 28px; }
}
@keyframes home-marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

@media (max-width: 389px) {
  .home-doctor-finder { grid-template-columns: 1fr; }
}
@media (max-width: 340px) {
  .home-location { padding: 11px; }
  .home-location p { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-slide, .home-service-card img { transition: none; }
  .home-hero-pulse, .is-marquee .home-review-track, .is-marquee .home-video-grid { animation: none; }
}
