/* ======================================= */
/* 🎅 AMBITO PRINCIPAL Y VARIABLES GLOBALES (MÍNIMAS) */
/* ======================================= */

/* Las variables de color en :root son generalmente seguras, no causan conflicto */
:root {
    --rojo-navidad: #c41e3a;
    --verde-navidad: #165b33;
    --dorado-navidad: #ffd700;
    --blanco-nieve: #f8f9fa;
    --verde-oscuro: #0f4c2a;
    --rojo-oscuro: #8b1538;
}

/* El selector universal (*) y los estilos de 'body' son los que más conflicto causan.
   Para evitarlo, SOLO mantenemos el reinicio básico si es estrictamente necesario,
   o lo aplicamos SOLAMENTE dentro del ámbito principal si fuera el caso.

   *** RECOMENDACIÓN: Mantener el reinicio básico (*) fuera del ámbito para no forzarlo.
   *** Si NO puedes modificar el HTML, salta este paso:
.navidad-carrusel-scope * {
    box-sizing: border-box; /* Aplicado solo dentro del carrusel */
    /* margin y padding deben ser manejados por los elementos internos */
}
*/

/* ----------------------------------------------------- */
/* ❄️ ESTILOS ESPECÍFICOS DEL CARRUSEL (Todo con prefijo) */
/* ----------------------------------------------------- */

/* Contenedor principal del carrusel (El único selector "corto") */
.carrusel-container {
    max-width: 900px;
    width: 100%;
    background: var(--blanco-nieve);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    border: 4px solid var(--dorado-navidad);
    animation: brillo 3s infinite alternate;
}

@keyframes brillo {
    0% { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.6); }
}

/* Título navideño */
.titulo-carrusel {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, var(--rojo-navidad), var(--verde-navidad));
    color: var(--blanco-nieve);
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.titulo-carrusel::before,
.titulo-carrusel::after {
    content: '🎄';
    position: absolute;
    font-size: 2rem;
    animation: rotar-adorno 4s infinite linear;
}

.titulo-carrusel::before { left: 20px; }
.titulo-carrusel::after { right: 20px; }

@keyframes rotar-adorno {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contenedor de imágenes */
.carrusel-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: linear-gradient(45deg, var(--verde-oscuro), var(--rojo-oscuro));
}

/* Imágenes del carrusel */
.carrusel-imagenes {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.carrusel-imagen {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.6s ease-in-out;
}

/* Navegación - Botones anterior/siguiente */
.btn-navegacion {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--dorado-navidad);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--rojo-navidad);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-navegacion:hover {
    background: var(--dorado-navidad);
    color: var(--blanco-nieve);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-anterior { left: 20px; }
.btn-siguiente { right: 20px; }

/* Indicadores de posición */
.indicadores {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--dorado-navidad);
}

.indicador.activo {
    background: var(--dorado-navidad);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.indicador:hover {
    background: var(--blanco-nieve);
    transform: scale(1.2);
}

/* Información de la imagen */
.info-imagen {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--blanco-nieve);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--dorado-navidad);
}

/* Controles de reproducción */
.controles-reproduccion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--dorado-navidad);
}

.btn-control {
    background: var(--rojo-navidad);
    color: var(--blanco-nieve);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-control:hover {
    background: var(--dorado-navidad);
    color: var(--rojo-navidad);
    border-color: var(--rojo-navidad);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Animación de carga */
.cargando {
    opacity: 0.7;
    pointer-events: none;
}

/* Efecto de transición adicional */
.fade-transition {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* ======================================= */
/* 📱 Responsive design (Ajusta los selectores) */
/* ======================================= */

@media (max-width: 768px) {
    .titulo-carrusel {
        font-size: 1.8rem;
        padding: 15px;
    }

    .titulo-carrusel::before,
    .titulo-carrusel::after {
        font-size: 1.5rem;
    }

    .carrusel-wrapper { height: 350px; }

    .btn-navegacion {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .btn-anterior { left: 10px; }
    .btn-siguiente { right: 10px; }

    .info-imagen {
        font-size: 0.8rem;
        padding: 8px 15px;
    }

    .controles-reproduccion {
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-control {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .carrusel-wrapper { height: 250px; }
    .titulo-carrusel { font-size: 1.4rem; }
    .btn-navegacion {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}