/* ExamRankers lead capture: inline "Book a free demo" section, the demo pop-up
   floating WhatsApp, announcement bar and mobile action bar
   (partials/lead.html, static/js/lead-capture.js). */

/* ---------- inline section ---------- */
.lead-card {
  background: linear-gradient(120deg, #060d2e 0%, #0b1437 55%, #0e1f5b 100%);
  border-radius: 24px; padding: clamp(24px, 4vw, 48px); color: #fff;
  position: relative; overflow: hidden;
}
.lead-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 10% 0%, rgba(26,86,219,.4) 0%, transparent 55%);
}
.lead-card > .row { position: relative; }
.lead-kicker {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan); background: rgba(6,182,212,.12); border: 1px solid rgba(6,182,212,.3);
  padding: 4px 12px; border-radius: 999px;
}
.lead-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.2; margin: 14px 0 12px; }
.lead-sub { color: rgba(255,255,255,.72); margin-bottom: 18px; }
.lead-points li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; color: rgba(255,255,255,.88); }
.lead-points i { color: #4ade80; font-size: 1.1rem; line-height: 1.4; }
.lead-wa-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: #4ade80; font-weight: 600; text-decoration: none; }
.lead-wa-link:hover { color: #86efac; text-decoration: underline; }
.lead-wa-link i { font-size: 1.25rem; }

.lead-form-card { background: #fff; color: var(--text); border-radius: 18px; padding: clamp(18px, 3vw, 28px); box-shadow: 0 20px 50px rgba(0,0,0,.25); }

/* ---------- form (inline + pop-up) ---------- */
.lead-form .form-label { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.lead-form .form-control, .lead-form .form-select { border-radius: 10px; padding: .6rem .8rem; border-color: #cbd5e1; }
.lead-form .input-group-text { border-radius: 10px 0 0 10px; background: var(--light); border-color: #cbd5e1; color: var(--muted); font-weight: 600; }
.lead-form .input-group .form-control { border-radius: 0 10px 10px 0; }
.lead-form .form-control:focus, .lead-form .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(26,86,219,.15); }
.lead-form .lead-submit { border-radius: 12px; font-weight: 700; font-size: 1rem; background: var(--green); border-color: var(--green); }
.lead-form .lead-submit:hover, .lead-form .lead-submit:focus { background: #15803d; border-color: #15803d; }
.lead-form .lead-note { color: var(--muted); }
.lead-form.was-validated .form-control:invalid, .lead-form.was-validated .form-select:invalid { border-color: #dc2626; }
.lead-form.is-done > .row { display: none; }
.lead-success { text-align: center; padding: 14px 4px; }
.lead-success > i { font-size: 2.6rem; color: var(--green); }
.lead-success p { color: var(--muted); }
/* honeypot: off-screen, not display:none (some bots skip hidden inputs) */
.lead-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.lead-modal { border: 0; border-radius: 20px; padding: 8px 6px; }
.lead-modal .lead-kicker { color: var(--blue); background: var(--light); border-color: #c7d7fe; }

/* ---------- floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 1040;
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; min-width: 56px; padding: 0 16px; border-radius: 999px;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 10px 28px rgba(37,211,102,.45); transition: transform .2s, box-shadow .2s;
}
.wa-float i { font-size: 1.6rem; line-height: 1; }
.wa-float:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(37,211,102,.55); }
.wa-float:focus-visible { outline: 3px solid #0b1437; outline-offset: 3px; }
.wa-float::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: #25d366; animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- announcement bar ---------- */
.er-topbar { background: linear-gradient(90deg, #1a56db, #06b6d4); color: #fff; font-size: .86rem; padding: 7px 0; }
.er-topbar .container { flex-wrap: wrap; text-align: center; }
.er-topbar-link { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.er-topbar-link:hover { color: #e0f2fe; }

/* ---------- mobile action bar (replaces the floating button on phones) ---------- */
.er-mobile-bar { display: none; }
@media (max-width: 767.98px) {
  .er-mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
    box-shadow: 0 -6px 20px rgba(11,20,55,.12);
  }
  .er-mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 12px; font-weight: 700; font-size: .92rem; text-decoration: none; }
  .er-mb-call { background: var(--light); color: var(--navy); }
  .er-mb-wa { background: #25d366; color: #fff; }
  .er-mb-demo { background: var(--green); color: #fff; }
  .er-mobile-bar a:hover { color: inherit; filter: brightness(.97); }
  .er-mb-wa:hover, .er-mb-demo:hover { color: #fff; }
  body { padding-bottom: 66px; }
  .wa-float { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wa-float::after { animation: none; } }
@media print { .wa-float, .er-mobile-bar, .er-topbar { display: none !important; } }

/* ---------- navbar: keep every item on one line ---------- */
@media (min-width: 992px) {
  .site-navbar .nav-link, .site-navbar .btn-demo { white-space: nowrap; }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
  .site-navbar .nav-link { padding: .75rem .6rem !important; font-size: .87rem; }
}
