/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  /*scroll-behavior: smooth;*/
  overflow: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #1a2332;
  color: white;
  /* Cambiar overflow-x: hidden por overflow-x: auto */
  overflow-x: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Agregar estas propiedades para mejor scroll en móviles */
  -webkit-overflow-scrolling: touch;
  /*overscroll-behavior: contain;*/

}

.screen-body-landing{
  background-image:  linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),url('./../img/material/fondo1.png');
  /*background-size: cover;
  background-position: center;*/
  background-size: 150%;           /* imagen más grande que el contenedor */
  background-position: top left; 
  background-repeat: no-repeat;
  background-attachment: fixed; /* 👈 hace que la imagen no se mueva */
}

.screen-body-register{
  background-image:  linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),url('./../img/material/fondo2.png');
  /*background-size: cover;
  background-position: center;*/
  background-size: 150%;           /* imagen más grande que el contenedor */
  background-position: top left; 
  background-repeat: no-repeat;
  background-attachment: fixed; /* 👈 hace que la imagen no se mueva */
}

.screen-body-login{
  background-image:  linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),url('./../img/material/fondo2.png');
  /*background-size: cover;
  background-position: center;*/
  background-size: 150%;           /* imagen más grande que el contenedor */
  background-position: top left; 
  background-repeat: no-repeat;
  background-attachment: fixed; /* 👈 hace que la imagen no se mueva */
}

/* Configuración mejorada para móviles */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Remover overflow-x: hidden que puede causar problemas */
  }

  input,
  textarea,
  button {
    -webkit-appearance: none;
    border-radius: 0;
  }
}

/* Fallback para navegadores que no soportan dvh */
@supports not (height: 100dvh) {
  .screen {
    min-height: 100vh;
  }
}

/* IMAGEN DE FONDO EN HTML */
.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none; /* No interfiere con el contenido */
}

/* Capa oscura sobre la imagen */
/*.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26, 35, 50, 0.85) 0%,
    rgba(15, 23, 35, 0.92) 50%,
    rgba(10, 18, 30, 0.95) 100%
  );
  z-index: 1;
  pointer-events: none;
}*/

.container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 90vh;
  padding: 0 20px;
  padding-top: 80px;
  /* Agregar padding-top adicional para compensar la barra de direcciones */
  padding-top: max(80px, env(safe-area-inset-top, 80px));
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}


/* Fallback para navegadores que no soportan dvh */
@supports not (height: 100dvh) {
  .container {
    min-height: 100vh;
  }
}

/* HEADER MEJORADO PARA MÓVILES */
.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  min-height: 80px;
  /*background: linear-gradient(135deg, rgba(26, 35, 50, 0.95) 0%, rgba(15, 23, 35, 0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);*/
  z-index: 1000;
  /* Agregar estas propiedades para mejor comportamiento */
  will-change: transform;
  -webkit-transform: translateX(-50%) translateZ(0);
  transform: translateX(-50%) translateZ(0);
}

.logo-title {
    font-size: 78px;
    font-weight: bold;
    text-align: center;
    /*margin: 10px 0;*/
    margin:0;
    text-align:left;
}

.logo-title .c { color: white; }
.logo-title .i { color: #007AFF; }
.logo-title .i2 { color: #007AFF; }
.logo-title .l { color: white; }

/* Header para pantallas más grandes */
@media (min-width: 481px) {
  .header {
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
  }
}

@media (min-width: 768px) {
  .header {
    max-width: 600px;
    padding: 20px 40px;
  }

  .container {
    max-width: 600px;
    padding: 0 40px;
    padding-top: 80px;
  }
}

@media (min-width: 1024px) {
  .header {
    max-width: 1200px;
    padding: 20px 60px;
  }

  .container {
    max-width: 1200px;
    padding: 0 60px;
    padding-top: 80px;
  }
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-icon-landing {
  width: 40px;
  height: 40px;
  /*background: trasnparent;*/
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
}

.logo-icon-landing img, 
.logo-icon-landing svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.login-btn {
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: white;
    /* font-size: 16px; */
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 15px;
    transition: background-color 0.2s ease;
    text-decoration: none;
   /* background: rgba(255, 255, 255, 0.05)*/
   background:#10294e;
}

/*.login-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}*/

.back-btn {
 -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}*/

/* Contenido principal */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  /*padding: 20px 0;*/
  padding: 0 0 0 0;
  min-height: calc(100vh - 160px); /* Altura menos header y footer */
}

.content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: start;
}

.main-title {
  font-size: clamp(48px, 12vw, 72px);
  font-weight: 300;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.main-title .highlight {
  color: #007aff;
}

.description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  font-style: italic;
  font-weight:200;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #ffffffd9;
  font-weight: 500;
}

.feature-icon {
    color:black;
  width: 30px;
  height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
  /*background: rgba(255, 255, 255, 0.1);*/
  background:white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
    box-sizing: border-box;
}

.feature-icon img{
    height:18px;
}

.image-section {
  display: none;
}

.person-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.person-image::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

/* Contenido de autenticación */
.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
  min-height: calc(100vh - 160px);
}

.auth-title {
  /*font-size: 28px;
  font-weight: 600;*/
    font-size: 26px;
    font-weight: 700;
  text-align: center;
  /*margin-bottom: 16px;*/
  line-height: 1.3;
  margin-bottom:5px;
}

.auth-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.5;
  font-style:italic;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom:-17px;
}

/* Botones */
.google-btn {
  /*display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: white;
  color: #333;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
     
    margin: 0 20px;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #333;
    border: none;
    border-radius: 70px;
    padding: 11px 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.google-btn svg{
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    position: absolute;
    left: 20px;
}

.google-btn:hover {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.google-btn:active {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transform: translateY(0);
}

.primary-btn {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  background: #007aff;
  color: white;
  border: none;
  border-radius: 22px;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  width: 100%;
}

.primary-btn:hover {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  background: #0056cc;
  /*transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);*/
}

.primary-btn:active {
  transform: translateY(0);
}

/* Divisor */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.divider span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* Formularios */
.form-group {
  display: flex;
  flex-direction: column;
  margin:0 20px;
}

.form-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 60px;
  padding: 11px;
  color: white;
  font-size: 12px;
  transition: all 0.2s ease;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
  outline: none;
  border-color: #007aff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-input.valid {
  border-color: #34c759;
}

.form-input.invalid {
  border-color: #ff3b30;
}

.password-input {
  position: relative;
  width: 100%;
}

.password-input input.form-input {
  width: 100%;
  padding-right: 40px; /* espacio para el icono */
  box-sizing: border-box;
}

.password-toggle {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  position: absolute;
  top: 50%;
  right: 10px; /* margen derecho de 10px */
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  /*transition: color 0.2s ease;*/
  user-select: none;
}

/*.password-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}*/

/* Checkbox */
.checkbox-group {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  margin-top: 8px;
    margin-right: 20px;
    margin-left: 20px;
}

.checkbox-label {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.checkbox {
  display: none;
}

/*.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.checkbox:checked + .checkmark {
  background: #007aff;
  border-color: #007aff;
}

.checkbox:checked + .checkmark::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}*/
.switch {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  position: relative;
  display: inline-block;
    width: 32px;
    height: 14px;
    margin-top:1px;
}

/* Oculta el checkbox real */
.switch input {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  opacity: 0;
  width: 0;
  height: 0;
}
/* Track: sin fondo, solo borde naranja */
.checkmark {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: transparent;
  border: 2px solid #ff7f00; /* contorno naranja */
  border-radius: 34px;
  transition: background-color 0.3s, border-color 0.3s;
}

/* El círculo del switch */
.checkmark::before {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  position: absolute;
  content: "";
  height: 9px;
  width: 9px;
  left: 2px;
  bottom: 0.5px;
  background-color: #ff7f00;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* Cuando está checked, fondo naranja y sin borde */
.switch input:checked + .checkmark {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  background-color: rgb(255 139 17 / 40%); /* fondo naranja */
  border-color: #ff7f00;     /* quitar borde visible */
}

/* Mueve el círculo */
.switch input:checked + .checkmark::before {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transform: translateX(13px);
}

.checkbox-text {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    font-size:10px;
  color: rgba(255, 255, 255, 0.7);
}

.link-terms{
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    font-style:italic;
}

.link {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  color: #007aff;
  text-decoration: none;
}

.link:hover ,.link-terms:hover {
  text-decoration: none;
}

.forgot-password {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  color: #007aff;
  text-decoration: none;
  font-size: 14px;
  text-align: right;
  margin-top: 8px;
}

/*.forgot-password:hover {
  text-decoration: underline;
}*/

/* Footer */
.footer {
  padding: 20px 0 40px;
  margin-top: auto;
  margin: 0 20px;
}

.auth-links {
  text-align: center;
  margin-top: 20px;
}

.auth-links p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Media Queries para contenido principal */
@media (min-width: 768px) {
  .main-content {
    flex-direction: row;
    align-items: center;
    gap: 60px;
  }

  .content-section {
    flex: 1.2;
  }

  .image-section {
    display: block;
    flex: 0.8;
  }

  .auth-content {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .main-content {
    gap: 80px;
  }

  .main-title {
    font-size: 84px;
  }

  .description {
    font-size: 18px;
  }

  .feature-item {
    font-size: 18px;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen.active {
  animation: fadeIn 0.3s ease-out;
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .google-btn:hover,
  .primary-btn:hover,
  .login-btn:hover,
  .back-btn:hover,
  .password-toggle:hover {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /*transform: none;
    box-shadow: none;*/
  }

  .google-btn:active,
  .primary-btn:active {
    transform: scale(0.98);
  }
}

/* Soporte para modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
  body {
    background: #0a0e1a;
  }

  .background-overlay {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(5, 8, 15, 0.98) 50%, rgba(2, 4, 10, 0.99) 100%);
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Soporte para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-icon {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .google-btn {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  .primary-btn {
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  }
}

/* Fix para iOS scroll */
@supports (-webkit-touch-callout: none) {
  .screen {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }

  /* Evitar que el header se mueva en iOS */
  .header {
    position: fixed;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }
}

/* Ocultar scrollbar pero mantener funcionalidad */
.screen::-webkit-scrollbar {
  display: none;
}

.screen {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mt-20{
    margin-top:20px;
}

.mt-40{
    margin-top:40px;
}

.mt-60{
    margin-top:60px;
}

.mt-80{
    margin-top:80px;
}

.mt-100{
    margin-top:100px;
}

.icono {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: green;
    display: none;
}

.icono img {
    width: 15px;
    height: 15px;
}

.v-password {
    display: none;
    color: red;
    text-align: right;
    font-size: 10px;
    margin-top:2px;
}

.error-mail {
    display: none;
    color: red;
    font-size: 10px;
    text-align: justify;
    margin-right: 20px;
    margin-left: 20px;
    margin-top: -17px;
}

.errors {
    display: none;
    color: red;
    font-size: 10px;
    text-align: left;
    margin-right: 0px;
    margin-top: 2px;
}

.text-error{
    margin-bottom: 20px;
    text-align: left;
    margin-left: 20px;
    margin-right: 20px;
    font-size: 13px;
}


.mb-20{
    margin-bottom:20px;
}


.mb-25{
    margin-bottom:25px;
}

.mb-30{
    margin-bottom:30px;
}

.header-content-left{
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    display: inline-flex;
    gap: 5px;
}

.language-selector {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  position: relative;
  display: inline-block;
}

#current-language {
  background: #10294e;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100px;
  justify-content: center;
}

#current-language img {
  width: 18px;
  height: 18px;
}

.dropdown {
  position: absolute;
  top: 45px;
  left: 0;
  background: #10294e;
  border-radius: 10px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: none;
  width: 150px;
  z-index: 1000;
}

.img-bandera-lang{
    object-fit: cover;
    width: 18px;
    height: 18px;
    border-radius: 100px;
}

.dropdown li {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.dropdown li:hover {
  background: #1c3b6f;
}

/*.dropdown li img {
  width: 20px;
}*/

.dropdown li .check {
  margin-left: auto;
  visibility: hidden;
}

.dropdown li.selected .check {
  visibility: visible;
}

.check-icon {
  margin-left: auto;
  display: none;
}

li.selected .check-icon {
    margin: auto;
    margin-right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color:rgb(0, 208, 132);
  border-radius:100%;
  width:14px;
  height:14px;
}

.check-icon svg {
  display: block;   /* Elimina espacio adicional */
  width: 14px;
  height: 14px;
}

.check-icon i {
  color: black;
  font-size: 7px;
}