/* ==================== VARIABLES / RESET ==================== */

:root {
  --bg-main: #fffaf3;
  --bg-hero: linear-gradient(135deg, #fff6ec, #ffeef7);
  --bg-cards: #fffdf8;
  --accent: #ffb7b2;
  --accent-strong: #ff8b94;
  --text-main: #4a3b3b;
  --text-muted: #8f7f7f;
  --card-border: #f3e4d9;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.08);

  --radius-xl: 24px;
  --radius-lg: 18px;
}

/* Scroll suave (sin snap en móvil por bug de “flick” al final) */
html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden; /* evita barras horizontales por el video */
  height: 100%;
}

/* Reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==================== SECCIONES GENERALES ==================== */

.section {
  min-height: 100vh;   /* fallback */
  min-height: 100svh;  /* mejor en móvil (barra navegador) */
  padding: 4rem 6vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ✅ Scroll-snap SOLO en desktop (evita el “salto” al final en móvil) */
@media (min-width: 901px) {
  body {
    scroll-snap-type: y mandatory; /* scroll guiado vertical */
  }

  .section {
    scroll-snap-align: start; /* se “engancha” al inicio */
    scroll-snap-stop: always; /* se detiene siempre en la sección */
  }
}

/* ==================== HERO (PORTADA CON VIDEO) ==================== */

.hero {
  position: relative;
  padding: 4rem 4vw;   /* acercamos más el contenido al borde izquierdo */
  height: 100vh;       /* fallback */
  height: 100svh;      /* mejor en móvil */
  width: 100vw;        /* ancho exacto a la ventana */
  overflow: hidden;
  background: var(--bg-hero); /* respaldo pastel mientras carga el video */
  display: flex;
  flex-direction: column; /* eje principal: vertical */
  justify-content: center; /* centrado vertical */
  align-items: flex-start; /* pegado a la izquierda */
}

/* Video a pantalla completa, ligeramente más grande para evitar bordes */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 102vw;
  min-height: 102vh;   /* fallback */
  min-height: 102svh;  /* mejor en móvil */
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  pointer-events: none; /* el video no bloquea el click en el contenido */
}

/* Sin pseudo-elemento extra */
.hero::before {
  content: none;
}

/* Contenido dentro de la portada */
.hero-content {
  position: relative;
  z-index: 1; /* por encima del video */
  max-width: 520px;
  padding: 0; /* sin caja interna, más pegado a la izquierda */
  background: transparent; /* fondo completamente transparente */
  box-shadow: none;
}

/* Pequeña etiqueta superior */
.hero-tag {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45); /* pastilla oscura para que se lea */
  color: #ffffff;
  margin-bottom: 0.9rem;
}

/* Título principal */
.hero-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 0.9rem;
  color: #ffffff; /* blanco para el fondo de video */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Subtítulo */
.hero-subtitle {
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9); /* blanco suave */
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* Contenedor del botón */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

/* Botón “Ver menú” */
.hero-btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 30px rgba(255, 139, 148, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 40px rgba(255, 139, 148, 0.8);
  background: #ff7681;
}

/* ==================== SECCIÓN CATEGORÍAS ==================== */

.categorias {
  background: radial-gradient(circle at top left, #fff1e2, #fffdf8 45%, #f9f5ff);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Grid responsivo */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.8rem;
}

/* Card tipo botón */
.menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 1.2rem 1.6rem;
  background: var(--bg-cards);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
  cursor: pointer;
}

/* Hover: zoom hacia adelante */
.menu-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: var(--shadow-soft);
  border-color: rgba(255, 139, 148, 0.35);
}

/* Icono (Lottie webm) */
.icon-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: #fff7f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.icon-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.menu-card h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.menu-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 900px) {
  /* explícito: sin snap en móvil/tablet (evita el bug del “flick” al final) */
  body {
    scroll-snap-type: none;
  }
  .section {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    padding: 3rem 7vw;
  }

  .hero {
    padding: 3rem 7vw;
    align-items: flex-start; /* también a la izquierda en pantallas medianas */
  }

  .hero-content {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 2.5rem 7vw;
  }

  .hero {
    padding-top: 3.5rem;
    align-items: flex-start; /* a la izquierda en móvil */
  }

  .hero-content {
    padding: 0;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .menu-card {
    padding: 1.2rem 1rem 1.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
