.counter-section {
    width: 100%;
    padding: 90px 20px;
    background: linear-gradient(185deg, #ffffff, #302b2b);
    display: flex;
    justify-content: center;
}

.counter-wrapper {
    display: flex;
    width: 90%;
    justify-content: space-between; /* even distribution */
    align-items: flex-start;
    flex-wrap: wrap; /* allow wrapping on smaller screens */
    gap: 20px; /* spacing between circles on wrap */
}

/* Container for title + circle */
.counter-box {
    flex: 1 1 150px; /* grow/shrink, min 150px */
    display: flex;
    justify-content: center;
    margin-bottom: 20px; /* space between rows on mobile */
}

/* Title above circle */
.counter-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 14px;
    color: #000000;
    letter-spacing: 0.5px;
}

/* Circle base */
.counter-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 18px 30px rgba(0,0,0,0.25),
        inset 0 4px 6px rgba(255,255,255,0.25),
        inset 0 -6px 10px rgba(0,0,0,0.25);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Hover lift */
.counter-circle:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 28px 45px rgba(0,0,0,0.35),
        inset 0 6px 8px rgba(255,255,255,0.35),
        inset 0 -8px 12px rgba(0,0,0,0.35);
}

.counter-title-inside {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    text-align: center;
}

/* خط صغير تحت العنوان */
.counter-title-inside::after {
    content: "";
    display: block;
    width: 30px;
    height: 2px;
    background: rgba(255,255,255,0.6);
    margin: 4px auto 0;
    border-radius: 2px;
}

.counter-number {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.4),
        0 0 12px rgba(255,255,255,0.25);
}

/* 🎯 Individual colors */
.counter-box:nth-child(1) .counter-circle {
    background: linear-gradient(145deg, #e53935, #b71c1c);
}

.counter-box:nth-child(2) .counter-circle {
    background: linear-gradient(145deg, #43a047, #1b5e20);
}

.counter-box:nth-child(3) .counter-circle {
    background: linear-gradient(145deg, #1e88e5, #0d47a1);
}

.counter-box:nth-child(4) .counter-circle {
    background: linear-gradient(145deg, #fb8c00, #e65100);
}

.counter-box:nth-child(5) .counter-circle {
    background: linear-gradient(145deg, #8e24aa, #4a148c);
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .counter-wrapper {
        justify-content: center; /* center circles on tablets */
    }
    .counter-box {
        flex: 1 1 120px; /* shrink circles on smaller screens */
        margin-bottom: 20px;
    }
    .counter-circle {
        width: 140px;
        height: 140px;
    }
    .counter-title-inside {
        font-size: 12px;
    }
    .counter-number {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .counter-wrapper {
        justify-content: center;
    }
    .counter-box {
        flex: 1 1 100%; /* stack vertically on phones */
    }
    .counter-circle {
        width: 120px;
        height: 120px;
    }
    .counter-title-inside {
        font-size: 11px;
    }
    .counter-number {
        font-size: 28px;
    }
}
