/* ==================================================
   GALERÍA DE EVENTOS - ESTILOS ESPECÍFICOS
   ================================================== */

/* Contenedor principal */
.events-gallery {
    padding: 80px 20px;
    background-color: var(--bg-light);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-light);
    font-size: 16px;
}

/* Carrusel infinito */
.gallery-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gallery-item {
    flex: 0 0 25%;
    padding: 0 10px;
    box-sizing: border-box;
}

.gallery-image {
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    height: 300px;
    transition: all 0.3s ease;
}

.gallery-image img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Efecto hover para imágenes */
.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

/* Botones de navegación */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.carousel-btn:hover:not(:disabled) {
    background: white;
    transform: translateY(-50%) scale(1.1);
    border-color: var(--primary-color);
}

.carousel-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-item {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 992px) {
    .gallery-item {
        flex: 0 0 50%;
    }
    
    .gallery-image {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .events-gallery {
        padding: 60px 15px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .gallery-item {
        flex: 0 0 100%;
        padding: 0 5px;
    }
    
    .gallery-image {
        height: 250px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .gallery-image {
        height: 200px;
    }
}

/* Efectos táctiles para móviles */
@media (hover: none) and (pointer: coarse) {
    .gallery-item:active .gallery-image img {
        transform: scale(1.05);
    }
}

/* Soporte para preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .carousel-track,
    .gallery-image img,
    .carousel-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .gallery-item:hover .gallery-image img {
        transform: none;
    }
}

/* Estilos para impresión */
@media print {
    .events-gallery {
        padding: 40px 20px;
        background: white;
    }
    
    .gallery-carousel,
    .carousel-btn {
        display: none !important;
    }
    
    .carousel-container {
        overflow: visible;
    }
    
    .carousel-track {
        transform: none !important;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .gallery-item {
        flex: none !important;
        width: 100%;
        padding: 0;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .gallery-image {
        height: 200px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .section-header h2 {
        color: black;
    }
    
    .section-header p {
        color: #666;
    }
}