/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);
  
  /*========== Font and typography ==========*/
  --body-font: "Poppins", sans-serif;
  --h1-font-size: 1.75rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.813rem;
  
  /*========== Font weight ==========*/
  --font-medium: 500;
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body,
input,
button {
  font-size: var(--normal-font-size);
  font-family: var(--body-font);
}

input,
button {
  outline: none;
  border: none;
}

body {
  color: rgb(27, 27, 27);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

/*=============== Login ===============*/
.login {
  position: relative;
  height: 100vh;
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.login--image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* MODIFICACIÓN PRINCIPAL: Formulario ocupa todo el ancho en móvil */
.login--form {
  position: relative;
  background-color: #fff;
  border: 2px solid var(--white-color);
  padding: 2rem 1.5rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(20px);
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login--title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  font-weight: var(--font-medium);
}

.login--content,
.login-box {
  display: grid;
}

.login--content {
  row-gap: 1.75rem;
  margin-bottom: 1.5rem;
}

.login-box {
  grid-template-columns: max-content 1fr;
  align-items: center;
  column-gap: 0.75rem;
  border-bottom: 2px solid rgb(27, 27, 27);
}

.login-icon,
.login-eye {
  font-size: 1.25rem;
}

.login-input {
  width: 100%;
  padding-block: 0.8rem;
  background: none;
  color: rgb(27, 27, 27);
  position: relative;
  z-index: 1;
  font-size: 16px; /* Evita zoom en iOS */
}

.login--input-box {
  position: relative;
}

.login--input-label {
  position: absolute;
  left: 0;
  top: 13px;
  font-weight: var(--font-medium);
  transition: top 0.3s, font-size 0.3s;
}

.login--eye {
  position: absolute;
  right: 0;
  top: 20px;
  z-index: 10;
  cursor: pointer;
}

.login-box:nth-child(2) input {
  padding-right: 1.8rem;
}

.login--check,
.login-check-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--small-font-size);
}

.login--check {
  margin-bottom: 1.75rem;
}

.login--check input {
  width: 14px;
  height: 14px;
}

.login-check-group {
  column-gap: 0.5rem;
}

.forgot-password {
  color: var(--white-color);
}

.forgot-password:hover,
.login-register a:hover {
  text-decoration: underline;
}

.login--button {
  margin-bottom: 1rem;
  padding: 0.75rem 1.2rem;
  width: 100%;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: var(--font-medium);
  background-color: rgb(0, 103, 184);
  color: #fff;
  font-size: 1rem;
}

.login--button--whatsapp {
  margin-bottom: 1rem;
  padding: 0.75rem 1.2rem;
  width: 100%;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: var(--font-medium);
  background-color: #075e54;
  color: #fff;
}

.login-register {
  text-align: center;
}

.login-register a {
  color: var(--white-color);
}

/* Input focus move up label */
.login-input:focus + .login--input-label,
.login-input:not(:placeholder-shown).login-input:not(:focus) + .login--input-label {
  top: -12px;
  font-size: var(--small-font-size);
}

/*=============== BREAKPOINTS ===============*/

/* Para móviles - formulario ocupa todo el ancho */
@media screen and (max-width: 767px) {
  .login {
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .login--form {
    width: 100%;
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* Asegurar que el contenido no se salga */
  .login--form > div[align="left"] {
    text-align: center;
  }
  
  .login--form > div[align="left"] img {
    width: 90px;
    margin: 0 auto;
  }
  
  .login--form > div[align="left"] span {
    font-size: 1.5rem;
  }
  
  /* Mejorar espaciado en móviles pequeños */
  @media screen and (max-width: 360px) {
    .login--form {
      padding: 1.5rem 1rem;
    }
    
    .login--form > div[align="left"] img {
      width: 80px;
    }
    
    .login-input {
      padding-block: 0.7rem;
    }
  }
}

/* Para tablets y escritorio */
@media screen and (min-width: 768px) {
  .login--form {
    width: 450px;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    max-width: 450px;
  }
  
  .login--title {
    font-size: 2rem;
  }
}

/* Para pantallas grandes */
@media screen and (min-width: 1200px) {
  .login--form {
    width: 432px;
    padding: 4rem 3rem 3.5rem;
    border-radius: 1.5rem;
  }
}