/* =========================================
   GALERÍA CARRUSEL UNIFICADO (LIMPIO)
   ========================================= */
.gallery-filters {
    display: flex; justify-content: center; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.filter-btn {
    background: transparent; border: 1px solid #e2e8f0; padding: 0.6rem 1.5rem;
    border-radius: 50px; cursor: pointer; font-weight: 500; color: #64748b;
    transition: all 0.3s ease; font-size: 0.95rem;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--color-primary); color: white; border-color: var(--color-primary);
}

.gallery-carousel-wrapper {
    position: relative; display: flex; align-items: center; gap: 1.5rem;
}

.carousel-btn {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid #e2e8f0; background: white; color: var(--color-primary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.08); z-index: 10;
}
.carousel-btn:hover {
    background: var(--color-primary); color: white; border-color: var(--color-primary); transform: scale(1.1);
}
.carousel-btn svg { width: 24px; height: 24px; }

.gallery-grid {
    flex: 1; display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-card {
    background: white; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9; display: block !important; /* Forzar visibilidad */
}
.gallery-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

.gallery-card__thumb {
    position: relative; height: 220px; overflow: hidden; cursor: pointer;
}
.gallery-card__thumb img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-card__thumb img { transform: scale(1.05); }

.gallery-card__play {
    position: absolute; inset: 0; background: rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-card__play svg { width: 48px; height: 48px; color: white; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.gallery-card:hover .gallery-card__play { opacity: 1; }

.gallery-card__info { padding: 1.25rem; text-align: center; }
.gallery-card__info h3 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--color-primary); }
.gallery-card__info p { font-size: 0.9rem; color: #64748b; margin: 0; line-height: 1.5; }

.carousel-pagination {
    display: flex; justify-content: center; gap: 0.75rem; margin-top: 2.5rem;
}
.pagination-dot {
    width: 12px; height: 12px; border-radius: 50%; border: none;
    background: #cbd5e1; cursor: pointer; transition: all 0.3s ease;
}
.pagination-dot.active { background: var(--color-primary); transform: scale(1.3); }
.pagination-dot:hover { background: var(--color-accent); }

/* Modal */
.gallery-modal {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.gallery-modal.is-open { opacity: 1; pointer-events: auto; }
.gallery-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(4px); }
.gallery-modal__content {
    position: relative; z-index: 2001; background: white; border-radius: var(--radius);
    max-width: 850px; width: 90%; max-height: 90vh; overflow-y: auto;
    transform: scale(0.95); transition: transform 0.3s ease;
}
.gallery-modal.is-open .gallery-modal__content { transform: scale(1); }
.gallery-modal__close {
    position: absolute; top: 1rem; right: 1rem; z-index: 2002;
    background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #1e293b; transition: background 0.2s;
}
.gallery-modal__close:hover { background: var(--color-accent); color: white; }
.gallery-modal__media { width: 100%; aspect-ratio: 16/9; background: #0f172a; display: flex; align-items: center; justify-content: center; }
.gallery-modal__media iframe, .gallery-modal__media img { width: 100%; height: 100%; object-fit: contain; border: none; }
.gallery-modal__info { padding: 1.5rem 2rem 2rem; text-align: center; }
.gallery-modal__info h3 { color: var(--color-primary); margin-bottom: 0.5rem; font-size: 1.4rem; }
.gallery-modal__info p { color: #475569; line-height: 1.6; margin: 0; }

@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { 
    .gallery-carousel-wrapper { flex-direction: column; gap: 1rem; }
    .carousel-btn { width: 100%; border-radius: 8px; height: 44px; }
    .gallery-grid { grid-template-columns: 1fr; } 
}