@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Playfair+Display:wght@700&display=swap');

/* ==========================================================================
   1. VARIABLES GLOBALES Y CONFIGURACIÓN
   ========================================================================== */
:root {
    --color-verde: #243428;
    --color-dorado: #cbb170;
    --color-beige: #f7ebbf;
    --color-blanco: #ffffff;
    --color-negro: #000000;

    /* Sombras premium y efectos */
    --sombra-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
    --sombra-premium: 0 5px 15px rgba(0, 0, 0, 0.05), 0 15px 35px rgba(0, 0, 0, 0.08), 0 25px 50px rgba(0, 0, 0, 0.1), 0 40px 90px rgba(0, 0, 0, 0.15);

    /* Transición unificada */
    --transicion: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-beige);
    color: var(--color-negro);
}

/* ==========================================================================
   2. CABECERA Y NAVEGACIÓN (HEADER)
   ========================================================================== */
.cabecera {
    background-color: var(--color-verde);
    border-bottom: 5px solid var(--color-dorado);
    height: 100px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 50;
    transition: var(--transicion);
}

.contenedor-cabecera {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.logo-imagen {
    height: 150px;
    width: 150px;
    display: block;
    transition: var(--transicion);
}

.navegacion {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    gap: 40px;
    transition: var(--transicion);
}

.enlace {
    color: var(--color-blanco);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s ease;
}

/* Subrayado deslizante premium */
.enlace::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-dorado);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.enlace:hover {
    color: var(--color-dorado);
}

.enlace:hover::after {
    width: 100%;
    left: 0;
}

/* ==========================================================================
   3. SECCIÓN HERO (PORTADA PRINCIPAL)
   ========================================================================== */
.fondo {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('imagenes/mostaza_fondo.png') center/180% no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
}

.titulo-fondo {
    color: var(--color-blanco);
    font-family: 'Playfair Display', serif;
    font-size: 45px;
    text-align: center;
    line-height: 1.1;
    font-weight: 700;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.boton-cta {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 36px;
    background-color: var(--color-dorado);
    color: var(--color-verde);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(203, 177, 112, 0.3);
    transition: var(--transicion);
    border: 2px solid transparent;
}

.boton-cta:hover {
    transform: translateY(-3px) scale(1.03);
    background-color: var(--color-blanco);
    color: var(--color-verde);
    box-shadow: 0 10px 25px rgba(203, 177, 112, 0.5), 0 0 15px rgba(203, 177, 112, 0.3);
}

.boton-cta:active {
    transform: translateY(-1px);
}

/* ==========================================================================
   4. SECCIÓN QUIÉNES SOMOS
   ========================================================================== */
.quienes-somos {
    width: 100%;
    min-height: 50vh;
    padding: 100px 5% 80px 5%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contenedor-texto {
    max-width: 800px;
    text-align: center;
}

.titulo-quienes {
    font-family: 'Playfair Display', serif;
    font-size: 40px;
    margin-bottom: 30px;
    color: var(--color-verde);
}

.descripcion-quienes {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-negro);
}

/* ==========================================================================
   5. SECCIÓN LOCALIZACIÓN Y HORARIOS
   ========================================================================== */
.localizacion {
    padding: 80px 5% 60px 5%;
    width: 100%;
}

.contenedor-localizacion {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
}

.info-localizacion {
    flex: 1;
}

.titulo-seccion {
    font-family: 'Playfair Display', serif;
    font-size: clamp(35px, 5vw, 55px);
    color: var(--color-verde);
    margin-bottom: 40px;
    letter-spacing: 3px;
    font-weight: 700;
}

.caja-dorada {
    background-color: var(--color-dorado);
    padding: 50px;
    border-radius: 40px;
    color: var(--color-verde);
    box-shadow: var(--sombra-soft);
    transition: var(--transicion);
}

.caja-dorada:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(203, 177, 112, 0.2);
}

.direccion {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.horarios h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.horarios p {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.mapa-contenedor {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.enlace-maps {
    display: block;
    margin-bottom: 15px;
    color: var(--color-verde);
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.enlace-maps:hover {
    color: var(--color-blanco);
}

iframe {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   6. SECCIÓN GALERÍA / CARRUSEL
   ========================================================================== */
.galeria {
    width: 100%;
    padding: 60px 5% 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.titulo-galeria {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 50px);
    color: var(--color-verde);
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.carrusel-deslizable {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 100px 0;
    width: 100%;
    scrollbar-width: none;
    align-items: center;
    /* El secreto: behavior auto para que el salto de JS no se vea */
    scroll-behavior: auto;
}

.carrusel-deslizable::-webkit-scrollbar {
    display: none;
}

.carrusel-deslizable img {
    flex: 0 0 300px;
    width: 300px;
    height: 250px;
    object-fit: cover;
    flex: 0 0 300px;
    height: 250px;
    object-fit: cover;
    border-radius: 30px;
    scroll-snap-align: center;
    scroll-snap-stop: always;

    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.5s ease,
        opacity 0.5s ease;
    transform: scale(0.7);
    filter: brightness(0.5) blur(2px);
    opacity: 0.5;
}

.carrusel-deslizable img.active {
    transform: scale(1.2);
    filter: brightness(1) blur(0);
    opacity: 1;
    z-index: 10;
}


/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
    background-color: var(--color-verde);
    color: var(--color-beige);
    padding: 60px 5%;
    width: 100%;
    border-top: 5px solid var(--color-dorado);
}

.contenedor-footer {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.redes-sociales {
    display: flex;
    gap: 20px;
    align-items: center;
}

.enlace-footer {
    color: var(--color-dorado);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.enlace-footer:hover {
    color: var(--color-blanco);
}

.logo-red-social {
    height: 45px;
    width: auto;
    display: block;
    transition: var(--transicion);
}

.enlace-footer:hover .logo-red-social {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.2);
}

.separador {
    color: var(--color-dorado);
    opacity: 0.5;
}

.texto-footer {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    letter-spacing: 3px;
    color: var(--color-blanco);
    opacity: 0.8;
}

.copyright {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 20px;
}

/* ==========================================================================
   8. COMPONENTES Y UTILIDADES DE INTERACCIÓN
   ========================================================================== */

/* Scroll Reveal (Aparición al hacer Scroll) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Botón Volver Arriba */
.volver-arriba {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-verde);
    color: var(--color-dorado);
    border: 2px solid var(--color-dorado);
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: var(--transicion);
}

.volver-arriba.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.volver-arriba:hover {
    background-color: var(--color-dorado);
    color: var(--color-verde);
    box-shadow: 0 6px 20px rgba(203, 177, 112, 0.5);
    transform: scale(1.1) translateY(-2px);
}

.volver-arriba:active {
    transform: scale(1) translateY(0);
}

/* Estilos de la página estática Carta (carta.html) */
.body-carta {
    background-color: var(--color-beige);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 10px;
    min-height: 100vh;
}

.imagen-carta {
    border-radius: 20px;
    width: 95%;
    max-width: 1000px;
    height: auto;
    box-shadow: var(--sombra-premium);
}

/* Menú Hamburguesa (Icono) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--color-blanco);
    border-radius: 3px;
    transition: var(--transicion);
}

/* Animaciones Hamburger -> X */
.menu-toggle.activo span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--color-dorado);
}

.menu-toggle.activo span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.activo span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--color-dorado);
}

/* ==========================================================================
   9. DISEÑO RESPONSIVO (MEDIA QUERIES CONSOLIDADOS)
   ========================================================================== */
@media (max-width: 900px) {
    .contenedor-localizacion {
        flex-direction: column;
        align-items: center;
    }

    .info-localizacion,
    .mapa-contenedor {
        width: 100%;
    }

    .caja-dorada {
        padding: 30px;
    }

    .direccion {
        font-size: 22px;
    }
}

@media (max-width: 768px) {

    /* Optimizar Fondo Hero para Pantalla Vertical */
    .fondo {
        background: url('imagenes/mostaza_fondo.png') center/cover no-repeat;
    }

    .titulo-fondo {
        font-size: clamp(24px, 7.5vw, 36px);
        line-height: 1.2;
    }

    /* Reducir Cabecera para ganar espacio en pantalla móvil */
    .cabecera {
        height: 75px;
    }

    .logo-imagen {
        height: 100px;
        width: 100px;
    }

    .overlay {
        padding-top: 60px;
    }

    /* Ajustar Quiénes Somos */
    .quienes-somos {
        padding: 80px 6% 40px 6%;
    }

    .titulo-quienes {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .descripcion-quienes {
        font-size: 15px;
        line-height: 1.7;
    }

    /* Ajustar Bloque de Horarios (Caja Dorada) */
    .caja-dorada {
        padding: 30px 20px;
        border-radius: 25px;
    }

    .direccion {
        font-size: 18px;
        margin-bottom: 25px;
    }

    .horarios h3 {
        font-size: 22px;
    }

    .horarios p {
        font-size: 16px;
    }

    /* Carrusel en Móvil */
    .carrusel-deslizable {
        padding: 50px 0 70px 0;
        margin-top: -20px;
        gap: 0px;
    }

    .carrusel-deslizable img {
        width: 150px;
        height: 120px;
        border-radius: 15px;
        margin: 0 -15px;
        transform: scale(0.7);
        filter: brightness(0.85) blur(1px);
        transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    }

    .carrusel-deslizable img.active {
        transform: scale(1.15);
        margin: 0 25px;
    }

    /* Menú Lateral Desplegable */
    .menu-toggle {
        display: flex;
    }

    .navegacion {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-verde);
        border-left: 3px solid var(--color-dorado);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        padding: 80px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 90;
    }

    .navegacion.activo {
        right: 0;
    }

    .enlace {
        font-size: 18px;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .enlace::after {
        display: none;
    }

    body.menu-abierto {
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    .carrusel-deslizable img {
        flex: 0 0 220px;
        /* Fotos más estrechas en móvil */
        width: 220px;
        height: 200px;
        /* Un poco más bajas */
        transform: scale(0.85);
        /* Que no se encojan tanto las de los lados */
    }

    .carrusel-deslizable img.active {
        transform: scale(1.1);
        /* Un aumento más suave para no pixelar */
    }

    .carrusel-deslizable {
        padding: 60px 0;
        /* Menos espacio arriba y abajo */
    }
}