/* ==========================================================================
   ESTILOS BASE: MÓVIL (Por defecto)
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- 1. NAVBAR Y MENÚ DESPLEGABLE MÓVIL --- */
.navbar {
  background: #ffffff;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky; /* Mantiene el sticky */
  top: 0;
  z-index: 999;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
  white-space: nowrap;
}

.logo span {
  color: #1e3d6b;
}

.logo .azul {
  color: #3b82f6;
}

.logo img {
  margin-right: 8px;
  width: 32px;
  height: auto;
  vertical-align: middle;
}

/* Botones Hamburguesa (Solo propiedades visuales base) */
.menu-burger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  z-index: 1030;
}

.menu-burger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #0f172a;
  border-radius: 3px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* --- CONTROL DE DETECCIÓN DE BOTONES --- */

/* Forzamos que por defecto la cruz empiece oculta en esta página */
.burger-close {
  display: none;
}

/* Si el menú móvil está activo en la URL, hacemos el intercambio definitivo */
.navbar:has(#menu-movil:target) .burger-open {
  display: none !important;
}

.navbar:has(#menu-movil:target) .burger-close {
  display: flex !important;
}

/* Transformación de la cruz exacta */
.navbar:has(#menu-movil:target) .burger-close span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar:has(#menu-movil:target) .burger-close span:nth-child(2) {
  opacity: 0;
}
.navbar:has(#menu-movil:target) .burger-close span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* PANEL DEL MENÚ DESPLEGABLE (Móvil) */
.navbar .menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 80px 24px 24px 24px; /* Tu padding personalizado */
  gap: 16px;
  box-sizing: border-box;
  z-index: 1020;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Al abrirse el target */
.navbar .menu:target {
  right: 0;
}

.navbar .menu a {
  display: block;
  width: 100%;
  font-size: 16px;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 0;
}

/* Tu botón personalizado con fondo azul oscuro y texto blanco */
.menu .btn-login {
  background: #1e3d6b;
  color: #ffffff !important;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  margin-top: 10px;
  display: inline-block;
  width: 100%;
}

/* --- 2. HERO DE ALTA FIDELIDAD --- */
.explicativa-hero {
  background: radial-gradient(circle at 50% 0%, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 40px 16px;
  text-align: center;
}

.badge-exclusivo {
  background: #1e3a8a;
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 16px;
}

.explicativa-hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.explicativa-hero p {
  color: #94a3b8;
  max-width: 650px;
  margin: 0 auto;
  font-size: 14px;
}

/* --- 3. MAQUETACIÓN DE FLUJO DE TRABAJO --- */
.page-main-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px auto 60px auto;
  width: 100%;
}

.content-column,
.sidebar-form-column {
  width: 100%;
}

/* --- 4. BLOQUES INFORMATIVOS Y TARIFAS --- */
.explicativa-block {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.explicativa-block h3 {
  color: var(--brand-dark, #0f172a);
  font-size: 17px;
  margin-bottom: 12px;
}

.explicativa-block p {
  color: var(--text-primary, #475569);
  font-size: 13.5px;
  line-height: 1.6;
}

.explicativa-block-highlight {
  border-left: 4px solid #eab308;
  border-radius: 0 12px 12px 0;
}

.price-clarification {
  background: #f0f7ff;
  border-left: 4px solid #0284c7;
  padding: 16px;
  border-radius: 8px;
  margin-top: 20px;
}

.price-clarification strong {
  color: #0369a1;
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.price-clarification p {
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.6;
}

/* --- 5. CAPTURA DE LEADS (FORMULARIO OSCURO) --- */
.sticky-form-card {
  background: #1e293b;
  color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

.sticky-form-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #ffffff;
}

.sticky-form-card p {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.5;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #cbd5e1;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #ffffff;
  font-size: 13.5px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-field input:focus,
.form-field select:focus {
  border-color: #3b82f6;
  outline: none;
}

.btn-send-postulation {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
  font-size: 14px;
}

.btn-send-postulation:hover {
  background: #2563eb;
}

/* --- 6. SEGURIDAD Y ALERTAS --- */
.alert-error-box {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 20px;
  color: #991b1b;
  font-size: 13px;
  text-align: left;
  line-height: 1.4;
}

.honeypot-field {
  display: none !important;
  tab-index: -1;
  aria-hidden: true;
}

/* ==========================================================================
   VISTA DE ESCRITORIO: A partir de 769px (Flexbox estructurado y Navbar en línea)
   ========================================================================== */

@media (min-width: 769px) {
  .container {
    padding: 0 24px;
  }

  /* Restauración de la barra de navegación horizontal */
  .navbar {
    padding: 16px 24px;
  }

  .logo {
    font-size: 18px;
  }

  /* Esconde los selectores del menú responsivo en pantallas de escritorio */
  .menu-burger,
  .burger-open,
  .burger-close {
    display: none !important;
  }

  /* El menú vuelve a su posición original flotante inline y alinea verticalmente */
  .navbar .menu {
    position: static;
    flex-direction: row;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
    gap: 0;
    box-shadow: none;
    display: flex;
    align-items: center; /* Alineación perfecta del texto con el botón */
  }

  .navbar .menu a {
    width: auto;
    font-size: 14px;
    margin-left: 20px;
    padding: 0;
  }

  .menu .btn-login {
    padding: 8px 16px;
    margin-top: 0;
    color: #ffffff !important; /* Asegura el color blanco en pantallas grandes */
  }

  /* Ajustes del Hero en pantallas grandes */
  .explicativa-hero {
    padding: 60px 24px;
  }

  .explicativa-hero h1 {
    font-size: 32px;
  }

  .explicativa-hero p {
    font-size: 15px;
  }

  /* Layout de Dos Columnas en Escritorio */
  .page-main-layout {
    flex-direction: row;
    gap: 0;
    margin: 40px auto 80px auto;
  }

  .content-column {
    width: 60%;
    padding-right: 40px;
    box-sizing: border-box;
  }

  .sidebar-form-column {
    width: 40%;
  }

  /* Tarjeta de formulario fija en scroll lateral */
  .sidebar-form-column > div:first-child {
    position: sticky;
    top: 100px;
  }

  /* Escalamiento de textos informativos */
  .explicativa-block {
    padding: 30px;
    margin-bottom: 24px;
  }

  .explicativa-block h3 {
    font-size: 19px;
  }

  .explicativa-block p {
    font-size: 14.5px;
  }

  .sticky-form-card {
    padding: 30px;
    border-radius: 16px;
  }
}
