/* ============================================================================
   THREE SQUARES GRID SECTION
   ============================================================================ */

/* Section Container */
.three-squares-grid-section {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.three-squares-container {
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
}

/* Grid Layout - 3 equal columns */
.three-squares-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

/* Individual Square Item */
.three-squares-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Square Link */
.three-squares-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.three-squares-link:hover {
    text-decoration: none;
}

/* Square Media Container */
.three-squares-media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.three-squares-picture {
    width: 100%;
    height: 100%;
    display: block;
}

.three-squares-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1520px) {
    .three-squares-grid-section {
        margin: 30px auto;
    }

    .three-squares-container {
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    .three-squares-grid-section {
        margin: 25px auto;
        padding: 0 15px;
    }

    .three-squares-grid {
        gap: 15px;
    }

}

@media (max-width: 991px) {
    .three-squares-grid-section {
        margin: 20px auto;
        padding: 0 12px;
    }

    .three-squares-grid {
        gap: 12px;
    }

}

@media (max-width: 767px) {
    .three-squares-grid-section {
        margin: 15px auto;
        padding: 0 15px;
    }

    /* On mobile: single column - stack vertically */
    .three-squares-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Remove square aspect ratio on mobile - let images display naturally */
    .three-squares-item {
        aspect-ratio: auto;
    }

}

@media (max-width: 480px) {
    .three-squares-grid-section {
        padding: 0 10px;
    }

    .three-squares-grid {
        gap: 12px;
    }

}

/* ============================================================================
   RTL SUPPORT
   ============================================================================ */

[dir="rtl"] .three-squares-grid {
    direction: rtl;
}


/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.three-squares-link:focus {
    outline: 2px solid #e0192e;
    outline-offset: 2px;
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */


/* ============================================================================
   END THREE SQUARES GRID SECTION
   ============================================================================ */
