/* --- Base Styles --- */
:root {
    --background: #FFFFFF;
    --foreground: #000000;
    --primary: #000000;
    --primary-foreground: #FFFFFF;
    --secondary: #F5F5F4; /* stone-100 */
    --border: #E5E7EB; /* gray-200 */
    --ring: #000000;
    --radius: 0.5rem;

    /* Custom Colors */
    --nuevo-beige: #F5F0E1;
    --nuevo-caoba: #4A2A2A;
    --green-500: #22c55e;
    --green-600: #16a34a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Lato', sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: #000;
    transition: all 0.3s ease-in-out;
    box-shadow: none;
}

.site-header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem; /* 80px */
}

.logo img {
    height: 4rem; /* 64px */
    width: auto;
}

.main-nav {
    display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 2rem; /* space-x-8 */
    }
}

.nav-link {
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #d6d3d1; /* stone-300 */
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.25rem;
    height: 2px;
    background-color: #facc15; /* amber-400 */
}

.mobile-menu-button {
    display: block;
    padding: 0.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

@media (min-width: 768px) {
    .mobile-menu-button {
        display: none;
    }
}

.mobile-menu-button .hidden {
    display: none;
}

/* Mobile Menu Styles */
.main-nav.mobile-active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
    max-width: 280px;
    background-color: var(--nuevo-caoba);
    padding: 7rem 2rem 2rem;
    z-index: 999;
    box-shadow: -10px 0 25px rgba(0,0,0,0.2);
}

.main-nav.mobile-active .nav-link {
    text-align: left;
    font-size: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav.mobile-active .nav-link.active {
    color: #facc15; /* amber-400 */
}

.main-nav.mobile-active .nav-link.active::after {
    display: none;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 48rem; /* max-w-3xl */
}

.hero-content h1 {
    color: white;
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem; /* text-lg */
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 42rem; /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
    .hero-content h1 {
        font-size: 3.75rem; /* md:text-6xl */
    }
    .hero-content p {
        font-size: 1.25rem; /* md:text-xl */
    }
}

@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 4.5rem; /* lg:text-7xl */
    }
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: white;
    color: black;
}

.btn-primary:hover {
    background-color: #f5f5f4; /* stone-100 */
    transform: scale(1.05);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-outline:hover {
    background-color: white;
    color: black;
    transform: scale(1.05);
}

/* --- General Section Styles --- */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-header p {
    font-size: 1.125rem; /* text-lg */
    color: #4b5563; /* gray-600 */
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .section-header h2 {
        font-size: 3rem; /* lg:text-5xl */
    }
    .section-header p {
        font-size: 1.25rem; /* lg:text-xl */
    }
}

/* --- History Section --- */
.history-section {
    background-color: #fafaf9; /* stone-50 */
}

.history-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

/* Set mobile order: content first */
.history-content {
    order: 1;
}
.history-image {
    order: 2;
}

@media (min-width: 1024px) {
    .history-container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    /* Reset order for desktop */
    .history-content,
    .history-image {
        order: initial;
    }
}

.history-image {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.history-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.history-image:hover img {
    transform: scale(1.05);
}

.history-content h2 {
    font-size: 2.25rem; /* text-3xl */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.history-content p {
    font-size: 1.125rem; /* text-lg */
    color: #374151; /* gray-700 */
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.history-content .font-medium {
    font-weight: 500;
}

@media (min-width: 768px) {
    .history-content h2 {
        font-size: 2.25rem; /* md:text-4xl */
    }
}

@media (min-width: 1024px) {
    .history-content h2 {
        font-size: 3rem; /* lg:text-5xl */
    }
}

.history-since {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
}

.history-since .line {
    width: 4rem;
    height: 2px;
    background: linear-gradient(to right, #000, #44403c); /* stone-600 */
    border-radius: 9999px;
}

.history-since span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #57534e; /* stone-600 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Menu Section --- */
.menu-section {
    background-color: var(--background);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.menu-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4 / 5;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-5px);
}

.menu-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out;
}

.menu-item:hover img {
    transform: scale(1.1);
}

.menu-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3), rgba(0,0,0,0.2));
    transition: background 0.5s ease;
}

.menu-item:hover .menu-item-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), rgba(0,0,0,0.3));
}

.menu-item h3 {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    text-align: center;
    padding: 1.5rem;
    line-height: 1.3;
    letter-spacing: 0.025em;
}

@media (min-width: 1024px) {
    .menu-item h3 {
        font-size: 1.5rem; /* lg:text-2xl */
    }
}

.menu-footer {
    text-align: center;
    margin-top: 3rem;
}

.menu-footer p {
    font-size: 0.875rem;
    color: #6b7280; /* gray-500 */
    font-style: italic;
}

/* --- Barrio Section --- */
.barrio-section {
    background-color: var(--nuevo-caoba);
    color: white;
}

.barrio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .barrio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.barrio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4 / 5;
}

.barrio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.barrio-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3), rgba(0,0,0,0.2));
}

.barrio-item h3 {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    text-align: center;
    padding: 1.5rem;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 1024px) {
    .barrio-item h3 {
        font-size: 1.5rem; /* lg:text-2xl */
    }
}

.barrio-footer {
    text-align: center;
    font-size: 1.125rem; /* text-lg */
    max-width: 42rem;
    margin: 0 auto;
    color: var(--nuevo-beige);
}

/* --- Contact Section --- */
.contact-section {
    background-color: #fafaf9; /* stone-50 */
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.contact-info h2 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .contact-info h2 {
        text-align: left;
        font-size: 3rem; /* lg:text-5xl */
    }
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item-icon svg {
    width: 28px;
    height: 28px;
    color: var(--nuevo-caoba);
    margin-top: 4px;
}

.info-item h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: #4b5563; /* gray-600 */
}

.contact-map {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    height: 400px;
}

@media (min-width: 1024px) {
    .contact-map {
        height: 100%;
    }
}

/* --- Footer --- */
.site-footer-bottom {
    background-color: black;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.site-footer-bottom p {
    color: #a8a29e; /* stone-400 */
    font-size: 0.875rem;
}

/* --- WhatsApp Button --- */
.whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    background-color: var(--green-500);
    color: white;
    padding: 1rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    background-color: var(--green-600);
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
}
