/* ============================================================
   ASHOK HOME HEALTHCARE SERVICES — ACHIEVEMENTS & STATS COUNTER
   Component: Statistics / Counter Section (Achievements Section)
   Design: Compact Full-width Healthcare Blue Gradient Strip
   ============================================================ */

.achievements-stats-section {
  position: relative;
  background: linear-gradient(135deg, #061833 0%, #0a254c 28%, #073d70 65%, #0858a4 100%);
  color: #ffffff;
  padding: 2.25rem 0 2.25rem;
  overflow: hidden;
  border-top: 1px solid rgba(56, 189, 248, 0.25);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px -10px rgba(6, 24, 51, 0.45);
  isolation: isolate;
}

/* Ambient Radial Lighting Effects */
.stats-ambient-glow-1 {
  position: absolute;
  top: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(9, 144, 225, 0.06) 45%, transparent 70%);
  pointer-events: none;
  filter: blur(35px);
  z-index: 1;
}

.stats-ambient-glow-2 {
  position: absolute;
  bottom: -35%;
  right: -5%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(10, 110, 189, 0.08) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  z-index: 1;
}

/* Decorative Medical Grid Pattern (Subtle & Clean) */
.stats-medical-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px),
    radial-gradient(rgba(56, 189, 248, 0.12) 1.5px, transparent 1.5px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* Subtle ECG Heartbeat Pulse Line Overlay */
.stats-ecg-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2%;
  height: 55px;
  width: 100%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
}

.stats-ecg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Compact Header Area */
.stats-header-area {
  max-width: 680px;
  margin: 0 auto 1.35rem auto;
  position: relative;
  z-index: 2;
}

.stats-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  box-shadow: 0 2px 8px rgba(6, 24, 51, 0.25);
}

.stats-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #38bdf8;
  display: inline-block;
  box-shadow: 0 0 8px #38bdf8;
  animation: statsPulseGlow 2s infinite ease-in-out;
}

@keyframes statsPulseGlow {
  0%, 100% {
    transform: scale(0.95);
    box-shadow: 0 0 4px #38bdf8;
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 10px #38bdf8, 0 0 16px rgba(56, 189, 248, 0.6);
    opacity: 1;
  }
}

.stats-main-title {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0;
  text-shadow: 0 2px 8px rgba(2, 6, 23, 0.3);
}

/* Statistics Grid & Sleek Compact Glass Cards */
.stats-grid-row {
  position: relative;
  z-index: 2;
}

.stat-counter-card {
  position: relative;
  height: 100%;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 2px solid rgba(56, 189, 248, 0.45);
  border-radius: 1.15rem;
  padding: 1.25rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 24px -4px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  cursor: default;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
  will-change: transform, box-shadow;
}

/* Individual card hover glow overlay (does not affect sibling cards) */
.stat-card-glow-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.22) 0%, transparent 72%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* Hover: ONLY hovered card is elevated with subtle lift, soft glow & icon transition */
.stat-counter-card:hover {
  transform: translateY(-6px);
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(56, 189, 248, 0.55);
  border-top-color: #38bdf8;
  box-shadow: 0 16px 36px -8px rgba(2, 6, 23, 0.5),
              0 0 25px rgba(56, 189, 248, 0.22),
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.stat-counter-card:hover .stat-card-glow-bg {
  opacity: 1;
}

/* Compact Medical Icon Container */
.stat-card-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(10, 110, 189, 0.28) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.55rem;
  box-shadow: 0 4px 12px -2px rgba(56, 189, 248, 0.2);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.35s ease,
              color 0.35s ease,
              box-shadow 0.35s ease;
  flex-shrink: 0;
}

.stat-card-icon-wrap svg {
  width: 22px;
  height: 22px;
  transition: transform 0.35s ease;
}

.stat-counter-card:hover .stat-card-icon-wrap {
  transform: scale(1.1) translateY(-1px);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32) 0%, rgba(10, 110, 189, 0.48) 100%);
  border-color: rgba(56, 189, 248, 0.65);
  color: #ffffff;
  box-shadow: 0 8px 18px -2px rgba(56, 189, 248, 0.4);
}

.stat-counter-card:hover .stat-card-icon-wrap svg {
  transform: scale(1.06);
}

/* Number & Value Formatting */
.stat-counter-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 0.2rem;
  line-height: 1;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.stat-counter-number {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.75rem, 2.25vw, 2.3rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-counter-suffix {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.5rem, 1.9vw, 1.95rem);
  font-weight: 800;
  color: #38bdf8;
  margin-left: 2px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  white-space: nowrap;
}

/* Static 24/7 formatting */
.stat-counter-static {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.95rem, 2.5vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: baseline;
}

.stat-counter-static span.text-accent-slash {
  color: #38bdf8;
  margin: 0 1px;
}

/* Compact Label & Micro-description */
.stat-card-title {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.stat-card-desc {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.775rem;
  color: #a5c5ee;
  line-height: 1.4;
  margin-bottom: 0;
  max-width: 220px;
}

/* ============================================================
   VIEWPORT SCROLL ANIMATIONS (Intersection Observer)
   ============================================================ */

/* Initial state before section enters viewport */
.achievements-stats-section .stat-counter-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
}

/* Fade in header area */
.achievements-stats-section .stats-header-area {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered entrance when .stats-visible class is applied */
.achievements-stats-section.stats-visible .stats-header-area {
  opacity: 1;
  transform: translateY(0);
}

.achievements-stats-section.stats-visible .stat-counter-card {
  opacity: 1;
  transform: translateY(0);
}

.achievements-stats-section.stats-visible .stat-col:nth-child(1) .stat-counter-card {
  transition-delay: 0.05s;
}

.achievements-stats-section.stats-visible .stat-col:nth-child(2) .stat-counter-card {
  transition-delay: 0.16s;
}

.achievements-stats-section.stats-visible .stat-col:nth-child(3) .stat-counter-card {
  transition-delay: 0.27s;
}

.achievements-stats-section.stats-visible .stat-col:nth-child(4) .stat-counter-card {
  transition-delay: 0.38s;
}

/* When hover occurs, cancel entrance delay so hover responds immediately */
.achievements-stats-section.stats-visible .stat-counter-card:hover {
  transition-delay: 0s !important;
}

/* ============================================================
   RESPONSIVE DESIGN (Desktop 4-col, Tablet 2x2, Mobile 1-col)
   ============================================================ */

/* Tablet & Intermediate Screens (576px - 991.98px) */
@media (max-width: 991.98px) {
  .achievements-stats-section {
    padding: 2rem 0 2rem;
  }

  .stats-header-area {
    margin-bottom: 1.25rem;
  }

  .stat-counter-card {
    padding: 1.15rem 1rem 1.05rem;
  }

  .stat-card-desc {
    max-width: 100%;
  }
}

/* Mobile Screens (max-width: 575.98px) */
@media (max-width: 575.98px) {
  .achievements-stats-section {
    padding: 1.75rem 0 1.75rem;
  }

  .stats-header-area {
    margin-bottom: 1rem;
  }

  .stats-eyebrow-pill {
    font-size: 0.68rem;
    padding: 0.24rem 0.75rem;
  }

  .stat-counter-card {
    padding: 1.1rem 0.9rem 1rem;
    border-radius: 1rem;
  }

  .stat-card-icon-wrap {
    width: 40px;
    height: 40px;
    margin-bottom: 0.45rem;
    border-radius: 0.75rem;
  }

  .stat-card-icon-wrap svg {
    width: 20px;
    height: 20px;
  }

  .stat-counter-number,
  .stat-counter-static {
    font-size: 1.85rem;
  }

  .stat-counter-suffix {
    font-size: 1.55rem;
  }

  .stat-card-title {
    font-size: 0.92rem;
  }

  .stat-card-desc {
    font-size: 0.74rem;
  }
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .achievements-stats-section,
  .achievements-stats-section .stat-counter-card,
  .achievements-stats-section .stats-header-area,
  .stat-card-glow-bg,
  .stat-card-icon-wrap,
  .stats-pulse-dot {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
