/* style.css */

/* Variables de Color (ACTUALIZADAS con variables de Footer) */
:root {
    --color-primary: #8B5738;      /* Color Marrón del Logo - Para Fondos Oscuros y Texto */
    --color-accent: #C2906C;       /* Ocre/Tostado - Para CTAs */
    --color-secondary: #FBF7F3;    /* Blanco Roto Cremoso - Fondo Principal */
    --color-light: #ffffff;        /* Blanco */
    /* 🔑 VARIABLES DEL FOOTER */
    --color-footer-bg: #EAE6E2;    /* Gris/Marrón muy claro (cerca del color secundario) */
    --color-footer-text: #4A4A4A;  /* Gris oscuro para el texto */
}

/* RESET BÁSICO Y TIPOGRAFÍA */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--color-primary);
    background-color: var(--color-secondary);
    line-height: 1.6; /* Espaciado de línea mejorado */
}
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* UTILIDADES */
.btn {
    display: inline-block; padding: 12px 30px; border-radius: 5px;
    font-weight: 600; text-decoration: none; text-transform: uppercase;
    transition: background-color 0.3s, transform 0.3s;
}
.btn-primary {
    background-color: var(--color-accent); color: var(--color-light);
}
.btn-primary:hover {
    background-color: #A67856; /* Tono de acento más oscuro en hover */
    transform: scale(1.05);
}
.section-title {
    font-size: 2.5rem; text-align: center; margin-bottom: 50px;
    color: var(--color-primary);
}

/* -------------------------------------------------- */
/* HEADER & NAV */
/* -------------------------------------------------- */
header {
    background-color: var(--color-light); 
    color: var(--color-primary);
    padding: 15px 0; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); 
}
.nav-content {
    display: flex; 
	justify-content: space-between; 
	align-items: center;
}
.brand { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  color: var(--color-primary); 
  text-decoration: none; 
}
.brand img {
    height: 64px;
    width: 64px;
    border-radius: 50%;
    object-fit: cover;
}
.brand_name { 
	font-weight: 700; 
	font-size: 1.2rem; 
}
.nav-links-desktop a {
    color: var(--color-primary); text-decoration: none; margin-left: 25px;
    font-weight: 600; opacity: 0.8; transition: opacity 0.3s;
}
.nav-links-desktop a:hover { opacity: 1; }
.nav-cta { margin-left: 30px; }
.menu-toggle {
    display: none; 
	width: 30px;
    background: none; border: none; padding: 10px; cursor: pointer;
    z-index: 1001;
}
.hamburger {
    display: block; width: 25px; height: 3px; 
    background: var(--color-primary); border-radius: 3px;
    position: relative;
    transition: background 0.3s;
}
.hamburger::before, .hamburger::after {
    content: ''; position: absolute; width: 100%; height: 3px; 
    background: var(--color-primary); border-radius: 3px;
    transition: transform 0.3s, top 0.3s;
}
.hamburger::before { top: -8px; left: 0; }
.hamburger::after { top: 8px; left: 0;}
.mobile-menu {
    display: none; 
}

/* -------------------------------------------------- */
/* SECCIÓN HERO (INICIO) */
/* -------------------------------------------------- */
#home {
    background: url('../img/fondo-hero.png') no-repeat center center/cover;
    height: 85vh; display: flex; align-items: center; text-align: center;
    position: relative;
}
#home::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4); 
}
.hero-content {
    position: relative; z-index: 10; width: 100%; color: var(--color-light);
    max-width: 800px; margin: 0 auto;
}
.hero-content h1 { font-size: 4.5rem; margin-bottom: 15px; }
.hero-content p { font-size: 1.4rem; margin-bottom: 40px; font-style: italic; }

.imagen-certificada {
    /* 1. Flotación */
    position: absolute; 
    
    /* 2. Centrado Horizontal Perfecto */
    width: 150px; /* Definimos el tamaño del sello */
    left: 50%; /* Mueve el punto de inicio al centro horizontal */
    transform: translateX(-50%); /* Lo mueve hacia atrás la mitad de su propio ancho (Centrado) */
    top: 110%;
    margin-top: 20px; /* Pequeño margen entre el botón y el sello */
    z-index: 10; /* Asegura que esté por encima de otros elementos */
}

.imagen-certificada img {
    width: 100%; 
    height: auto;
    /* Redondeo Total */
    border-radius: 50%; 
    aspect-ratio: 1 / 1; /* Asegura que la imagen sea un círculo perfecto */
    object-fit: cover; /* Asegura que la imagen rellene el círculo */
    
    /* Sombreada / Sutil */
    opacity: 0.9; /* Hace la imagen un 60% opaca */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra muy suave */
}

/* -------------------------------------------------- */
/* SECCIÓN MENÚ DESTACADO */
/* -------------------------------------------------- */
#menu { padding: 80px 0; background-color: var(--color-secondary); }

.menu-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.menu-grid-2-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    justify-content: center; 
    max-width: 900px; 
    margin: 40px auto 0; 
}

/* Estilos para HOVER y MENÚ FLOTANTE */
.menu-item {
    background: var(--color-light); 
    border-radius: 10px; 
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    
    position: relative; 
    cursor: pointer; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent; 
}

.menu-item:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
    border-color: var(--color-accent); 
}

.menu-item img {
    width: 100%; height: 250px; object-fit: cover;
}
.menu-info { padding: 25px 20px; }
.menu-info h3 { font-size: 1.8rem; margin-bottom: 10px; color: var(--color-accent); }
.menu-info p { font-size: 0.95rem; margin-bottom: 15px; color: #555; }
.menu-price { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); }

.action-hint {
    display: block;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-accent);
    margin-top: 5px;
}

.imagen-certificada {
    /* 1. Flotación */
    position: absolute; 
    
    /* 2. Centrado Horizontal Perfecto */
    width: 120px; /* Definimos el tamaño del sello */
    left: 50%; /* Mueve el punto de inicio al centro horizontal */
    transform: translateX(-50%); /* Lo mueve hacia atrás la mitad de su propio ancho (Centrado) */
    
    /* 3. Posicionamiento Vertical (Debajo del botón) */
    /* Ajusta el valor de 'top' si el sello queda muy arriba o muy abajo */
    top: 110%; /* Intenta con 55% y ajusta si es necesario (ej: 60%) */
    
    /* 4. Margen */
    margin-top: 10px; /* Pequeño margen entre el botón y el sello */
    z-index: 10; /* Asegura que esté por encima de otros elementos */
}

.imagen-certificada img {
    width: 100%; 
    height: auto;
    /* Redondeo Total */
    border-radius: 50%; 
    aspect-ratio: 1 / 1; /* Asegura que la imagen sea un círculo perfecto */
    object-fit: cover; /* Asegura que la imagen rellene el círculo */
    
    /* Sombreada / Sutil */
    opacity: 0.9; /* Hace la imagen un 60% opaca */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra muy suave */
}

/* -------------------------------------------------- */
/* ESTILOS DEL MENÚ DE DELIVERY FLOTANTE */
/* -------------------------------------------------- */
.delivery-menu-float {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;     
    display: flex; flex-direction: column; justify-content: center; align-items: center;         
    z-index: 100; padding: 20px; border-radius: 10px;    
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(5px);     
    visibility: hidden; opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.delivery-menu-float h4 {
    font-size: 1.2rem; color: var(--color-light); margin-bottom: 20px;
}
.delivery-menu-float.open {
    visibility: visible; opacity: 1;
}
.delivery-option {
    display: block; width: 80%; max-width: 200px; text-align: center;
    padding: 10px 15px; margin-top: 10px; border-radius: 5px;
    text-decoration: none; font-weight: 700; color: #fff;
    transition: transform 0.2s, filter 0.2s;
}
/* 🔑 COLOR DE UBER EATS CORREGIDO */
.delivery-option.uber { background-color: #06C167; border: 2px solid white; } 
.delivery-option.glovo { background-color: #fce200; color: #111; } 
.delivery-option.just-eat { background-color: #ff8000; }
.delivery-option:hover {
    transform: translateY(-2px); 
    filter: brightness(1.1);
}


/* -------------------------------------------------- */
/* SECCIÓN CONTACTO Y DELIVERY */
/* -------------------------------------------------- */
#contact { 
    padding: 80px 0; 
    background-color: var(--color-primary); 
    color: var(--color-light); 
    text-align: center; 
}
#contact h2 { color: var(--color-light); }
.delivery-links {
    display: flex; 
    justify-content: center; 
    gap: 40px; 
    margin-top: 40px;
}
.delivery-icon {
    display: flex; justify-content: center; align-items: center;
    width: 130px; height: 130px; border-radius: 50%; overflow: hidden; 
    background-color: var(--color-light); 
    border: 3px solid var(--color-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); 
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    text-decoration: none;
}
.delivery-icon:hover { 
    transform: scale(1.1); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4); 
    border-color: var(--color-accent); 
}
.delivery-logo {
    width: 100%; height: 100%; object-fit: contain; padding: 20%; 
    display: block; background-color: transparent; 
}
.delivery-icon:nth-child(1) { background-color: black; }
.delivery-icon:nth-child(2) { background-color: #fce200; }
.delivery-icon:nth-child(3) { background-color: #ff8000; }


/* -------------------------------------------------- */
/* 🔑 FOOTER (FONDO CLARO, DATOS Y REDES) */
/* -------------------------------------------------- */
footer {
    /* 🔑 CAMBIO DE COLOR: Fondo más suave */
    background-color: var(--color-footer-bg); 
    color: var(--color-footer-text);
    padding: 30px 0; 
    text-align: center; 
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1); 
}

/* 🔑 Espaciado de contacto */
.contact-info {
    margin-bottom: 20px;
    line-height: 1.8;
}

.contact-info p a {
    color: var(--color-footer-text); 
    font-weight: 600;
}
.contact-info p a:hover {
    color: var(--color-accent);
}

/* 🔑 Redes Sociales */
.social-links {
    margin: 15px 0 20px; 
}
.social-links a {
    display: inline-block;
    color: var(--color-primary); 
    font-size: 1.8rem; 
    margin: 0 12px;
    transition: transform 0.3s, color 0.3s;
    text-decoration: none;
}
.social-links a:hover {
    color: var(--color-accent); 
    transform: translateY(-3px); 
}

/* Texto legal y enlaces */
.copyright {
    margin-bottom: 10px;
}
.legal-links a {
    color: var(--color-footer-text); 
    text-decoration: none; 
    margin: 0 10px; 
    transition: color 0.3s;
}
.legal-links a:hover { 
    color: var(--color-accent); 
    text-decoration: underline; 
}


/* -------------------------------------------------- */
/* 🔑 PÁGINAS LEGALES (AVISO LEGAL, PRIVACIDAD) */
/* -------------------------------------------------- */
.content-page {
    /* Espacio para que el header sticky no tape el título, y altura mínima */
    padding-top: 100px; 
    padding-bottom: 80px;
    min-height: 80vh; 
    background-color: var(--color-light); 
}

/* Contenedor de texto con ancho limitado */
.legal-text {
    text-align: left; 
    max-width: 900px;
    margin: 0 auto;
}

/* Títulos H1 (Aviso Legal) */
.legal-text .section-title {
    margin-bottom: 30px;
    color: var(--color-primary);
}

/* Títulos H2 (secciones internas: 1. Datos, 2. Objeto, etc.) */
.legal-text h2 {
    font-family: 'Playfair Display', serif; /* Usar la fuente de títulos */
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 5px;
}

/* Párrafos, Listas y Espaciado */
.legal-text p, 
.legal-text ul, 
.legal-text ol {
    margin-bottom: 20px;
    color: #555; 
    line-height: 1.6; /* Aumentar el interlineado para mejor lectura */
}
.legal-text ul {
    list-style-type: disc; /* Puntos de lista */
    margin-left: 20px; /* Espacio para los puntos */
}

/* 💥 LA CLAVE: Estilo para los ENLACES (<a>) dentro del texto legal */
.legal-text a {
    color: var(--color-accent); /* Color Ocre/Tostado para destacar el enlace */
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}
.legal-text a:hover {
    color: var(--color-primary); /* Marrón primario al pasar el ratón */
}

/* -------------------------------------------------- */
/* BANNER DE CONSENTIMIENTO DE COOKIES */
/* -------------------------------------------------- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* 🔑 Color de fondo: un color neutro o el color primario de tu marca */
    background-color: var(--color-primary); 
    color: var(--color-light); 
    padding: 15px 0;
    z-index: 2000; /* Asegura que esté por encima de todo */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: flex; /* Por defecto visible, JavaScript lo ocultará si ya se aceptó */
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
}

.cookie-content p {
    margin: 0;
    flex-grow: 1; /* Permite que el texto ocupe la mayor parte del espacio */
}

.cookie-content a {
    color: var(--color-accent); /* Resaltar el enlace a la política de cookies */
    text-decoration: underline;
    font-weight: 600;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

/* 🔑 Botones para el Banner (Ajustamos los estilos del .btn general) */
.btn-primary-cookie {
    background-color: var(--color-accent);
    color: var(--color-light);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}
.btn-primary-cookie:hover {
    background-color: var(--color-primary);
}

.btn-secondary-cookie {
    background: none;
    color: var(--color-light);
    border: 1px solid var(--color-light);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}
.btn-secondary-cookie:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
/* ================================================= */
/* === ESTILOS ESPECÍFICOS DEL FORMULARIO (CONTACTO) === */
/* ================================================= */

.content-page {
    padding: 80px 0;
    min-height: 70vh; /* Asegura que la página sea lo suficientemente alta */
}

.form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background-color: var(--color-light); /* Blanco */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-form {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Estilo para el mensaje de estado (éxito/error) */
.message-status {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.message-success {
    background-color: #d4edda; /* Verde claro */
    color: #155724; /* Verde oscuro */
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da; /* Rojo claro */
    color: #721c24; /* Rojo oscuro */
    border: 1px solid #f5c6cb;
}

/* --- ESTILO PARA EL BOTÓN FLOTANTE DE WHATSAPP --- */
.whatsapp-float {
    position: fixed; /* Lo mantiene fijo al hacer scroll */
    width: 90px;
    height: 90px;
    bottom: 25px; /* Separación del fondo */
    right: 25px; /* Separación de la derecha */
    background-color: #25D366; /* Color verde de WhatsApp */
    color: #FFF;
    border-radius: 50px; /* Forma redonda */
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    display: flex; /* Para centrar el icono */
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none; /* ¡NUEVO! Elimina el subrayado */
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Ajuste para móviles: más pequeño y un poco más abajo */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 40px; /* AJUSTADO: Más abajo en móviles */
        right: 15px;
        font-size: 24px;
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}
/* -------------------------------------------------- */
/* MEDIA QUERIES (ADAPTACIÓN A MÓVILES) */
/* -------------------------------------------------- */
@media (max-width: 768px) {
    /* Menú */
    .hero-content h1 { font-size: 3rem; }
    .hero-content p { font-size: 1.2rem; }
    .section-title { font-size: 2rem; }
    .menu-grid-2-items {
        grid-template-columns: 1fr; 
        max-width: none;
    }
    
    /* Contacto en móvil */
    .delivery-links { gap: 20px; }
    .delivery-icon {
        width: 100px;
        height: 100px;
    }
	    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-actions {
        width: 100%;
        justify-content: space-around;
    }
    .btn-primary-cookie, .btn-secondary-cookie {
        padding: 10px 20px;
        flex-grow: 1;
    }
	.imagen-certificada { 
		position: static; 
		width: 110px; 
		margin: 120px auto 0; 
		transform: none; 
		top: auto; 
	}	
}

@media (max-width: 992px) {
    .nav-links-desktop, .nav-cta-desktop { 
        display: none; 
    }
    .menu-toggle { 
        display: flex; justify-content: center; align-items: center;     
        width: 40px; height: 40px; z-index: 1001; 
    }
    .mobile-menu {
        position: absolute; top: 74px; 
        right: 0; width: 100%; background: var(--color-light); 
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0; display: flex; flex-direction: column;
        text-align: center; visibility: hidden; opacity: 0;
        transition: opacity 0.3s, visibility 0.3s;
    }
	.mobile-menu a {
        display: block; padding: 12px 20px;
        color: var(--color-dark-text); /* Enlaces del menú móvil en gris oscuro */
        text-decoration: none;
        font-weight: 600;
    }
    .mobile-menu a.btn-primary {
        margin: 20px auto 0;
        color: var(--color-dark-text); /* Texto oscuro para el CTA en el menú móvil */
    }
    .mobile-menu.open {
        visibility: visible; opacity: 1;
    }

}