:root {
  color-scheme: light dark;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(117, 114, 113, 0.8) 10%, rgba(40, 49, 77, 0.8) 30%, rgba(29, 35, 71, 0.8) 50%, rgba(19, 25, 28, 0.8) 80%, rgba(15, 14, 14, .8) 100%), url(https://38.media.tumblr.com/tumblr_m00c3czJkM1qbukryo1_500.gif);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
}

body {
  background-color: white;
  color: #000000c2;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modo-oscuro {
  background-color: #000000e7;
  color: white;
}

body.modo-oscuro h1 {
  color: white;
}

body.modo-oscuro h3 {
  color: white;
}

body.modo-oscuro footer {
  color: #ffffff;
}

img {
  border-radius: 10px;
  cursor: pointer;
  width: 358px;
  height: 234px;
}

h1 {
  font-family: palatino, serif;
  font-size: 200%;
  color: brown;
  text-align: center;
}

h3 {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  color: rgb(39, 39, 39);
  font-size: 130%;
}

p {
  font-family: sans-serif;
  font-size: small;
}

/* Estilos generales para los platos */
section {
  text-align: center;
  justify-content: center;
  display: flex;
  flex-wrap: wrap; /* Para que los platos se envuelvan en una nueva línea cuando no haya espacio */
  justify-content: space-between; /* Espaciado uniforme entre los platos */
}

section div {
  width: 100%; /* Ancho del contenedor de cada plato en una columna */
  margin-bottom: 20px; /* Espacio entre los platos */
}

/* Media Query para 3 columnas en pantallas mayores a 1280px */
@media (min-width: 1281px) {
  section div {
    width: 30%; /* Ancho del contenedor de cada plato en 3 columnas */
  }
}

/* Media Query para 2 columnas en pantallas entre 769px y 1280px */
@media (min-width: 769px) and (max-width: 1280px) {
  section div {
    width: 48%; /* Ancho del contenedor de cada plato en 2 columnas */
  }
}

/* Media Query para 1 columna en pantallas menores o iguales a 768px */
@media (max-width: 768px) {
  section div {
    width: 100%; /* Ancho del contenedor de cada plato en 1 columna */
  }
}

ul {
  color: white;
  font-size: x-large;
  text-align: center;
  line-height: 50px;
  text-align: center;
  vertical-align: bottom;
}

.text {
  font-family: sans-serif;
  font-size: small;
}

.alergenos {
  display: block;
}

.alergenos.hide {
  display: none;
}

.detalles {
  opacity: 0;
  transition: opacity 0.6s ease-out;   /* Cambiar tiempo animación */
  text-align: center;
  margin: 0 auto;
}

.detalles.mostrar {
  opacity: 1;
}

.detalles.ocultar {
  opacity: 0;
}

.hidden {
  opacity: 0;
  transition: all 0.7s;
}

.show {
  opacity: 1;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 30px;
  left: 25px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffffff;
  transition: background-color 0.2s ease-in-out;
  z-index: 9999;
  opacity: 0.75;
  transition: all 0.2s ease-in-out;
}

.arrow-icon {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}

.arrow-up {
  transform: rotate(-45deg) translateY(0px);
  pointer-events: none;
}

.to-top .arrow-icon {
  transform: rotate(45deg) translateY(0px);
  pointer-events: none;
}

.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 30px;
  right: 25px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffffff;
  transition: background-color 0.2s ease-in-out;
  z-index: 9999;
  opacity: 0.75;
  transition: all 0.2s ease-in-out;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 12px;
  pointer-events: none;
}

.menu-icon:before,
.menu-icon-middle,
.menu-icon:after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: #000000;
  transition: all 0.2s ease-in-out;
}

.menu-icon-middle {
  margin-top: 0.5px;
}

.menu-icon:before {
  transform: translateY(-2px);
}

.menu-icon:after {
  transform: translateY(2px);
}

.menu {
  display: none;
  position: fixed;
  top: 80px;
  right: 25px;
  width: calc(94vw - 50px); /* Modificado para que el menú ocupe casi toda la pantalla */
  max-width: 400px; /* Establecido un ancho máximo para evitar que el menú sea demasiado ancho en pantallas grandes */
  background-color: rgba(0, 0, 0, 0.823);
  border-radius: 10px;
  padding: 10px;
  animation: fadeInDown 0.5s;
  z-index: 9999;
  justify-content: center;
}

.menu.show {
  display: block;
}

.menu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.menu li {
  margin-bottom: 40px;
  position: relative; /* Necesario para el dropdown */
}

.menu a, .menu button {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
}

.menu a:hover, .menu button:hover {
  text-decoration: underline;
}

/* Estilos específicos para el dropdown */
.dropdown-content {
  display: none;
  position: relative; /* Cambiado a relative para que funcione bien en móviles */
  background-color: rgba(0, 0, 0, 0.823);
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mostrar el dropdown cuando se active */
.show {
  display: block;
}

@keyframes fadeInDown {
  from {
    transform: translate3d(10%, -50%, 0);
    opacity: 0;
  }

  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

footer {
  background-color: #2c2c2c;
  padding: 20px;
  margin-top: auto;
  text-align: center;
  position: relative;
  color: white;
}

footer p {
  margin-bottom: 10px;
  font-size: 14px;
}

footer a {
  color: #333;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

#language {
  font-weight: bold;
}

.image-fade {
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
