/* ================================================================
   LEADS.CSS — Capturador de datos Somosecoterra
   Formulario de nombre · email · WhatsApp
   ================================================================ */

/* ── SECCIÓN CONTENEDORA ─────────────────────────────────────── */
.lead-section {
  padding: 5rem 0;
  background: var(--bg-2);
  border-top: 1px solid var(--b);
  border-bottom: 1px solid var(--b);
}

/* ── CARD PRINCIPAL ──────────────────────────────────────────── */
.lead-card {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--b-green);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(72,180,97,0.08), 0 30px 60px rgba(0,0,0,0.4);
}

/* ── COLUMNA IZQUIERDA (info / propuesta de valor) ───────────── */
.lead-info {
  padding: 3rem 2.5rem;
  background: linear-gradient(145deg, #0D3320 0%, #0A2818 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lead-info::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(72,180,97,0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.lead-info-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  line-height: 1;
}
.lead-info-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--t1);
  line-height: 1.25;
  margin-bottom: 0.875rem;
}
.lead-info-title em {
  font-style: normal;
  color: var(--vh);
}
.lead-info-desc {
  font-size: 0.9rem;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}
.lead-beneficios {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.lead-ben-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.85rem;
  color: var(--t2);
}
.lead-ben-dot {
  width: 20px;
  height: 20px;
  background: rgba(72,180,97,0.15);
  border: 1px solid rgba(72,180,97,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--vh);
  font-size: 0.6rem;
}
.lead-privacy {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--b);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--t3);
}

/* ── COLUMNA DERECHA (formulario) ────────────────────────────── */
.lead-form-side {
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lead-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 0.35rem;
}
.lead-form-sub {
  font-size: 0.78rem;
  color: var(--t3);
  margin-bottom: 1.75rem;
}

/* ── FORMULARIO ──────────────────────────────────────────────── */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.lead-field-wrap {
  position: relative;
}
.lead-field-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  font-size: 0.875rem;
  pointer-events: none;
  transition: color 0.2s;
}
.lead-field {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 0.875rem 1rem 0.875rem 2.5rem;
  color: var(--t1);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.lead-field::placeholder { color: var(--t3); }
.lead-field:focus {
  border-color: var(--b-green);
  box-shadow: 0 0 0 3px rgba(72,180,97,0.1);
}
.lead-field:focus + .lead-field-icon,
.lead-field-wrap:focus-within .lead-field-icon { color: var(--vh); }

.lead-error {
  display: none;
  font-size: 0.78rem;
  color: #FF6B6B;
  margin-top: -0.25rem;
  padding-left: 0.25rem;
}

/* ── BOTÓN SUBMIT ────────────────────────────────────────────── */
.lead-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.975rem;
  background: var(--cta);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(255,107,53,0.35);
  margin-top: 0.25rem;
}
.lead-submit:hover:not(:disabled) {
  background: var(--cta-h);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255,107,53,0.45);
}
.lead-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── DIVIDER + LINK DIRECTO ──────────────────────────────────── */
.lead-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.lead-divider::before,
.lead-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--b);
}
.lead-divider span {
  font-size: 0.72rem;
  color: var(--t3);
  white-space: nowrap;
}
.btn-lead-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: transparent;
  color: var(--vt);
  border: 1px solid var(--b-green);
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-lead-direct:hover {
  background: rgba(72,180,97,0.08);
  transform: translateY(-2px);
}

/* ── ESTADO ÉXITO ────────────────────────────────────────────── */
.lead-success {
  text-align: center;
  padding: 1rem;
}
.lead-success-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: popIn 0.5s ease;
}
@keyframes popIn {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.lead-success-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 0.625rem;
}
.lead-success-msg {
  font-size: 0.875rem;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.btn-cta-lead-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.975rem;
  background: var(--cta);
  color: #fff;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(255,107,53,0.35);
  margin-bottom: 0.75rem;
}
.btn-cta-lead-full:hover {
  background: var(--cta-h);
  transform: translateY(-2px);
}
.btn-wa-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: #25D366;
  color: #fff;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}
.btn-wa-success:hover { background: #1eaf55; transform: translateY(-2px); }
.lead-form-wrap { min-height: 300px; }

/* ── POPUP MODAL (exit-intent / timed) ───────────────────────── */
.lead-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.lead-popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.lead-popup {
  background: var(--bg-card);
  border: 1px solid var(--b-green);
  border-radius: 24px;
  width: min(480px, 100%);
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(72,180,97,0.1);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s ease;
}
.lead-popup-overlay.visible .lead-popup {
  transform: translateY(0) scale(1);
}
.lead-popup-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  color: var(--t3);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.lead-popup-close:hover { background: var(--surface); color: var(--t1); }
.lead-popup-icon  { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; }
.lead-popup-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--t1);
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.lead-popup-title em { font-style: normal; color: var(--vh); }
.lead-popup-sub {
  font-size: 0.85rem;
  color: var(--t2);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.lead-popup .lead-form { gap: 0.75rem; }

/* ── BARRA DE LEAD INLINE (compacta, en el hero o sticky) ───── */
.lead-bar {
  background: rgba(72,180,97,0.07);
  border: 1px solid rgba(72,180,97,0.2);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.lead-bar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--t1);
  flex-shrink: 0;
}
.lead-bar .lead-field {
  flex: 1;
  min-width: 140px;
  padding: 0.65rem 0.875rem;
  border-radius: 8px;
  font-size: 0.82rem;
}
.lead-bar .lead-submit {
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  border-radius: 8px;
  width: auto;
  flex-shrink: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lead-card {
    grid-template-columns: 1fr;
  }
  .lead-info {
    padding: 2rem 1.75rem;
  }
  .lead-form-side {
    padding: 2rem 1.75rem;
  }
  .lead-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .lead-bar .lead-field { min-width: 100%; }
  .lead-bar .lead-submit { width: 100%; }
}

@media (max-width: 480px) {
  .lead-info { padding: 1.75rem 1.25rem; }
  .lead-form-side { padding: 1.75rem 1.25rem; }
  .lead-popup { padding: 2rem 1.5rem; }
}
