/* Lanex lead capture (js/lead.js). */
.lead-section { background: var(--navy); color: #fff; padding: 48px 0; }
.lead-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.lead-copy h2 { font-family: var(--display); font-size: 1.9rem; line-height: 1.2; margin: 0 0 10px; }
.lead-copy p { margin: 0 0 12px; color: rgba(255,255,255,.88); }
.lead-direct a { color: #fff; font-weight: 600; }
.lead-card { background: var(--paper); color: var(--ink); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.lead-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--navy); }
.lead-grid .lead-wide { grid-column: 1 / -1; }
.lead-grid input, .lead-grid textarea {
  font: inherit; font-weight: 400; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; width: 100%;
}
.lead-grid input:focus, .lead-grid textarea:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px var(--cta-soft); }
.lead-grid textarea { resize: vertical; min-height: 64px; }
.lead-hp { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }  /* not left:-10000px: that made RTL (Hebrew) pages scroll sideways */
.lead-submit { width: 100%; margin-top: 14px; cursor: pointer; }
.lead-submit:disabled { opacity: .7; cursor: wait; }
.lead-consent { font-size: .78rem; color: var(--muted); margin: 10px 0 0; line-height: 1.4; }
.lead-error { background: #fdecec; color: #9b1c1c; border-radius: 8px; padding: 8px 12px; margin: 12px 0 0; font-size: .9rem; }
.lead-thanks { text-align: center; padding: 18px 8px; }
.lead-thanks:focus { outline: none; }
.lead-thanks-icon { width: 56px; height: 56px; line-height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--save-bg); color: var(--save); font-size: 1.8rem; font-weight: 700; }
.lead-thanks h3 { font-family: var(--display); color: var(--navy); margin: 0 0 6px; font-size: 1.4rem; }
.lead-thanks p { margin: 0 0 14px; color: var(--muted); }
.lead-again { cursor: pointer; }

/* Popup actions */
.lead-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.lead-detail-actions .btn { flex: 1 1 200px; justify-content: center; text-align: center; cursor: pointer; }
.lead-quote-btn { background: var(--navy); }
.lead-quote-btn:hover { background: var(--navy-3); }
.lead-wa-btn, .lead-bar-wa { background: #1f8f4e; color: #fff; }
.lead-wa-btn:hover { background: #17713d; }

/* Modal */
.lead-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lead-modal[hidden] { display: none; }
.lead-modal-backdrop { position: absolute; inset: 0; background: rgba(11,31,58,.6); }
.lead-modal-panel { position: relative; background: var(--paper); border-radius: 16px; padding: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.lead-modal-panel h2 { font-family: var(--display); color: var(--navy); margin: 0 36px 4px 0; font-size: 1.4rem; }
.lead-modal-sub { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.lead-modal-close { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--navy); }
body.lead-open { overflow: hidden; }

/* Sticky mobile bar */
.lead-bar { display: none; }
.lead-fab {
  position: fixed; bottom: 16px; inset-inline-start: 16px; z-index: 31;
  min-height: 48px; padding: 12px 20px; border-radius: 999px; border: 2px solid #fff;
  background: var(--cta); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px rgba(11,31,58,.28);
}
.lead-fab:hover { background: var(--cta-hover); }
body.detail-open .lead-fab, body.lead-open .lead-fab { visibility: hidden; }

@media (max-width: 900px) {
  .lead-inner { grid-template-columns: 1fr; gap: 18px; }
  .lead-fab { display: none; }
  .lead-bar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--navy); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px;
    box-shadow: 0 -6px 20px rgba(11,31,58,.25);
  }
  .lead-bar.has-wa { grid-template-columns: repeat(4, 1fr); }
  .lead-bar-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    min-height: 48px; border-radius: 10px; border: 0; font: inherit; font-size: .92rem; font-weight: 700;
    text-decoration: none; color: #fff; background: var(--navy-3); cursor: pointer; white-space: nowrap;
  }
  .lead-bar-call { background: var(--cta); }
  .lead-bar-quote { background: #fff; color: var(--navy); }
  body.has-lead-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.has-lead-bar .start-over { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.detail-open .lead-bar { display: none; }
  .lead-section { padding: 32px 0; }
  .lead-copy h2 { font-size: 1.5rem; }
}
@media (max-width: 420px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead-bar-btn { font-size: .82rem; }
  .lead-bar-btn > span[aria-hidden] { display: none; }
}
