.magic-title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: -60px;
  /* Pulls the title up to occupy the empty space above */
  margin-bottom: -100px;
  /* Bring the hero image closer since the empty space was removed */
  position: relative;
  z-index: 10;

  /* Azul celeste y azul aqua */
  --celeste: #87ceeb;
  --aqua: #40e0d0;
  --blue: #00bfff;
}

.magic-title-container h1 {
  font-family: "monallesia", "Rubik", sans-serif;
  font-size: clamp(3em, 6vw, 5em);
  font-weight: 400;
  margin: 0px;
  text-align: center;
  position: relative;
  line-height: 1.2;
}

.magic-title-container h1>.magic {
  display: inline-block;
  position: relative;
}

.magic-title-container h1>.magic>.magic-star {
  --size: clamp(20px, 1.5vw, 30px);

  animation: scale 700ms ease forwards;
  display: block;
  height: var(--size);
  left: var(--star-left);
  position: absolute;
  top: var(--star-top);
  width: var(--size);
}

.magic-title-container h1>.magic>.magic-star>svg {
  animation: rotate 1000ms linear infinite;
  display: block;
  opacity: 0.7;
}

.magic-title-container h1>.magic>.magic-star>svg>path {
  fill: var(--aqua);
}

.magic-title-container h1>.magic>.magic-text {
  display: inline-block;
  width: 100%;
}

.magic-title-container h1>.magic>.magic-text svg {
  display: block;
  transform: scale(2.8);
  transform-origin: center bottom;
}

.magic-svg-text {
  font-family: "monallesia", cursive;
  font-size: 250px;
  filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.2)) drop-shadow(0px 0px 20px rgba(135, 206, 235, 0.6));
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 2px;
}

@keyframes background-pan {
  from {
    background-position: 0% center;
  }

  to {
    background-position: -200% center;
  }
}

@keyframes scale {

  from,
  to {
    transform: scale(0);
  }

  50% {
    transform: scale(1);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(180deg);
  }
}

/* Responsividad para ajustar la posición en pantallas más pequeñas sin desplazar el hero */
@media (max-width: 991px) {
  .magic-title-container {
    margin-top: -70px;
    margin-bottom: -90px;
  }
  .magic-title-container h1>.magic>.magic-text svg {
    transform: scaleX(2.0) scaleY(2.8);
  }
}

@media (max-width: 767px) {
  .magic-title-container {
    margin-top: -10px;
    margin-bottom: -150px;
  }
  .magic-title-container h1>.magic>.magic-text svg {
    transform: scaleX(1.6) scaleY(2.8);
  }
}

@media (max-width: 575px) {
  .magic-title-container {
    margin-top: 10px;
    margin-bottom: -170px;
  }
  .magic-title-container h1>.magic>.magic-text svg {
    transform: scaleX(1.4) scaleY(2.8);
  }
}