/* 
  LA BYA | GRANJA - Estilos Principales
  v1.0 - Diseño Rústico Elegante
*/



:root {
    --bg-color: #FFFFFF; /* Blanco */
    --accent-bg: #F8FAFC; /* Gris muy claro para fondos */
    --text-dark: #000000; /* Negro */
    --text-light: #1E293B; /* Azul oscuro/gris para texto secundario */
    --primary: #0F172A; /* Azul marino profundo (Elegante) */
    --secondary: #1E3A8A; /* Azul vibrante elegante */
    --white: #FFFFFF;
    --whatsapp: #25D366;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-color);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- ESTILOS HEADER --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 1px solid rgba(138, 90, 36, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 50%;
    background: var(--white);
    padding: 2px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav ul li a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-light);
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* --- ESTILOS HERO --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)), url('assets/terraza.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: var(--white);
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin-bottom: 30px;
    font-style: italic;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-btn {
    background-color: var(--primary);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(138, 90, 36, 0.3);
    border: 2px solid transparent;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-btn:hover {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-3px);
}

/* --- SECCIONES GENERALES --- */
section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 50px;
    font-style: italic;
}

/* --- SOBRE NOSOTROS --- */
.about {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-img {
    flex: 1;
    position: relative;
}

.about-img img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-content {
    flex: 1;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Corrección defensiva para centrado */
.gallery .section-title, 
.gallery .section-subtitle {
    text-align: center;
    width: 100%;
}

/* --- NUESTRO ESPACIO (INTERMEDIO) --- */
.space-section {
    padding: 80px 20px;
    background: var(--primary);
    color: var(--white);
    max-width: 100%;
}

.space-section .section-title {
    color: var(--white);
}

.space-section .section-title::after {
    color: var(--white);
}

.space-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.space-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.space-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.space-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.space-content {
    padding: 25px;
    text-align: center;
}

.space-content h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.space-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

/* --- SERVICIOS --- */
.services-bg {
    background-color: var(--accent-bg);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(138, 90, 36, 0.08);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- GALERÍA --- */
.gallery {
    padding: 80px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas (7 filas) */
    gap: 15px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    }
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Cuadradas para un look moderno */
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* --- CONTACTO --- */
.contact {
    display: flex;
    gap: 50px;
    background: var(--accent-bg);
    border-radius: 20px;
    padding: 50px !important;
    margin-bottom: 80px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.contact-icon {
    background: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.contact-map {
    flex: 1;
    min-height: 250px;
    display: grid;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- BOTÓN WHATSAPP --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* --- FOOTER --- */
footer {
    background: var(--text-dark);
    color: #9A897C;
    text-align: center;
    padding: 40px 20px;
}

footer p {
    font-size: 0.9rem;
}

/* --- ANIMACIONES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 20px;
    }
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        border-bottom: 1px solid rgba(138, 90, 36, 0.1);
    }
    nav.active ul {
        display: flex;
    }
    nav ul li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .about {
        flex-direction: column;
    }
    .contact {
        flex-direction: column;
        padding: 30px !important;
        background: transparent !important;
    }
    .contact-map {
        width: 100% !important;
    }
}

/* --- PÁGINA DE LA CARTA --- */
.menu-page {
    padding-top: 120px; /* Espacio para el header fijo */
    background-color: var(--accent-bg);
    min-height: 100vh;
}

.menu-header {
    text-align: center;
    margin-bottom: 50px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.menu-category {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-top: 4px solid var(--secondary); /* Acento azul */
}

.menu-category h3 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 10px;
}

.menu-item {
    padding: 12px 0;
    border-bottom: 1px dashed #E2E8F0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.item-name {
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
}

.item-price {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

.description {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 3px;
}

.allergens {
    display: block;
    font-size: 0.75rem;
    color: #DC2626; /* Rojo alérgenos */
    font-weight: 500;
}

.allergen-legend {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    font-size: 0.8rem;
    border: 1px solid #E2E8F0;
}

@media (min-width: 768px) {
    .allergen-legend {
        grid-template-columns: repeat(4, 1fr);
    }
}

.allergen-legend h4 {
    grid-column: 1 / -1;
    color: var(--primary);
    margin-bottom: 15px;
}

/* --- PÁGINA DE LA CARTA (REDISÉÑO PREMIUM) --- */
.menu-page {
    padding-top: 140px;
    background-color: #060E1C; /* Azul noche muy oscuro (Elegante) */
    background-image: radial-gradient(circle at 50% 50%, #0C1B36 0%, #060E1C 100%);
    min-height: 100vh;
    color: var(--white);
}

.menu-header h2 {
    color: var(--white);
    font-size: 3rem;
    letter-spacing: 2px;
}

.menu-header .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.menu-grid {
    display: flex;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.menu-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (max-width: 768px) {
    .menu-grid {
        flex-direction: column; /* Colapsar en móvil estándar o normal */
    }
}

.menu-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    height: fit-content; /* Crecer según contenido */
}

.menu-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.menu-category h3 {
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    text-align: center;
}

.menu-item {
    padding: 15px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.item-name {
    font-weight: 500;
    color: var(--white);
    font-size: 1.05rem;
}

.item-price {
    font-weight: 700;
    color: #38BDF8; /* Azul claro para destacar precio */
    font-size: 1.15rem;
}

.description {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-top: 2px;
}

.allergens {
    display: block;
    font-size: 0.75rem;
    color: #F87171; /* Rojo suave para alérgenos */
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.8;
}

.allergen-legend {
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
    .allergen-legend {
        grid-template-columns: repeat(4, 1fr);
    }
}

.allergen-legend h4 {
    grid-column: 1 / -1;
    color: var(--white);
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

/* --- ESTILOS ACTIVOS --- */
nav ul li a.active {
    color: var(--primary) !important;
    font-weight: 600;
}
nav ul li a.active::after {
    width: 100%;
}

