/* ========================================
   CIRCULAR PROGRESS STATISTICS
   Animated Ring Progress Indicators
   ======================================== */

.circular-stats-section {
    padding: 6rem 0;
    background: linear-gradient(
        135deg,
        rgba(0, 107, 125, 0.05),
        rgba(91, 44, 111, 0.05)
    );
    position: relative;
    overflow: hidden;
}

/* Section Header Enhancements */
.circular-stats-section .section-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #006b7d 0%, #5b2c6f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.circular-stats-section .section-subtitle {
    color: #daa520; /* GoldenRod */
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.circular-stats-section .section-description {
    color: #555;
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.circular-stats-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(0, 107, 125, 0.02) 35px,
        rgba(0, 107, 125, 0.02) 70px
    );
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Circular Progress Card */
.circular-stat-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Enhanced shadow */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.circular-stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 107, 125, 0.1);
}

/* SVG Circle Progress */
.progress-ring-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem; /* Increased margin */
}

.progress-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-ring-circle {
    fill: none;
    stroke-width: 12;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.progress-ring-bg {
    stroke: rgba(0, 0, 0, 0.08); /* Darker track for better contrast */
}

.progress-ring-value {
    stroke-linecap: round;
}

/* Different colors for each stat */
.progress-ring-value.teal {
    stroke: url(#gradientTeal);
}

.progress-ring-value.purple {
    stroke: url(#gradientPurple);
}

.progress-ring-value.gold {
    stroke: url(#gradientGold);
}

.progress-ring-value.success {
    stroke: url(#gradientSuccess);
}

/* Center Content */
.progress-ring-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.progress-ring-number {
    font-size: 3rem; /* Larger number */
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0px;
    letter-spacing: -1px;
}

.progress-ring-suffix {
    font-size: 1.75rem; /* Larger suffix */
    font-weight: 700;
    color: var(--primary-color);
    vertical-align: super;
    margin-left: 2px;
}

/* Stat Info */
.stat-title {
    font-size: 1.25rem; /* Larger title */
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.stat-description {
    font-size: 1rem; /* Larger description */
    color: #555; /* Higher contrast text */
    line-height: 1.6;
    max-width: 250px;
    margin: 0 auto;
}

/* Animation Classes */
.progress-ring-circle.animated {
    animation: progressAnimation 1.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes progressAnimation {
    from {
        stroke-dashoffset: 565;
    }
}

/* Staggered Animation Delays */
.circular-stat-card:nth-child(1) .progress-ring-circle {
    animation-delay: 0.2s;
}
.circular-stat-card:nth-child(2) .progress-ring-circle {
    animation-delay: 0.4s;
}
.circular-stat-card:nth-child(3) .progress-ring-circle {
    animation-delay: 0.6s;
}
.circular-stat-card:nth-child(4) .progress-ring-circle {
    animation-delay: 0.8s;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .progress-ring-container {
        width: 160px;
        height: 160px;
    }

    .progress-ring-number {
        font-size: 2.5rem;
    }

    .circular-stat-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .circular-stats-section {
        padding: 4rem 0;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        max-width: 600px; /* Constrain width for centered stack */
    }

    .stat-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .circular-stat-card {
        flex-direction: row;
        text-align: left;
        align-items: center;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .progress-ring-container {
        width: 100px;
        height: 100px;
        margin: 0;
        flex-shrink: 0;
    }

    .progress-ring-number {
        font-size: 1.75rem;
    }

    .progress-ring-suffix {
        font-size: 1rem;
    }

    .stat-content-wrapper {
        flex: 1;
    }

    .stat-title {
        margin-bottom: 0.25rem;
    }

    .stat-description {
        font-size: 0.9rem;
        margin: 0;
        text-align: left;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .progress-ring-circle {
        transition: none;
        animation: none;
    }

    .circular-stat-card:hover {
        transform: none;
    }
}
