/* --- HOME PAGE (full-bleed hero desktop, inline image mobile) --- */

/* ================== MEDIA BASICS ================== */
/* Default: keep images' natural aspect ratio */
.hero-bg img,
.path-split .path-media img,
.ph-media img,
.feat-card .media img,
.loc-map img {
  width: 100%;
  height: auto;
  display: block;
}

/* Iframes should always fill their container */
.loc-map iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none !important;
  outline: none;
}

/* ================== MOBILE-ONLY INLINE IMAGE ================== */
/* Hidden by default, shown on mobile below */
.mobile-hero-image { display: none; margin: 0; padding: 0; }

/* Aspect-ratio placeholder so text doesn't jump */
.mobile-hero-image .mobile-hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--mobile-hero-ar, 3 / 2); /* adjust if your asset ratio differs */
  background: #f7fafc;
  overflow: hidden;
}

/* Make the picture fill the reserved box */
.mobile-hero-image .mobile-hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* Fill the box without distortion */
.mobile-hero-image .mobile-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
  .mobile-hero-image .mobile-hero-media {
    height: 0;
    padding-top: 66.6667%; /* 3:2 ratio fallback */
  }
  .mobile-hero-image .mobile-hero-media picture,
  .mobile-hero-image .mobile-hero-media img {
    position: absolute;
    inset: 0;
  }
}

/* ---- HERO ---- */
.home-hero {
  position: relative;
  padding: 0;
  min-height: clamp(620px, 88vh, 900px);
  display: flex;
  align-items: stretch;
  background: #fff;
}

/* Hero background intentionally fills the box (use cover) */
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 88% 50%;
}

.home-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.78) 28%,
    rgba(255,255,255,0.42) 52%,
    rgba(255,255,255,0.12) 72%,
    rgba(255,255,255,0) 88%);
  pointer-events: none;
}

.hero-wrap {
  position: relative; z-index: 1;
  width: 100%; margin: 0;
  padding-left: clamp(16px, 6vw, 56px);
  padding-right: clamp(16px, 4vw, 40px);
  display: flex; align-items: center; justify-content: flex-start;
}
.hero-copy { max-width: 640px; }
.hero-copy h1 {
  font-size: clamp(2.4rem, 4.1vw, 3.6rem);
  line-height: 1.12; color: var(--section-heading-color); margin-bottom: .6rem;
}
.hero-copy .lead { font-size: 1.2rem; color: var(--text-color); line-height: 1.9; max-width: 62ch; }
.hero-ctas { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.1rem 0 .6rem; }

/* ---- Unified Buttons ---- */
.btn, .btn-primary {
  --btn-bg: var(--primary-color);
  --btn-bg-hover: var(--primary-600);
  --btn-text: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 44px; padding: .6rem 1rem; border-radius: 6px; border: 0;
  background-color: var(--btn-bg); color: var(--btn-text);
  font-weight: 600; font-size: .95rem; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, transform .06s ease;
}
.btn:hover, .btn-primary:hover { background-color: var(--btn-bg-hover); }
.btn:active, .btn-primary:active { transform: translateY(1px); }

/* keep white text on hover/active/focus */
.btn-primary,
.btn-primary:link,
.btn-primary:visited,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-primary:focus-visible { color: #fff !important; text-decoration: none; }

/* Secondary link-style CTA */
.btn-link {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-weight: 700; color: var(--primary-color); text-decoration: none;
}
.btn-link:hover { color: var(--primary-700); text-decoration: underline; }

/* ---- Badges ---- */
.hero-badges { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .85rem; }
.badge {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid #e6edf0; background: #fff; border-radius: 999px;
  padding: .5rem .85rem; box-shadow: var(--box-shadow-soft);
  color: var(--section-heading-color); font-weight: 600;
}
.badge img { width: 20px; height: 20px; }

/* ---- PATH (baseline + split w/ image) ---- */
.path { padding: 2.2rem 1.5rem 3rem; }
.path .container { max-width: var(--container-max-width); margin: 0 auto; }
.path h2 {
  text-align: center; margin-bottom: 1.1rem;
  color: var(--section-heading-color); font-size: clamp(1.7rem, 2.4vw, 2.1rem);
}
.step-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.1rem; margin-top: .6rem; }
.step-card {
  grid-column: span 12;
  border: 1px solid #e6edf0; background: #fff; border-radius: 14px;
  padding: 1.15rem; box-shadow: var(--box-shadow-soft); min-height: 160px;
}
.step-card .num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-color); color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-weight:700; margin-bottom: .5rem;
}
.step-card h3 { margin: 0 0 .3rem; color: var(--section-heading-color); }

/* ▶ 2×2 steps at desktop + slightly larger image */
.path-split .path-wrap {
  display: grid;
  /* Make the image a bit wider than the text column */
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem; align-items: center;
}
.path-split .path-copy h2 { text-align: left; margin-bottom: .9rem; color: var(--section-heading-color); font-size: clamp(1.7rem, 2.4vw, 2.1rem); }

/* 1-col steps on small screens, 2-col (2×2) on ≥900px */
.path-split .step-grid { grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) {
  .path-split .step-grid { grid-template-columns: 1fr 1fr; }
  .path-split .step-grid .step-card { grid-column: auto; min-height: 0; }
}

/* Bigger visual on the right */
.path-split .path-media {
  border-radius: 16px; overflow: hidden; box-shadow: var(--box-shadow-soft);
  background: var(--light-background);
  aspect-ratio: 3 / 2;      /* bigger than before */
  max-height: 560px;        /* allow a bit more height */
}

/* Path image intentionally fills its box */
.path-split .path-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% center;
}

/* ---- CONDITIONS ---- */
.conditions { padding: 1.5rem 1.5rem 3rem; }
.conditions .container { max-width: var(--container-max-width); margin:0 auto; }
.conditions h2 { text-align:center; margin-bottom: 1rem; color: var(--section-heading-color); }
.chip-grid { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

.chip {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  border-radius: 999px; padding: .6rem 1rem; font-weight: 600;
  box-shadow: var(--box-shadow-soft);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { background: var(--chip-bg-hover); color: var(--chip-text-hover); border-color: var(--chip-border); }

.conditions-note { text-align:center; color:#556; margin-top: .9rem; }

/* ---- FEATURED TREATMENTS ---- */
.featured { padding: 1.5rem 1.5rem 3.2rem; }
.featured .container { max-width: var(--container-max-width); margin: 0 auto; }
.featured h2 { text-align:center; margin-bottom: 1.2rem; color: var(--section-heading-color); }
.feat-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.2rem; }
.feat-card {
  grid-column: span 12;
  border: 1px solid #e6edf0; background:#fff; border-radius:14px;
  box-shadow: var(--box-shadow-soft); overflow:hidden;
  transition: transform .2s ease, box-shadow .2s ease; min-height: 360px;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--box-shadow-medium); }
.feat-card .media { aspect-ratio: 16/9; background: var(--light-background); }
.feat-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feat-card h3 { margin: .9rem 1.1rem .3rem; color: var(--section-heading-color); }
.feat-card p  { margin: 0 1.1rem .9rem; color: var(--text-color); }
.feat-card .more { display:inline-block; margin: 0 1.1rem 1.1rem; color: var(--primary-color); font-weight:700; text-decoration: none; }
.feat-card .more:hover { color: var(--primary-700); text-decoration: underline; }

/* ---- PROVIDER HIGHLIGHT (more image, tighter text) ---- */
.provider-highlight {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  padding: 1.75rem 1.5rem 3rem;
}
.highlight-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 1.6rem; max-width: var(--container-max-width); margin: 0 auto;
  min-height: 520px; align-items: center;
}
.ph-copy { max-width: 560px; }
.ph-copy h2 { color: var(--section-heading-color); margin-bottom: .6rem; }
.ph-copy p  { color: var(--text-color); margin-bottom: 1rem; }
.ph-media {
  border-radius: 16px; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,.08);
  width: 100%; max-width: none; justify-self: stretch; aspect-ratio: 3 / 2;
}
/* Provider image fills its box without distortion */
.ph-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- REVIEWS ---- */
.home-reviews { padding: 1.5rem 1.5rem 3rem; }
.home-reviews .container { max-width: var(--container-max-width); margin: 0 auto; }
.home-reviews h2 { text-align:center; margin-bottom: 1.2rem; color: var(--section-heading-color); }
.review-row { display:grid; grid-template-columns: repeat(12, 1fr); gap: 1.1rem; }
.review-card {
  grid-column: span 12;
  background:#fff; border:1px solid #e6edf0; border-radius:14px;
  padding: 1.1rem 1.1rem; box-shadow: var(--box-shadow-soft); min-height: 150px;
}
.review-card p { margin: 0; color: var(--text-color); }
.review-card .name { display:block; margin-top:.6rem; color:#667; font-weight:600; }

/* ---- LOCATION SNAPSHOT (smaller text column, bigger map, closer gap, no borders) ---- */
.home-location { padding: 1.75rem 1.5rem 3rem; }
.loc-wrap {
  display: grid;
  /* Smaller text column, larger map column */
  grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
  gap: clamp(.4rem, 1.2vw, .75rem);
  max-width: var(--container-max-width);
  margin: 0 auto;
  align-items: stretch;
}
.loc-card {
  display: flex; flex-direction: column;
  gap: .35rem; padding: .2rem 0;  /* tighter vertical spacing */
}
.loc-card h3 { margin: 0; }
.loc-card p  { margin: 0; color: #556; }

/* Hours list in Home location (match Location page look) */
.home-location .hours {
  list-style: none;
  margin: .35rem 0 .15rem;
  padding: 0;
}
.home-location .hours li {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: .6rem;          /* tighter space between label and time */
  align-items: center;
  justify-content: start;     /* no stretching */
  padding: .25rem 0;
  border-bottom: 1px dashed #e6edf0;
}
.home-location .hours li:last-child { border-bottom: 0; }
.home-location .hours li span { white-space: nowrap; }  /* keep each part on one line */

.loc-card .loc-ctas {
  display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: .45rem;
}

.loc-map {
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--box-shadow-soft);
  background: var(--light-background);
  aspect-ratio: 16 / 9;
  width: 100%; justify-self: stretch;
  border: none;                 /* remove any border on the container */
}
.loc-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- FINAL CTA ---- */
.home-cta { background: linear-gradient(180deg, #f7fafc 0%, #ffffff 100%); padding: 2.2rem 1.5rem 3.4rem; }
.cta-wrap { max-width: 900px; margin: 0 auto; text-align:center; }
.cta-wrap h2 { color: var(--section-heading-color); margin-bottom: .35rem; }
.cta-wrap p { color: var(--text-color); margin-bottom: 1rem; }

/* ---- RESPONSIVE ---- */
@media (min-width: 768px) {
  .step-card { grid-column: span 6; }
  .feat-card, .review-card { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .step-card { grid-column: span 3; }
  .feat-card, .review-card { grid-column: span 4; }
}
@media (max-width: 900px) {
  .path-split .path-wrap, .highlight-wrap, .loc-wrap { grid-template-columns: 1fr; }
  .ph-media { max-width: 100%; }
}
@media (max-width: 768px) {
  .mobile-hero-image { display: block; padding: 0 !important; margin: 0 !important; }
  .hero-bg { display: none !important; }
  .home-hero::after { content: none; }
  .home-hero { min-height: auto; padding: 0; }
  .hero-wrap {
    align-items: flex-start;
    padding-top: .35rem;
    padding-left: clamp(16px, 5vw, 28px);
    padding-right: clamp(16px, 5vw, 28px);
  }
}
