/* Continuous upward loop for the three small hero care cards. */
.hero-care-visual {
  overflow: hidden;
}

.care-float-card {
  top: auto !important;
  bottom: -88px !important;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: careCardRiseLoop !important;
  animation-duration: 10.5s !important;
  animation-timing-function: linear !important;
  animation-iteration-count: infinite !important;
}

.care-float-one {
  left: 4% !important;
  right: auto !important;
  animation-delay: 0s !important;
}

.care-float-two {
  left: auto !important;
  right: 2% !important;
  animation-delay: -3.5s !important;
}

.care-float-three {
  left: 18% !important;
  right: auto !important;
  animation-delay: -7s !important;
  min-width: 0;
}

/* Reuse the existing third card as the physician-led message. */
.care-float-three > span,
.care-float-three > strong {
  display: none !important;
}

.care-float-three::before {
  content: 'Physician-led';
  display: block;
  margin-bottom: 3px;
  color: #e05c3a;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.care-float-three::after {
  content: 'Interpretation & follow-up';
  display: block;
  color: #17324d;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

/* Rios Healthcare care promise inside the main hero card. */
.care-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: start;
  font-size: 0 !important;
}

.care-note .care-heart {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin-top: 1px;
  font-size: 1rem !important;
  line-height: 1.2;
}

.care-note::before {
  content: 'Built by people who actually practice medicine—and care what happens next.';
  grid-column: 2;
  grid-row: 1;
  color: #365a72;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}

.care-note::after {
  content: 'Put your health in the hands of people who care.';
  grid-column: 2;
  grid-row: 2;
  color: #4a7fa5;
  font-family: 'DM Serif Display', serif;
  font-size: .76rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
}

/* Branded closing thought in the About section. */
.about-text::after {
  content: 'Put your health in the hands of people who care.';
  display: block;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(74,127,165,.22);
  color: #2c5f82;
  font-family: 'DM Serif Display', serif;
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.45;
}

@keyframes careCardRiseLoop {
  0% {
    transform: translate3d(0, 0, 0) scale(.96);
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  78% {
    opacity: 1;
  }

  92%,
  100% {
    transform: translate3d(0, -590px, 0) scale(1.02);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .care-float-one {
    left: 2% !important;
  }

  .care-float-two {
    right: 2% !important;
  }

  .care-float-three {
    left: 18% !important;
  }
}

@media (max-width: 600px) {
  .care-float-card {
    animation-duration: 10.5s !important;
  }

  .care-float-one {
    left: 0 !important;
  }

  .care-float-two {
    right: 0 !important;
  }

  .care-float-three {
    display: block !important;
    left: 8% !important;
    right: auto !important;
    min-width: 0;
  }

  .care-float-three::before {
    font-size: .67rem;
  }

  .care-float-three::after {
    font-size: .82rem;
  }

  .care-note {
    grid-template-columns: 17px minmax(0, 1fr);
    column-gap: 7px;
  }

  .care-note::before {
    font-size: .72rem;
  }

  .care-note::after {
    font-size: .7rem;
  }

  @keyframes careCardRiseLoop {
    0% {
      transform: translate3d(0, 0, 0) scale(.95);
      opacity: 0;
    }

    8% {
      opacity: 1;
    }

    76% {
      opacity: 1;
    }

    92%,
    100% {
      transform: translate3d(0, -455px, 0) scale(1);
      opacity: 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .care-float-card {
    animation: none !important;
    opacity: 1;
    bottom: auto !important;
  }

  .care-float-one {
    top: 10% !important;
  }

  .care-float-two {
    top: 62% !important;
  }

  .care-float-three {
    top: 80% !important;
  }
}
