/* Estilos base */
body {
  /* Fondo claro original */
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 25%, #ffffff 50%, #f1f3f4 75%, #f8f9fa 100%);
  position: relative;
  overflow-x: hidden;
}

/* Elementos decorativos minimal aeronÃÂ¡uticos (dos arcos suaves y halo) */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
body::before { background:
  radial-gradient(circle at 70% 20%, rgba(0,123,255,.12), transparent 60%),
  radial-gradient(circle at 15% 75%, rgba(40,167,69,.10), transparent 65%);
  opacity: .9;
}
body::after { background:
  conic-gradient(from 210deg at 85% 10%, rgba(0,123,255,.18), transparent 40%),
  conic-gradient(from 40deg at 10% 90%, rgba(40,167,69,.15), transparent 55%);
  mask: linear-gradient(180deg,#fff 25%,rgba(255,255,255,.4));
  opacity:.45;
  mix-blend-mode: multiply;
}

/* Fade-in general */
@media (prefers-reduced-motion:no-preference){
  body { animation: fadeInBody .9s ease-out; }
  @keyframes fadeInBody { from { opacity:0;} to { opacity:1;} }
}

/* TipografÃÂ­a fluida para tÃÂ­tulos y subtÃÂ­tulos (se aplica en mÃÂ³vil y tablet) */
.tablet-title {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .5px;
}

/* Asegurar que Bootstrap (.fs-*) no anule el tamaÃÂ±o */
.fs-1.tablet-title,
.fs-2.tablet-title,
.fs-3.tablet-title,
.fs-4.tablet-title,
.tablet-title { font-size: clamp(2.4rem, 7vw, 3.8rem) !important; }

.tablet-subtitle {
  font-size: clamp(1.2rem, 4.2vw, 1.9rem);
  line-height: 1.35;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  color: #4e5c66 !important;
}

.fs-5.tablet-subtitle,
.fs-6.tablet-subtitle,
.tablet-subtitle { font-size: clamp(1.2rem, 4.2vw, 1.9rem) !important; }

.tablet-button { font-size: clamp(1.4rem, 4.5vw, 2.2rem); font-weight:600; letter-spacing:.5px; }

.fs-4.tablet-button,
.btn-lg.tablet-button,
.tablet-button { font-size: clamp(1.4rem, 4.5vw, 2.2rem) !important; }

/* Logo base (sobrescribe inline max-width con !important si existe) */
.tablet-logo { max-width: clamp(260px, 75vw, 620px) !important; width: 100%; height: auto; }

#qrcode svg { 
  width: 100%; 
  height: auto; 
  border-radius: .5rem; 
}

@keyframes pulse { 
  0%,100%{transform:scale(1)} 
  50%{transform:scale(1.03)} 
}

.pulse { 
  animation: pulse 3s ease-in-out infinite; 
}

/* Estilos responsivos para tablet */
@media (min-width: 768px) and (min-height: 800px) {
  .tablet-layout {
    display: grid;
    grid-template-rows: auto 1fr auto;
  min-height: 100dvh; /* Mejor soporte en navegadores mÃÂ³viles modernos */
  gap: 3rem;
  padding: 4rem 3rem 3rem;
    text-align: center; /* Centrar todo el contenido en tablet */
  }
  
  .tablet-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem; /* MÃÂ¡s separaciÃÂ³n para ocupar vertical */
    text-align: center;
  }
  
  .tablet-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    text-align: center;
  }
  
  .tablet-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  
  .tablet-logo {
    max-width: 640px !important;
    width: 82%;
  }
  
  .tablet-title {
    font-size: clamp(3.5rem, 5.5vw, 5.2rem) !important;
    margin-bottom: 1.2rem !important;
    text-align: center !important;
  }
  
  .tablet-subtitle {
    font-size: clamp(1.6rem, 2.2vw, 2.3rem) !important;
    max-width: 70%;
    line-height: 1.4;
    text-align: center !important;
    margin: 0 auto;
  }
  
  .tablet-button {
    font-size: clamp(2rem, 2.4vw, 2.6rem) !important;
    padding: clamp(1.4rem, 2vw, 2rem) clamp(3.2rem, 5vw, 5rem) !important;
    margin: 0 !important;
  }
  
  .tablet-qr {
    max-width: 320px !important;
    width: 100% !important;
    margin: 0 auto;
  }
  
  .tablet-qr-text {
    font-size: 1.2rem !important;
    text-align: center !important;
  }
}

/* Estilos para mÃÂ³vil - asegurar centrado */
@media (max-width: 767px) {
  .mobile-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  min-height: 100dvh;
  padding: 2.5rem 1.2rem 2rem;
  }
  
  .mobile-layout > * {
    width: 100%;
    max-width: 480px;
    text-align: center;
    margin: 0 auto 2.4rem auto; /* MÃÂ¡s separaciÃÂ³n vertical controlada */
  }

  .mobile-layout .tablet-title {
    margin-top: 0;
  }

  .mobile-layout .tablet-subtitle {
    padding: 0 .3rem;
  }

  .mobile-layout .tablet-button {
    width: 100%;
    padding: 1.2rem 1rem !important;
  }
  
  .mobile-layout .btn {
    display: block;
    margin: 1rem auto;
    text-align: center;
  }
  
  .mobile-layout .tablet-qr {
    margin: 0 auto !important;
  }
  
  .mobile-layout p {
    text-align: center !important;
  }
}

/* Mejoras visuales */
.content-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* HERO NUEVO */
.hero-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1.2rem, 2.6vw, 2.8rem) clamp(1rem, 3.5vw, 4rem) 3rem; /* Restaurar padding mÃÂ¡s neutro */
  min-height: 100dvh;
  align-content: center; /* Centrado vertical general */
}

@media (min-width: 992px) {
  .hero-wrapper { grid-template-columns: 1fr 420px; align-items: center; column-gap: clamp(3rem,6vw,6rem); }
  .hero-main { text-align: left; }
  .hero-main .tablet-title, .hero-main .tablet-subtitle { text-align: left !important; margin-left:0; }
  .hero-qr { justify-self: center; }
}

.hero-main { text-align:center; }

/* Espaciados refinados */
.hero-main .tablet-logo { margin-top: clamp(0rem, -2vw, -1rem); margin-bottom: clamp(1.8rem,3.5vw,3.2rem) !important; }
.hero-main .tablet-title { margin-top: 0; margin-bottom: clamp(1.2rem,2.2vw,2.4rem) !important; }
.hero-main .tablet-subtitle { margin-bottom: clamp(2rem,3.2vw,3.4rem) !important; }
.hero-actions { margin-top: clamp(.5rem,1vw,1rem); }

/* SeparaciÃÂ³n adicional del QR en layouts estrechos */
@media (max-width: 991.98px) {
  .hero-qr { margin-top: 1.5rem; }
}

.hero-actions { margin-top: clamp(1.8rem,3vw,3rem); }

.hero-qr-card { padding: 2rem 2.2rem; }

.hero-note { font-size: .95rem; color:#6c757d; margin-top: .75rem; }

/* Mejorar botÃÂ³n principal */
.btn-primary-cta { position:relative; overflow:hidden; }
.btn-primary-cta::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.35) 50%,rgba(255,255,255,0) 100%); transform:translateX(-100%); }
@media (prefers-reduced-motion:no-preference){
  .btn-primary-cta:hover::after { animation: sheen .9s linear; }
  @keyframes sheen { to { transform:translateX(100%);} }
}

.btn-custom {
  background: linear-gradient(45deg, #28a745, #20c997);
  border: none;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  transition: all 0.3s ease;
}

.btn-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  background: linear-gradient(45deg, #20c997, #28a745);
}

/* Variante roja con mismo estilo que el verde */
.btn-danger.btn-custom {
  background: linear-gradient(45deg, #dc3545, #ff6b6b); /* Rojo degradado */
  border: none;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.35); /* sombra igual que el verde */
  transition: all 0.3s ease;
}

.btn-danger.btn-custom:hover {
  transform: translateY(-2px);
  background: linear-gradient(45deg, #ff6b6b, #dc3545);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.45);
}



/* Formulario pantalla completa sin contenedor extra */
.visita-form { padding: 0; margin:0 auto; width:100%; max-width: 760px; }

/* Asegurar centrado vertical cuando main usa min-vh-100 */
main.min-vh-100 { display:flex !important; flex-direction:column; justify-content:center; }
.visita-form .row { max-width: 980px; }
/* Solo en mÃ³vil */
@media (max-width: 767.98px){
  .visita-form .row.g-3 > [class^="col-"] { flex:0 0 100%; max-width:100%; }
}

.visita-form + .row { margin-bottom: 0; }
.visita-form > .text-center { margin-top: .5rem; }
.visita-form label { font-weight: 500; }
.visita-form button { font-weight:600; letter-spacing:.5px; }
.visita-form input.form-control { padding-top:.9rem; padding-bottom:.9rem; }

/* Estilos especÃ­ficos para campos de fecha y hora en tablet */
@media (min-width: 768px) {
  .visita-form .row.g-3 > .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .visita-form .row.g-3 > .col-md-4:first-of-type {
    padding-right: 0.5rem;
  }
  
  .visita-form .row.g-3 > .col-md-4:nth-of-type(2) {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  .visita-form .row.g-3 > .col-md-4:last-of-type {
    padding-left: 0.5rem;
  }
  
  /* Asegurar que los inputs tengan el mismo tamaÃ±o */
  .visita-form input[type="date"],
  .visita-form input[type="time"] {
    width: 100%;
  }
}

/* Estilos para mÃ³vil - campos apilados */
@media (max-width: 767px) {
  .visita-form .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .hero-main .tablet-logo {
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    padding-top: 0.5rem;
  }
  
  .hero-wrapper {
    padding-top: clamp(2rem, 4vw, 3rem) !important;
  }
}
