header {
    background-color: transparent;
    height: fit-content;
    border-bottom: none;
    display: flex;
    align-items: center; /* centra verticalmente */
    justify-content: space-between; /* Separa el logo y el menu */
    gap: 15px; /* espacio entre imagen y texto */
    padding: 15px 30px;
    flex-wrap: wrap; /* Permite que los elementos se envuelvan en pantallas pequenas */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}
header h1, header h5 {
  text-align: center;   
}


body {
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
  margin: 0;
  min-height: 100vh; /* que ocupe el 100% de la altura de la ventana */
  position: relative;
  overflow-x: hidden; /* Solo oculta scroll horizontal */
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/imagen de fondo.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/imagen de fondo.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  filter: brightness(0.4) blur(3px);
  z-index: -1;
}

img {
    width: 150px;
    height: auto;
    max-width: 30%;
}

.container {
  width: 100%;
  margin-top: 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px; /* Anade padding lateral para dispositivos moviles */
}

.form-content {
  width: 100%;
  max-width: 450px;
  background-color: white;
  padding: 5% 3%;
  text-align: center;
  border-radius: 5%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInUp 1s ease-out forwards;
  position: relative;
  overflow: hidden;
}

/* Contenedor de hojas */
.leaves-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Estilos de las hojas */
.leaf {
  position: absolute;
  width: 20px;
  height: 30px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 50%, #3d8b40 100%);
  border-radius: 0 100% 50% 100%;
  opacity: 0.6;
  animation: fall linear infinite;
  z-index: 1;
}

/* Variaciones de las hojas */
.leaf:nth-child(1) {
  left: 10%;
  animation-duration: 8s;
  animation-delay: 0s;
  width: 15px;
  height: 25px;
}

.leaf:nth-child(2) {
  left: 25%;
  animation-duration: 10s;
  animation-delay: 2s;
  width: 18px;
  height: 28px;
}

.leaf:nth-child(3) {
  left: 40%;
  animation-duration: 9s;
  animation-delay: 1s;
  width: 22px;
  height: 32px;
}

.leaf:nth-child(4) {
  left: 55%;
  animation-duration: 11s;
  animation-delay: 3s;
  width: 16px;
  height: 26px;
}

.leaf:nth-child(5) {
  left: 70%;
  animation-duration: 7s;
  animation-delay: 0.5s;
  width: 20px;
  height: 30px;
}

.leaf:nth-child(6) {
  left: 85%;
  animation-duration: 9.5s;
  animation-delay: 4s;
  width: 17px;
  height: 27px;
}

.leaf:nth-child(7) {
  left: 15%;
  animation-duration: 10.5s;
  animation-delay: 2.5s;
  width: 19px;
  height: 29px;
}

.leaf:nth-child(8) {
  left: 60%;
  animation-duration: 8.5s;
  animation-delay: 1.5s;
  width: 21px;
  height: 31px;
}

/* Animacion de caida con balanceo */
@keyframes fall {
  0% {
    top: -10%;
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(20px) rotate(90deg);
  }
  50% {
    transform: translateX(-20px) rotate(180deg);
  }
  75% {
    transform: translateX(20px) rotate(270deg);
  }
  100% {
    top: 110%;
    transform: translateX(0) rotate(360deg);
  }
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  position: relative;
  z-index: 10;
}

.form-logo {
  width: 180px;
  height: auto;
  max-width: 70%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10;
}

.form-logo:hover {
  transform: scale(1.05);
}

.form-content h5 {
  margin-top: 10px;
  margin-bottom: 25px;
  font-weight: 600;
  color: #333;
  position: relative;
  z-index: 10;
}

.form-content form {
  position: relative;
  z-index: 10;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.input-group {
  display: flex;
  flex-direction: column;
  gap: 2%;
}

.input-field input {
    width: 100%; /* Para que el input ocupe todo el ancho disponible */
    padding: 12px 15px; /* Mas espacio interno para que se vean mas grandes */
    background-color: white; /* Fondo blanco completamente */
    border-radius: 15px; /* Bordes mas redondeados */
    border: 1px solid #ccc; /* Borde ligero para definicion */
    font-size: 11px; /* Texto un poco mas grande */
    box-sizing: border-box; /* Para que padding no aumente ancho total */
}

.forgot-password {
  text-align: right;
  margin-top: 10px;
  margin-bottom: 5px;
}

.forgot-password a {
  color: #EE731E;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #d66119;
  text-decoration: underline;
}

.btn-field button {
    background-color: #EE731E;
    border-radius: 20px;
    border:none;
    padding: 8px 8px;
    margin-top: 6%;
    margin-bottom: 3%;
}

nav {
  margin-left: auto; /* Empuja el nav completamente a la derecha */
  position: relative;
}

/* Boton hamburguesa - oculto por defecto en escritorio */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: black;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin-top: 0; /* Elimina el margen superior */
  flex-wrap: wrap; /* Permite que los elementos se envuelvan */
  padding: 0;
}

nav a {
  text-decoration: none;
  color: black;
  font-weight: bold;
  white-space: nowrap; /* Evita que el texto se divida en varias lineas */
}

/*Mensaje de error*/
.error-message {
  color: red;
  font-size: 12px;
  margin-top: 5px;
}

/* Estilos de los modales */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: white;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
  position: relative;
}

.modal-icon {
  margin: 0 auto 20px;
  animation: scaleIn 0.5s ease;
}

.modal-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 15px 0;
  color: #333;
}

.modal-content p {
  font-size: 16px;
  color: #666;
  margin: 15px 0 25px;
  line-height: 1.5;
}

.modal-btn {
  background-color: #EE731E;
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(238, 115, 30, 0.3);
}

.modal-btn:hover {
  background-color: #d66119;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(238, 115, 30, 0.4);
}

.modal-btn:active {
  transform: translateY(0);
}

/* Animaciones del modal */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.form-seleccion {
  width: 100%;
  max-width: 450px;
  background-color: white;
  padding: 5% 3%;
  text-align: center;
  border-radius: 5%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInUp 1s ease-out forwards;
}

/* Media Queries para dispositivos moviles */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    text-align: center;
    padding: 15px;
    justify-content: flex-end;
  }

  img {
    width: 120px;
    max-width: 50%;
  }

  nav {
    margin-left: 0;
    width: auto;
  }

  /* Mostrar boton hamburguesa en moviles */
  .hamburger {
    display: flex;
  }

  nav ul {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
    gap: 0;
    padding: 20px 0;
    z-index: 1000;
  }

  nav ul.active {
    left: 0;
  }

  nav ul li {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav a {
    font-size: 18px;
  }

  .container {
    margin-top: 10%;
    padding: 0 10px;
  }

  .form-content,
  .form-seleccion {
    padding: 8% 5%;
    border-radius: 20px;
    max-width: 100%;
  }

  .input-field input {
    font-size: 14px;
    padding: 14px 15px;
  }

  .btn-field button {
    width: 100%;
    padding: 12px 8px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px;
  }

  img {
    width: 100px;
    max-width: 60%;
  }

  body {
    height: auto;
    min-height: 100vh;
  }

  .container {
    margin-top: 15%;
  }

  .form-content h5,
  .form-seleccion h5 {
    font-size: 16px;
  }

  .input-field input {
    font-size: 13px;
  }
}
