/* ==========================================================================
   --- ESTILOS GENERALES DE LA HOME (RESTAURADOS AL 100%) ---
   ========================================================================== */
.home-wrapper {
    max-width: 85%;
    margin: 0 auto;
    padding: 20px 20px 60px 20px;
    box-sizing: border-box;
}

.descripcion-lugar {
    text-align: center;
    padding: 30px 10px 40px 10px;
    margin-bottom: 20px;
}
.descripcion-lugar h2 { color: var(--primary-color); text-transform: uppercase; font-size: 20pt; letter-spacing: 1.5px; margin-bottom: 15px; font-weight: bold; }
.descripcion-lugar p { font-size: 12pt; color: var(--text-color); max-width: 750px; margin: 0 auto 15px auto; line-height: 1.6; }
.descripcion-lugar p.destacado-editorial { font-style: italic; color: var(--secondary-color); font-size: 12.5pt; }

.galeria-local { margin: 40px 0; display: flex; flex-direction: column; gap: 30px; align-items: center; }
.local-container { width: 100%; max-height: 450px; overflow: hidden; border: 2px solid var(--border-color); background-color: var(--box-bg); }
.local-container img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.95); transition: filter 0.3s ease; }
.local-container:hover img { filter: brightness(1); }
.local-pie { font-size: 10.5pt; font-style: italic; color: var(--secondary-color); margin-top: 10px; margin-bottom: 20px; text-align: center; }

.historia-local { padding: 40px 10px; margin-top: 20px; border-top: 1px dashed var(--border-color); border-bottom: 1px dashed var(--border-color); }
.historia-local h3 { color: var(--primary-color); text-transform: uppercase; font-size: 14pt; letter-spacing: 1px; margin-bottom: 15px; text-align: center; }
.historia-texto { font-size: 11pt; color: var(--text-color); line-height: 1.7; max-width: 750px; margin: 0 auto; text-align: justify; }

.franja-parallax { height: 320px; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; border-top: 2px solid var(--primary-color); border-bottom: 2px solid var(--primary-color); margin: 40px 0; position: relative; }
.franja-parallax::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(51, 34, 26, 0.15); }

.mapa-wrapper { width: 100%; margin-top: 20px; border: 2px solid var(--border-color); line-height: 0; }
.mapa-wrapper iframe { width: 100%; height: 250px; border: 0; }

.reveal { opacity: 0; transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, opacity; }
.reveal:nth-of-type(odd) { transform: translateX(-20px) translateY(10px); }
.reveal:nth-of-type(even) { transform: translateX(20px) translateY(10px); }
.reveal.active { opacity: 1; transform: translateX(0) translateY(0); }


/* ==========================================================================
   --- EL MOSAICO CONTINUO CON MOTOR DE INERCIA ---
   ========================================================================== */
.mosaico-platos-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 80px 0 120px 0;
    border: none;
    background-color: transparent;
    overflow: visible;
}

.mosaico-item-premium {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
    background-color: var(--box-bg);
    will-change: transform, opacity;
    z-index: 1;
}

.mosaico-item-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.mosaico-item-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
    opacity: 0;
}

.mosaico-item-overlay h3 {
    color: #ffffff !important;
    text-transform: uppercase;
    font-size: 11pt;
    margin: 0;
    letter-spacing: 1px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.mosaico-item-premium:hover { 
    z-index: 10; 
}

.mosaico-item-premium:hover img { 
    transform: scale(1.32) !important; 
    filter: brightness(1.05); 
}

.mosaico-item-premium:hover .mosaico-item-overlay { 
    background-color: transparent !important; 
}

@media (max-width: 768px) {
    .mosaico-platos-grid-premium { 
        grid-template-columns: 1fr; 
    }
    .mosaico-item-premium { 
        transform: none !important; 
        opacity: 1 !important; 
    }
    .mosaico-item-premium img { 
        transform: none !important; 
    }
}
/* ==========================================================================
   --- 1. EL FONDO CONTINUO PARA LOS EDITORIALES ---
   ========================================================================== */
.seccion-editorial-mixta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    /* CLAVE: Cambiamos margin por padding para que las secciones se toquen */
    margin: 0 !important; 
    padding: 100px 20px; 
    width: 100%;
    box-sizing: border-box;
    /* Le damos un color de fondo ligeramente distinto al resto de la web 
       y un degradado radial sutil burdeos que imita la luz ambiente */
    background-color: var(--box-bg); 
    background-image: radial-gradient(circle at center, rgba(160, 64, 27, 0.05) 0%, transparent 65%);
}
.seccion-editorial-mixta:nth-of-type(even) {
    flex-direction: row-reverse;
}

.editorial-col-texto {
    flex: 1;
}

.editorial-col-texto h3 {
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 14pt;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.editorial-col-texto .historia-texto {
    text-align: justify;
    margin: 0;
}

/* LA FOTO ÚNICA (TU CÓDIGO ORIGINAL) */
.editorial-col-imagen {
    flex: 1;
    max-height: 420px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background-color: var(--box-bg);
    will-change: transform, opacity;
}

.editorial-col-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   --- GRUPO DE 2 FOTOS (DISEÑO SOLAPADO PREMIUM) ---
   ========================================================================== */
.editorial-col-imagen-grupo {
    flex: 1;
    /* CLAVE: Espacio de cortesía para el zigzag y altura total de seguridad */
    min-height: 550px; 
    position: relative; /* Escenario para las fotos absolutas */
    box-sizing: border-box;
}

/* MARCO COMÚN PERO FLEXIBLE (Eliminamos el height fijo de antes) */
.editorial-foto-mitad {
    overflow: hidden;
    border: 2px solid var(--border-color);
    background-color: var(--box-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: absolute; /* CLAVE para el solapamiento */
}

.editorial-foto-mitad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* FOTO 1: EL BAR (Arriba, Horizontal/Cuadrada, por debajo) */
.foto-caida {
    top: 0;
    left: 0;
    width: 85%; /* No ocupa todo el ancho */
    aspect-ratio: 4 / 3; /* Formato horizontal elegante */
    z-index: 1; /* Fondo */
    will-change: transform, opacity;
}

/* FOTO 2: LA TERRAZA (Abajo, Vertical, por encima) */
.foto-zoom {
    bottom: 0;
    right: 0;
    width: 70%; /* Más estrecha pero más alta */
    aspect-ratio: 3 / 4; /* Formato vertical de revista */
    z-index: 2; /* Pasa por encima */
    margin-top: 0 !important; /* Limpieza de márgenes anteriores */
    will-change: transform, opacity;
}

/* RESPONSIVE MÓVIL (Las des-solapamos para que se lean bien) */
@media (max-width: 768px) {
    .editorial-col-imagen-grupo {
        min-height: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .editorial-foto-mitad {
        position: relative; /* Vuelven al flujo normal */
        width: 100%;
        height: 200px;
        aspect-ratio: auto; /* Formato estándar en móvil */
    }
}
/* ==========================================================================
   --- 2. LA LÍNEA VIVA ILUMINADA ---
   ========================================================================== */
.separador-vivo-wrapper {
    width: 100%;
    height: 120px; /* Reducimos la altura porque ya hay mucho padding arriba y abajo */
    display: flex;
    justify-content: center;
    align-items: center;
    /* CLAVE: También quitamos el margen para que se fusione con los editoriales */
    margin: 0 !important; 
    padding: 20px 0;
    /* Continuamos el mismo fondo ambiente */
    background-color: var(--box-bg);
    background-image: radial-gradient(circle at center, rgba(160, 64, 27, 0.12) 0%, transparent 50%);
}

.separador-vivo-track {
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
    position: relative;
    border-radius: 2px;
    /* overflow: hidden; <-- LO QUITAMOS para que el brillo pueda salirse de la caja */
}

.separador-vivo-fill {
    width: 100%;
    background-color: var(--primary-color);
    position: absolute;
    top: 0;
    left: 0;
    height: 0%;
    will-change: height;
    /* EL TOQUE PREMIUM: Le metemos un difuminado que hace que la tinta "brille" */
    box-shadow: 0 0 15px 2px rgba(160, 64, 27, 0.8);
}

/* ==========================================================================
   --- SECCIÓN TAKEAWAY (ESTRUCTURA ESTABLE Y TRANSICIONES) ---
   ========================================================================== */
.seccion-takeaway {
    width: 100%;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    background-color: transparent;
}

.takeaway-contenido {
    max-width: 900px;
    width: 100%;
}

.takeaway-texto h3 {
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 14pt; 
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

.takeaway-texto .historia-texto {
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
}

/* FORZAMOS DISEÑO HORIZONTAL */
.takeaway-tracker {
    display: flex;
    flex-direction: row !important; 
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 50px;
    width: 100%;
}

/* ESTADO BASE DE LOS ICONOS (Apagados) */
.tracker-paso {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    color: var(--text-color);
    opacity: 0.3; /* Empiezan apagados */
    /* La transición amortigua el encendido que lanza el JS */
    transition: opacity 0.4s ease, color 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tracker-paso svg {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 15px;
    stroke: currentColor;
    flex-shrink: 0;
}

.tracker-text h4 {
    font-size: 11pt;
    color: inherit;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracker-text p {
    font-size: 9.5pt;
    color: var(--secondary-color);
    margin: 0;
}

/* LÍNEAS CONECTORAS */
.tracker-linea {
    flex: 1;
    height: 2px;
    background-color: var(--border-color);
    margin: 28px 5px 0 5px;
    position: relative;
    border-radius: 2px;
    min-width: 20px;
    overflow: hidden; /* Clave para que la barra no se salga */
}

.tracker-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Empieza vacía */
    background-color: var(--primary-color);
    /* La transición hace que la barra se llene suavemente */
    transition: width 0.8s ease-in-out;
}

/* --- LAS CLASES INTERRUPTOR QUE ACTIVA EL JS --- */
.tracker-paso.activo {
    color: var(--primary-color);
    transform: scale(1.1);
    opacity: 1;
}

.tracker-fill.lleno {
    width: 100%;
}
/* ==========================================================================
   --- PIE INFORMATIVO INFERIOR Y BANNERS ---
   ========================================================================== */
.info-footer-home { 
    border-top: 2px solid var(--primary-color); 
    padding-top: 30px; display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; margin-top: 60px; 
}

.bloque-info h4 { 
    color: var(--primary-color); 
    text-transform: uppercase; 
    margin: 0 0 10px 0; 
    font-size: 12pt; 
    font-weight: bold; 
}

.bloque-info p { 
    margin: 0; 
    color: var(--text-color); 
    line-height: 1.5; 
}

.cookie-flotante { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    background-color: var(--box-bg); 
    color: var(--text-color); 
    border: 1px solid var(--primary-color); 
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    z-index: 9998; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
    transition: all 0.2s ease; 
}

.cookies-banner { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background-color: var(--box-bg); 
    border-top: 2px solid var(--primary-color); 
    padding: 15px 20px; 
    box-sizing: border-box; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 9999; 
    font-size: 10pt; 
    color: var(--text-color); 
}

.cookies-btn { 
    background-color: var(--primary-color); 
    color: white; 
    border: none; 
    padding: 8px 18px; 
    text-transform: uppercase; 
    font-size: 9pt; 
    font-weight: bold; 
    letter-spacing: 1px; 
    cursor: pointer; 
    transition: background-color 0.2s ease; 
}

@media (max-width: 768px) {
    .franja-parallax { 
        background-attachment: scroll !important; 
        height: 180px; 
    }    
    /* Responsive para la sección asimétrica: se convierte en un bloque vertical clásico */
    .seccion-editorial-mixta {
        flex-direction: column;
        gap: 30px;
        margin: 50px 0;
    }
    .editorial-col-imagen { width: 100%; max-height: 250px; }
}


@media (max-width: 600px) 
{ 
    .info-footer-home { 
        grid-template-columns: 1fr; 
        gap: 25px; text-align: center; 
    } 
    
    .cookies-banner { 
        flex-direction: column; 
        text-align: center; 
        gap: 12px; 
    } 
}

/* ==========================================================================
   --- CORRECCIONES RESPONSIVE PARA MÓVIL (< 768px) ---
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Contenedor: Aprovechamos el ancho total */
    .home-wrapper {
        max-width: 100% !important;
        padding: 10px !important;
        overflow-x: hidden; /* Esto evita que el scroll horizontal se descontrole */
        text-align: center; /* Centrado general para móviles */
        margin: 0 auto !important;
    }

    .container {
        width: 100% !important;
        box-sizing: border-box;
    }

/* 3. Takeaway: Centrado absoluto del bloque y sus hijos */
    .seccion-takeaway {
        width: 100%;
        display: flex;
        justify-content: center;
        text-align: center;
        padding: 0 0 0 0 !important;
    }

    .takeaway-contenido {
        width: 100% !important;
        max-width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center; /* Alineación central en flex */
    }

    .takeaway-tracker {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
        gap: 20px;
    }

    .tracker-paso {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    /* Ajustamos el tamaño de los iconos en móvil para que no sean gigantes */
    .tracker-paso svg {
        width: 45px !important;
        height: 45px !important;
    }

    /* Líneas de conexión verticales centradas */
    .tracker-linea {
        width: 2px;
        height: 30px;
        margin: 10px auto !important; /* Centrado automático */
        transform: none;
    }

    /* 3. Secciones Editoriales: Apilamiento legible */
    .seccion-editorial-mixta {
        flex-direction: column !important;
        padding: 40px 15px !important;
        gap: 30px;
    }
    
    .editorial-col-texto, 
    .editorial-col-imagen-grupo, 
    .editorial-col-imagen {
        width: 100% !important;
        flex: none !important;
    }

    /* Ajustamos las fotos solapadas en móvil para que no se corten */
    .editorial-col-imagen-grupo {
        min-height: 300px;
        position: relative;
    }
    
    .editorial-foto-mitad {
        position: relative !important; /* Salen del flujo absoluto */
        width: 100% !important;
        height: 200px;
    }
}
