/* ========================================
   LA COCINA MEXICANA — DESIGN SYSTEM
   Modern Rustic · Mobile-First
   ======================================== */

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

:root {
  /* Palette */
  --cream: #fbf0e4;
  --teal: #13a89e;
  --red: #ed1c24;
  --yellow: #fcde05;
  --dark: #2c1810;
  --dark-alt: #3d2518;
  --cream-dark: #f0e0cc;

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --section-py: 5rem;
  --container-px: 1.25rem;

  /* Transitions */
  --ease: cubic-bezier(.25, .46, .45, .94);
}

html {
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  background-color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- UTILITY --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.section {
  padding: var(--section-py) 0;
}

/* --- FADE-IN ANIMATION --- */
.fade-in {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.fade-in.visible {
  opacity: 1;
}


/* ========================================
   NAVIGATION
   ======================================== */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(251, 240, 228, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#main-nav.scrolled {
  box-shadow: 0 2px 20px rgba(44, 24, 16, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--container-px);
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-img {
  width: 100px;
  height: auto;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.35s var(--ease);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger → X */
.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Mobile Menu */
.nav-menu {
  list-style: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 70vw;
  max-width: 300px;
  height: 100dvh;
  background: var(--cream);
  padding: 6rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -4px 0 30px rgba(44, 24, 16, 0.1);
}

.nav-menu.open {
  transform: translateX(0);
}

.nav-link {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--dark);
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 1.5rem;
}

/* Dropdown (Mobile First) */
.nav-dropdown {
  position: relative;
}

.dropdown-arrow {
  font-size: 0.7em;
  margin-left: 0.25rem;
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.dropdown-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 1.25rem;
  margin-top: 0.25rem;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease);
}

.nav-dropdown.expanded .dropdown-menu {
  max-height: 300px;
}

.nav-dropdown.expanded .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-link {
  display: block;
  font-size: 0.95rem;
  color: var(--dark-alt);
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.dropdown-link:hover {
  color: var(--teal);
}



/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('images/hero.png') center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(44, 24, 16, 0.55) 0%,
      rgba(44, 24, 16, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem var(--container-px);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 2.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: #0f8c83;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(19, 168, 158, 0.35);
}


/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.15;
}


/* ========================================
   ABOUT
   ======================================== */
.about {
  background: var(--cream);
}

.about-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--dark-alt);
  margin-bottom: 1.25rem;
}

.about-divider {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider-icon {
  color: var(--teal);
  font-size: 1.2rem;
  opacity: 0.6;
}


/* ========================================
   MENU
   ======================================== */
.menu {
  background: #fff;
}

.menu-category {
  margin-bottom: 3rem;
}

.menu-category:last-child {
  margin-bottom: 0;
}

.menu-category-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--yellow);
  display: inline-block;
}

.menu-grid {
  display: grid;
  gap: 1.25rem;
}

.menu-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(44, 24, 16, 0.06);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-header {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.menu-item-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--dark);
}

.menu-item-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(44, 24, 16, 0.2);
  min-width: 1rem;
  margin-bottom: 6px;
}

.menu-item-price {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}

.menu-item-desc {
  font-size: 0.88rem;
  color: rgba(44, 24, 16, 0.6);
  line-height: 1.5;
}

.veg-indicator {
  color: var(--teal);
  font-size: 0.8rem;
  cursor: pointer;
}

/* --- Vegetarian Tooltip --- */
.veg-tooltip {
  position: absolute;
  background: var(--dark);
  color: var(--cream);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: tooltipFade 0.25s forwards var(--ease);
}

.veg-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
}

@keyframes tooltipFade {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, -10px); }
}


/* ========================================
   GALLERY
   ======================================== */
.gallery {
  background: var(--cream);
}

.gallery-wrapper {
  position: relative;
  width: 100%;
}

.gallery-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 calc(100% - 2rem);
  scroll-snap-align: center;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

@media (max-width: 767px) {
  .lightbox-btn {
    display: none;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.lightbox.active .lightbox-content img {
  transform: scale(1);
}

.lightbox-close,
.lightbox-btn {
  position: absolute;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s, transform 0.3s;
  padding: 1rem;
}

.lightbox-close {
  top: 1rem;
  right: 1.5rem;
  font-size: 3rem;
  line-height: 1;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-btn:hover {
  color: #fff;
  transform: scale(1.1) translateY(-50%);
}

.lightbox-close:hover {
  transform: scale(1.1);
}



/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--dark);
  color: rgba(251, 240, 228, 0.85);
  padding: var(--section-py) 0 0;
}

.footer-content {
  display: grid;
  gap: 3rem;
}

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

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: rgba(251, 240, 228, 0.55);
}

.footer-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  text-align: center;
}

.footer-block h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.footer-block p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-block a {
  transition: color 0.25s var(--ease);
}

.footer-block a:hover {
  color: var(--teal);
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(251, 240, 228, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(251, 240, 228, 0.35);
}


/* ========================================
   RESPONSIVE — TABLET (768px+)
   ======================================== */
@media (min-width: 768px) {
  :root {
    --section-py: 6rem;
    --container-px: 2rem;
  }

  .menu-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 3rem;
  }

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    overflow-x: visible;
  }

  .gallery-item {
    flex: auto;
  }

  .desktop-hidden {
    display: none !important;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    text-align: left;
  }

  .footer-brand {
    text-align: left;
  }

  .footer-info {
    text-align: left;
  }
}


/* ========================================
   RESPONSIVE — DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
  :root {
    --section-py: 7rem;
    --container-px: 2rem;
  }

  /* Desktop nav — inline links, hide hamburger */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    transform: none;
    box-shadow: none;
  }

  .nav-link {
    padding: 0.25rem 0;
    font-size: 0.9rem;
  }

  /* Desktop Dropdown Hover */
  .nav-dropdown {
    position: relative;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 180px;
    background: var(--cream);
    padding: 1rem;
    margin-top: 0;
    box-shadow: 0 8px 30px rgba(44, 24, 16, 0.12);
    border-radius: 6px;
    border: 1px solid rgba(44, 24, 16, 0.05);
    list-style: none;
    flex-direction: column;

    visibility: hidden;
    opacity: 0;
    max-height: none;
    transition: all 0.3s var(--ease);
    display: flex;
  }

  .nav-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
  }
}