/* ================= HERO ================= */

.gallery-hero{

    height: 60vh;

    background: url('../assets/instalaciones/alberca.png') center/cover no-repeat;

    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    text-align: center;
}

.gallery-overlay{

    position: absolute;
    inset: 0;

    background: rgba(0,0,0,0.5);
}

.gallery-hero-content{

    position: relative;
    z-index: 2;

    color: white;

    max-width: 800px;
}

.gallery-hero-content h1{

    font-size: 72px;
    margin-bottom: 20px;
}

.gallery-hero-content p{

    font-size: 20px;
}

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

.gallery-grid{

    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 25px;
}

.gallery-item{

    position: relative;

    overflow: hidden;

    border-radius: 30px;

    cursor: pointer;

    min-height: 350px;
}

.gallery-item.large{

    grid-column: span 2;
}

.gallery-item img{

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.7s ease;
}

.gallery-item:hover img{

    transform: scale(1.08);
}

.gallery-text{

    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(0,0,0,0.7),
        transparent
    );

    display: flex;
    align-items: flex-end;

    padding: 30px;

    color: white;
}

.gallery-text h3{

    font-size: 28px;
}

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

@media(max-width:992px){

    .gallery-grid{

        grid-template-columns: repeat(2,1fr);
    }

}

@media(max-width:768px){

    .gallery-grid{

        grid-template-columns: 1fr;
    }

    .gallery-item.large{

        grid-column: span 1;
    }

    .gallery-hero-content h1{

        font-size: 52px;
    }

}

@media(max-width:480px){

    .gallery-hero-content h1{

        font-size: 40px;
    }

    .gallery-text h3{

        font-size: 22px;
    }

}

/* ================= LIGHTBOX ================= */

.lightbox{

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.92);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;

    transition: 0.4s ease;

    z-index: 5000;
}

.lightbox.active{

    opacity: 1;
    visibility: visible;
}

.lightbox img{

    max-width: 85%;
    max-height: 85vh;

    border-radius: 25px;

    transform: scale(0.8);

    transition: 0.4s ease;
}

.lightbox.active img{

    transform: scale(1);
}

.close-lightbox{

    position: absolute;

    top: 40px;
    right: 50px;

    color: white;

    font-size: 42px;

    cursor: pointer;
}