/* Margenes de la página */
#margin1, #margin2, #margin3, #margin4 {
    position: fixed;
    background-color: #eaeaea;
    z-index: 98;
}
#margin1 {
    top: 0px;
    width: 100vw;
    height: 5vmin;
}
#margin2 {
    bottom: 0px;
    width: 100vw;
    height: 5vmin;
}
#margin3 {
    left: 0px;
    width: 5vmin;
    height: 100vh;
}
#margin4 {
    right: 0px;
    width: 5vmin;
    height: 100vh;
}

/* Configuración de las imágenes dentro de las columnas */
.masonry-item img {
    width: 100%;
    aspect-ratio: 1/1;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: saturate(0);
    mix-blend-mode: multiply;
    opacity: 0.4;
    transition: all 0.5s ease;
}

.masonry-item img:hover {
    opacity: 1;
    filter: saturate(1);
    mix-blend-mode: normal;
}

.logo_grid {
    width: 80%;
    max-width: 150px;
    height: 80%;
    object-fit: contain;
    filter: invert(0%) brightness(100%);
    transition: filter 0.3s ease-in-out;
}

.masonry-item2:hover .logo_grid {
    filter: invert(100%) brightness(100%);
}

/* Lightbox general */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 22, 29, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 4px;
}

/* Control de la posición de los elementos en el lightbox */


.lightbox-title {
    position: absolute;
    bottom: 1vmin; /* Control vertical */
    left: 10%;
    font-family: effra-cc, sans-serif;
    text-align: center;
    font-weight: 500;
    font-size: 1.5rem;
    color: #eaeaea;
    z-index: 1200;
}

.lightbox-description {
    bottom: 2vmin; /* Control vertical */
    left: 30%;
    position: absolute;
    font-family: effra-cc, sans-serif;
    font-weight: 300;
    font-size: 1rem;
    text-align: center;
    color: #eaeaea;
    z-index: 1200;
}

.lightbox-button {
    position: absolute;
    bottom: 3vmin;
    right: 2.5%; /* Centrado horizontal */
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    color: #16161d;
    background-color: #eaeaea;
    text-decoration: none;
    text-align: center;
    border-radius: 2px;
    transition: background-color 0.3s ease;
    z-index: 9999;
}

.lightbox-button:hover {
    background-color: #d83312;
    color: #eaeaea;
}



/* Galería general */
.gallery_container {
    padding: 5vmin;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    overflow: hidden;
}

.masonry-item {
    width: 100%;
    transition: width 0.3s ease;
}

.masonry-item2 {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    background-color: #eaeaea;
    transition: background-color 0.3s ease-in-out;
}

.masonry-item2:hover {
    background-color: #16161d;
}


.masonry-item3 {
    background-color: #16161d;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: width 0.3s ease;
}

/* Ajustes responsivos */
@media (max-width: 767px) {
    .gallery_container {
        grid-template-columns: repeat(3, 1fr);
    }

    .masonry-item {
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }



.lightbox-title {
    font-family: effra-cc, sans-serif;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    top: 10px;
    left: 50%; /* Centrado horizontal */
    transform: translateX(-50%);
}

.lightbox-description {
    text-align: center;
    top: 40px;
    left: 50%; /* Centrado horizontal */
    transform: translateX(-50%);

}

.lightbox-button {
    bottom: 15px;
    left: 50%; /* Centrado horizontal */
    transform: translateX(-50%);
}
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gallery_container {
        grid-template-columns: repeat(4, 1fr);
    }



    .lightbox img {
        max-width: 85%;
        max-height: 85%;
    }
}



/* Estilos adicionales */
.masonry-item.active img {
    opacity: 1;
    filter: saturate(1);
    mix-blend-mode: normal;
}


/* CONTROLLER */

.controller-masonry-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    text-align: center;
}

.controller-image-link img {
    width: 30%;
    max-width: 150px;
    height: auto;
    object-fit: contain;
}

.controller-button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 70%;
    margin-top: 25px;
    gap: 10px;
}

.controller-button {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #eaeaea;
    font-size: 1rem;
    border: 1px solid #eaeaea;
    padding: 5px 10px 2px;
}

.controller-button:hover {
    background: #eaeaea;
    color: #16161d;
}


/* Responsividad */
@media (max-width: 768px) {
    .controller-masonry-content {
        max-width: 200px;
    }

    .controller-image-link img {
        max-width: 80px;
    }

    .controller-button {
        font-size: 0.9rem;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .controller-button {
        display: none;
    }
}

@media (max-width: 767px) and (max-aspect-ratio: 1/1) {
    .controller-image-link img {
        margin-top: 30px; /* Ajusta este valor según la cantidad de espacio que necesites */
    }
    .controller-image-link img {
        max-width: 60px;
    }
    
}
