/* ==========================================
   1. Variables y Reseteo
========================================== */
:root {
    --color-primario: #1a1a1a;    /* Oscuro casi negro */
    --color-secundario: #d4af37;  /* Dorado elegante */
    --color-fondo: #fafafa;
    --color-texto: #4a4a4a;
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-textos: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-textos);
    color: var(--color-texto);
    background-color: var(--color-fondo);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   2. Navbar (Efecto Cristal) y Logo
========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s ease;
    background: rgba(26, 26, 26, 0.1);
    backdrop-filter: blur(10px); 
}

.navbar.scrolled {
    background: rgba(26, 26, 26, 0.95);
    padding: 1rem 4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar .logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar .logo .logo-text {
    font-family: var(--fuente-titulos);
    font-size: 1.6rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
}

.navbar .logo a:hover img {
    transform: scale(1.08);
}

/* ==========================================
   3. Enlaces de Navegación (PC)
========================================== */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-secundario);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==========================================
   4. Hero Section y Botones
========================================== */
.hero {
    height: 100vh;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7)), url('fondo.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-family: var(--fuente-titulos);
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 300;
}

.btn-reservar {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--color-secundario);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn-reservar:hover {
    background-color: var(--color-secundario);
    color: var(--color-primario);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==========================================
   5. Estructura de Secciones y Animaciones
========================================== */
.seccion { padding: 120px 0; }
.bg-claro { background-color: var(--color-fondo); }
.bg-oscuro { background-color: #f0f0f0; }

.section-title {
    font-family: var(--fuente-titulos);
    font-size: 3rem;
    color: var(--color-primario);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 4rem;
    color: #666;
    font-size: 1.1rem;
}

.reveal {
    opacity: 0; 
    transform: translateY(50px); 
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   6. Carta (Acordeones)
========================================== */
.menu-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    color: var(--color-primario);
    font-family: var(--fuente-titulos);
    font-size: 1.8rem;
    text-align: left;
    padding: 20px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.accordion-header:hover, .accordion-header.active { color: var(--color-secundario); }

.accordion-header .icon {
    font-size: 1.8rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.accordion-header.active .icon { transform: rotate(45deg); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content-inner { padding-bottom: 20px; }

.menu-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
}

.menu-row:last-child { border-bottom: none; }

.dish-name {
    color: var(--color-texto);
    font-weight: 500;
    font-size: 1.1rem;
    flex: 1;
    padding-right: 15px;
}

.dish-price {
    color: var(--color-secundario);
    font-weight: 600;
    white-space: nowrap;
    font-size: 1.15rem;
}

.menu-disclaimer {
    color: #888;
    font-size: 0.85rem;
    margin-top: 30px;
    text-align: center;
}

/* ==========================================
   7. Carrusel de Sugerencias
========================================== */
.carousel-container {
    position: relative;
    max-width: 650px; 
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    touch-action: pan-y; /* Permite hacer scroll vertical, pero bloquea las acciones táctiles horizontales nativas del navegador */
}

.carousel-slide {
    min-width: 100%;
    flex: 0 0 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(26,26,26,0.95));
    color: white;
    padding: 40px 30px 25px;
    text-align: center;
}

.slide-caption h3 {
    font-family: var(--fuente-titulos);
    font-size: 2rem;
    color: var(--color-secundario);
    margin-bottom: 8px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.4);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: var(--color-secundario);
    color: var(--color-primario);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

/* ==========================================
   8. Sección de Reservas
========================================== */
.reservation-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.reservation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primario);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--fuente-textos);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-secundario);
}

.btn-submit {
    margin-top: 10px;
    padding: 15px;
    background-color: var(--color-primario);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--color-secundario);
    transform: translateY(-2px);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ==========================================
   9. Contacto y Footer
========================================== */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.contacto-info h3 {
    font-family: var(--fuente-titulos);
    font-size: 2rem;
    color: var(--color-secundario);
    margin-bottom: 20px;
}

.contacto-info p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--color-texto);
}

.redes-sociales {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.redes-sociales a {
    color: var(--color-primario);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.redes-sociales a:hover { color: var(--color-secundario); }

/* Estilos de la imagen del mapa */
.contacto-mapa-imagen {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contacto-mapa-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.contacto-mapa-imagen .mapa-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contacto-mapa-imagen .mapa-overlay span {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 5px;
}

.contacto-mapa-imagen:hover img { transform: scale(1.05); }
.contacto-mapa-imagen:hover .mapa-overlay { opacity: 1; }

.footer {
    background-color: var(--color-primario);
    color: white;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
}

/* ==========================================
   10. Menú Hamburguesa (PC oculto)
========================================== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-secundario); 
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* ==========================================
   11. RESPONSIVE ABSOLUTO (Móviles y Tablets)
========================================== */
@media (max-width: 768px) {
    
    /* Navbar y Logo */
    .navbar, .navbar.scrolled {
        padding: 1rem 15px; 
        justify-content: flex-start; 
    }
    .navbar .logo .logo-text { font-size: 1.2rem; }

    /* Menú Hamburguesa y Enlaces */
    .hamburger {
        display: flex;
        position: absolute;
        right: 15px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        max-height: 350px;
        padding: 20px 0;
    }

    .nav-links li { margin: 15px 0; }

    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Textos y Títulos Generales */
    .hero h1 {
        font-size: 2.8rem;
        padding: 0 10px;
    }
    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }
    .section-title { font-size: 2.2rem; }
    .seccion { padding: 80px 0; } 

    /* Carrusel */
    .carousel-slide img { height: 350px; }
    .slide-caption h3 { font-size: 1.5rem; }

    /* Ocultar los botones del carrusel en dispositivos móviles */
    .carousel-btn {
        display: none;
    }

    /* Formulario de Reservas (Arreglo del desbordamiento) */
    .form-row {
        grid-template-columns: 1fr; 
        gap: 15px;
    }
    .reservation-container {
        padding: 25px 20px; 
        margin: 0 15px; 
    }

    /* Contacto */
    .contacto-grid {
        grid-template-columns: 1fr;
        padding: 20px; 
        gap: 20px;
    }
    
    .contacto-info h3 { 
        font-size: 1.5rem; 
    }
    
    .contacto-info p {
        word-break: break-word; 
        font-size: 0.95rem;
    }

    .redes-sociales {
        flex-wrap: wrap; 
        gap: 10px;
    }
    
    .contacto-mapa-imagen { height: 250px; }
}
