/* Variables */
:root {
  --primary-color: #336699;
  --primary-hover: #31415b;
  --primary-inactive: #73a3d6;
  --danger-color: #dc3545;
  --text-light: #fff;
  --text-dark: #333;
  --link-color: #336699;
}

/* Font Imports */
@font-face {
  font-family: "Montserrat";
  font-weight: 300;
  src: url("../fonts/montserrat/Montserrat-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 400;
  src: url("../fonts/montserrat/Montserrat-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 600;
  src: url("../fonts/montserrat/Montserrat-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 700;
  src: url("../fonts/montserrat/Montserrat-Bold.ttf") format("truetype");
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f0f0f0;
}

#background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1s ease;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease; /* Transición más rápida para la imagen */
}

.background-image.loaded {
  opacity: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

#terminos_condiciones {
  margin-right: 5px;
}

.text-center {
  text-align: center;
}

/* Layout */
.login-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.login-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 1rem;
}

.login-card {
  background: #fff;
  padding: 25px;
  margin-left: 5em;
  border-radius: 10px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid gray;
}

.logo-container {
  margin-bottom: 1.5rem;
}

.card-logo {
  width: 100%;
  max-width: 150px;
  height: auto;
  margin-bottom: 15px;
}

/* Form Styles */
.loginForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floating-label-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.floating-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
}

.floating-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.floating-label-group::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease-in-out;
}

.floating-label-group:focus-within::after {
  width: 100%;
  right: auto;
  left: 0;
}

.floating-label {
  position: absolute;
  font-size: 15px;
  left: 14px;
  top: 25%;
  transform: translateY(7%);
  transition: all 0.2s ease-in-out;
  color: #666;
  pointer-events: none;
  background: white;
  padding: 0 5px;
}

.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
  top: -10px;
  font-size: 0.85rem;
  color: var(--primary-color);
}

.form-group--checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-dark);
}

.terms-link {
  color: var(--link-color);
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  display: block;
}

.error-container {
  padding: 0.5rem;
  color: var(--danger-color);
  font-size: 1rem;
  text-align: center;
}

/* Buttons */
.form-actions {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 10px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-light);
  border: none;
  border-radius: 5px;
  transition: background-color 0.4s;
}

.btn-primary {
  background-color: var(--primary-color);
}

.btn-primary:hover{
  background-color: var(--primary-hover);
  cursor: pointer;
}

.btn-secondary {
  background-color: var(--primary-color);
  text-decoration: none;
}

.btn-secondary:hover:not([aria-disabled="true"]) {
  background-color: var(--primary-hover);
}

.btn:disabled,
.btn.inactive,
.btn[aria-disabled="true"] {
  background-color: var(--primary-inactive);
  cursor: not-allowed;
}

/* Branding */
.branding-logo {
  max-height: 40px;
  width: auto;
}

/* Logo de Aplicativo */
.imagen-inferior-derecha {
  position: absolute;
  bottom: 120px;
  right: 0px;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.900);
  border-radius: 20px 0 0 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid gray;
}

.imagen-inferior-derecha img {
  max-width: 600px;
  height: auto;
  margin: 5px 30px;
}

/* Footer */
.site-footer {
  background: #333;
  text-align: center;
  color: var(--text-light);
}

.footer-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 50px 0 50px;
}

.footer-logo {
  max-width: 120px;
  height: auto;
}

.footer-text {
  font-weight: 400;
  font-size: 12px;
  width: 210px;
}

#footer-text {
  width: auto;
}

.footer-link {
  color: var(--text-light);
  font-size: 12px;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Switch Styles */
.switch-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-label {
  font-size: 12px;
  color: var(--text-dark);
  font-weight: 400;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: background-color 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: transform 0.4s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--primary-color);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* Responsive Design */
@media (max-width: 600px) {
  .login-card {
      padding: 15px;
      margin-left: 0em;
  }

  .footer-content {
      flex-direction: column;
      gap: 0.5rem;
      margin: 0;
  }

  .switch-container {
      top: 10px;
      right: 10px;
      padding: 6px 10px;
  }

  .switch-label {
      font-size: 11px;
  }

  .switch {
      width: 40px;
      height: 24px;
  }

  .slider:before {
      height: 16px;
      width: 16px;
      left: 4px;
      bottom: 4px;
  }

  .switch input:checked + .slider:before {
      transform: translateX(16px);
  }
}

@media (max-width: 1200px) {
  .imagen-inferior-derecha img {
      max-width: 400px;
  }  
}

@media (max-width: 760px) and (max-height: 1000px) {
  .imagen-inferior-derecha {
      display: none;
  }

  .login-main{
    justify-content: center;
  }

  .login-card{
    margin-left: 0;
  }

  
}