/* ============================================================
   EL RANCHITO — RESTAURANTE & GRILL · TEOTIHUACÁN
   Design Tokens basados en el logo oficial:
     Crema cálido: #FDECC8  (fondo del logo)
     Marrón oscuro: #3D1C02  (tipografía del logo)
     Marrón medio: #7A3B10
     Dorado: #C8840A
     Verde oliva: #5A6E3A (acento natural)
   ============================================================ */

/* ── RESET Y BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Paleta armónica extraída del logo */
    --cream:       #FDECC8;   /* fondo cálido */
    --cream-dark:  #F5D99A;   /* crema más saturado */
    --brown-deep:  #3D1C02;   /* marrón del logo */
    --brown-mid:   #7A3B10;   /* marrón intermedio */
    --brown-light: #B8722A;   /* terracota cálido */
    --gold:        #C8840A;   /* dorado/ámbar */
    --olive:       #5A6E3A;   /* verde oliva natural */
    --white:       #FFFFFF;
    --off-white:   #FDFAF4;

    /* Texto */
    --text-dark:   #2A1000;
    --text-body:   #4A2E0A;
    --text-muted:  #8B6744;

    /* Sombras */
    --shadow-sm:   0 2px 8px rgba(61,28,2,.08);
    --shadow-md:   0 6px 24px rgba(61,28,2,.12);
    --shadow-lg:   0 16px 48px rgba(61,28,2,.18);

    /* Tipografías */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-script:  'Dancing Script', cursive;
    --font-body:    'Poppins', system-ui, sans-serif;

    /* Espaciado y geometría */
    --radius:      10px;
    --radius-lg:   20px;
    --container:   1240px;
    --nav-h:       72px;
    --transition:  0.3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; font-size: 100%; }

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--off-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── ACCESIBILIDAD ────────────────────────────────────────── */
.skip-link {
    position: absolute; top: -100%; left: 0; z-index: 9999;
    padding: .75rem 1.5rem;
    background: var(--brown-deep); color: var(--cream);
    font-weight: 600; border-radius: 0 0 var(--radius) 0;
    transition: top .2s;
}
.skip-link:focus { top: 0; }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── CONTENEDOR ───────────────────────────────────────────── */
.container {
    width: min(90%, var(--container));
    margin-inline: auto;
}

/* ── TIPOGRAFÍA GLOBAL ────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; color: var(--brown-deep); }

h2 { font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.1rem, 1.5vw + .5rem, 1.4rem); }

em { font-family: var(--font-script); font-style: normal; color: var(--brown-light); }

.section-eyebrow {
    display: block;
    font-size: .8rem; font-weight: 600; letter-spacing: .18em;
    text-transform: uppercase; color: var(--gold);
    margin-bottom: .5rem;
}
.section-desc { color: var(--text-muted); max-width: 55ch; margin-inline: auto; margin-bottom: 2.5rem; }
.text-center { text-align: center; }

/* ── BOTONES ──────────────────────────────────────────────── */
.btn-primary, .btn-outline, .btn-whatsapp, .btn-nav, .map-cta {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: 50px; font-family: var(--font-body);
    font-size: 1rem; font-weight: 600; cursor: pointer;
    border: 2px solid transparent; text-decoration: none;
    transition: var(--transition); min-height: 44px;
}
.btn-primary {
    background: var(--brown-deep); color: var(--cream);
    border-color: var(--brown-deep);
}
.btn-primary:hover { background: var(--brown-mid); border-color: var(--brown-mid); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
    background: transparent; color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: var(--white); }

.btn-whatsapp {
    background: #25D366; color: var(--white); border-color: #25D366;
    margin-top: 1.5rem;
}
.btn-whatsapp:hover { background: #20b858; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37,211,102,.3); }

.btn-nav {
    background: var(--gold); color: var(--white); border-color: var(--gold);
    padding: .55rem 1.25rem; font-size: .9rem;
}
.btn-nav:hover { background: var(--brown-light); border-color: var(--brown-light); }

.btn-full { width: 100%; justify-content: center; font-size: 1.05rem; padding: .9rem 2rem; }

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--nav-h); z-index: 900;
    background: rgba(253,236,200,.97);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(61,28,2,.08);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
    height: 100%; display: flex; align-items: center;
    justify-content: space-between; gap: 1.5rem;
}

/* Logo SVG inline */
.logo {
    display: flex; align-items: center; gap: 0;
    text-decoration: none; color: var(--brown-deep);
    line-height: 1;
}
.logo-el {
    font-family: var(--font-heading); font-weight: 800;
    font-size: 1.7rem; letter-spacing: -.02em;
}
.logo-wheel {
    width: 32px; height: 32px; color: var(--brown-mid);
    margin-inline: .15rem;
}
.logo-ranchito {
    font-family: var(--font-heading); font-weight: 700;
    font-size: 1.5rem; letter-spacing: -.01em;
}
.logo-light { color: var(--cream); }
.logo-light .logo-wheel { color: var(--cream-dark); }

.nav-links {
    display: flex; align-items: center; gap: 1.5rem;
    list-style: none;
}
.nav-links a:not(.btn-nav) {
    font-size: .92rem; font-weight: 500; color: var(--text-body);
    text-decoration: none; padding: .25rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.nav-links a:not(.btn-nav):hover { color: var(--brown-deep); border-color: var(--gold); }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; justify-content: center;
    gap: 5px; background: none; border: none; cursor: pointer;
    padding: .5rem; min-width: 44px; min-height: 44px;
    color: var(--brown-deep);
}
.hamburger span {
    display: block; width: 24px; height: 2px;
    background: currentColor; border-radius: 2px;
    transition: var(--transition);
}

/* Mobile nav */
.mobile-nav {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--cream); z-index: 800; padding: 1rem 0;
    box-shadow: var(--shadow-md);
}
.mobile-nav ul { list-style: none; }
.mobile-nav a {
    display: block; padding: .85rem 1.5rem;
    font-size: 1rem; font-weight: 500; color: var(--text-body);
    text-decoration: none; border-bottom: 1px solid rgba(61,28,2,.07);
    transition: var(--transition);
}
.mobile-nav a:hover { background: var(--cream-dark); color: var(--brown-deep); }
.mobile-nav .btn-nav { margin: .75rem 1.5rem; width: calc(100% - 3rem); justify-content: center; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
    position: relative; min-height: 100svh;
    display: flex; align-items: center;
    padding-top: var(--nav-h);
    color: var(--white); text-align: center;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        url('https://images.unsplash.com/photo-1552332386-f8dd00dc2f85?w=1600&auto=format&fit=crop&q=80')
        center / cover no-repeat;
}
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(
        175deg,
        rgba(30,8,0,.7) 0%,
        rgba(61,28,2,.65) 60%,
        rgba(10,5,0,.8) 100%
    );
}
.hero-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    gap: 1rem; padding-block: 3rem;
}
.hero-eyebrow {
    font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
    color: var(--cream-dark); font-weight: 500;
}

/* Hero logo mark (h1) */
h1 {
    display: flex; align-items: center; gap: .2rem;
    font-size: clamp(2.8rem, 8vw + 1rem, 6rem);
    font-weight: 800; color: var(--cream);
    line-height: 1; text-shadow: 0 2px 16px rgba(0,0,0,.4);
}
.h1-el, .h1-ranchito { color: var(--cream); }
.h1-wheel { width: clamp(2.2rem, 6vw, 4.5rem); height: clamp(2.2rem, 6vw, 4.5rem); color: var(--cream-dark); }

.hero-sub {
    font-size: clamp(.85rem, 1.5vw + .5rem, 1.15rem);
    color: rgba(253,236,200,.85); letter-spacing: .12em;
    text-transform: uppercase; font-weight: 300;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }
.hero-trust {
    display: flex; align-items: center; gap: 1rem;
    flex-wrap: wrap; justify-content: center;
    margin-top: 1rem;
    font-size: .82rem; color: rgba(253,236,200,.75);
    letter-spacing: .05em;
}
.trust-item { display: flex; align-items: center; gap: .4rem; }
.trust-item i { color: var(--gold); }
.trust-sep { opacity: .4; }

.hero-scroll {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%); z-index: 2;
    color: rgba(253,236,200,.7); font-size: 1.3rem;
    text-decoration: none; animation: bounce 2s infinite;
    transition: var(--transition);
}
.hero-scroll:hover { color: var(--cream); }

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── SECCIÓN GENÉRICA ─────────────────────────────────────── */
.section { padding-block: clamp(3.5rem, 6vw, 6rem); }

/* ── NOSOTROS ─────────────────────────────────────────────── */
.about { background: var(--off-white); }

.about-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.about-img-wrap { position: relative; }
.about-img-wrap img {
    width: 100%; border-radius: var(--radius-lg);
    object-fit: cover; aspect-ratio: 4/3;
    box-shadow: var(--shadow-lg);
}
.about-badge {
    position: absolute; bottom: -1.5rem; right: -1.5rem;
    background: var(--brown-deep); color: var(--cream);
    border-radius: 50%; width: 100px; height: 100px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; box-shadow: var(--shadow-md);
}
.badge-number { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.badge-text { font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; line-height: 1.3; }

.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }

.about-features {
    list-style: none; margin-top: 1.25rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .5rem;
}
.about-features li {
    display: flex; align-items: center; gap: .5rem;
    font-size: .9rem; font-weight: 500; color: var(--text-dark);
}
.about-features i { color: var(--olive); }

/* ── MENÚ DIGITAL ─────────────────────────────────────────── */
.menu-section { background: var(--cream); }
.menu-section h2 { margin-bottom: .5rem; }

/* Tab list */
.menu-tabs {
    display: flex; flex-wrap: wrap; gap: .6rem;
    justify-content: center; margin-bottom: 2.5rem;
}
.menu-tab {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .6rem 1.4rem; border-radius: 50px;
    background: var(--off-white); border: 2px solid var(--cream-dark);
    color: var(--text-muted); font-family: var(--font-body);
    font-size: .9rem; font-weight: 600; cursor: pointer;
    transition: var(--transition); min-height: 44px;
}
.menu-tab:hover { border-color: var(--brown-light); color: var(--brown-deep); }
.menu-tab.active, .menu-tab[aria-selected="true"] {
    background: var(--brown-deep); border-color: var(--brown-deep);
    color: var(--cream); box-shadow: var(--shadow-sm);
}
.menu-tab i { font-size: .9em; }

/* Panels */
.menu-panel { animation: fadeUp .35s ease; }
.menu-panel[hidden] { display: none; }

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

.menu-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 2.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.menu-category h3 {
    font-size: 1.4rem;
    color: var(--brown-deep);
    border-bottom: 2px solid var(--cream-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.menu-list-item {
    margin-bottom: 1.25rem;
}
.menu-list-item:last-child {
    margin-bottom: 0;
}
.menu-list-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.25rem;
}
.menu-list-top h4 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    position: relative;
}
/* Dotted line leader */
.menu-list-top::after {
    content: "";
    flex-grow: 1;
    border-bottom: 2px dotted rgba(122, 59, 16, 0.2);
    margin: 0 0.5rem;
}
.menu-list-top .price {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    order: 1;
}
.menu-list-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    max-width: 85%;
}

/* ── GALERÍA ──────────────────────────────────────────────── */
.gallery-section { background: var(--off-white); }
.gallery-section h2 { margin-bottom: 1.5rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 260px 260px;
    gap: 12px;
}
.gallery-item { border-radius: var(--radius); overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-wide { grid-column: span 2; grid-row: span 2; }

/* ── RESERVACIONES ────────────────────────────────────────── */
.res-section { background: var(--cream); }

.res-grid {
    display: grid; grid-template-columns: 1fr 1.1fr;
    gap: clamp(2rem, 5vw, 4rem); align-items: start;
}

.res-info h2 { margin-bottom: 1rem; }
.res-info p { color: var(--text-muted); }

.res-benefits {
    list-style: none; margin-top: 1.25rem;
    display: flex; flex-direction: column; gap: .7rem;
}
.res-benefits li { display: flex; align-items: center; gap: .6rem; font-size: .93rem; color: var(--text-dark); }
.res-benefits i { color: var(--olive); font-size: 1.1em; }

/* Form */
.res-form-wrap {
    background: var(--white); border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-md);
}
.res-form { display: flex; flex-direction: column; gap: 1.1rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

label {
    font-size: .85rem; font-weight: 600; color: var(--brown-deep);
}

input, textarea {
    padding: .7rem 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius);
    font-family: var(--font-body); font-size: .95rem;
    color: var(--text-dark); background: var(--off-white);
    transition: var(--transition); width: 100%;
    min-height: 44px;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,132,10,.12);
    background: var(--white);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #c0392b; }

textarea { min-height: 90px; resize: vertical; }

.field-error { font-size: .8rem; color: #c0392b; margin-top: .2rem; }

.form-status {
    padding: .85rem 1rem; border-radius: var(--radius);
    font-size: .9rem; font-weight: 500;
    text-align: center;
}
.form-status.success { background: #eafbea; color: #1a7a1a; border: 1px solid #a8daa8; }
.form-status.error   { background: #fff0ee; color: #c0392b; border: 1px solid #f5b0a8; }

/* ── UBICACIÓN ────────────────────────────────────────────── */
.location-section { background: var(--brown-deep); color: var(--cream); }
.location-section .section-eyebrow { color: var(--cream-dark); }
.location-section h2 { color: var(--cream); margin-bottom: 2rem; }

.location-grid {
    display: grid; grid-template-columns: 1.3fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}

/* Leaflet map */
#map {
    height: 380px; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-lg);
    z-index: 1;
}
.map-cta {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-top: .75rem;
    background: var(--gold); color: var(--white);
    border-color: var(--gold); padding: .6rem 1.25rem;
    border-radius: 50px; font-size: .85rem; font-weight: 600;
    text-decoration: none; transition: var(--transition); min-height: 44px;
}
.map-cta:hover { background: var(--brown-light); border-color: var(--brown-light); }

.hours-wrap h3 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--cream); margin-block: 1.5rem .75rem; }

.contact-address { font-style: normal; }
.contact-row {
    display: flex; align-items: flex-start; gap: .75rem;
    margin-bottom: .9rem; font-size: .9rem; color: rgba(253,236,200,.85);
}
.contact-row i { color: var(--gold); margin-top: .1rem; flex-shrink: 0; }
.contact-row a { color: rgba(253,236,200,.85); text-decoration: none; transition: var(--transition); }
.contact-row a:hover { color: var(--cream); text-decoration: underline; }

.hours-list { list-style: none; }
.hour-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem 0; border-bottom: 1px solid rgba(253,236,200,.1);
    font-size: .9rem; color: rgba(253,236,200,.8);
}
.hour-row:last-child { border-bottom: none; }
.hour-row.highlight { color: var(--cream); font-weight: 600; }
.hour-row dt { font-weight: 500; }
.hour-row dd { color: var(--cream-dark); }

.location-note {
    display: flex; align-items: flex-start; gap: .6rem;
    margin-top: 1.5rem; padding: .9rem 1rem;
    background: rgba(253,236,200,.06); border-radius: var(--radius);
    font-size: .82rem; color: rgba(253,236,200,.65);
}
.location-note i { color: var(--gold); margin-top: .1rem; flex-shrink: 0; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
    background: #1A0A00;
    color: rgba(253,236,200,.6);
    padding-top: 3rem;
}
.footer-inner {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 1.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(253,236,200,.08);
}
.footer-brand p { font-size: .85rem; margin-top: .3rem; color: rgba(253,236,200,.5); }

.footer-nav {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.footer-nav a {
    font-size: .85rem; color: rgba(253,236,200,.6);
    text-decoration: none; transition: var(--transition);
}
.footer-nav a:hover { color: var(--cream); }

.footer-social { display: flex; gap: .75rem; }
.footer-social a {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(253,236,200,.07); color: rgba(253,236,200,.7);
    text-decoration: none; transition: var(--transition);
    font-size: 1rem;
}
.footer-social a:hover { background: var(--gold); color: var(--white); transform: translateY(-2px); }

.footer-bottom {
    padding: 1.25rem 0; text-align: center;
    font-size: .78rem; color: rgba(253,236,200,.35);
}

/* ── WHATSAPP FAB ─────────────────────────────────────────── */
.whatsapp-fab {
    position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 800;
    width: 58px; height: 58px; border-radius: 50%;
    background: #25D366; color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; box-shadow: 0 4px 20px rgba(37,211,102,.45);
    text-decoration: none; transition: var(--transition);
}
.whatsapp-fab:hover { background: #20b858; transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.55); }
.fab-tooltip {
    position: absolute; right: calc(100% + .75rem);
    background: var(--brown-deep); color: var(--cream);
    padding: .35rem .75rem; border-radius: 50px;
    font-size: .78rem; font-weight: 600; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity .2s; box-shadow: var(--shadow-sm);
}
.whatsapp-fab:hover .fab-tooltip { opacity: 1; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-img-wrap { max-width: 540px; margin-inline: auto; }
    .about-badge { bottom: .5rem; right: .5rem; }
    .location-grid { grid-template-columns: 1fr; }
    #map { height: 300px; }
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
    .gallery-wide { grid-column: span 2; }
    .gallery-item { height: 220px; }
    .res-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .about-features { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-wide { grid-column: span 1; }
    .gallery-item { height: 200px; }
    .hero-cta { flex-direction: column; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-nav { justify-content: center; }
    .footer-social { justify-content: center; }
}
