body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f9f9f9;
    overflow-x: hidden; 
}

main {
    text-align: center;
}

/* --- HERO SECTION --- */
.hero {
    position: relative; 
    color: white;
    height: 60vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../imagenes/restauranteWeb/IMG_3479.JPG');
    background-size: cover; 
    background-position: center;
    margin-top: 0; /* Asegura que pegue con el navbar si es necesario */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    animation: fadeInOverlay 1.5s ease-out forwards;
}

.hero-title {
    position: relative;
    font-size: 5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    animation: fadeUp 1.2s ease-out forwards;
    z-index: 2; /* Asegura que el texto esté sobre la sombra */
}

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

@keyframes fadeInOverlay {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.3); }
}

/* --- CONTENIDO E HISTORIA --- */
.content-section {
    background-color: #fff;
    padding: 60px 20px;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 60px; 
    max-width: 1100px;
    margin: 0 auto 100px auto; 
    background: #fdfdfd;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.history-row.reverse {
    flex-direction: row-reverse;
}

.history-image {
    flex-basis: 60%; 
}

.history-text {
    flex-basis: 40%; 
}

.history-image img {
    width: 100%;
    height: 300px; 
    object-fit: cover;
    border-radius: 8px;
}

.history-text {
    text-align: left;
}

.history-text h3 {
    font-size: 2.2rem;
    color: #fbbf24; /* El color amarillo */
    margin-top: 0;
}

.history-text p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
}

.content-section h2 {
    font-size: 2.8rem;
    color: #111827; 
    margin-top: 60px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* --- GALERÍA --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px; 
    margin: 0 auto; 
}

.gallery-item {
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden; 
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item figcaption {
    padding: 15px;
    font-size: 0.95rem;
    color: #333;
    text-align: left;
}

/* --- EFECTOS SCROLL --- */
.history-row.animated-section .history-image,
.history-row.animated-section .history-text {
    opacity: 0;
    transition: all 0.8s ease-out;
}
.history-row.animated-section .history-image { transform: translateX(-50px); }
.history-row.animated-section .history-text  { transform: translateX(50px); }

.history-row.animated-section.reverse .history-image { transform: translateX(50px); }
.history-row.animated-section.reverse .history-text  { transform: translateX(-50px); }


.gallery-item.animated-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.gallery-item.animated-section:nth-child(2) { transition-delay: 0.1s; }
.gallery-item.animated-section:nth-child(3) { transition-delay: 0.2s; }
.gallery-item.animated-section:nth-child(4) { transition-delay: 0.3s; }

.animated-section.is-visible,
.animated-section.is-visible .history-image,
.animated-section.is-visible .history-text {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* --- RESPONSIVE --- */

/* Estilos del botón hamburguesa */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .navbar-right {
        display: none;
    }

    .navbar-center {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #1a2635;
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    .navbar-center.active {
        display: flex;
    }

    .navbar-center a {
        padding: 12px 20px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: block;
    }

    .navbar-center a:hover {
        background-color: rgba(251, 191, 36, 0.1);
    }
    
    /* 1. Ajuste del título gigante */
    .hero-title { 
        font-size: 2.5rem; /* Más pequeño para que quepa en celular */
        padding: 0 10px;   /* Un poco de aire a los lados */
    }

    /* 2. Transformar las filas en columnas */
    .history-row,
    .history-row.reverse {
        flex-direction: column !important; /* Uno arriba del otro obligatoriamente */
        padding: 20px;
        width: 90%;       /* Para que no toque los bordes de la pantalla */
        margin: 0 auto 40px auto; /* Centrado y con separación abajo */
        gap: 20px;        /* Espacio entre la foto y el texto */
    }

    /* 3. Asegurar que las cajas ocupen todo el ancho */
    .history-image,
    .history-text {
        flex-basis: auto; 
        width: 100%;      /* Ocupar el 100% del contenedor */
        text-align: center; /* Opcional: centra el texto para que se vea más ordenado */
    }

    /* 4. ¡EL ARREGLO DE LA IMAGEN! */
    .history-image img {
        height: auto;     /* CRUCIAL: Quita los 300px fijos y deja que la altura sea natural */
        max-height: none; /* Asegura que no tenga límites extraños */
        width: 100%;      /* Ancho completo */
        margin-bottom: 15px;
    }

    /* 5. Ajustes de tipografía para lectura fácil */
    .history-text h3 { 
        font-size: 1.8rem; 
        margin-top: 0;
    }
    
    .history-text p { 
        font-size: 1rem; 
        text-align: justify; /* Opcional: hace que el bloque de texto se vea cuadradito */
    }

    .content-section h2 { 
        font-size: 2rem; 
        margin-top: 30px; 
}
}
