/* ==========================================================================
   Ergo Rehab: home page. Layout follows the 2025 home page section by section.
   ========================================================================== */

/* --- Hero: full-width clinic photo with the blue "ErgoRehab" wall visible at
       the top; white headline, intro and referral button sit in the lower part
       over a soft navy fade; "Founded in 2000" badge. -------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: 680px;
  padding: 0 var(--gutter) var(--sp-7);
  color: var(--white); text-align: center;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 0%; }
.hero::after { /* clear at the top (the wall sign), navy behind the text */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(20, 46, 105, 0) 0%,
    rgba(20, 46, 105, 0) 30%,
    rgba(20, 46, 105, 0.72) 55%,
    rgba(20, 46, 105, 0.88) 100%);
}
.hero__panel { max-width: 46rem; }
.hero__title {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-hero); font-weight: var(--fw-heavy);
  font-size: var(--fs-hero); line-height: 1.15; letter-spacing: -0.02em;
  color: var(--white);
  text-shadow: 0 2px 14px rgba(10, 24, 60, 0.6);
}
.hero__title span { display: block; }
.hero__lead {
  max-width: 36rem; margin: 0 auto var(--sp-5);
  font-size: var(--fs-base); font-weight: var(--fw-semi); line-height: var(--lh-body);
  text-shadow: 0 1px 8px rgba(10, 24, 60, 0.6);
}
.hero__cta {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap); padding: var(--sp-3) var(--sp-5);
  background: var(--stone); color: var(--navy);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium); text-decoration: none;
  transition: background var(--ease);
}
.hero__cta:hover { background: var(--white); color: var(--navy); }
.hero__cta .icon { width: 28px; height: 28px; }
.hero__badge { display: block; width: 104px; margin: var(--sp-5) auto 0; }
.hero__badge img { width: 100%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); }

/* Phones and tablets (up to 1024px): photo strip on top with the wall sign in
   view, text on navy underneath. Wider screens: text over the lower photo. */
@media (max-width: 1024px) {
  .hero { min-height: 0; padding: 0 0 var(--sp-7); justify-content: flex-start; background: var(--navy); }
  .hero__bg { position: relative; inset: auto; width: 100%; height: clamp(260px, 60vw, 520px); }
  .hero__bg img { object-position: 36% 40%; }
  .hero::after {
    top: 0; bottom: auto; height: clamp(260px, 60vw, 520px);
    background: linear-gradient(180deg, rgba(27, 61, 138, 0) 65%, var(--navy) 100%);
  }
  .hero__panel { padding: var(--sp-4) var(--gutter) 0; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .hero__bg img { object-position: 50% 45%; }
  .hero__badge { width: 120px; }
}
@media (min-width: 1025px) {
  .hero { min-height: clamp(640px, 62vw, 880px); padding-bottom: var(--sp-8); }
  .hero__bg img { object-position: 50% 20%; }
  .hero::after {
    background: linear-gradient(180deg,
      rgba(20, 46, 105, 0) 0%,
      rgba(20, 46, 105, 0) 38%,
      rgba(20, 46, 105, 0.7) 62%,
      rgba(20, 46, 105, 0.85) 100%);
  }
  /* badge in the bottom-right corner so the text block stays compact */
  .hero__badge { position: absolute; right: max(var(--gutter), calc((100% - var(--container)) / 2)); bottom: var(--sp-7); width: 136px; margin: 0; }
}

/* --- Navy band: four features with icon tiles and thin dividers (old site) --- */
.features { margin-top: clamp(2rem, 5vw, 5rem); background: var(--navy); color: var(--white); padding-block: var(--sp-7); }  /* white gap above, as old site */
.features__grid { display: grid; gap: var(--sp-6); }
.feature { display: flex; gap: var(--sp-4); align-items: flex-start; }
.feature__icon {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12); color: var(--stone);
}
.feature__icon .icon { width: 30px; height: 30px; }
.feature__title { margin: 0 0 var(--sp-2); color: var(--white); font-size: 1.2rem; font-weight: var(--fw-bold); line-height: 1.25; letter-spacing: var(--tracking-head); }
.feature p { margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--white); }

@media (min-width: 768px) {
  .features__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6) var(--sp-7); }
}
@media (min-width: 1025px) {
  .features { padding-block: var(--sp-8); }
  .features__grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .feature { padding: 0 var(--sp-5); border-left: 1px solid rgba(255, 255, 255, 0.35); }
  .feature:first-child { padding-left: 0; border-left: 0; }
}

/* --- Trusted Experts: rounded photo left, centred text right (old site) ---- */
.experts { padding-block: var(--section-y); background: var(--white); overflow: hidden; }
.experts__grid { display: grid; gap: var(--sp-6); align-items: center; }
.experts__media { max-width: 640px; width: 100%; margin-inline: auto; }
.experts__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.experts__body h2 { max-width: 32rem; }
.experts__body p { font-size: var(--fs-sm); line-height: 1.75; }
/* one tidy column of link rows (was a scattered 2-column icon list) */
.experts__list { display: grid; gap: var(--sp-3); max-width: 30rem; margin: var(--sp-5) 0 var(--sp-6); padding: 0; list-style: none; }
.experts__list a {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap); padding: var(--sp-3) var(--sp-4);
  background: var(--mist); border: 1px solid var(--linen); border-radius: var(--radius);
  color: var(--navy); font-weight: var(--fw-medium); text-decoration: none;
}
.experts__list .icon { width: 22px; height: 22px; color: var(--steel); flex: none; }
.experts__list span { flex: 1; }
.experts__list .experts__arrow { width: 18px; height: 18px; color: var(--navy); }

@media (min-width: 1025px) {
  .experts__grid { grid-template-columns: 1fr 1.1fr; gap: var(--sp-8); }
}

/* --- Reviews: fixed cards of real Google reviews (old site showed a slider of cards) --- */
.reviews { padding-block: 0 var(--section-y); }
.reviews__grid { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.review {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5); background: var(--white);
  border: 1px solid var(--linen); border-radius: var(--radius); box-shadow: var(--shadow);
}
.review__stars { margin: 0; color: #B8860B; font-size: 1.25rem; letter-spacing: 0.1em; line-height: 1; }  /* dark gold: 3.3:1 on white */
.review__star-off { color: var(--linen); }
.review__text { flex: 1; margin: 0; }
.review__text p { margin: 0; font-size: var(--fs-sm); line-height: 1.65; color: var(--slate); }
.review__by { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1) var(--sp-3); margin: 0; padding-top: var(--sp-3); border-top: 1px solid var(--linen); font-size: var(--fs-xs); }
.review__name { font-weight: var(--fw-semi); color: var(--navy); }
.review__src { color: var(--slate); }
.reviews__more { margin: var(--sp-6) 0 0; text-align: center; }

@media (min-width: 768px) { .reviews__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1025px) { .reviews__grid { grid-template-columns: repeat(4, 1fr); } }

/* --- Motion: hero entrance + hover effects -------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  @keyframes badge-in { from { opacity: 0; transform: scale(0.6) rotate(-20deg); } to { opacity: 1; transform: none; } }
  .hero__bg img { animation: hero-zoom 2.2s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__title { animation: rise 700ms 150ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero__lead  { animation: rise 700ms 300ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero__cta   { animation: rise 700ms 450ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero__badge img { animation: badge-in 700ms 700ms cubic-bezier(.3, 1.5, .5, 1) both; }

  .hero__cta .icon, .experts__arrow, .feature, .feature__icon, .experts__list a,
  .experts__media img, .review { transition: transform 250ms ease, background 250ms ease, color 250ms ease, box-shadow 250ms ease, border-color 250ms ease; }
}

@media (hover: hover) {
  .hero__cta:hover .icon { transform: translateX(4px); }

  .feature { border-radius: var(--radius); }
  .feature:hover .feature__icon { background: var(--white); color: var(--navy); transform: translateY(-3px); }

  .experts__list a:hover { background: var(--white); border-color: var(--steel); box-shadow: var(--shadow); color: var(--navy); }
  .experts__list a:hover .experts__arrow { transform: translateX(4px); }

  .experts__media { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
  .experts__media img { box-shadow: none; }
  .experts__media:hover img { transform: scale(1.04); }

  .review:hover { transform: translateY(-6px); border-color: var(--stone); box-shadow: 0 14px 34px rgba(20, 46, 105, 0.18); }
}
