/* ── Scroll vertical y video fijo ── */
html, body {
  overflow: hidden !important;
  height: 100% !important;
}
#navbar {
  z-index: 200 !important;
}
#overlay-effect {
  pointer-events: none !important;
  z-index: 0 !important;
}
.video-background {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
section#home {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  /* top se establece dinámicamente por JS según altura del navbar */
  overflow-y: auto !important;
  height: auto !important;
  min-height: unset !important;
}

/* ── Contenedor central ── */
#contenedorCentral {
  height: auto !important;
  min-height: unset !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 16px 16px 60px;
}
#contenidoCentral {
  width: 100%;
  max-width: 460px;
}

/* ── Tarjeta del formulario ── */
#formContainer {
  position: relative;
  z-index: 50;
  background: rgba(0, 10, 40, 0.82);
  border: 1px solid rgba(0, 43, 135, 0.6);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}
#formContainer h2 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}
#formContainer p.subtitulo {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

/* ── Campos del formulario ── */
#formPreApertura .form-group {
  margin-bottom: 16px;
}
#formPreApertura label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  margin-bottom: 4px;
  display: block;
}
#formPreApertura input[type="text"],
#formPreApertura input[type="email"],
#formPreApertura input[type="tel"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  padding: 10px 14px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#formPreApertura input:focus {
  border-color: #002b87;
}
#formPreApertura input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ── Checkbox aviso legal ── */
.acepta-legal-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.acepta-legal-group input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #002b87;
}
.acepta-legal-group label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  margin: 0;
}
.acepta-legal-group a {
  color: #5b8df5;
  text-decoration: underline;
}

/* ── Botón submit ── */
#btnEnviar {
  width: 100%;
  background: #002b87;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s, opacity 0.2s;
}
#btnEnviar:hover    { background: #003db5; }
#btnEnviar:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Spinner del botón ── */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mensaje general bajo el botón ── */
#formMsg {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  display: none;
}
#formMsg.error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
  display: block;
}

/* ── Wrapper input + icono ── */
.input-wrapper {
  position: relative;
}
.input-wrapper input {
  padding-right: 36px;
}
.field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}

/* ── Mensajes de error por campo ── */
.field-error {
  color: #f87171;
  font-size: 0.76rem;
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }

/* ── Estados del input ── */
input.is-valid   { border-color: #22c55e !important; }
input.is-invalid { border-color: #ef4444 !important; }

/* ── Tarjeta de éxito ── */
#successCard {
  display: none;
  text-align: center;
  padding: 16px 8px;
}
#successCard .success-check {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 16px;
}
#successCard h3 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
#successCard p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── Botón Home: visible en todos los tamaños (no hay versión desktop aquí) ── */
.pedir-cita-btn--mobile {
  display: inline-flex !important;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  #contenedorCentral {
    padding: 16px 16px 80px;
  }
  #formContainer {
    padding: 24px 18px;
  }
  #formContainer h2 {
    font-size: 1.1rem;
  }
}
