/* ==========================================================
   Contenedor general
   ========================================================== */

.section-gallery {
    width: 100%;
    padding: 40px 0;
}


/* ==========================================================
   Galería de escritorio
   ========================================================== */

.empresa-gallery--desktop {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
    width: 100%;
}

.empresa-gallery__column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}


/* ==========================================================
   Elementos e imágenes
   ========================================================== */

.empresa-gallery__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.empresa-gallery__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}


/* ==========================================================
   Galería móvil
   Se oculta en escritorio.
   ========================================================== */

.empresa-gallery-mobile {
    display: none;
}


/* ==========================================================
   Vídeos
   ========================================================== */

.empresa-gallery-videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 24px;
}

.empresa-gallery__video {
    display: block;
    width: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.empresa-gallery__video-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #222;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.empresa-gallery__video-image::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease;
}

.empresa-gallery__video-image .fa {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 64px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.empresa-gallery__video:hover
.empresa-gallery__video-image::before,
.empresa-gallery__video:focus
.empresa-gallery__video-image::before {
    background: rgba(0, 0, 0, 0.4);
}

.empresa-gallery__video:hover
.empresa-gallery__video-image .fa,
.empresa-gallery__video:focus
.empresa-gallery__video-image .fa {
    transform: scale(1.08);
}

.empresa-gallery__video:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}


/* ==========================================================
   Móvil
   ========================================================== */

@media (max-width: 767px) {
    .section-gallery {
        padding: 24px 0;
    }

    /*
     * Ocultamos la distribución específica de escritorio.
     */
    .empresa-gallery--desktop {
        display: none;
    }

    /*
     * Mostramos las imágenes en una sola columna,
     * respetando el orden original de la galería.
     */
    .empresa-gallery-mobile {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .empresa-gallery-videos {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }

    .empresa-gallery__video-image .fa {
        font-size: 52px;
    }
}