#counter_area .counter_container::before{
    background: transparent;
}

#counter_area {
    padding: 100px 0;
    background: linear-gradient(135deg, #C8141F, #008B45);
    position: relative;
    overflow: hidden;
}

#counter_area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    animation: floatBackground 30s infinite linear;
    will-change: transform;
}

@keyframes floatBackground {
    0% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    25% { 
        transform: translate(-25px, -25px) rotate(90deg); 
    }
    50% { 
        transform: translate(-50px, -50px) rotate(180deg); 
    }
    75% { 
        transform: translate(-25px, -25px) rotate(270deg); 
    }
    100% { 
        transform: translate(0, 0) rotate(360deg); 
    }
}

/* Alternative smoother animation - uncomment if you prefer this one */
/*
@keyframes floatBackground {
    0% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    100% { 
        transform: translate(-100px, -100px) rotate(360deg); 
    }
}
*/

.modern-counter-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

.modern-counter-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 1);
}

.counter_icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C8141F, #008B45);
    border-radius: 50%;
    padding: 15px;
}

.icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.5s ease;
    z-index: 2;
    position: relative;
}

.modern-counter-card:hover .icon-img {
    transform: scale(1.1);
}

.counter_content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #C8141F;
    margin: 0 0 15px 0;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.counter-line {
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #C8141F, #008B45);
    margin: 0 auto 20px;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.modern-counter-card:hover .counter-line {
    width: 60px;
}

.counter-text {
    font-size: 1.1rem;
    color: #555;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Staggered animation for cards */
.modern-counter-card {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.modern-counter-card:nth-child(1) { animation-delay: 0.1s; }
.modern-counter-card:nth-child(2) { animation-delay: 0.2s; }
.modern-counter-card:nth-child(3) { animation-delay: 0.3s; }
.modern-counter-card:nth-child(4) { animation-delay: 0.4s; }

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

/* Ensure 4 cards in a row on large screens */
@media (min-width: 1200px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #counter_area {
        padding: 60px 0;
    }

    .modern-counter-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .counter_content h2 {
        font-size: 2.2rem;
    }

    .counter_icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .icon-img {
        width: 35px;
        height: 35px;
    }

    .counter-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .modern-counter-card {
        padding: 25px 15px;
    }

    .counter_content h2 {
        font-size: 2rem;
    }

    .counter-text {
        font-size: 0.9rem;
    }

    .counter_icon {
        width: 60px;
        height: 60px;
        padding: 12px;
    }

    .icon-img {
        width: 30px;
        height: 30px;
    }
}