/* Estilos/components/interactive-gallery.css */

.interactive-gallery {
    position: relative;
    padding: 0 40px;
}

/* ... (código del wrapper y grid sin cambios) ... */
.interactive-gallery-wrapper {
    overflow: hidden;
}

.interactive-gallery-grid {
    display: flex;
    gap: 15px;
    transition: transform 0.5s ease-in-out;
}

/* ... (código del item sin cambios) ... */
.interactive-gallery-item {
    flex: 0 0 calc((100% - 30px) / 3);
    aspect-ratio: 16 / 9;
    position: relative;
    cursor: pointer;
    background-color: var(--color-dark-alt);
    border-radius: 8px;
    overflow: hidden;
}

.interactive-gallery-item img,
.interactive-gallery-item video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.interactive-gallery-item video:fullscreen {
    object-fit: contain;
}

/*
=================================================
=         POSICIONAMIENTO DE FLECHAS CORREGIDO         =
=================================================
*/

/* Hacemos que los controles de slider (que contienen las flechas) 
   no ocupen espacio en el flujo normal del documento */
.interactive-gallery .slider-controls {
    position: static;
}

/* Posicionamos las flechas de forma absoluta RELATIVO 
   al contenedor .interactive-gallery que tiene position: relative */
.interactive-gallery .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    /* Ajuste para que no se vea afectado por los dots */
    /* Lo centramos respecto a la altura de la propia galería */
    margin-top: -20px;
    /* Sube las flechas para compensar los dots */

    background: rgba(30, 30, 30, 0.6);
    color: var(--color-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    z-index: 10;
    cursor: pointer;
}

.interactive-gallery .arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.interactive-gallery .arrow.prev {
    left: 5px;
}

.interactive-gallery .arrow.next {
    right: 5px;
}


/* ... (resto de estilos: video, overlay, lightbox) ... */
.video-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.video-btn {
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.video-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.interactive-gallery-item[data-type="image"]:hover .item-overlay {
    opacity: 1;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.lightbox__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
}

.lightbox.visible {
    display: flex;
}

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.lightbox__prev {
    left: 18px;
}

.lightbox__next {
    right: 18px;
}

.lightbox__image {
    z-index: 2;
}

/* ===== Flechas del lightbox (mismo estilo del sitio) ===== */
.lightbox .arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
    backdrop-filter: blur(4px);
}

.lightbox .arrow i {
    font-size: 18px;
}

/* Hover igual que el sitio */
.lightbox .arrow:hover {
    background: rgba(0, 0, 0, .8);
    transform: translateY(-50%) scale(1.05);
}

/* Posiciones */
.lightbox__prev {
    left: 24px;
}

.lightbox__next {
    right: 24px;
}

@media (max-width: 992px) {
    .interactive-gallery-item {
        flex-basis: calc((100% - 15px) / 2);
    }
}

@media (max-width: 767px) {
    .interactive-gallery {
        padding: 0;
    }

    .interactive-gallery .arrow {
        display: none;
    }

    .slider-controls {
        position: relative;
        margin-top: 15px;
    }

    .slider-dots {
        display: none;
    }

    .lightbox .arrow {
        display: none;
    }
}