@import url('https://fonts.googleapis.com/css2?family=Poppins');

:root {
  --card-opacity: 1;
}

/* ====== ESTILOS COMUNES (DISEÑO DE ESCRITORIO) ====== */
body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #e0e0e0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header.page-header {
  display: none;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
}

main.login-card-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.login-card {
  background-color: rgba(255, 255, 255, var(--card-opacity));
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 79em;
  height: 35em;
  position: relative;
}

.login-form-section {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-form-section h1 {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #333;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group label {
  position: absolute;
  top: 12px;
  left: 15px;
  color: #888;
  font-size: 0.9em;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  background-color: transparent;
  padding: 0 5px;
  border-radius: 3px;
  z-index: 1;
}

.input-group input {
  width: 200px;
  padding: 12px 15px;
  border: none;
  border-radius: 25px;
  font-size: 1em;
  outline: none;
  transition: border-color 0.2s;
  background-color: #eeeeee;
  color: black;
}

.input-group input::placeholder {
  color: transparent;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 0.75em;
  color: #555;
}

button {
  width: 150px;
  height: 40px;
  background-color: #e53935;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

button:hover {
  background-color: #c62828;
}

.logos-grid {
  display: grid;
  grid-template-columns: 14fr 14fr 27fr 24fr 21fr;
  gap: 7px;
  margin-top: 40px;
  padding-top: 20px;
  justify-content: center;
  align-items: center;
  width: auto;
  margin: 0 auto;
}

.logos-grid img {
  max-width: 100%;
  height: auto;
  opacity: 0.7;
}

.login-image-section {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.decorative-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-43.9%, -50.0%);
  height: 49em;
  max-height: none;
  object-fit: contain;
}

footer.footer {
  background-color: white;
  color: black;
  text-align: center;
  padding: 0;
  font-size: 0.9em;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
}

/* ====== MEDIA QUERY TABLET/MÓVIL (hasta 900px) ====== */
@media (max-width: 900px) {
  .login-card {
    grid-template-columns: 1fr;
    width: 90%;
    max-width: 25rem;
    height: auto;
    border-radius: 0.9375rem;
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.3);
  }

  .login-image-section {
    display: none;
  }

  body {
    background-image: url('../images/backgroundImage.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  header.page-header {
    display: flex;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    justify-content: flex-end;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: transparent;
  }

  header.page-header img {
    height: 2.5rem;
  }

  .page-container {
    padding: 1.25rem;
    padding-top: 5.5rem;
  }
}

/* ====== MEDIA QUERY MÓVIL PEQUEÑO (hasta 600px) ====== */
@media (max-width: 600px) {
  .login-card {
    padding: 1.5rem;
  }

  .login-form-section h1 {
    font-size: 1.8em;
  }

  .input-group {
    max-width: 100%;
  }

  .input-group input {
    font-size: 0.9em;
    padding: 0.625rem;
  }

  .input-group label {
    font-size: 0.8em;
  }

  button {
    width: 100%;
    font-size: 0.9em;
    padding: 0.625rem;
  }

  .logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  footer.footer {
    font-size: 0.6em;
  }
}
