/* ============================================================= */
/* Section: 07-cta-direction */
/* ============================================================= */
/* ===== CTA banner "Give Unpaid Accident Bills Direction" — Figma node 12183:1157 (1240 x 369) ===== */
.ai-cta-direction-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 369px;
  padding: 40px;
  border-radius: 20px;
  overflow: clip;
  background: linear-gradient(90deg, #05134c 13.942%, #05134c 34.135%, rgba(33, 86, 154, 0.9) 100%);
  box-shadow: 0 2.704px 41.56px rgba(0, 0, 0, 0.12);
  isolation: isolate;
}

/* Decorative circles (12183:1158-1160), positioned from the card's right edge. */
.ai-cta-direction-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.ai-cta-direction-ring {
  position: absolute;
  display: block;
}

.ai-cta-direction-ring img {
  display: block;
  max-width: none;
}

.ai-cta-direction-ring--top   { top: 50.2px;  right: 189.2px; }
.ai-cta-direction-ring--right { top: 97.2px;  right: 22.1px; }
.ai-cta-direction-ring--left  { top: 184.3px; right: 343.1px; }

.ai-cta-direction-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  width: 608px;
  max-width: 100%;
}

.ai-cta-direction-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ai-cta-direction-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 9.069px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ai-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 9.976px;
  text-transform: uppercase;
}

.ai-cta-direction-title {
  color: var(--ai-white);
  font-size: 32px;
  font-weight: 700;
  line-height: 45px;
}

.ai-cta-direction-text {
  color: var(--ai-white);
  font-size: 16px;
  font-weight: 400;
  line-height: 25.2px;
}

.ai-cta-direction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 8px 20px;
  border-radius: 60px;
  background: var(--ai-orange);
  color: var(--ai-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 20.8px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.3s var(--ai-ease), box-shadow 0.3s var(--ai-ease), transform 0.3s var(--ai-ease);
}

.ai-cta-direction-btn img {
  display: block;
  flex: none;
  transition: transform 0.3s var(--ai-ease);
}

.ai-cta-direction-btn:hover,
.ai-cta-direction-btn:focus-visible {
  background: #e9474b;
  color: var(--ai-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(252, 93, 97, 0.7);
}

.ai-cta-direction-btn:hover img,
.ai-cta-direction-btn:focus-visible img {
  transform: translateX(4px);
}

.ai-cta-direction-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 35px;
}

.ai-cta-direction-feature {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.ai-cta-direction-feature-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 3px;
  border-radius: 43px;
  background: #eff2ff;
  overflow: clip;
  transition: transform 0.3s var(--ai-ease), box-shadow 0.3s var(--ai-ease);
}

.ai-cta-direction-feature-icon img {
  display: block;
  max-width: none;
}

.ai-cta-direction-feature:hover .ai-cta-direction-feature-icon {
  transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(239, 242, 255, 0.15);
}

.ai-cta-direction-feature-text {
  color: var(--ai-white);
  font-size: 14px;
  font-weight: 600;
  line-height: 22.5px;
  white-space: nowrap;
}

/* Doctor photo "image 58" (12183:1191): 481 x 320 at left 732 / top 59.24 (clipped by the card). */
.ai-cta-direction-photo {
  position: absolute;
  top: 59.24px;
  right: 27px;
  z-index: 0;
  width: 481px;
  height: 320px;
  pointer-events: none;
}

.ai-cta-direction-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* ---------- Animation ---------- */
.ai-cta-direction.is-armed:not(.is-in) :is(.ai-cta-direction-card, .ai-cta-direction-head > *, .ai-cta-direction-btn, .ai-cta-direction-feature, .ai-cta-direction-ring, .ai-cta-direction-photo) {
  opacity: 0;
}

.ai-cta-direction.is-in .ai-cta-direction-card {
  animation: ai-cta-direction-zoom 0.8s var(--ai-ease) backwards;
}

@keyframes ai-cta-direction-zoom {
  from { opacity: 0; scale: 0.96; }
  to   { opacity: 1; scale: 1; }
}

.ai-cta-direction.is-in .ai-cta-direction-head > * {
  animation: ai-rise 0.7s var(--ai-ease) 0.2s backwards;
}

.ai-cta-direction.is-in .ai-cta-direction-head > :nth-child(2) { animation-delay: 0.3s; }
.ai-cta-direction.is-in .ai-cta-direction-head > :nth-child(3) { animation-delay: 0.4s; }

.ai-cta-direction.is-in .ai-cta-direction-btn {
  animation: ai-rise 0.7s var(--ai-ease) 0.5s backwards;
}

.ai-cta-direction.is-in .ai-cta-direction-feature {
  animation: ai-rise 0.6s var(--ai-ease) 0.6s backwards;
}

.ai-cta-direction.is-in .ai-cta-direction-feature:nth-child(2) { animation-delay: 0.72s; }
.ai-cta-direction.is-in .ai-cta-direction-feature:nth-child(3) { animation-delay: 0.84s; }

.ai-cta-direction.is-in .ai-cta-direction-feature-icon {
  animation: ai-pop 0.6s var(--ai-ease) 0.7s backwards;
}

.ai-cta-direction.is-in .ai-cta-direction-feature:nth-child(2) .ai-cta-direction-feature-icon { animation-delay: 0.82s; }
.ai-cta-direction.is-in .ai-cta-direction-feature:nth-child(3) .ai-cta-direction-feature-icon { animation-delay: 0.94s; }

/* Circles pop in, then breathe (the loop sits on the inner img so it never fights the entrance). */
.ai-cta-direction.is-in .ai-cta-direction-ring {
  animation: ai-pop 1s var(--ai-ease) 0.3s backwards;
}

.ai-cta-direction.is-in .ai-cta-direction-ring--right { animation-delay: 0.45s; }
.ai-cta-direction.is-in .ai-cta-direction-ring--left { animation-delay: 0.6s; }

.ai-cta-direction.is-in .ai-cta-direction-ring img {
  animation: ai-cta-direction-breathe 5s ease-in-out 1.4s infinite;
}

.ai-cta-direction.is-in .ai-cta-direction-ring--right img { animation-delay: 2.2s; }
.ai-cta-direction.is-in .ai-cta-direction-ring--left img { animation-delay: 3s; }

@keyframes ai-cta-direction-breathe {
  0%, 100% { scale: 1; }
  50%      { scale: 1.07; }
}

/* Photo (with its floating cards) rises in, then floats gently. */
.ai-cta-direction.is-in .ai-cta-direction-photo {
  animation: ai-cta-direction-photo-in 1s var(--ai-ease) 0.35s backwards;
}

.ai-cta-direction.is-in .ai-cta-direction-photo img {
  animation: ai-float 6s ease-in-out 1.5s infinite;
}

@keyframes ai-cta-direction-photo-in {
  from { opacity: 0; translate: 0 60px; scale: 0.96; }
  to   { opacity: 1; translate: 0 0; scale: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .ai-cta-direction-body {
    width: 54%;
  }

  .ai-cta-direction-title {
    font-size: 30px;
    line-height: 40px;
  }

  .ai-cta-direction-btn {
    height: auto;
    min-height: 50px;
    white-space: normal;
    text-align: left;
  }

  .ai-cta-direction-features {
    gap: 14px 24px;
  }

  .ai-cta-direction-photo {
    top: auto;
    bottom: 24px;
    right: 16px;
    width: 40%;
    height: auto;
    aspect-ratio: 481 / 320;
  }

  .ai-cta-direction-art {
    transform: scale(0.82);
    transform-origin: right center;
  }
}

@media (max-width: 991px) {
  .ai-cta-direction-card {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    min-height: 0;
    padding: 40px 32px 0;
    background: linear-gradient(180deg, #05134c 0%, #05134c 45%, rgba(33, 86, 154, 0.9) 100%);
  }

  .ai-cta-direction-body {
    width: 100%;
  }

  .ai-cta-direction-btn {
    white-space: nowrap;
  }

  .ai-cta-direction-photo {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(481px, 100%);
    margin: 0 auto;
  }

  .ai-cta-direction-art {
    top: auto;
    height: 360px;
    transform: none;
  }

  .ai-cta-direction-ring--top   { top: 10px;  right: auto; left: calc(50% - 60px); }
  .ai-cta-direction-ring--right { top: 70px;  right: calc(50% - 250px); }
  .ai-cta-direction-ring--left  { top: 150px; right: auto; left: calc(50% - 260px); }
}

@media (max-width: 767px) {
  .ai-cta-direction-card {
    gap: 24px;
    padding: 20px;
    background: linear-gradient(90deg, #05134c 13.942%, #05134c 34.135%, rgba(33, 86, 154, 0.9) 100%);
  }

  .ai-cta-direction-eyebrow {
    font-size: 10px;
  }

  .ai-cta-direction-title {
    font-size: 24px;
    line-height: 35px;
  }

  .ai-cta-direction-text {
    font-size: 14px;
    line-height: 25.2px;
  }

  /* One line: 14px while it fits, then shrinks just enough. Room for the label = 100vw - 40
     (page gutters) - 40 (card padding) - 40 (button padding) - 30 (gap + arrow) - 4 (safety);
     the label is about 282px wide at 14px. */
  .ai-cta-direction-btn {
    width: 100%;
    height: auto;
    min-height: 50px;
    padding: 8px 20px;
    font-size: min(14px, calc((100vw - 154px) * 14 / 282));
    text-align: center;
    white-space: nowrap;
  }

  .ai-cta-direction-features {
    gap: 26px 35px;
  }

  .ai-cta-direction-photo {
    width: 100%;
    margin: 0;
    aspect-ratio: 388 / 254;
  }

  /* Circles sit in the photo box, behind the photo. */
  .ai-cta-direction-art {
    inset: auto 20px 20px;
    height: auto;
    aspect-ratio: 388 / 254;
    transform: none;
  }

  .ai-cta-direction-ring img {
    width: 100%;
    height: auto;
  }

  .ai-cta-direction-ring--top   { top: 16.12%; right: auto; left: 28.12%; width: 35.42%; }
  .ai-cta-direction-ring--right { top: 28.19%; right: auto; left: 59.52%; width: 32.06%; }
  .ai-cta-direction-ring--left  { top: 50.51%; right: auto; left: 10.68%; width: 27.03%; }
}
