/* ============================================
   STATS SECTION STYLES
   ============================================ */

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #4299e1 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.03)"/></svg>');
  background-size: cover;
  pointer-events: none;
}

/* Container */
.stats-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Section Header */
.stats-section .section-header {
  margin-bottom: 60px;
}

.stats-section .section-title {
  color: #ffffff;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
  background: linear-gradient(45deg, #ffffff, #dbeafe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-section .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.25rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Grid Layout */
.stats-section .grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

/* Stat Card */
.stat-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #4299e1, #2c5282);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

/* Stat Icon */
.stat-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, #4299e1, #2c5282);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 8px 20px rgba(66, 153, 225, 0.3);
  transition: all 0.4s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(360deg);
  background: linear-gradient(135deg, #2c5282, #1a365d);
}

/* Stat Number */
.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: #1a365d;
  margin-bottom: 10px;
  line-height: 1;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(45deg, #2c5282, #4299e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stat Label */
.stat-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat Description */
.stat-description {
  font-size: 0.95rem;
  color: #718096;
  line-height: 1.5;
  max-width: 200px;
  margin: 0 auto;
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.plus-sign {
  opacity: 1;
  margin-left: 2px;
}

.animate-on-scroll.animate-fade-in-up {
  opacity: 1;
  transform: translateY(0);
}

.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets (1024px and below) */
@media (max-width: 1024px) {
  .stats-section .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .stats-section .section-title {
    font-size: 2.5rem;
  }

  .stat-card {
    padding: 35px 25px;
  }

  .stat-number {
    font-size: 3rem;
  }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
  .stats-section {
    padding: 60px 0;
  }

  .stats-section .section-header {
    margin-bottom: 50px;
  }

  .stats-section .section-title {
    font-size: 2.25rem;
  }

  .stats-section .section-subtitle {
    font-size: 1.1rem;
    padding: 0 15px;
  }

  .stat-card {
    padding: 30px 20px;
  }

  .stat-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
    margin-bottom: 20px;
  }

  .stat-number {
    font-size: 2.75rem;
  }

  .stat-label {
    font-size: 1.1rem;
  }

  .stat-description {
    font-size: 0.9rem;
  }
}

/* Mobile Devices (600px and below) */
@media (max-width: 600px) {
  .stats-section .grid-4 {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 40px auto 0;
    gap: 20px;
  }

  .stats-section .container {
    padding: 0 15px;
  }

  .stats-section .section-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  .stats-section .section-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  .stat-card {
    padding: 25px 20px;
  }

  .stat-card:hover {
    transform: translateY(-5px);
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 1rem;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  .stats-section {
    padding: 50px 0;
  }

  .stats-section .section-header {
    margin-bottom: 40px;
  }

  .stats-section .section-title {
    font-size: 1.75rem;
  }

  .stats-section .section-subtitle {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .stat-card {
    padding: 20px 15px;
  }

  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.95rem;
  }

  .stat-description {
    font-size: 0.85rem;
    max-width: 180px;
  }

  .stats-section .grid-4 {
    gap: 15px;
  }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
  .stats-section {
    padding: 40px 0;
  }

  .stats-section .section-title {
    font-size: 1.5rem;
  }

  .stats-section .section-subtitle {
    font-size: 0.9rem;
  }

  .stat-card {
    padding: 18px 12px;
  }

  .stat-icon {
    width: 55px;
    height: 55px;
    font-size: 1.25rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .stat-description {
    font-size: 0.8rem;
    max-width: 160px;
  }
}

/* Landscape Mode for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .stats-section {
    padding: 40px 0;
  }

  .stats-section .section-header {
    margin-bottom: 30px;
  }

  .stats-section .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-card {
    padding: 20px 15px;
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 10px;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* High-Density Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .stat-card {
    backdrop-filter: blur(20px);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .stat-icon,
  .stat-number,
  .animate-on-scroll,
  .animate-bounce,
  .animate-fade-in-up {
    transition: none !important;
    animation: none !important;
  }

  .stat-card:hover {
    transform: none;
  }

  .stat-icon {
    transform: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .stat-card {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .stat-card:hover {
    background: rgba(45, 55, 72, 1);
  }

  .stat-label {
    color: #e2e8f0;
  }

  .stat-description {
    color: #a0aec0;
  }
}

/* Print Styles */
@media print {
  .stats-section {
    background: white !important;
    color: black !important;
    padding: 40px 0 !important;
  }

  .stats-section::before {
    display: none;
  }

  .stat-card {
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .stat-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .stat-icon {
    background: #e2e8f0 !important;
    color: #2d3748 !important;
    box-shadow: none !important;
  }

  .stat-number {
    color: #2d3748 !important;
    -webkit-text-fill-color: #2d3748 !important;
    background: none !important;
  }

  .animate-on-scroll,
  .animate-bounce,
  .animate-fade-in-up {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .stats-section .grid-4 {
    display: block;
    column-count: 2;
    column-gap: 20px;
  }

  .stat-card {
    margin-bottom: 20px;
  }
}
