/*
 * HGI - Why Section + Doctor Section + CTA Parallax
 * 08-doctor.css - v2.0
 *
 * Why: Teal-derived parallax overlay, frosted glass pillar cards.
 * Doctor: Standalone portrait + bio on warm base.
 * CTA: Teal-derived parallax overlay, inverted buttons.
 */


/* ═══════════════════════════════════════════
   WHY SECTION (parallax)
═══════════════════════════════════════════ */

.why-section {
  position: relative;
  overflow: hidden;
  padding: var(--space-32) 0;
}

/* Parallax background image */
.why-section__parallax {
  position: absolute;
  inset: -20% 0;
  background-image: var(--why-bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

/* Overlay - teal-derived dark */
.why-section__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay-dark);
  z-index: 1;
}

/* Fallback: no image uploaded — LIGHT mode */
.why-section:not([style*="--why-bg"]) .why-section__parallax {
  display: none;
}

.why-section:not([style*="--why-bg"]) .why-section__overlay {
  background: var(--color-bg-alt);
}

.why-section:not([style*="--why-bg"]) .why-section__eyebrow {
  color: var(--color-text-muted);
}

.why-section:not([style*="--why-bg"]) .why-section__heading {
  color: var(--color-text-primary);
}

.why-section:not([style*="--why-bg"]) .why-section__quote {
  color: var(--color-text-body);
}

.why-section:not([style*="--why-bg"]) .why-section__pillar {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.why-section:not([style*="--why-bg"]) .why-section__pillar:hover {
  background: var(--color-bg-white);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.why-section:not([style*="--why-bg"]) .why-section__pillar-title {
  color: var(--color-text-primary);
}

.why-section:not([style*="--why-bg"]) .why-section__pillar-desc {
  color: var(--color-text-body);
}

.why-section:not([style*="--why-bg"]) .why-section__pillar-icon {
  background: rgba(34, 67, 2, 0.08);
  border: 1px solid rgba(34, 67, 2, 0.25);
}

.why-section:not([style*="--why-bg"]) .why-section__pillar-icon svg {
  stroke: var(--color-action);
}

/* Content container */
.why-section__content {
  position: relative;
  z-index: 2;
}


/* ── Statement ── */

.why-section__statement {
  text-align: center;
  max-width: 780px;
  margin: 0 auto var(--space-16);
}

.why-section__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: rgba(247, 249, 250, 0.50);
  display: block;
  margin-bottom: var(--space-4);
}

.why-section__heading {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: var(--weight-medium);
  color: var(--color-text-inverse);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-8);
}

.why-section__quote {
  position: relative;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: var(--weight-regular);
  font-size: var(--text-xl);
  color: rgba(247, 249, 250, 0.85);
  line-height: var(--leading-normal);
  max-width: 40ch;
  margin: 0 auto;
}

.why-section__quote-mark {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: var(--weight-light);
  color: var(--color-action);
  line-height: 0;
  position: absolute;
  top: -0.1em;
  left: -0.6em;
  opacity: 0.50;
}


/* ── Frosted glass pillar cards ── */

.why-section__pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.why-section__pillar {
  background: rgba(247, 249, 250, 0.06);
  border: 0.5px solid rgba(247, 249, 250, 0.10);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    background   400ms var(--ease-out),
    border-color 400ms var(--ease-out);
}

.why-section__pillar:hover {
  background: rgba(247, 249, 250, 0.10);
  border-color: rgba(34, 67, 2, 0.40);
}

.why-section__pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 67, 2, 0.15);
  border: 1px solid rgba(34, 67, 2, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-section__pillar-icon svg {
  width: 26px;
  height: 26px;
  stroke: rgba(247, 249, 250, 0.85);
}

.why-section__pillar-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text-inverse);
  line-height: var(--leading-snug);
}

.why-section__pillar-desc {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: rgba(247, 249, 250, 0.80);
  line-height: var(--leading-normal);
}


/* ═══════════════════════════════════════════
   DOCTOR SECTION (two doctors, alternating)
═══════════════════════════════════════════ */

.doctor-section {
  background: var(--color-bg-base);
}

.doctor-section .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.doctor-intro {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-12);
  align-items: center;
}

/* Reversed: content left, image right */
.doctor-intro--reversed {
  grid-template-columns: 7fr 5fr;
}


/* ── Portrait ── */

.doctor-intro__image-wrap {
  position: relative;
}

.doctor-intro__image {
  width: 100%;
  border-radius: var(--radius-xl);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
  box-shadow: var(--shadow-lg);
}

.doctor-intro__image--placeholder {
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}


/* ── Content ── */

.doctor-intro__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.doctor-intro__name {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  font-style: italic;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

.doctor-intro__title {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-action);
}

.doctor-intro__bio {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text-body);
  line-height: var(--leading-normal);
  max-width: 52ch;
}


/* ── Credentials ── */

.doctor-intro__credentials {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.doctor-intro__cred {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.doctor-intro__cred-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-action);
  flex-shrink: 0;
}


/* ── CTA link ── */

.doctor-intro__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-action);
  text-decoration: none;
  margin-top: var(--space-3);
  transition:
    gap var(--duration-base) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.doctor-intro__link:hover {
  color: var(--color-action-hover);
  gap: var(--space-3);
}

.doctor-intro__link svg {
  transition: transform var(--duration-base) var(--ease-bounce);
}

.doctor-intro__link:hover svg {
  transform: translateX(3px);
}


/* ═══════════════════════════════════════════
   CTA SECTION (parallax overrides)
═══════════════════════════════════════════ */

.cta-section--parallax {
  position: relative;
  overflow: hidden;
  background: none;
  padding-block: var(--space-24);
}

/* Parallax background */
.cta-section__parallax {
  position: absolute;
  inset: -20% 0;
  background-image: var(--cta-bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

/* Overlay - teal-derived dark */
.cta-section__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay-dark);
  z-index: 1;
}

/* Fallback: no image — solid teal */
.cta-section--parallax:not([style*="--cta-bg"]) .cta-section__parallax {
  display: none;
}

.cta-section--parallax:not([style*="--cta-bg"]) .cta-section__overlay {
  background: var(--color-action);
}

/* Content above layers */
.cta-section__container {
  position: relative;
  z-index: 2;
}

/* Light text on dark */
.cta-section__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: rgba(247, 249, 250, 0.50);
  display: block;
}

.cta-section--parallax .cta-center__heading {
  color: var(--color-text-inverse);
}

.cta-section--parallax .cta-center__sub {
  color: rgba(247, 249, 250, 0.80);
}

.cta-section--parallax .cta-center__tagline {
  color: rgba(247, 249, 250, 0.55);
}

/* Buttons on dark - primary is white bg, teal text */
.cta-section__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background   var(--duration-fast) var(--ease-out),
    transform    var(--duration-fast) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.cta-section__btn--primary {
  color: var(--color-action);
  background: var(--color-bg-base);
  border: none;
}

.cta-section__btn--primary:hover {
  background: var(--color-action-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 249, 250, 0.15);
}

.cta-section__btn--ghost {
  color: var(--color-text-inverse);
  background: none;
  border: 1px solid rgba(247, 249, 250, 0.25);
}

.cta-section__btn--ghost:hover {
  background: rgba(247, 249, 250, 0.08);
  border-color: rgba(247, 249, 250, 0.45);
}


/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .doctor-intro {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-8);
  }

  .doctor-intro--reversed {
    grid-template-columns: 7fr 5fr;
  }

  .doctor-intro__name {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 768px) {

  /* Why section */
  .why-section {
    padding: var(--space-20) 0;
  }

  .why-section__parallax {
    background-attachment: scroll;
  }

  .why-section__heading {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .why-section__quote {
    font-size: var(--text-lg);
  }

  .why-section__quote-mark {
    position: static;
    display: block;
    font-size: 3rem;
    margin-bottom: -0.5em;
  }

  .why-section__pillars {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .why-section__pillar {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: var(--space-6);
    gap: var(--space-3);
  }

  .why-section__pillar-icon {
    width: 48px;
    height: 48px;
  }

  .why-section__pillar-icon svg {
    width: 22px;
    height: 22px;
  }

  /* Doctor */
  .doctor-section .container {
    gap: var(--space-12);
  }

  .doctor-intro {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .doctor-intro--reversed {
    grid-template-columns: 1fr;
  }

  /* On mobile, reversed block: image should appear above content */
  .doctor-intro--reversed .doctor-intro__image-wrap {
    order: -1;
  }

  .doctor-intro__image {
    aspect-ratio: 4 / 5;
    max-width: 320px;
  }

  .doctor-intro__name {
    font-size: var(--text-xl);
  }

  .doctor-intro__cred {
    font-size: var(--text-sm);
  }

  /* CTA parallax */
  .cta-section--parallax {
    padding-block: var(--space-16);
  }

  .cta-section__parallax {
    background-attachment: scroll;
  }

  .cta-section--parallax .cta-center__heading {
    font-size: clamp(2.25rem, 9vw, 3rem);
  }

  .cta-center__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-section__btn {
    width: 100%;
    justify-content: center;
  }
}


/* ── Mobile parallax alternative: slow breathing zoom ── */

@media (max-width: 768px) {
  .why-section__parallax,
  .cta-section__parallax {
    animation: mobile-parallax-zoom 8s var(--ease-in-out) infinite alternate;
  }
}

@keyframes mobile-parallax-zoom {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}

/* Deep links from the old site land here, keep the header clear of them */
.doctor-intro[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
}

/* ── Booking button + team link, one row ── */

.doctor-intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-3);
}

.doctor-intro__actions .doctor-intro__link {
  margin-top: 0;
}

@media (max-width: 768px) {
  .doctor-intro__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Meet Our Team: jump links ── */

.team-jump {
  margin-top: var(--space-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.team-jump__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.team-jump__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
}

.team-jump__link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-white);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    color        var(--duration-fast) var(--ease-out),
    background   var(--duration-fast) var(--ease-out);
}

.team-jump__link:hover,
.team-jump__link:focus-visible {
  border-color: var(--color-action);
  color: var(--color-action);
}

/* Space between team rows, and the detail lists under each bio */
.team-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.doctor-intro__detail-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.doctor-intro__detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
}

.doctor-intro__bio p + p {
  margin-top: var(--space-3);
}

@media (max-width: 768px) {
  .team-rows {
    gap: var(--space-12);
  }
}

/* CTA: scroll with the page and show the top of the photo */
.cta-section__parallax {
  background-attachment: scroll;
  background-position: 50% 15%;
}