/* ============================================================
   Blackridge Insurance — Shared Component Styles
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --navy:       #0D1B3E;
  --navy-deep:  #080f22;
  --gold:       #C9A84C;
  --gold-dim:   #7A5E1E;
  --gold-light: #DEC06A;
  --white:      #FFFFFF;
  --off-white:  #F8F9FA;
  --slate:      #E8EBF0;
  --muted:      #5A6272;
  --amber:      #D97706;
  --amber-bg:   #FFFBEB;
  --success:    #059669;
  --danger:     #DC2626;
  --gold-warm:  #FAF6EC;
  --text-subtle: #8892A0;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(13,27,62,0.10);
  --shadow-lg:  0 12px 48px rgba(13,27,62,0.16);
  --transition: 0.22s ease;
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--navy-deep);
  color: #e2e8f0;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.35);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-banner p {
  flex: 1;
  min-width: 260px;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
  color: #cbd5e1;
}
.cookie-banner p a {
  color: var(--gold-light);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cookie-btn-accept {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 6px;
  padding: 9px 22px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.cookie-btn-accept:hover { background: var(--gold-light); }
.cookie-btn-decline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cookie-btn-decline:hover { border-color: #94a3b8; color: #e2e8f0; }

/* ============================================================
   STICKY DESKTOP CTA BAR
   ============================================================ */
.sticky-cta-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 24px rgba(13,27,62,0.3);
}
.sticky-cta-bar.visible {
  transform: translateY(0);
}
.sticky-cta-bar-text {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
}
.sticky-cta-bar-text strong {
  color: var(--gold-light);
}
.sticky-cta-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sticky-cta-bar a.btn-sticky {
  background: var(--gold);
  color: var(--navy-deep);
  padding: 8px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
}
.sticky-cta-bar a.btn-sticky:hover { background: var(--gold-light); }
.sticky-cta-bar a.btn-sticky-phone {
  color: var(--gold-light);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.sticky-cta-bar a.btn-sticky-phone:hover { color: #fff; }
@media (max-width: 640px) { .sticky-cta-bar { display: none !important; } }

/* ============================================================
   MULTI-STEP FORM
   ============================================================ */
.form-step { display: none; }
.form-step.active { display: block; }

/* Progress bar */
.form-progress-wrap {
  margin-bottom: 24px;
}
.form-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.form-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-progress-count {
  font-size: 13px;
  color: var(--muted);
}
.form-progress-track {
  height: 5px;
  background: var(--slate);
  border-radius: 99px;
  overflow: hidden;
}
.form-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1);
}

/* Step headings */
.form-step-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ebf0;
}

/* Step navigation buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}
.step-nav-left { display: flex; align-items: center; }
.btn-step-back {
  background: transparent;
  color: var(--muted);
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.btn-step-back:hover { border-color: var(--navy); color: var(--navy); }
.btn-step-next {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
  flex: 1;
  justify-content: center;
}
.btn-step-next:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-step-next:active { transform: translateY(0); }
.btn-step-next svg, .btn-step-back svg { flex-shrink: 0; }

/* Input validation states */
.form-field-error input,
.form-field-error select,
.form-field-error textarea {
  border-color: var(--danger) !important;
  background: #fff5f5 !important;
}
.field-error-msg {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.form-field-error .field-error-msg { display: block; }

/* ============================================================
   RENEWAL DATE URGENCY NUDGE
   ============================================================ */
.urgency-nudge {
  display: none;
  background: var(--amber-bg);
  border: 1.5px solid var(--amber);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 13.5px;
  color: #92400e;
  line-height: 1.45;
  gap: 10px;
  align-items: flex-start;
}
.urgency-nudge.visible {
  display: flex;
}
.urgency-nudge svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--amber);
}
.urgency-nudge strong { color: #78350f; }

/* ============================================================
   FILE UPLOAD — DRAG & DROP + PROGRESS
   ============================================================ */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  background: var(--off-white);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.upload-zone.drag-over {
  border-color: var(--gold);
  background: #fdf8ec;
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.upload-zone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--muted);
}
.upload-zone-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
}
.upload-zone-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.upload-zone-sub span { color: var(--gold-dim); font-weight: 600; }

/* File list */
.upload-file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload-file-item {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-file-icon {
  width: 32px;
  height: 32px;
  background: #eef2ff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
}
.upload-file-info { flex: 1; min-width: 0; }
.upload-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-file-size { font-size: 11.5px; color: var(--muted); }
.upload-progress-track {
  height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  margin-top: 5px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 99px;
  width: 0%;
  transition: width 0.3s ease;
}
.upload-file-remove {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
  flex-shrink: 0;
  line-height: 0;
}
.upload-file-remove:hover { color: var(--danger); }
.upload-file-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  margin-top: 2px;
}

/* ============================================================
   FORM SUCCESS SCREEN
   ============================================================ */
.form-success-screen {
  display: none;
  text-align: center;
  padding: 32px 16px;
}
.form-success-screen.visible { display: block; }
.form-success-icon {
  width: 64px;
  height: 64px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--success);
}
.form-success-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}
.form-success-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.form-success-next {
  background: var(--off-white);
  border-radius: 10px;
  padding: 20px 24px;
  text-align: left;
  margin-bottom: 20px;
}
.form-success-next h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold-dim);
  margin-bottom: 14px;
}
.form-success-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.form-success-step:last-child { margin-bottom: 0; }
.form-success-step-num {
  width: 28px;
  height: 28px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.form-success-step-text {
  font-size: 13.5px;
  color: var(--navy);
  line-height: 1.5;
  padding-top: 4px;
}

/* ============================================================
   INSURER LOGOS TRUST STRIP
   ============================================================ */
.insurer-strip {
  background: var(--white);
  border-top: 1px solid #e8ebf0;
  border-bottom: 1px solid #e8ebf0;
  padding: 20px 0;
  overflow: hidden;
}
.insurer-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.insurer-strip-label {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}
.insurer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.insurer-logo-item {
  font-size: 13px;
  font-weight: 700;
  color: #5A6272;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}
.insurer-logo-item:hover { color: var(--navy); border-color: var(--navy); }

/* ============================================================
   WHAT HAPPENS NEXT — 3-STEP VISUAL
   ============================================================ */
.next-steps-visual {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e8ebf0;
}
.next-steps-visual h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold-dim);
  margin-bottom: 16px;
}
.next-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.next-step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.next-step-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}
.next-step-text {
  font-size: 13px;
  color: var(--navy);
  line-height: 1.5;
}
.next-step-text strong { display: block; font-weight: 700; margin-bottom: 1px; }
.next-step-text span { color: var(--muted); font-size: 12.5px; }

/* No obligation badge */
.no-obligation-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}
.no-obligation-note svg { color: var(--success); flex-shrink: 0; }

/* ============================================================
   LOGO — SVG banner + fallback PNG (LP pages)
   ============================================================ */
.logo-img {
  height: 52px;
  width: auto;
  display: block;
  transition: filter var(--transition);
}
/* SVG logo: dark-nav scrolled state */
.nav.scrolled .logo-text-main { fill: #ffffff; }
.nav.scrolled .logo-mark-body { fill: rgba(255,255,255,0.14); }

/* ============================================================
   SCROLL OFFSET — prevents fixed nav from covering section headings
   ============================================================ */
section[id],
div[id].section-anchor,
.subsector-card[id],
.faq-item[id] {
  scroll-margin-top: 90px;
}

/* ============================================================
   FADE-IN ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   MOBILE HAMBURGER + DRAWER
   ============================================================ */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
  line-height: 0;
  transition: color var(--transition);
}
.nav.scrolled .nav-hamburger { color: var(--white); }
@media (max-width: 600px) {
  .nav-hamburger { display: flex; align-items: center; }
}
.nav-mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--navy);
  padding: 5rem 2rem 2rem;
  flex-direction: column;
  overflow-y: auto;
}
.nav-mobile-drawer.open { display: flex; }
.nav-mobile-drawer a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s;
}
.nav-mobile-drawer a:hover { color: var(--gold); }
.nav-mobile-drawer .drawer-cta {
  margin-top: 1.5rem;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 14px;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  border: none;
  display: block;
}
.nav-mobile-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  padding: 8px;
  line-height: 0;
  transition: color 0.2s;
}
.nav-mobile-close:hover { color: var(--white); }

/* ============================================================
   LANDING PAGE (stripped) — /lp/ pages
   ============================================================ */
.lp-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--navy);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
.lp-nav {
  background: var(--navy);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-nav-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.02em;
}
.lp-nav-brand span { color: var(--gold); }
.lp-nav-phone {
  color: var(--gold-light);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.lp-hero {
  background: var(--off-white);
  padding: 48px 24px;
}
.lp-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
  .lp-hero { padding: 32px 16px; }
}
.lp-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  margin-bottom: 10px;
}
.lp-hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 16px;
}
.lp-hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.lp-trust-points {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-trust-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--navy);
  font-weight: 500;
}
.lp-trust-points li::before {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230D1B3E'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}
.lp-form-card {
  background: var(--white);
  border-radius: 14px;
  border-top: 4px solid var(--gold);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg);
}
.lp-footer {
  background: var(--navy-deep);
  color: #64748b;
  text-align: center;
  padding: 20px 24px;
  font-size: 12.5px;
  line-height: 1.6;
}
.lp-footer a { color: #94a3b8; }

/* ============================================================
   RESPONSIVE — Shared Component Breakpoints
   ============================================================ */

/* --- Nav Logo SVG: constrain on mobile so it doesn't overflow --- */
/* SVG ignores CSS max-width when it has an explicit width attribute,
   so we use width + height auto to force scaling via CSS */
.nav-logo-svg {
  height: 44px;
  width: auto;
  max-width: 270px;
}

@media (max-width: 640px) {
  .nav-logo-svg {
    max-width: 190px;
    width: 190px !important;
    height: auto !important;
  }
  .logo-text-sub {
    display: none; /* hide "INSURANCE SERVICES LTD" on very small screens */
  }
}

@media (max-width: 360px) {
  .nav-logo-svg {
    max-width: 155px;
    width: 155px !important;
  }
}

/* --- Nav CTA button: reduce padding on tablet --- */
@media (max-width: 900px) {
  .btn-nav-cta {
    padding: 9px 14px;
    font-size: 0.78rem;
  }
}

/* --- Mobile hamburger: show at ≤768px (shared across all pages) --- */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex !important;
    align-items: center;
  }
}

/* --- Mobile drawer: ensure it works at all viewport sizes --- */
.nav-mobile-drawer {
  /* Already full-screen via inset:0, but ensure touch targets are adequate */
}
.nav-mobile-drawer a {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* --- Footer grid: stack on mobile --- */
@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

/* --- Insurer logo strip: smaller gap on mobile --- */
@media (max-width: 640px) {
  .insurer-logos {
    gap: 12px;
  }
  .insurer-logo-item {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* --- Cookie banner: stack on very small screens --- */
@media (max-width: 480px) {
  .cookie-banner {
    padding: 14px 16px;
    gap: 12px;
  }
  .cookie-banner p {
    min-width: unset;
    font-size: 13px;
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-btn-accept,
  .cookie-btn-decline {
    flex: 1;
    text-align: center;
    min-height: 44px;
  }
}

/* --- Step nav buttons: ensure 44px min touch target --- */
@media (max-width: 640px) {
  .btn-step-next,
  .btn-step-back {
    min-height: 44px;
    padding: 12px 16px;
  }
}

/* --- Large desktop: generous max-width breathing room --- */
@media (min-width: 1400px) {
  .insurer-strip-inner {
    max-width: 1300px;
  }
}

.form-error-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #dc2626;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 1rem;
  line-height: 1.5;
}
