/**
 * Section: Doctor CTA
 *
 * Dark full-width CTA with a tall vertical doctor photo on the right,
 * headline, lead text, phone + booking buttons, and doctor attribution.
 *
 * @package Ortorodzina
 */

/* ── Shell ─────────────────────────────────────────────────────────────────── */

.doc-cta {
  position: relative;
  overflow: visible; /* allow image to bleed above the section */
  background: var(--color-dark);
}

/* ── Layout grid ───────────────────────────────────────────────────────────── */

.doc-cta__inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  min-height: 520px;
  align-items: center;
}

/* ── Content (left) ────────────────────────────────────────────────────────── */

.doc-cta__content {
  /* padding: var(--space-10) var(--space-8) var(--space-10) 0; */
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
  z-index: 1;
  transition:
    opacity 500ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 500ms cubic-bezier(0.23, 1, 0.32, 1);

  @starting-style {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ── Heading ───────────────────────────────────────────────────────────────── */

.doc-cta__heading {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
}

/* Wrap key words in <em> in the admin to colour them */
.doc-cta__heading em {
  color: var(--color-accent);
  font-style: normal;
}

/* ── Lead text ─────────────────────────────────────────────────────────────── */

.doc-cta__lead {
  font-size: 15.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  max-width: 600px;
}

/* ── CTA button row ────────────────────────────────────────────────────────── */

.doc-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* Phone button: filled accent */
.doc-cta__btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--color-accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    background 160ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
}

.doc-cta__btn-phone:hover {
  background: #e02d20;
  color: #fff;
}

.doc-cta__btn-phone:active {
  transform: scale(0.97);
}

.doc-cta__btn-phone svg {
  flex-shrink: 0;
}

/* Book button: white outline ghost */
.doc-cta__btn-book {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    border-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
    background 160ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
}

.doc-cta__btn-book:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.doc-cta__btn-book:active {
  transform: scale(0.97);
}

/* ── Doctor attribution — floating card on image ──────────────────────────── */

.doc-cta__doctor {
  position: absolute;
  bottom: 20px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.8);
  min-width: 180px;
  z-index: 2;
  transition:
    opacity 400ms cubic-bezier(0.23, 1, 0.32, 1) 200ms,
    transform 400ms cubic-bezier(0.23, 1, 0.32, 1) 200ms;

  @starting-style {
    opacity: 0;
    transform: translateY(8px);
  }
}

.doc-cta__doctor-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.doc-cta__doctor-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 2px;
  line-height: 1.3;
}

.doc-cta__doctor-prefix {
  font-weight: 400;
  color: var(--color-text-soft);
  margin-right: 3px;
}

.doc-cta__doctor-title {
  font-size: 11px;
  color: var(--color-text-soft);
  margin: 0;
  line-height: 1.4;
}

/* ── Image (right) ─────────────────────────────────────────────────────────── */

.doc-cta__media {
  position: relative;
  align-self: stretch;
  overflow: visible;
  margin-top: -20px; /* bleed 20px above the section background */
  clip-path: inset(-9999px 0 0 0); /* clip bottom+sides, allow bleed at top */
}

.doc-cta__img {
  position: absolute;
  inset: 0;
  top: 0;
  width: 100%;
  height: calc(100% + 20px); /* compensate for the -20px margin */
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

/* Tablet landscape */
@media (max-width: 1024px) {
  .doc-cta__inner {
    grid-template-columns: 1fr 340px;
  }
}

/* Tablet portrait */
@media (max-width: 840px) {
  .doc-cta__inner {
    grid-template-columns: 1fr 280px;
    min-height: 420px;
  }

  .doc-cta__heading {
    font-size: clamp(1.45rem, 4vw, 2rem);
  }

  .doc-cta__lead {
    font-size: 14.5px;
  }

  .doc-cta__doctor {
    left: 10px;
    bottom: 14px;
    padding: 8px 12px;
    min-width: 0;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .doc-cta__inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  /* Content below the image */
  .doc-cta__content {
    padding: var(--space-6) var(--space-4) var(--space-8);
    order: 2;
    margin-top: -80px;
    position: relative;
    z-index: 2;
  }

  .doc-cta__heading,
  .doc-cta__lead {
    text-align: center;
  }

  /* Image column: fixed height, no bleed */
  .doc-cta__media {
    order: 1;
    height: 520px;
    clip-path: none;
    overflow: hidden;
    align-self: auto;
  }

  /* Bottom gradient scrim on mobile image */
  .doc-cta__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-dark) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
  }

  /* Fill the fixed-height container */
  .doc-cta__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .doc-cta__doctor {
    left: 12px;
    bottom: 100px;
  }

  .doc-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .doc-cta__btn-phone,
  .doc-cta__btn-book {
    justify-content: center;
    text-align: center;
  }
}
