@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #FFF8F2;
  color: #212121;
  display: flex;
  height: 100vh;
}

.login-wrapper {
  display: flex;
  width: 100%;
}

.login-container {
  flex: 1;
  background-color: #ffffff;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeInUp 0.5s ease forwards;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.logo {
  width: 160px;
  margin-bottom: 30px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.logo:hover {
  transform: scale(1.05);
}

h2 {
  margin-bottom: 25px;
  color: #004225;
  animation: fadeIn 0.5s ease;
}

form {
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease;
}

label {
  margin-bottom: 5px;
  font-weight: bold;
  animation: fadeIn 0.6s ease;
}

input[type="text"],
input[type="password"] {
  padding: 10px;
  border: 1px solid #CCC;
  border-radius: 8px;
  font-size: 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInUp 0.6s ease;
}

input:focus {
  border: 1px solid #FF5722;
  box-shadow: 0 0 8px rgba(255, 87, 34, 0.3);
  outline: none;
}

#password-login {
  margin-bottom: 20px;
}

#eye-login {
  margin-bottom: 20px;
}

button {
  padding: 12px;
  background-color: #2E7D32;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  animation: fadeInUp 0.7s ease;
  
}

.button-r {
  margin-top: 20px;
}

button:hover {
  background-color: #004225;
  transform: translateY(-2px);
}

.terms a{
  color: #FF5722;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.terms a:hover{
  text-decoration: underline;
  color: #E64A19;
}

.registro {
  margin-top: 20px;
  text-align: center;
  animation: fadeIn 0.6s ease;
}

.registro a {
  color: #FF5722;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.registro a:hover {
  text-decoration: underline;
  color: #E64A19;
}

.errors {
  background-color: #FFE0B2;
  border-left: 5px solid #FF5722;
  padding: 10px 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  color: #212121;
  list-style: none;
  animation: fadeInUp 0.4s ease;
}

/* Imagen compartida */
.login-image {
  flex: 1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 300px; /* para evitar que se haga muy pequeña */
  width: 100%;
  animation: fadeIn 0.6s ease;
}


.login-image.login-img {
  background: url("../images/backgrounds/bg_login.webp") no-repeat center center;
  background-size: cover;
}

.login-image.register-img {
  background: url("../images/backgrounds/bg_register.webp") no-repeat center center;
  background-size: cover;
  background-position: center;
  height: 100vh;
  width: 100%;
  animation: fadeIn 0.6s ease;
}

/* Estilos para el contenedor de contraseña */
.password-container {
    margin-bottom: 0px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    margin-bottom: 0;
}

.toggle-password {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.eye-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toggle-password:hover .eye-icon {
    opacity: 1;
}

/* Ajuste responsive */
@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-container {
    padding: 40px 30px;
    box-shadow: none;
  }

  .login-image {
    display: block;
    width: 100%;
    min-height: 200px; /* evita que se "achique" demasiado */
    background-position: center;
    background-size: cover;
  }

  .toggle-password {
    padding: 8px;
  }
}
