.percentage-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #6b46c1 0%, #9333ea 50%, #c084fc 100%);
}

.percentage-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.percentage-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.percentage-title {
  font-size: var(--fs-h1);
  font-weight: 500;
  color: #FFFFFA;
  margin-bottom: 5rem;
}

/* Unified stats container that adapts based on number of items */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  justify-items: center;
}

/* Single stat layout - center vertically */
.single-stat .stats-grid {
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Multiple stats layout - horizontal on desktop, vertical on mobile */
.multiple-stats .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 280px;
  width: 100%;
  max-width: 300px;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-card:nth-child(1) {
  animation: fadeInUp 0.6s ease forwards;
}

.stat-card:nth-child(2) {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

.stat-circle {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Added SVG progress ring styles for circular progress indicator */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
  width: 120px;
  height: 120px;
}

.progress-ring-background {
  fill: none;
  stroke: rgba(104, 0, 255, 0.1);
  stroke-width: 20;
}

.progress-ring-progress {
  fill: none;
  stroke: rgba(104, 0, 255, 1);
  stroke-width: 20;
  stroke-linecap: inherit;
  stroke-dasharray: 314.16; /* 2 * π * 50 */
  stroke-dashoffset: calc(314.16 - (314.16 * var(--percentage)) / 100);
  transition: stroke-dashoffset 2s ease-in-out;
}

.stat-number {
  font-size: var(--fs-h3);
  font-weight: 500;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.stat-description {
  color: #FFFFFF;
  font-size: var(--fs-h5);
  line-height: 1.4;
  text-align: center;
  max-width: 250px;
}

@media screen and (max-width: 1580px) {
  .percentage-title {
    font-size: var(--fs-h3);
  }
}

/* Mobile responsive - stack all cards vertically */
@media (max-width: 960px) {
  .percentage-section {
    min-height: 100vh;
    padding: 1rem;
  }

  .percentage-title {
    font-size: var(--fs-h4);
    margin-bottom: 3rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 350px;
  }

  .stat-card {
    padding: 1.5rem 1rem;
    min-height: 240px;
  }

  .stat-circle {
    width: 100px;
    height: 100px;
  }

  .progress-ring {
    width: 100px;
    height: 100px;
  }

  .progress-ring-background,
  .progress-ring-progress {
    cx: 50;
    cy: 50;
    r: 42;
  }

  .progress-ring-progress {
    stroke-dasharray: 263.89; /* 2 * π * 42 */
    stroke-dashoffset: calc(263.89 - (263.89 * var(--percentage)) / 100);
  }

  .stat-number {
    font-size: var(--fs-h4);
  }

  .stat-description {
    font-size: var(--fs-h6);
  }
}

@media (max-width: 669px) {
  .percentage-content {
    padding: 1rem;
  }

  .percentage-title {
    font-size: var(--fs-h5);
  }

  .stat-card {
    padding: 1rem;
    min-height: 200px;
  }

  .stat-circle {
    width: 80px;
    height: 80px;
  }

  .progress-ring {
    width: 80px;
    height: 80px;
  }

  .progress-ring-background,
  .progress-ring-progress {
    cx: 40;
    cy: 40;
    r: 34;
  }

  .progress-ring-progress {
    stroke-dasharray: 213.63; /* 2 * π * 34 */
    stroke-dashoffset: calc(213.63 - (213.63 * var(--percentage)) / 100);
  }

  .stat-number {
    font-size: var(--fs-h5);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
