/* Estilos base */
body,
html {
  height: 100%;
  margin: 0;
  font-family: 'Montserrat Alternates', sans-serif;
  padding-top: 27px;
}

/* Contenedor principal */
.login-container {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

/* Espacio para evitar solapamiento con navbar */
.form-content {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

/* Panel izquierdo */
.left-panel {
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Panel derecho */
.bg-primary {
  background-color: #006ab0 !important;
}

/* Botón volver */
.btn-back {
  border-radius: 0.5rem;
  font-weight: 600;
}

/* Ajustes del formulario */
.display-5 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem !important;
  color: #006ab0;
  line-height: 1.3;
}

.display-5 small {
  font-size: 1.1rem;
  display: block;
  margin-top: 0.5rem;
  color: #6c757d;
  font-weight: 400;
}

.lead {
  font-size: 1.1rem;
  margin-bottom: 1.5rem !important;
  color: #495057;
}

/* Campos de formulario */
.form-control {
  border: 2px solid #e9ecef;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: #006ab0;
  box-shadow: 0 0 0 0.25rem rgba(0, 106, 176, 0.25);
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #495057;
}

/* Checkbox y enlace olvidó contraseña */
.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  margin-right: 0.5rem;
}

.form-check-label {
  color: #495057;
}

.forgot-link {
  color: #006ab0;
  font-weight: 600;
  font-size: 0.9rem;
}

.forgot-link:hover {
  color: #006ab0;
  text-decoration: underline;
}

/* Botón mostrar contraseña */
.toggle-password {
  border-left: none;
  background-color: #f8f9fa;
  border-color: #e9ecef;
}

.toggle-password:hover {
  background-color: #e9ecef;
}

/* Botón de login */
.btn-login {
  background-color: #006ab0;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.btn-login:hover {
  background-color: #0084d6;
  transform: translateY(-2px);
}

/* Contenedor de imagen UNESCO */
.unesco-container {
  padding: 2rem;
  border-radius: 8px;
  max-width: 90%;
  margin: auto;
}

.unesco-img {
  max-height: 60vh;
  width: auto;
  opacity: 0.9;
  display: block;
  margin: 0 auto;
}

/* Responsividad mejorada */
@media (max-width: 1200px) {
  .display-5 {
    font-size: 2rem;
  }
}

@media (max-width: 992px) {
  .display-5 {
    font-size: 1.8rem;
  }

  .lead {
    font-size: 1rem;
  }

  .left-panel {
    padding: 2rem !important;
  }

  .form-content {
    margin-top: 0;
    padding: 0.5rem;
  }
}

@media (max-width: 768px) {
  body,
  html {
    padding-top: 70px;
  }

  .login-container {
    min-height: calc(100vh - 70px);
  }

  .display-5 {
    font-size: 1.6rem;
    margin-bottom: 1rem !important;
  }

  .left-panel {
    padding: 1.5rem !important;
    justify-content: flex-start;
  }

  .form-content {
    padding-top: 0;
  }

  /* CORRECCIÓN: Eliminar margen superior excesivo */
  .mb-3 {
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
  }

  .navbar-spacer {
    height: 60px !important;
  }
}

@media (max-width: 576px) {
  .display-5 {
    font-size: 1.4rem;
  }

  .display-5 small {
    font-size: 1rem;
  }

  .left-panel {
    padding: 1rem !important;
  }

  .form-content {
    padding: 0.25rem;
  }

  .form-control {
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
  }

  .btn-login {
    font-size: 1rem;
    padding: 0.7rem;
  }

  .forgot-link {
    font-size: 0.8rem;
  }
}

/* Asegurar que los elementos sean visibles en pantallas pequeñas */
.form-control {
  font-size: 1rem;
}

.btn {
  font-size: 1rem;
}

/* Estilos para evitar que el contenido quede detrás del navbar */
.navbar.fixed-top {
  position: fixed;
  width: 100%;
  z-index: 1030;
}

/* Utilidades adicionales */
.text-primary-custom {
  color: #006ab0 !important;
}

/* Mejorar la alineación en móviles */
@media (max-width: 768px) {
  .d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .forgot-link {
    margin-left: 0;
  }
}
