/* ==========================================================================
   Premium Yucatecan Style - El Sazón Yucateco
   ========================================================================== */

   :root {
    /* Colors */
    --clr-bg: #FAF6ED; /* Pergamino/Ivory claro */
    --clr-bg-alt: #FFF1E1;
    --clr-primary: #D65A18; /* Naranja Achiote */
    --clr-primary-dark: #b3460e;
    --clr-secondary: #2C1A12; /* Marrón muy oscuro/casi negro */
    --clr-text: #3D291F; /* Marrón texto principal */
    --clr-text-light: #7A5C4F;
    --clr-accent: #E89E3A; /* Detalles dorados/amarillos */
    --clr-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Effects */
    --shadow-soft: 0 10px 30px rgba(44, 26, 18, 0.08);
    --shadow-hover: 0 15px 40px rgba(214, 90, 24, 0.15);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-pill: 50px;
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--font-text);
    background-color: var(--clr-bg);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

/* Texture overlay for paper feel */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--clr-secondary);
    font-weight: 900;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   Background Illustrations (Watermarks)
   ========================================================================== */
.bg-char {
    position: absolute;
    z-index: 3; /* Asegura que floten sobre las secciones blancas */
    opacity: 0.35; /* Opacidad ideal para que se vean sin estorbar la lectura */
    mix-blend-mode: multiply;
    pointer-events: none;
    filter: sepia(0.3) contrast(1.1);
}

.char-woman {
    top: 10%;
    left: -20px;
    width: clamp(200px, 28vw, 450px);
    transform: rotate(-5deg);
}

.char-man {
    top: 5%;
    right: 10px;
    width: clamp(200px, 28vw, 450px);
    transform: rotate(3deg);
}

.char-children {
    top: -150px; /* Sube por encima del footer */
    right: clamp(10px, 5vw, 80px);
    left: auto;
    width: clamp(180px, 22vw, 380px);
    transform: rotate(-2deg);
}

/* ==========================================================================
   Floral Borders
   ========================================================================== */
.floral-border {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: -2;
    background-image: url('assets/images/floral_border_yucatan_1781413818925.png');
    background-repeat: repeat-y;
    background-size: contain;
    opacity: 0.4;
    pointer-events: none;
}

.floral-border.left {
    left: 0;
}

.floral-border.right {
    right: 0;
    transform: scaleX(-1);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    border: 2px solid var(--clr-primary);
    box-shadow: 0 4px 15px rgba(214, 90, 24, 0.3);
}

.btn-primary:hover {
    background-color: var(--clr-primary-dark);
    border-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214, 90, 24, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
}

.btn-outline:hover {
    background-color: var(--clr-primary);
    color: var(--clr-white);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(250, 246, 237, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: center; /* Centrar todo el contenido */
    align-items: center;
    height: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links.centered {
    width: 100%;
    justify-content: center;
}

.nav-links a:not(.btn-nav) {
    font-weight: 600;
    color: var(--clr-secondary);
    font-size: 0.95rem;
}

.nav-links a:not(.btn-nav):hover {
    color: var(--clr-primary);
}

.btn-nav {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--clr-secondary);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative; /* Para anclar al watermark */
    padding-top: calc(var(--nav-height) + 120px);
    padding-bottom: 120px;
    /* Eliminado min-height: 90vh para evitar bugs en "Sitio de Computadora" en móviles */
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content .subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--clr-accent);
    margin-bottom: 20px;
}

.hero-content h1, .main-hero-title {
    font-size: 5.5rem; /* Aumentado para mayor impacto */
    line-height: 1.05;
    margin-bottom: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-content h1 span, .main-hero-title span {
    color: var(--clr-primary);
    font-style: italic;
    font-size: 6rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--clr-text-light);
    margin-bottom: 40px;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    padding: 20px;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-color: var(--clr-bg-alt);
    border-radius: 50%;
    z-index: -1;
    box-shadow: var(--shadow-soft);
}

.hero-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.divider {
    color: var(--clr-primary);
    letter-spacing: 15px;
    font-size: 1.2rem;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery {
    padding: 100px 0;
    background-color: var(--clr-white);
    border-radius: 60px;
    margin: 0 40px;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-card {
    background: var(--clr-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(214, 90, 24, 0.1);
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.img-box {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.gallery-card:hover .img-box img {
    transform: scale(1.1) rotate(2deg);
}

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

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

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

/* ==========================================================================
   Menu Section (Dynamic Tabs)
   ========================================================================== */
.menu-section {
    position: relative; /* Para anclar al watermark */
    padding: 120px 0;
}

.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid rgba(44, 26, 18, 0.1);
    color: var(--clr-text-light);
    padding: 12px 30px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

.tab-btn.active {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
    box-shadow: 0 4px 15px rgba(214, 90, 24, 0.3);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

.tab-pane.active {
    display: block;
}

.tab-desc {
    text-align: center;
    color: var(--clr-text-light);
    font-style: italic;
    margin-bottom: 40px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.menu-item {
    background: var(--clr-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    position: relative;
    border-bottom: 4px solid var(--clr-bg-alt);
    transition: all 0.3s ease;
}

.menu-item:hover {
    border-bottom-color: var(--clr-primary);
    transform: translateY(-5px);
}

.special-item {
    background: var(--clr-bg-alt);
    border: 1px solid rgba(214, 90, 24, 0.2);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.item-header h3 {
    font-size: 1.4rem;
    line-height: 1.2;
}

.item-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-sm {
    font-size: 0.9rem;
    color: var(--clr-text-light);
    font-weight: 600;
}

.price-lg {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--clr-primary);
    font-weight: 900;
}

.item-flavors {
    color: var(--clr-text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-secondary);
    color: var(--clr-bg);
    padding: 80px 0 20px;
    position: relative;
    z-index: 5;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    color: var(--clr-white);
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--clr-primary);
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    max-width: 300px;
}

.footer h3 {
    color: var(--clr-accent);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer address, .footer ul {
    color: rgba(255,255,255,0.8);
    font-style: normal;
    list-style: none;
}

.footer-phone {
    display: inline-block;
    margin-top: 15px;
    color: var(--clr-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    padding-bottom: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .floral-border {
        width: 80px;
    }
    
    .hero-container {
        gap: 30px;
    }
    
    .hero-content h1, .main-hero-title {
        font-size: 3.5rem;
    }

    .hero-content h1 span, .main-hero-title span {
        font-size: 4rem;
    }

    .char-woman, .char-man, .char-children {
        width: 300px;
    }
}

@media (max-width: 860px) {
    .floral-border {
        display: none;
    }
    
    .gallery {
        margin: 0 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 10px 0;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .nav-links a:not(.btn-nav) {
        font-size: 0.85rem;
    }

    .btn-nav {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .mobile-toggle {
        display: none; /* Ya no se usa */
    }
    
    .hero {
        padding-top: calc(var(--nav-height) + 40px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin: 0 auto 30px;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .hero-image-wrapper {
        margin-top: 40px;
    }

    /* Reducir watermarks en mobile */
    .bg-char {
        opacity: 0.15; /* Aún más tenue en móvil para lectura clara */
    }
    .char-woman { top: 10%; left: -20px; width: 200px; }
    .char-man { top: 5%; right: -20px; width: 250px; }
    .char-children { top: -80px; right: 0px; width: 200px; }

    /* Ajustar galería y menús para que no se desborden */
    .gallery {
        margin: 0 15px;
        padding: 50px 0;
        border-radius: 30px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p {
        margin: 0 auto 20px;
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1, .main-hero-title {
        font-size: 2.5rem;
    }

    .hero-content h1 span, .main-hero-title span {
        font-size: 2.8rem;
    }

    .gallery {
        margin: 0 10px;
    }

    .menu-item {
        padding: 20px;
    }
}
