/* Stacked Gallery Styles */

.stacked-gallery-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.stacked-gallery-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
}

.stacked-gallery-item {
    position: absolute;
    width: 50%;
    max-width: 600px;
    height: 80%;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.stacked-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay para imágenes no activas */
.stacked-gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color, #1a5a4a);
    opacity: var(--overlay-opacity, 0.8);
    z-index: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

/* Imagen activa - sin overlay y centrada */
.stacked-gallery-item.active {
    z-index: 10;
    transform: translateX(0) scale(1);
    opacity: 1;
}

.stacked-gallery-item.active::before {
    opacity: 0;
}

/* Imágenes a la izquierda */
.stacked-gallery-item.left-1 {
    z-index: 9;
    transform: translateX(-50%) scale(0.78);
    opacity: 1;
}

.stacked-gallery-item.left-2 {
    z-index: 8;
    transform: translateX(-68%) scale(0.74);
    opacity: 1;
}

.stacked-gallery-item.left-3 {
    z-index: 1;
    opacity: 0;
    transform: translateX(-100%) scale(0.5);
    pointer-events: none;
}

/* Imágenes a la derecha */
.stacked-gallery-item.right-1 {
    z-index: 9;
    transform: translateX(50%) scale(0.78);
    opacity: 1;
}

.stacked-gallery-item.right-2 {
    z-index: 8;
    transform: translateX(68%) scale(0.74);
    opacity: 1;
}

.stacked-gallery-item.right-3 {
    z-index: 1;
    opacity: 0;
    transform: translateX(100%) scale(0.5);
    pointer-events: none;
}

/* Imágenes ocultas (fuera del rango visible) */
.stacked-gallery-item.hidden {
    opacity: 0;
    transform: translateX(0) scale(0.5);
    z-index: 1;
    pointer-events: none;
}

/* Indicadores (dots) */
.stacked-gallery-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 10px;
}

.stacked-gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #f4a261;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.stacked-gallery-dot:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

.stacked-gallery-dot.active {
    background-color: #e76f51;
    opacity: 1;
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 768px) {
    .stacked-gallery-item {
        width: 70%;
        height: 70%;
    }
    
    .stacked-gallery-item.left-1 {
        transform: translateX(-55%) scale(0.75);
    }
    
    .stacked-gallery-item.left-2 {
        transform: translateX(-70%) scale(0.72);
    }
    
    .stacked-gallery-item.right-1 {
        transform: translateX(55%) scale(0.75);
    }
    
    .stacked-gallery-item.right-2 {
        transform: translateX(70%) scale(0.72);
    }
    
    .stacked-gallery-item.left-3,
    .stacked-gallery-item.right-3 {
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 480px) {
    .stacked-gallery-container {
        height: 400px;
    }
    
    .stacked-gallery-item {
        width: 85%;
        height: 65%;
    }
}
