/* ===== GALLERY LANDING ===== */

.gallery-section {
    padding: 60px 20px;
    font-family: var(--font-family-text);
}

/* FILTROS */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.gallery-filters .button {
    font-family: var(--font-family-body);
}

.gallery-filters .button.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* GRID MASONRY */
.gallery-grid {
    column-count: 3;
    column-gap: 16px;
}

.gallery-grid__item {
    break-inside: avoid;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    display: block;
}

.gallery-grid__item a {
    display: block;
    position: relative;
    overflow: hidden;
}

.gallery-grid__item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

/* VARIED HEIGHTS */
.gallery-grid__item:nth-child(3n+1) img {
    height: 280px;
    object-fit: cover;
}

.gallery-grid__item:nth-child(3n+2) img {
    height: 380px;
    object-fit: cover;
}

.gallery-grid__item:nth-child(3n) img {
    height: 220px;
    object-fit: cover;
}

/* IMAGE SCALE ON HOVER */
.gallery-grid__item a:hover img {
    transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 767px) {
    /* Filtros 2x2 con mismo ancho para alineación */
    .gallery-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .gallery-filters .button {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .gallery-grid {
        column-count: 1;
    }
}
