/* ======== ESTILO GENERAL ======== */
body {
  margin: 0;

  font-family: 'League Spartan', sans-serif;
  font-weight: 400; /* Puedes usar 400, 600 o 700 según lo que importaste */
  color: #f5f1e6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  background-color: #000; /* respaldo si no carga la imagen */
}

/* ======== FONDO FIJO DEL MENÚ ======== */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('image/bkg.jpg'); /* fondo del menú */
  background-repeat: repeat;
  background-position: center center;
  background-size: 50vw; /* ocupa toda la pantalla */
  z-index: -2; /* detrás de todo el contenido */
}

/* Degradado opcional encima del fondo para contraste */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3); /* ajusta opacidad si quieres más contraste */
  z-index: -1;
}

/* ======== ANIMACIÓN DE BIENVENIDA ======== */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 40;
  animation: fadeOut 1s ease 4s forwards;
}

.welcome-text {
  color: #f5f1e6;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 3px;
  opacity: 0;
  animation: fadeIn 2s forwards;
  text-transform: uppercase;
  text-align: center;
  z-index: 2;
}

.welcome-overlay img {
  position: fixed; /* la nutria se queda encima */
  top: 50%;
  left: 50%;
  width: 25vw;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.3;
  z-index: 1;
  animation: float 4s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -52%) scale(1.05); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ======== MENÚ ======== */
main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 3rem 4vw;
  position: relative;
  z-index: 2;
}

/* Secciones del menú */
.menu-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(3px);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.menu-section:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.menu-section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #000000;
  margin-bottom: 1rem;
  border-bottom: 2px solid #000000;
  padding-bottom: 0.5rem;
}

/* ======== ITEMS ======== */
.menu-item {
  background: rgba(245, 241, 230, 0.9);
  margin: 0.75rem 0;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
  color: #2e3d2f;
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.menu-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(169,196,163,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-item:hover::before {
  opacity: 1;
}

.menu-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.menu-item.hidden {
  opacity: 0;
  transform: translateY(-40px);
}

.menu-item p {
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.price {
  float: right;
  font-weight: 700;
  color: #2e3d2f;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) { /* tablets y móviles grandes */
  body::before {
    background-size: cover; /* ajusta la imagen al tamaño de pantalla */
  }
}

@media (max-width: 768px) { /* móviles pequeños */
  .welcome-text {
    font-size: 2rem;
  }

  .menu-section {
    padding: 1rem;
  }

  main {
    padding: 2rem 1rem;
  }
}
