/* =========================================================
   SCHOLARIUS HOMEPAGE STATISTICS CARDS
   Responsive Flexbox layout for desktop, tablet and mobile
   ========================================================= */

/* Desktop: four cards per row when sufficient width is available */
.container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

/* Common card styling */
.service-box {
    height: 300px;
    width: 300px;
    flex: 1 1 calc(25% - 15px);
    min-width: 0;
    max-width: 300px;

    background-color: #FFFFFF;
    border-radius: 12px;
    border: 3px solid #EDEDED;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    padding: 10px;
    box-sizing: border-box;
}

/* Icon styling: fixed 100 x 100px */
.container .service-box img {
    width: 100px !important;
    height: 100px !important;
    max-width: 100%;
    object-fit: contain;
    display: block;
    flex: 0 0 100px;
    margin: 0 0 8px;
}

/* Paragraph styling: independent of the website BODY font size */
.container .service-box p {
    font-size: 18px !important;
    line-height: 1.4;
    margin: 5px 0;
    padding: 5px;
}

/* Animated number styling */
.container .service-box .counter {
    display: inline-block;
    font-size: 36px !important;
    font-weight: bold;
    color: #F28C00;
    margin: 5px 0;
}

/* Tablet and narrower laptop screens: two cards per row */
@media screen and (max-width: 1024px) {
    .container {
        justify-content: center;
    }

    .service-box {
        flex: 0 1 calc(50% - 10px);
        width: calc(50% - 10px);
        max-width: 300px;
    }
}

/* Mobile screens: one card per row */
@media screen and (max-width: 600px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .service-box {
        flex: 0 1 auto;
        width: 90%;
        max-width: 300px;
    }
}
