/**
 * About Page - Statistics Section
 * Pixel-perfect implementation of Figma design
 *
 * @package Sanjeevani
 */

.about-stats {
    position: relative;
    max-width: 1280px;
    border-radius: 24px;
    padding: 20px 0;
    margin: 0 auto;
    margin-top: 20px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #00B894 0%, #0FD2AB 70%);
    overflow: visible;
}

/* Background SVG dots (provided asset) */
.about-stats::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../../images/about/Group-dots.svg');
    background-repeat: no-repeat;
    background-position: right 180px top 0px;
    background-size: auto 260px; /* increased size for visibility */
    opacity: 0.9; /* increase visibility over gradient */
    pointer-events: none;
    z-index: 0; /* sit beneath content but above gradient */
}

.about-stats__container {
    max-width: 1166px;
    margin: 0 auto;
    padding: 50px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* Bottom-centered arrow */
.about-stats__arrow {
    position: absolute;
    left: 50%;
    bottom: -100px;
    transform: translateX(-50%);
    width: 63px;  /* matches intrinsic SVG width */
    height: 76px; /* matches intrinsic SVG height */
    z-index: 2;   /* above gradient and dot background */
    pointer-events: none;
}

.about-stats__arrow img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Individual metric styling */
.about-stats__metric {
    text-align: center;
    color: #020817;
}

.about-stats__value {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 70px;
    line-height: 60px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #020817 0%, #01B995 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.about-stats__label {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 28px;
    color: #020817;
    white-space: nowrap;
}

/* Separator lines */
.about-stats__separator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 119px;
    width: 1px;
}

.about-stats__separator img {
    height: 100%;
    width: auto;
    opacity: 0.3;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {

    .about-stats{
        padding-top: 0px;
        padding-bottom: 0px;

    }

    .about-stats__container {
        max-width: 100%;
        padding: 40px 20px;
    }
    
    .about-stats__value {
        font-size: 60px;
        line-height: 50px;
        margin-bottom: 16px;
    }
    
    .about-stats__label {
        font-size: 18px;
        line-height: 24px;
    }
    
    .about-stats__separator {
        height: 100px;
    }
}

@media screen and (max-width: 768px) {
    .about-stats__container {
        flex-wrap: wrap;
        gap: 40px;
        padding: 40px 20px;
    }
    /* Soften background dots behind content on small screens */
    .about-stats::after {
        opacity: 0.35;
        background-position: right 60px top 0px;
        background-size: auto 200px;
    }
    .about-stats__arrow {
        width: 42px;
        height: 50px;
        bottom: 8px;
    }
    
    .about-stats__metric {
        flex: 1;
        min-width: calc(50% - 20px);
    }
    
    .about-stats__separator {
        display: none;
    }
    
    .about-stats__value {
        font-size: 50px;
        line-height: 45px;
    }
    
    .about-stats__label {
        font-size: 16px;
        line-height: 22px;
        white-space: normal;
    }
}

@media screen and (max-width: 480px) {
    .about-stats__container {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }
    /* Hide decorative arrow and dots on very small screens to avoid overlap */
    .about-stats__arrow,
    .about-stats::after {
        display: none !important;
        content: none !important;
    }
    .about-stats__arrow {
        width: 36px;
        height: 44px;
        bottom: 6px;
    }
    
    .about-stats__metric {
        width: 100%;
        min-width: auto;
    }
    
    .about-stats__value {
        font-size: 48px;
        line-height: 42px;
        margin-bottom: 12px;
    }
    
    .about-stats__label {
        font-size: 16px;
        line-height: 22px;
    }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .about-stats::before {
        background-size: 10px 10px;
    }
}

/* Animation for values when section comes into view */
.about-stats__value {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.about-stats__metric:nth-child(1) .about-stats__value { animation-delay: 0.1s; }
.about-stats__metric:nth-child(3) .about-stats__value { animation-delay: 0.2s; }
.about-stats__metric:nth-child(5) .about-stats__value { animation-delay: 0.3s; }
.about-stats__metric:nth-child(7) .about-stats__value { animation-delay: 0.4s; }

.about-stats__label {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.about-stats__metric:nth-child(1) .about-stats__label { animation-delay: 0.3s; }
.about-stats__metric:nth-child(3) .about-stats__label { animation-delay: 0.4s; }
.about-stats__metric:nth-child(5) .about-stats__label { animation-delay: 0.5s; }
.about-stats__metric:nth-child(7) .about-stats__label { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .about-stats__value,
    .about-stats__label {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Focus states for accessibility */
.about-stats__metric:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: 8px;
}