/* ==========================================================================
 |    PARTNER - COMMUNITY IMPACT SECTION
 |    ========================================================================== */

/* Community Impact Section */
.community-impact {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.community-impact::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 83, 154, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: impact-float 10s ease-in-out infinite;
}

.community-impact::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 58, 107, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: impact-float 12s ease-in-out infinite reverse;
}

/* Impact Stats Grid */
.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Stat Cards */
.stat-card {
    background: white;
    padding: 50px 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 60px rgba(20, 83, 154, 0.08);
    border: 2px solid transparent;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: stat-fade-in 0.8s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.5s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.7s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 83, 154, 0.08), transparent);
    transition: left 0.8s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-12px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 25px 80px rgba(20, 83, 154, 0.15);
    border-color: rgba(20, 83, 154, 0.2);
}

/* Stat Icon */
.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #14539a, #0d3a6b);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(20, 83, 154, 0.3);
    position: relative;
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #14539a, #0d3a6b, #14539a);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(20, 83, 154, 0.4);
}

.stat-card:hover .stat-icon::before {
    opacity: 1;
    animation: icon-glow 2s ease-in-out infinite alternate;
}

/* Stat Number */
.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #14539a;
    line-height: 1;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

.stat-number::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #14539a, #0d3a6b);
    border-radius: 2px;
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number::after {
    transform: translateX(-50%) scaleX(1);
}

/* Stat Label */
.stat-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1e293b 0%, #14539a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stat Description */
.stat-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Community Message */
.community-message {
    background: white;
    padding: 60px 50px;
    border-radius: 24px;
    text-align: center;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 60px rgba(20, 83, 154, 0.1);
    border: 2px solid rgba(20, 83, 154, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: message-fade-in 0.8s ease 1s forwards;
}

.community-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 83, 154, 0.06), transparent);
    transition: left 0.8s ease;
}

.community-message:hover::before {
    left: 100%;
}

.community-message:hover {
    transform: translateY(-8px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 25px 80px rgba(20, 83, 154, 0.15);
    border-color: rgba(20, 83, 154, 0.2);
}

.message-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b 0%, #14539a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.message-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #475569;
    margin: 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced Stats with Counter Animation */
.stat-card[data-counter] .stat-number {
    opacity: 0;
    animation: counter-appear 0.6s ease 0.8s forwards;
}

/* Animations */
@keyframes stat-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes message-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes counter-appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes icon-glow {
    from {
        box-shadow: 0 10px 30px rgba(20, 83, 154, 0.3);
    }
    to {
        box-shadow: 0 15px 40px rgba(20, 83, 154, 0.5);
    }
}

@keyframes impact-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .community-impact {
        padding: 80px 0;
    }

    .impact-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-bottom: 60px;
    }

    .stat-card {
        padding: 32px 24px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1.1rem;
    }

    .stat-description {
        font-size: 0.9rem;
    }

    .community-message {
        padding: 40px 32px;
    }

    .message-content h3 {
        font-size: 1.75rem;
    }

    .message-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .community-impact {
        padding: 60px 0;
    }

    .impact-stats {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .stat-card {
        padding: 24px 20px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    .community-message {
        padding: 32px 24px;
    }

    .message-content h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .message-content p {
        font-size: 1rem;
        line-height: 1.7;
    }
}