/* Tablet Optimization for Stats Section */

/* Tablet-specific styles (577px to 991px) */
@media (min-width: 577px) and (max-width: 991px) {
    /* Stats items layout */
    .stats-section .stats-numbers {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* First row: Deti 3-4 and Deti 5-6 in one row */
    .stats-section .stats-numbers .stats-item:nth-child(1),
    .stats-section .stats-numbers .stats-item:nth-child(2) {
        width: 50%;
        text-align: center;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
    /* Make sure the first row items are centered */
    .stats-section .stats-numbers .stats-item:nth-child(1) .stats-title,
    .stats-section .stats-numbers .stats-item:nth-child(2) .stats-title,
    .stats-section .stats-numbers .stats-item:nth-child(1) .stats-description,
    .stats-section .stats-numbers .stats-item:nth-child(2) .stats-description {
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    /* Second row: 2800 Materských škôl */
    .stats-section .stats-numbers .stats-item:nth-child(3) {
        width: 100%;
        margin-top: 30px;
        text-align: center;
        clear: both;
    }
    
    /* Center the third stats item */
    .stats-section .stats-numbers .stats-item:nth-child(3) .stats-title {
        text-align: center;
    }
    
    .stats-section .stats-numbers .stats-item:nth-child(3) .stats-title span {
        display: inline;
        text-align: center;
    }
    
    .stats-section .stats-numbers .stats-item:nth-child(3) .stats-description {
        text-align: center;
        display: block;
        width: 100%;
    }
    
    /* Ensure the dividing line is centered */
    .stats-section .stats-heading::after {
        content: "";
        display: block;
        width: 80px;
        height: 4px;
        background-color: #cce242;
        margin: 20px auto;
        position: relative;
        left: 0;
        right: 0;
    }
    
    /* Partner logos layout - same as smartphone version */
    .stats-section .partner-logos {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
        gap: 25px;
        justify-items: center;
        align-items: center;
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    /* Position the logos in the grid */
    /* First row: 2 logos */
    .stats-section .partner-logos img:nth-child(1) { grid-column: 1; grid-row: 1; }
    .stats-section .partner-logos img:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    /* Second row: 2 logos */
    .stats-section .partner-logos img:nth-child(3) { grid-column: 1; grid-row: 2; }
    .stats-section .partner-logos img:nth-child(4) { grid-column: 2; grid-row: 2; }
    
    /* Third row: 1 logo centered */
    .stats-section .partner-logos img:nth-child(5) {
        grid-column: 1 / span 2;
        grid-row: 3;
        justify-self: center;
    }
    
    /* Make the logos larger */
    .stats-section .partner-logo {
        height: 80px;
        max-width: none;
        width: auto;
    }
}