/* Estilo para el recuadro */
.recuadro {
  width: 100%;
  max-width: 27%;
  margin: 0 auto;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.5); /* Fondo negro translúcido para mejor contraste */
  border-radius: 12px; /* Bordes más redondeados */
  border: none; /* Sin borde */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Sombra ligera para destacarlo un poco */
  text-align: center;
  font-family: Arial, sans-serif;
  position: relative;
}

/* Estilo para el texto animado */
.texto-animado {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 100%;
  text-align: center;
}

/* Estilo para el texto */
#animatedText {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff; /* Texto completamente blanco */
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #fff;
  display: inline-block;
  width: 0;
  animation: typing 4s steps(50) 1s forwards, blinkCaret 0.75s step-end infinite;
}

/* Animaci贸n de la escritura de texto */
@keyframes typing {
  to {
    width: 100%;
  }
}

/* Parpadeo del cursor */
@keyframes blinkCaret {
  50% {
    border-color: transparent;
  }
}

/* Estilos Responsivos */
@media screen and (max-width: 768px) {
  .recuadro {
    max-width: 45%;
    padding: 10px;
  }

  #animatedText {
    
    font-size: .9rem;
  }
}

@media screen and (max-width: 480px) {
  .recuadro {
    max-width: 75%;
    padding: 8px;
  }

  #animatedText {
    font-size: .8rem;
  }
}
/* === AJUSTE PARA LAPTOPS PEQUEÑAS (10" a 14") === */
/* Este código soluciona el problema de superposición con el menú */

@media screen and (min-width: 992px) and (max-width: 1400px) {
  
  .recuadro {
    /* 1. Lo BAJAMOS para que no choque con el menú de navegación */
    top: 60px;

    /* 2. Lo hacemos un poco MÁS CHICO */
    max-width: 25%;
    padding: 10px;
  }

  #animatedText {
    /* 3. Ajustamos el tamaño del texto para que quepa bien */
    font-size: 1.3rem;
  }
}
