/* 3PWeb Health r13: contrast, compact mobile cards and motion polish. */
#inicio .health-competition h2,
#inicio .health-authority h2,
#inicio .health-simulator h2 {
  color: #fff !important;
  text-shadow: 0 10px 34px rgba(0, 0, 0, .16);
}

#inicio .health-competition h2 > span,
#inicio .health-authority h2 > span,
#inicio .health-simulator h2 > span {
  color: #7eeef4 !important;
}

.stacked-bars > div {
  position: relative;
  min-height: 4.2rem;
  overflow: hidden;
  padding: .62rem .82rem;
  background: #edf5f5 !important;
  color: var(--hm-ink) !important;
  isolation: isolate;
}

.stacked-bars > div::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: .32rem;
  border-radius: 999px;
  background: var(--hm-dark);
  transform: scaleX(calc(var(--size) / 100%));
  transform-origin: left;
  content: "";
}

.stacked-bars > div:nth-child(2)::after { background: #169baa; }
.stacked-bars > div:nth-child(3)::after { background: #7ad5da; }

.stacked-bars b {
  display: grid;
  flex: 0 0 3.15rem;
  min-width: 3.15rem;
  min-height: 3.15rem;
  place-items: center;
  border-radius: 999px;
  background: var(--hm-dark);
  color: #fff;
}

.stacked-bars > div:nth-child(2) b { background: #169baa; }
.stacked-bars > div:nth-child(3) b { background: #7ad5da; color: var(--hm-ink); }
.stacked-bars span { color: var(--hm-ink); line-height: 1.3; }

.health-kpi-grid article,
.health-chart-card,
.health-insight-grid article,
.health-journey-grid li,
.health-specialty-grid a,
.health-tech-grid article {
  position: relative;
  overflow: hidden;
  transition: transform .42s cubic-bezier(.16, 1, .3, 1), box-shadow .42s ease, border-color .3s ease;
}

.health-kpi-grid article::after,
.health-chart-card::after,
.health-insight-grid article::after,
.health-specialty-grid a::after,
.health-tech-grid article::after {
  position: absolute;
  right: -5rem;
  bottom: -6rem;
  width: 12rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 173, 188, .18), transparent 68%);
  opacity: 0;
  transform: scale(.65);
  transition: opacity .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
  content: "";
  pointer-events: none;
}

.health-kpi-grid article:hover,
.health-chart-card:hover,
.health-insight-grid article:hover,
.health-journey-grid li:hover,
.health-specialty-grid a:hover,
.health-tech-grid article:hover {
  transform: translate3d(0, -7px, 0);
  border-color: rgba(8, 173, 188, .42);
  box-shadow: 0 24px 52px rgba(6, 56, 68, .15);
}

.health-kpi-grid article:hover::after,
.health-chart-card:hover::after,
.health-insight-grid article:hover::after,
.health-specialty-grid a:hover::after,
.health-tech-grid article:hover::after {
  opacity: 1;
  transform: scale(1);
}

.hm-motion-ready .health-kpi-grid article,
.hm-motion-ready .health-chart-card,
.hm-motion-ready .health-insight-grid article,
.hm-motion-ready .health-competition-stats p,
.hm-motion-ready .health-journey-grid li,
.hm-motion-ready .health-specialty-grid a,
.hm-motion-ready .health-tech-grid article,
.hm-motion-ready .health-stat-list article {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(.985);
}

.hm-motion-ready .hm-in-view {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  transition: opacity .62s ease var(--hm-delay, 0ms), transform .75s cubic-bezier(.16, 1, .3, 1) var(--hm-delay, 0ms), box-shadow .42s ease, border-color .3s ease;
}

.hm-motion-ready .health-chart-card .chart-line {
  stroke-dasharray: 740;
  stroke-dashoffset: 740;
}

.hm-motion-ready .health-chart-card.hm-in-view .chart-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.25s cubic-bezier(.16, 1, .3, 1) .18s;
}

.hm-motion-ready .health-chart-card .stacked-bars > div::after {
  transform: scaleX(0);
}

.hm-motion-ready .health-chart-card.hm-in-view .stacked-bars > div::after {
  transform: scaleX(calc(var(--size) / 100%));
  transition: transform .95s cubic-bezier(.16, 1, .3, 1) .25s;
}

@media (max-width: 600px) {
  .health-journey-grid,
  .health-specialty-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .health-journey-grid li,
  .health-journey-grid li:last-child,
  .health-specialty-grid a {
    grid-column: auto;
    min-height: 0;
    padding: 1rem 1.05rem;
    gap: .3rem;
  }

  .health-journey-grid li b,
  .health-specialty-grid > a > span {
    display: none;
  }

  .health-specialty-grid a small {
    margin-top: .35rem;
  }

  .stacked-bars > div {
    min-height: 3.75rem;
  }

  #inicio .health-competition h2,
  #inicio .health-authority h2,
  #inicio .health-simulator h2 {
    font-size: clamp(2.2rem, 11.5vw, 3.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-motion-ready .health-kpi-grid article,
  .hm-motion-ready .health-chart-card,
  .hm-motion-ready .health-insight-grid article,
  .hm-motion-ready .health-competition-stats p,
  .hm-motion-ready .health-journey-grid li,
  .hm-motion-ready .health-specialty-grid a,
  .hm-motion-ready .health-tech-grid article,
  .hm-motion-ready .health-stat-list article,
  .health-kpi-grid article,
  .health-chart-card,
  .health-insight-grid article,
  .health-journey-grid li,
  .health-specialty-grid a,
  .health-tech-grid article {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .health-chart-card .chart-line { stroke-dashoffset: 0 !important; }
  .health-chart-card .stacked-bars > div::after { transition: none !important; }
}

/* Ensure the character-level heading animation inherits the dark-section contrast. */
#inicio .health-competition h2 .animated-heading-character,
#inicio .health-authority h2 .animated-heading-character,
#inicio .health-simulator h2 .animated-heading-character {
  color: #ffffff !important;
}

#inicio .health-competition h2 .animated-heading-word.is-accent .animated-heading-character,
#inicio .health-authority h2 .animated-heading-word.is-accent .animated-heading-character,
#inicio .health-simulator h2 .animated-heading-word.is-accent .animated-heading-character {
  color: #7eeef4 !important;
}
