/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: url('/Public/imagenes/fondo.jpg');
}

.back-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
  margin-left: -23px;
  margin-top: -20px;
}

.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-arrow:visited {
  color: #fff;
}

.back-arrow i {
  color: inherit;
}

.back-arrow:hover {
  color: #7EC5FF;
}

/* Contenedor principal del login */
.login-container {
  position: relative;
  max-width: 450px;         /* Ancho máximo */
  width: 90%;               /* Se ajusta al 90% del contenedor padre */
  background-color: #2C5472;
  margin: 60px auto;        /* Espacio para centrar y separar del top */
  padding: 2.5rem;          /* Separación interna */
  border-radius: 8px;
  text-align: center;
  /* Sombra para simular una card */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-top: 10%;
}

/* Contenedor del logo */
.logo-container {
  margin-bottom: 1rem;
}

.logo-container img {
  max-width: 100%;
  height: auto;
}

/* Títulos y textos */
h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

p {
  color: #fff;
  margin-bottom: 1rem;
}

/* Agrupación de inputs con su label */
.input-group {
  margin-bottom: 1rem;
  text-align: left;
}

.input-group label {
  display: block;
  color: #fff;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 4px;
}

/* Placeholder con un gris más claro */
.input-group input::placeholder {
  color: #999;
}

/* Botón de Ingresar */
.btn-login {
  width: 100%;
  padding: 0.75rem;
  background-color: #3974C9;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.btn-login:hover {
  background-color: #2C5472;
}

/* Enlace de registro */
.register-link p {
  color: #fff;
  margin-top: 0.5rem;
}

.register-link a {
  color: #7EC5FF;
  text-decoration: none;
}

.register-link a:hover {
  text-decoration: underline;
}

/* ------------------------- */
/* Estilos para el botón de Recuperar Contraseña */
/* (Ubicado en el input de correo) */

/* Aseguramos que el grupo del email tenga posición relativa */
.input-group.email-group {
  position: relative;
}

/* Botón o enlace con apariencia de botón */
.btn-recover {
  background: none;
  border: none;
  color: #7EC5FF;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  position: absolute;
  right: 0;
  bottom: -1.5rem; /* Ajusta este valor si es necesario */
}

/* Si prefieres que sea un link en lugar de un botón real, puedes usar: */
.forgot-link {
  color: #7EC5FF;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  position: absolute;
  right: 0;
  bottom: -1.5rem; /* Ajusta este valor si es necesario */
}

.forgot-link:hover {
  background-color: #2C5472;
}

/* ------------------------- */
/* Breakpoints para dispositivos pequeños */

/* Hasta 480px (teléfonos en general) */
@media (max-width: 480px) {
  .login-container {
    position: relative;
    margin: 40px auto;
    padding: 2rem;
    margin-top: 30%;
  }
  h1 {
    font-size: 1.3rem;
  }
  .forgot-link {
    color: #7EC5FF;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    position: absolute;
    right: 0;
    bottom: -1.5rem; /* Ajusta este valor si es necesario */
  }
  
  .forgot-link:hover {
    background-color: #2C5472;
  }
  
}

/* Hasta 414px (iPhone XR, iPhone 14 Pro Max en vertical, etc.) */
@media (max-width: 414px) {
  .login-container {
    position: relative;
    margin: 30px auto;
    padding: 1.8rem;
    margin-top: 30%;
  }
  h1 {
    font-size: 1.2rem;
  }
  .forgot-link {
    color: #7EC5FF;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    position: absolute;
    right: 0;
    bottom: -1.5rem; /* Ajusta este valor si es necesario */
  }
  
  .forgot-link:hover {
    background-color: #2C5472;
  }
  
}

/* Hasta 390px (iPhone 12 Pro) */
@media (max-width: 390px) {
  .login-container {
    position: relative;
    margin: 25px auto;
    padding: 1.6rem;
    margin-top: 30%;
  }
  h1 {
    font-size: 1.1rem;
  }
  .forgot-link {
    color: #7EC5FF;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    position: absolute;
    right: 0;
    bottom: -1.5rem; /* Ajusta este valor si es necesario */
  }
  
  .forgot-link:hover {
    background-color: #2C5472;
  }
  
}

/* Hasta 360px (Samsung Galaxy S8+, S20 Ultra, etc.) */
@media (max-width: 360px) {
  .login-container {
    position: relative;
    margin: 20px auto;
    padding: 1.4rem;
    margin-top: 30%;
  }
  h1 {
    font-size: 1rem;
  }
  .forgot-link {
    color: #7EC5FF;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    position: absolute;
    right: 0;
    bottom: -1.5rem; /* Ajusta este valor si es necesario */
  }
  
  .forgot-link:hover {
    background-color: #2C5472;
  }
  
}

/* Hasta 320px (iPhone SE) */
@media (max-width: 320px) {
  .login-container {
    position: relative;
    margin: 15px auto;
    padding: 1.2rem;
    margin-top: 30%;
  }
  h1 {
    font-size: 0.95rem;
  }
  .forgot-link {
    color: #7EC5FF;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    position: absolute;
    right: 0;
    bottom: -1.5rem; /* Ajusta este valor si es necesario */
  }
  
  .forgot-link:hover {
    background-color: #2C5472;
  }
  
}
