html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

.overlay {
  position: absolute;
  top: 63px;
  right: -30px;
  height: 100vh;
  width: 3000%;
  background: rgba(2, 2, 2, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  z-index: 10;
}

#cart-toggle:checked ~ .overlay,
#menu-toggle:checked ~ .overlay {
  display: block;
}

.list-nav li {
  position: relative;
}

.list-nav li a::after {
  content: ""; /*es importante, sino no anda*/
  height: 2px;
  width: 100%;
  background-color: var(--secundario);
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.15s ease;
}

.list-nav li a:hover::after {
  transform: scaleX(1); /*al hacer hover, la línea aparece*/
  transform-origin: bottom left;
}
.list-nav li a:hover {
  font-weight: bold;
}

.cart-toggle,
.login-bar {
  font-size: 40px; /* tamaño del ícono */
  cursor: pointer; /* cambia el puntero a "mano" */
  display: inline-block; /* necesario para que la animación funcione bien */
  transition: transform 0.2s ease; /* transición suave */
}

.cart-toggle:hover,
.login-bar:hover {
  animation: bounce 0.5s ease; /* aplicamos la animación */
}

/* Definimos la animación */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0); /* posición inicial/final */
  }
  50% {
    transform: translateY(-10px); /* sube 10px */
  }
}
/*Animación opacidad*/
@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/*Animación de abajo hacia arriba*/
@keyframes slide-up {
  from {
    transform: translateY(100px);
  }
  to {
    transform: translateY(0);
  }
}

/*Animación de derecha a izquierda*/
@keyframes slide-right {
  from {
    transform: translateX(100px);
  }
  to {
    transform: translateX(0);
  }
}

h1 {
  animation: fade 1s ease-in, slide-up 0.4s ease-in;
}
h1 span {
  animation: fade 1s ease-in forwards, slide-up 1.5s ease-in-out;
}
.texto-info p {
  opacity: 0;
  animation: fade 1s ease-in forwards, slide-up 0.6s ease-in-out;
  animation-delay: 0.2s;
}

.texto-info a button {
  opacity: 0;
  animation: fade 1s ease-in forwards;
  animation-delay: 0.5s;
}

.img-info img {
  opacity: 0;
  animation: fade 1s ease-in forwards, slide-right 0.4s ease-in;
  animation-delay: 0.2;
}

.seccion_2 {
  opacity: 0;
  animation: fade 1s ease-in forwards, slide-up 0.6s ease-in-out;
}

.cursos-container {
  transition: all 0.3 linear;
}
.cursos-container:hover {
  transform: scale(1.03);
}

.oferta {
  background-color: #fcebff;
  text-align: center;
  padding: 30px;
  font-family: "Urbanist", sans-serif;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
  animation: bannerAnim 4s steps(1, end) infinite;
}

/* Animación que cambia colores y tipografía */
@keyframes bannerAnim {
  0% {
    background-color: #d5afdb; /* lila pastel */
    color: #5a3e61;
    font-family: "Urbanist", sans-serif;
    font-weight: bold;
    line-height: 1.5;
  }

  25% {
    background-color: #9c3da5; /* rosa pastel */
    color: #f5ecf2;
    font-family: "Atma", sans-serif;
    font-weight: bold;
    line-height: 1.5;
  }

  50% {
    background-color: #d5afdb; /* violeta muy suave */
    color: #4e2f5c;
    font-family: "Urbanist", sans-serif;
    font-weight: bold;
    line-height: 1.5;
  }

  75% {
    background-color: #9c3da5; /* rosa lila intermedio */
    color: #f5ecf2;
    font-family: "Atma", sans-serif;
    font-weight: bold;
    line-height: 1.5;
  }

  100% {
    background-color: #d5afdb; /* vuelve al inicio */
    color: #5a3e61;
    font-family: "Urbanist", sans-serif;
    font-weight: bold;
    line-height: 1.5;
  }
}

.titulo-animado {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100px;
}
.titulo-animado h2 {
  font-family: "atma", sans-serif;
  font-size: 35px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  animation: pulso-brillo 4s ease-in-out infinite;
}

@keyframes pulso-brillo {
  0% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }
}
