/* Estilos para la página de bienvenida */
.welcome-container {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.welcome-header {
  text-align: center;
  margin-bottom: 3rem;
}

.welcome-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #007bff;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideDown 0.8s ease-out 0.5s forwards;
  transition: color 0.3s ease;
}

.welcome-subtitle {
  font-size: 1.2rem;
  color: #2c3e50;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 1s forwards;
  transition: color 0.3s ease;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  color: #007bff;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.feature-title {
  font-size: 1.25rem;
  color: #007bff;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.feature-description {
  color: #2c3e50;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.welcome-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 1.5s forwards;
}

.typing-text {
  display: block;
  width: 0;
  max-width: 77%;
  margin: 0 auto;
  padding: 0.5rem 0;
  font-size: 1.2rem;
  color: #2c3e50;
  text-align: justify;
  overflow: hidden;
  border-right: 1px solid #007bff;
  white-space: nowrap; /* Mantiene la animación correcta */
  animation: typing 4s steps(60, end) 2s forwards, 
             blink-caret 0.75s step-end infinite;
}
 
/* Animación de escritura */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
 
/* Animación del cursor parpadeante */
@keyframes blink-caret {
  50% { border-right-color: transparent; }
  100% { border-right-color: #007bff; }
}
 

@media (max-width: 600px) {

  .typing-text {
    font-size: 1rem; 
    max-width: 90%;
    white-space: normal; /* Permite que el texto haga saltos de línea */
    overflow-wrap: break-word; /* Corta palabras largas si es necesario */
    border-right: none; /* Evita que se muestre todo de golpe */
  }
 
  /* Vuelve a aplicar la animación manualmente */
  .typing-text::after {
    content: attr(data-text);
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(60, end) forwards, 
               blink-caret 0.75s step-end infinite;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Estilos para modo oscuro */
body.dark-mode .welcome-container {
  background-color: #1a1a1a;
}

body.dark-mode .welcome-title {
  color: #66b3ff;
}

body.dark-mode .welcome-subtitle {
  color: #e1e1e1;
}

body.dark-mode .feature-card {
  background-color: #2d2d2d;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .feature-card:hover {
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .feature-title {
  color: #66b3ff;
}

body.dark-mode .feature-description {
  color: #e1e1e1;
}

body.dark-mode .feature-icon {
  color: #66b3ff;
}

body.dark-mode .typing-text {
  color: #e1e1e1;
}