/* Estilos generales */
body {
  font-family: "PT Sans", sans-serif;
  background-color: #fbfbfb;
}

/* Estilos del menú hamburguesa */
#menu {
  width: 35px;
  height: 30px;
  margin: 20px 0 10px 10px;
  cursor: pointer;
  background-color: rgba(191, 191, 249, 0.1);
  border-radius: 5px;
}

.bar {
  height: 5px;
  width: 100%;
  background-color: rgb(241, 15, 15);
  display: block;
  border-radius: 5px;
  transition: 0.3s ease;
}

#bar1 {
  transform: translateY(-4px);
}

#bar3 {
  transform: translateY(4px);
}

/* Estilos del menú de navegación */
#nav {
  display: none;
}

#nav.open {
  display: block;
}

nav {
  background-color: rgb(245, 106, 106);
  padding: 10px 0;
  justify-content: left;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

nav ul li {
  display: inline;
  margin-right: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
}

.nav a {
  text-decoration: none;
  color: black;
  display: block;
  padding: 3px;
}

.nav a:hover {
  background-color: yellow;
}

.nav li a {
  color: #fefcfc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.3s;
}

.nav li a:hover,
.nav li a:active {
  font-weight: bold;
  background-color: #ffd700;
}

.nav li {
  list-style: none;
  padding: 0;
}

.nav {
  padding: 0;
  margin: 0 10px;
  transition: 0.3s ease;
  display: none;
}

.link {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.link li {
  width: 45%;
  margin-bottom: 5px;
  justify-content: left;
}

#menu-bar {
  top: 0;
  left: 0;
  position: absolute;
  justify-content: left;
  z-index: 2;
  width: 80vw;
  max-width: 300px;
  min-width: 240px;
}

.menu-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 80vw;
  max-width: 300px;
  min-width: 240px;
  height: 100vh;
  z-index: 1;
  background: #1a237e;
  border-radius: 0%;
  transition: 0.3s ease;
  display: none;
  padding: 5px;
  color: rgb(255, 255, 255);
  justify-content: left;
}

.menu-bg.open {
  background: rgba(26, 35, 126, 0.7);
  display: block;
  color: rgb(16, 3, 35);
}

.change .bar {
  background-color: rgb(241, 15, 15);
}

.change #bar1 {
  transform: translateY(4px) rotateZ(-45deg);
}

.change #bar3 {
  transform: translateY(-6px) rotate(45deg);
}

.change #bar2 {
  opacity: 0;
}

.change {
  display: block;
}

/* Media queries para pantallas pequeñas */
@media screen and (max-width: 576px) {
  .menu-bg {
    background: rgba(0, 0, 0, 0.6);
    width: 85vw;
    max-width: 300px;
    height: 100vh;
  }
  #menu-bar {
    position: absolute;
    width: 85vw;
    max-width: 300px;
  }
  .menu-bg.open {
    width: 85vw;
    height: 80vh;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .menu-bg {
    background: rgba(0, 0, 0, 0.6);
    width: 80vw;
    max-width: 300px;
    height: 50vh;
  }
  #menu-bar {
    width: 80vw;
    max-width: 300px;
  }
  .menu-bg.open {
    width: 80vw;
    height: 80vh;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .menu-bg {
    background: rgba(0, 0, 0, 0.6);
    width: 40vw;
    max-width: 350px;
    height: 60vh;
  }
  #menu-bar {
    height: 60vh;
  }
  .menu-bg.open {
    width: 40vw;
    height: 80vh;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  #menu-bar {
    width: 25vw;
    height: 100vh;
  }
}

@media screen and (min-width: 1200px) {
  .menu-bg {
    height: 80vh;
  }
  .menu-bg.open {
    width: 40vw;
    height: 80vh;
  }
}