@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Misma paleta que index.html */
    --color-fondo-1: #E4C76D;
    --color-rojo-oscuro: #8C182A;
    --color-fondo-3: #C0392B;
    --color-fondo-4: #A16A46;
    --color-primario: #8C182A;
    --color-texto: #3b2a24;
    --color-blanco: #FFF9F2;
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.15);
    --borde-radio: 20px;
    --transicion-suave: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Quita el flash azul en móviles */
    -webkit-text-size-adjust: 100%;           /* Evita que el navegador cambie el tamaño del texto al girar el cel */
    box-sizing: border-box;                   /* Evita problemas con el padding y el tamaño */
    user-select: none;                        /* Evita que el usuario seleccione el texto */
    -webkit-user-select: none;                /* Safari y Chrome móvil */
    -webkit-touch-callout: none;              /* Evita el menú de "Copiar" en iOS */
}

@keyframes gradienteVivo {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(-45deg, #E4C76D, #DDB85A, #CDA84A, #EDD27A);
    background-size: 400% 400%;
    animation: gradienteVivo 15s ease infinite;
    color: var(--color-texto);
}

/* CONTENEDOR PRINCIPAL */

.galeria_deslizable {
    max-width: 1100px;
    margin: 40px auto;
    padding: 30px 40px;
    background: #FFF9F2;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.galeria_titulo {
    margin: 0 0 25px 0;
    text-align: center;
    font-size: 2.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-rojo-oscuro);
}

/* MARCO DEL CARRUSEL */

.contenedor_deslizable {
    position: relative;
    overflow: hidden;
    border-radius: var(--borde-radio);
    background: #FFF9F2;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.05);
}

.contenido {
    overflow: hidden;
    border-radius: var(--borde-radio);
}

/* PISTA QUE SE MUEVE (IMPORTANTE PARA EL JS) */

.contenido_imgenes {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

/* CADA SLIDE (IMAGEN O VIDEO) – TODOS MISMOS 100% DE ANCHO */

.imagen {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0.7;
    transform: scale(0.96);
    transition: var(--transicion-suave);
}

.imagen_activa {
    opacity: 1;
    transform: scale(1);
}

.imagen img,
.contenido_videos video {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    display: block;
}

.img_inicio_ajustada {
    height: 420px;
}

/* CONTENEDOR DEL VIDEO */

.contenido_videos {
    width: 100%;
}

/* TÍTULO BAJO CADA IMAGEN/VIDEO */

.titulo_imagen {
    background: #FFF9F2;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-rojo-oscuro);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

/* BOTONES DE NAVEGACIÓN LATERALES */

.boton_imagen_anterior,
.boton_imagen_siguiente {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 26px;
    color: var(--color-blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    z-index: 10;
    transition: var(--transicion-suave);
}

.boton_imagen_anterior {
    left: 20px;
    background: var(--color-fondo-4);
}

.boton_imagen_siguiente {
    right: 20px;
    background: var(--color-rojo-oscuro);
}

.boton_imagen_anterior:hover,
.boton_imagen_siguiente:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* PUNTOS DE PAGINACIÓN */

.puntos_desplazables {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.punto_desplazable {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: #cfd8dc;
    cursor: pointer;
    transition: var(--transicion-suave);
}

.punto_desplazable:hover {
    background-color: #b0bec5;
    transform: scale(1.1);
}

.punto_desplazable_activo {
    background-color: var(--color-rojo-oscuro);
    transform: scale(1.25);
    box-shadow: 0 0 10px rgba(140, 24, 42, 0.4);
}

/* BOTÓN REGRESAR AL INICIO (PARTE DE ABAJO) */

.item_boton {
    display: flex;
    justify-content: center;
    margin: 40px 0 10px;
}

.item_boton a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 26px;
    background: #FFF9F2;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
    transition: var(--transicion-suave);
    border: 2px solid transparent;
}

.item_boton a:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
    border-color: var(--color-rojo-oscuro);
    background: #FFFFFF;
}

.boton_inicio {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-rojo-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.boton_inicio img {
    width: 28px;
    height: auto;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.item_boton a:hover .boton_inicio img {
    transform: translateX(-4px);
}

.item_boton span {
    color: var(--color-rojo-oscuro);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===================== */
/*   MEDIA QUERIES       */
/* ===================== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {

    .galeria_deslizable {
        margin: 30px auto;
        padding: 24px 24px;
    }

    .galeria_titulo {
        font-size: 2.1rem;
    }

    .imagen {
        padding: 20px 24px 26px;
    }

    .imagen img,
    .contenido_videos video {
        max-height: 360px;
    }
    
    .img_inicio_ajustada {
        height: 360px;
    }
}

/* Móviles grandes / phablets */
@media (max-width: 768px) {

    .galeria_deslizable {
        margin: 20px 12px;
        padding: 20px 14px;
        border-radius: 24px;
    }

    .galeria_titulo {
        font-size: 1.9rem;
        letter-spacing: 2px;
        margin-bottom: 18px;
    }

    .imagen {
        padding: 16px 14px 22px;
        gap: 12px;
    }

    .imagen img,
    .contenido_videos video {
        max-height: 280px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    }
    
    .img_inicio_ajustada {
        height: 280px;
    }

    .titulo_imagen {
        font-size: 0.95rem;
        padding: 8px 18px;
    }

    .boton_imagen_anterior,
    .boton_imagen_siguiente {
        width: 44px;
        height: 44px;
        font-size: 22px;
        top: 50%;
    }

    .boton_imagen_anterior {
        left: 10px;
    }

    .boton_imagen_siguiente {
        right: 10px;
    }

    .puntos_desplazables {
        margin-top: 16px;
        gap: 8px;
    }

    .punto_desplazable {
        width: 11px;
        height: 11px;
    }

    .item_boton {
        margin: 30px 0 5px;
    }

    .item_boton a {
        padding: 10px 20px;
    }

    .item_boton span {
        font-size: 1rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {

    .galeria_deslizable {
        margin: 16px 8px;
        padding: 16px 10px;
    }

    .galeria_titulo {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }

    .imagen {
        padding: 12px 8px 18px;
    }

    .imagen img,
    .contenido_videos video {
        max-height: 230px;
        border-radius: 18px;
    }
    
    .img_inicio_ajustada {
        height: 230px;
    }

    .boton_imagen_anterior,
    .boton_imagen_siguiente {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .puntos_desplazables {
        gap: 6px;
    }

    .punto_desplazable {
        width: 10px;
        height: 10px;
    }

    .item_boton a {
        padding: 9px 18px;
    }

    .boton_inicio {
        width: 34px;
        height: 34px;
    }

    .boton_inicio img {
        width: 24px;
    }
}

/* ─── FOOTER ─── */
.pie_pagina {
    width: 100%;
    max-width: 1100px;
    text-align: center;
    padding: 18px 20px 24px;
    margin: 10px auto 0;
    border-top: 1px solid rgba(140, 24, 42, 0.15);
}

.pie_pagina p {
    color: #8a7060;
    font-size: 0.78rem;
    font-weight: 400;
    font-style: italic;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    line-height: 1.6;
}
