/* Reset y base */
* {
  box-sizing: border-box;
}

/* Fondo y layout */
body{
  margin:0;
  padding:0;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  background-image:url(../img/FONDO_PAGINA_PRINCIPAL.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height:100vh;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  overflow-x: hidden;
}

/* Logo */
.logo-esquina{
  position:fixed;
  top:6%;
  left:2%;
  width:140px;
  height:auto;
  z-index:10;
  transition: all 0.3s ease;
}

.container{
  display:flex;
  align-items:center;
  width:100%;
  height:100vh;
  padding-left:5%;
  padding-right:2%;
}

.text-box{
  margin-top: 100px;
  display:inline-block;        
  max-width: 1000px;
  width: 100%;
}

.headline{
  margin:0 0 18px 0;
  line-height:1.02;            
  letter-spacing:0;
}

.line1{
  display:block;
  font-weight:800;
  color:#000;
  font-size: 89px;
}

.line2{
  display:block;
  color:#000;
  font-size: 45px;
  font-weight:800;
}

.line3{
  display:block;
  color:#0085CE;
  font-weight:800;
  font-size: 149px;
  letter-spacing:0.3px;        
}

.headline::after{
  content:"";
  display:block;
  height:3px;
  width:80%;                    
  background:#0085CE;
  margin-top:16px;
  border-radius:2px;
}

.btn {
  padding: 36px 72px;         
  background: #fff;
  border: 3px solid #0085CE;  
  border-radius: 12px;
  font-size: 2rem;         
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}

.btn:hover {
  background: #0085CE;
  color: #fff;
  transform: translateY(-2px) scale(1.03); 
}

/* MODAL INGRESO */
.overlay{
  position:fixed; 
  inset:0; 
  z-index:1000;
  background:rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  display:flex; 
  align-items:center; 
  justify-content:center;
  opacity:0; 
  pointer-events:none; 
  transition:opacity .2s ease;
  padding: 20px;
}
.overlay.open{ opacity:1; pointer-events:auto; }

.modal {
  width: min(400px, 100%);   
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 90vh;
  overflow-y: auto;
}

.modal header {
  text-align: center;
  margin-bottom: 22px;
}

.modal header img {
  width: 120px;   
  height: auto;
}

.modal form {
  width: 100%;               
  display: flex;
  flex-direction: column;
  gap: 16px;                
}

.input {
  width: 100%;               
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  background: #ececec;
  font-size: 1rem;
  outline: 2px solid transparent;
  box-sizing: border-box;    
}

.input:focus {
  outline-color: #0085CE;
  background: #f5f8ff;
}

.modal .btn-primary {
  margin-top: 10px;
  padding: 14px 20px;
  border: 2px solid #0085CE;
  border-radius: 10px;
  background: #fff;
  font-weight: 700; 
  cursor: pointer;
  transition: .2s ease;
  width: 100%;               
}

.modal .btn-primary:hover {
  background: #0085CE;
  color: #fff;
}

/* RESPONSIVE DESIGN */

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  .logo-esquina {
    width: 120px;
    top: 4%;
    left: 3%;
  }

  .container {
    margin-top: 0rem;
    padding-left: 8%;
    padding-right: 4%;
    align-items: center;
  }

  .text-box {
    margin-top: 80px;
    max-width: 800px;
  }

  .line1 {
    font-size: 72px;
  }

  .line2 {
    font-size: 38px;
  }

  .line3 {
    font-size: 120px;
  }

  .btn {
    padding: 30px 60px;
    font-size: 1.8rem;
  }
}

/* Mobile Grande (481px - 767px) */
@media (max-width: 767px) {
  body {
    background-image: url(../img/mobil_bg.png);
    /* Aplicar desenfoque sutil al fondo */
    background-color: rgb(0, 0, 0); /* capa semitransparente para permitir backdrop-filter */
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(1px);
    align-items: flex-start;
  }

  .logo-esquina {
    width: 100px;
    top: 2%;
    left: 4%;
  }

  .container {
    padding-left: 6%;
    padding-right: 6%;
    min-height: 100vh;
    align-items: center;
  }

  .text-box {
    margin-top: 40px;
    text-align: center;
    width: 100%;
  }

  .line1 {
    font-size: 48px;
  }

  .line2 {
    font-size: 28px;
    margin: 8px 0;
  }

  .line3 {
    font-size: 85px;
  }

  .headline {
    margin: 0 0 25px 0;
  }

  .headline::after {
    margin-top: 20px;
  }

  .btn {
    padding: 24px 48px;
    font-size: 1.4rem;
    width: 100%;
    max-width: 280px;
  }

  .btn:hover {
    transform: translateY(-1px) scale(1.02);
  }

  /* Modal ajustes para mobile */
  .overlay {
    background-color: #000000b2; 
    backdrop-filter: blur(15px);
    padding: 15px;
    align-items: center;
  }

  .modal {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px;
    margin-bottom: 0;
    max-height: 85vh;
  }

  .modal header img {
    width: 100px;
  }

  .input {
    padding: 16px;
    font-size: 16px; /* Evita zoom en iOS */
  }
}

/* Mobile Pequeño (320px - 480px) */
@media (max-width: 480px) {
  .logo-esquina {
    width: 85px;
    top: 2%;
    left: 5%;
  }

  .container {
    padding-left: 5%;
    padding-right: 5%;
  }

  .text-box {
    margin-top: 20px;
  }

  .line1 {
    font-size: 38px;
  }

  .line2 {
    font-size: 22px;
  }

  .line3 {
    font-size: 65px;
  }

  .btn {
    padding: 20px 36px;
    font-size: 1.2rem;
    max-width: 260px;
  }

  .modal {
    padding: 20px 16px;
    max-height: 80vh;
  }

  .modal header {
    margin-bottom: 18px;
  }

  .modal header img {
    width: 85px;
  }

  .modal form {
    gap: 14px;
  }
}

/* Mobile Muy Pequeño (menos de 320px) */
@media (max-width: 319px) {
  .logo-esquina {
    width: 75px;
  }

  .line1 {
    font-size: 32px;
  }

  .line2 {
    font-size: 18px;
  }

  .line3 {
    font-size: 55px;
  }

  .btn {
    padding: 18px 30px;
    font-size: 1.1rem;
    max-width: 240px;
  }
}

/* Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 767px) {
  body {
    background-image: url(../img/mobil_bg.png) !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
  }

  .container {
    align-items: flex-start;
    padding-top: 20px;
  }

  .text-box {
    margin-top: 10px;
  }

  .line1 {
    font-size: 36px;
  }

  .line2 {
    font-size: 20px;
  }

  .line3 {
    font-size: 60px;
  }

  .btn {
    padding: 16px 32px;
    font-size: 1.1rem;
  }

  .logo-esquina {
    width: 70px;
    top: 2%;
  }

  .modal {
    max-height: 95vh;
    margin: 10px 0;
  }
}

/* Mejoras adicionales para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover {
    transform: none;
  }
}

/* Alto contraste */
@media (prefers-contrast: high) {
  .btn {
    border-width: 4px;
  }

  .input:focus {
    outline-width: 3px;
  }
}