/* ============================================
   LENDFIQ — GLOBAL STYLESHEET
   Official government-style design system
   ============================================ */

:root {
  --gov-blue: #1a4480;
  --gov-blue-dark: #0f2b4f;
  --gov-blue-light: #e8eef5;
  --gov-gold: #b8860b;
  --gov-gold2: #d4a73f;
  --gov-gray-100: #f7f7f7;
  --gov-gray-200: #e6e6e6;
  --gov-gray-300: #d1d1d1;
  --gov-gray-400: #a6a6a6;
  --gov-gray-600: #5c5c5c;
  --gov-gray-800: #2e2e2e;
  --gov-ink: #1b1b1b;
  --gov-white: #ffffff;
  --gov-red: #b3261e;
  --gov-green: #2e7d32;
  --gov-green-bg: #e8f5e9;
  --font-sans: 'Public Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: var(--font-sans);
  color: var(--gov-ink);
  line-height: 1.6;
  background: var(--gov-white);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  min-height: 100vh;
}

a { color: var(--gov-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid #2491ff;
  outline-offset: 2px;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--gov-blue); color: #fff;
  padding: 10px 16px; z-index: 999; font-weight: 600;
}
.skip:focus { left: 8px; }

.container {
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 20px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--gov-ink);
}
h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

/* ---------- OFFICIAL BANNER ---------- */
.official-banner {
  background: #f0f0f0;
  border-bottom: 1px solid #d9d9d9;
  font-size: 0.8rem;
  color: #2e2e2e;
  padding: 6px 0;
}
.official-banner .container {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.official-banner .flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: #1a4480;
}
.official-banner .flag svg { width: 18px; height: 12px; }
.official-banner .sep { color: #a6a6a6; margin: 0 4px; }
.official-banner a { color: #1a4480; text-decoration: underline; font-weight: 500; }
@media (max-width: 600px) { .official-banner .container { font-size: 0.72rem; } }

/* ---------- HEADER ---------- */
.header {
  background: var(--gov-blue);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700; font-size: 1.5rem;
  letter-spacing: -0.01em; flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: #fff; }
.logo-mark {
  width: 44px; height: 44px;
  background: #fff; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
}
.logo-mark svg {
  width: 26px; height: 26px;
  stroke: var(--gov-blue); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.top-nav { display: flex; align-items: center; gap: 28px; list-style: none; }
.top-nav a {
  color: #fff; text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
  white-space: nowrap;
}
.top-nav a:hover { text-decoration: none; border-bottom-color: #fff; }
.nav-cta {
  background: var(--gov-gold); color: #fff !important;
  padding: 10px 20px !important; border-radius: var(--radius);
  font-weight: 600 !important;
  border: 2px solid var(--gov-gold) !important;
  transition: background .2s, color .2s !important;
}
.nav-cta:hover {
  background: #fff !important; color: var(--gov-blue) !important;
  text-decoration: none !important;
}

.nav-user {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff !important; font-weight: 600 !important;
}
.nav-user::before {
  content: ''; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gov-gold); color: var(--gov-blue);
  display: grid; place-items: center; font-size: .75rem; font-weight: 800;
}
.nav-user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-toggle {
  display: none;
  background: transparent; border: 2px solid rgba(255,255,255,.5);
  color: #fff; width: 44px; height: 44px;
  border-radius: var(--radius); cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-toggle svg {
  width: 22px; height: 22px; stroke: currentColor;
  fill: none; stroke-width: 2; stroke-linecap: round;
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .top-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--gov-blue-dark); flex-direction: column; gap: 0;
    padding: 8px 0; border-top: 3px solid var(--gov-gold);
    box-shadow: 0 8px 16px rgba(0,0,0,.3);
    z-index: 99;
  }
  .top-nav.open { display: flex; }
  .top-nav a {
    width: 100%; padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    border-left: 4px solid transparent;
  }
  .top-nav a:hover { background: rgba(255,255,255,.05); border-left-color: var(--gov-gold); }
  .nav-cta { margin: 12px 24px; text-align: center; border-bottom: 0 !important; border-left: 0 !important; }
}

/* ---------- HERO ---------- */
.hero {
  background: var(--gov-blue-dark); color: #fff;
  padding: 56px 0 64px;
  border-bottom: 6px solid var(--gov-gold);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-badge svg {
  width: 16px; height: 16px;
  stroke: var(--gov-gold); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.hero h1 { color: #fff; max-width: 20em; margin-bottom: 18px; font-weight: 700; }
.hero-sub {
  color: #d1d9e6; font-size: 1.1rem;
  max-width: 44em; margin-bottom: 32px; line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  text-decoration: none; line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gov-gold); color: #fff; border-color: var(--gov-gold); }
.btn-primary:hover { background: #9a7009; border-color: #9a7009; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.btn-secondary { background: #fff; color: var(--gov-blue); border-color: #fff; }
.btn-secondary:hover { background: var(--gov-blue-light); border-color: var(--gov-blue-light); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-outline { background: transparent; color: var(--gov-blue); border-color: var(--gov-blue); }
.btn-outline:hover { background: var(--gov-blue-light); }
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: .65; cursor: not-allowed; }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 14px 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-trust li {
  display: flex; align-items: center; gap: 10px;
  color: #d1d9e6; font-size: 0.9rem; font-weight: 500;
}
.hero-trust svg {
  width: 20px; height: 20px;
  stroke: var(--gov-gold); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- ALERT BAR ---------- */
.alert-bar {
  background: #fff8e6;
  border-bottom: 1px solid #f0e0b0;
  border-top: 4px solid var(--gov-gold);
  padding: 14px 0; font-size: 0.9rem;
}
.alert-bar .container { display: flex; align-items: flex-start; gap: 12px; }
.alert-bar svg {
  width: 20px; height: 20px;
  stroke: #8a6a16; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; margin-top: 1px;
}
.alert-bar p { color: #5c4a10; margin: 0; }
.alert-bar strong { color: #3d2f05; }

/* ---------- STATS ---------- */
.stats {
  background: var(--gov-gray-100);
  border-bottom: 1px solid var(--gov-gray-200);
  padding: 32px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; text-align: center;
}
.stats-grid > div { padding: 8px; }
.stats strong {
  display: block; font-family: var(--font-serif);
  font-size: 1.9rem; font-weight: 700;
  color: var(--gov-blue); line-height: 1.1; margin-bottom: 4px;
}
.stats span { font-size: 0.85rem; color: var(--gov-gray-600); font-weight: 500; }

/* ---------- SECTION ---------- */
.section { padding: 56px 0; }
.section-alt {
  background: var(--gov-gray-100);
  border-top: 1px solid var(--gov-gray-200);
  border-bottom: 1px solid var(--gov-gray-200);
}
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 {
  color: var(--gov-ink); margin-bottom: 10px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--gov-gold);
  display: inline-block;
}
.section-head p { color: var(--gov-gray-600); font-size: 1rem; margin-top: 8px; }

/* ---------- STEPS ---------- */
.steps { display: grid; gap: 20px; }
.steps li {
  background: #fff;
  border: 1px solid var(--gov-gray-300);
  border-left: 4px solid var(--gov-blue);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex; gap: 18px; align-items: flex-start;
  transition: border-left-color .2s, box-shadow .2s;
}
.steps li:hover { border-left-color: var(--gov-gold); box-shadow: var(--shadow-md); }
.step-num {
  flex-shrink: 0; width: 40px; height: 40px;
  background: var(--gov-blue); color: #fff;
  border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 1.05rem;
}
.step-body h3 {
  font-family: var(--font-sans); font-size: 1.05rem;
  margin-bottom: 4px; color: var(--gov-blue);
}
.step-body p { color: var(--gov-gray-600); font-size: 0.95rem; line-height: 1.55; }

/* ---------- CARD GRID ---------- */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.info-card {
  background: #fff;
  border: 1px solid var(--gov-gray-300);
  border-top: 4px solid var(--gov-blue);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow .2s, border-top-color .2s;
}
.info-card:hover { box-shadow: var(--shadow-md); border-top-color: var(--gov-gold); }
.info-card svg {
  width: 36px; height: 36px;
  stroke: var(--gov-blue); fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 14px;
}
.info-card h3 { font-family: var(--font-sans); font-size: 1.05rem; margin-bottom: 8px; color: var(--gov-ink); }
.info-card p { color: var(--gov-gray-600); font-size: 0.92rem; line-height: 1.55; }

/* ---------- WHY LIST ---------- */
.why-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.why-item {
  background: #fff;
  border: 1px solid var(--gov-gray-300);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; gap: 16px; align-items: flex-start;
}
.why-item .check {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 50%; background: var(--gov-green-bg);
  display: grid; place-items: center; margin-top: 2px;
}
.why-item .check svg {
  width: 16px; height: 16px;
  stroke: var(--gov-green); fill: none;
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.why-item h3 { font-family: var(--font-sans); font-size: 1rem; margin-bottom: 4px; color: var(--gov-ink); }
.why-item p { color: var(--gov-gray-600); font-size: 0.92rem; line-height: 1.55; }

/* ---------- TESTIMONIALS ---------- */
.testimonial-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.testimonial {
  background: #fff;
  border: 1px solid var(--gov-gray-300);
  border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.testimonial .stars {
  color: var(--gov-gold); font-size: 1rem;
  letter-spacing: 2px; margin-bottom: 12px;
}
.testimonial blockquote {
  font-size: 0.95rem; color: var(--gov-ink);
  line-height: 1.6; margin-bottom: 16px; flex: 1;
}
.testimonial .author {
  border-top: 1px solid var(--gov-gray-200);
  padding-top: 14px; font-size: 0.88rem;
}
.testimonial .author strong { color: var(--gov-ink); display: block; }
.testimonial .author span { color: var(--gov-gray-600); }
.testimonial .tag {
  display: inline-block; background: var(--gov-blue-light);
  color: var(--gov-blue); font-size: 0.75rem; font-weight: 600;
  padding: 2px 10px; border-radius: 3px; margin-top: 6px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- FAQ ---------- */
.faq-list { border: 1px solid var(--gov-gray-300); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--gov-gray-300); }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; text-align: left; background: #fff; border: 0;
  padding: 18px 22px; font-family: var(--font-sans);
  font-size: 1rem; font-weight: 600; color: var(--gov-ink);
  cursor: pointer; transition: background .15s;
}
.faq-q:hover { background: var(--gov-gray-100); }
.faq-q[aria-expanded="true"] { background: var(--gov-gray-100); }
.faq-icon {
  flex-shrink: 0; width: 24px; height: 24px;
  border: 1.5px solid var(--gov-blue); border-radius: 50%;
  display: grid; place-items: center; position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; background: var(--gov-blue);
  transition: transform .2s;
}
.faq-icon::before { width: 10px; height: 2px; }
.faq-icon::after { width: 2px; height: 10px; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: scaleY(0); }
.faq-a {
  padding: 0 22px 20px; color: var(--gov-gray-600);
  font-size: 0.95rem; line-height: 1.65; background: var(--gov-gray-100);
}

/* ---------- CONTACT SECTION ---------- */
.contact-section {
  background: var(--gov-blue-light);
  border-top: 4px solid var(--gov-blue);
}
.contact-grid { display: grid; gap: 36px; }
.contact-info h2 { color: var(--gov-ink); margin-bottom: 14px; }
.contact-info p { color: var(--gov-gray-600); margin-bottom: 16px; font-size: 0.98rem; }
.contact-info .note {
  background: #fff; border-left: 4px solid var(--gov-gold);
  padding: 14px 18px; font-size: 0.9rem; color: var(--gov-gray-600);
  margin-top: 20px; border-radius: 0 var(--radius) var(--radius) 0;
}
.contact-info .note strong { color: var(--gov-ink); }
.contact-detail {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; font-size: 0.95rem; color: var(--gov-gray-600);
}
.contact-detail svg {
  width: 20px; height: 20px;
  stroke: var(--gov-blue); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.contact-detail a { color: var(--gov-blue); font-weight: 600; }

/* ---------- FORM CARD ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--gov-gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.form-card .form-header {
  background: var(--gov-blue); color: #fff;
  padding: 18px 24px;
  border-bottom: 4px solid var(--gov-gold);
}
.form-card .form-header h3 {
  color: #fff; font-family: var(--font-sans);
  font-size: 1.1rem; margin-bottom: 2px;
}
.form-card .form-header p { color: #c5d4e8; font-size: 0.85rem; margin: 0; }

.form-body { padding: 24px; display: grid; gap: 18px; }
.form-section {
  border: 1px solid var(--gov-gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fafafa;
}
.form-section-title {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gov-blue);
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gov-gray-300);
}
.form-row {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}
.form-row:last-child { margin-bottom: 0; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--gov-ink); }
.field .req { color: var(--gov-red); }
.field .hint { font-size: 0.78rem; color: var(--gov-gray-600); font-weight: 400; margin-top: 2px; }
input, select, textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1.5px solid var(--gov-gray-400);
  border-radius: var(--radius);
  background: #fff; color: var(--gov-ink);
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gov-blue);
  box-shadow: 0 0 0 3px rgba(26,68,128,.15);
}
textarea { resize: vertical; min-height: 96px; }
.field.bad input, .field.bad select, .field.bad textarea {
  border-color: var(--gov-red); background: #fdf2f2;
}
.err { color: var(--gov-red); font-size: 0.82rem; font-weight: 500; min-height: 0; }

.check-group { display: grid; gap: 10px; }
.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.9rem; color: var(--gov-gray-800);
  line-height: 1.5;
}
.check-row input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  margin-top: 2px; accent-color: var(--gov-blue);
  cursor: pointer;
}
.check-row label { font-weight: 400; cursor: pointer; }

/* ---------- SUCCESS / PRELOADER ---------- */
.success-banner {
  display: none;
  background: var(--gov-green-bg);
  border: 1px solid #a5d6a7;
  border-left: 4px solid var(--gov-green);
  color: #1b5e20;
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 500;
  margin: 0 24px 20px;
}
.success-banner.show { display: block; }

.preloader-overlay {
  position: absolute; inset: 0;
  background: rgba(26,68,128,.97);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  z-index: 20; opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.preloader-overlay.active { opacity: 1; visibility: visible; }
.preloader-spinner {
  width: 52px; height: 52px;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: var(--gov-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.preloader-text {
  color: #fff; font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em;
  animation: pulseText 1.6s ease-in-out infinite;
}
@keyframes pulseText {
  0%,100% { opacity: .7; }
  50% { opacity: 1; }
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,25,48,.75);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 680px; width: 100%;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  border-top: 6px solid var(--gov-gold);
  transform: translateY(20px) scale(.98);
  transition: transform .3s;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--gov-gray-300);
  flex-shrink: 0;
}
.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem; color: var(--gov-ink);
  margin-bottom: 4px;
}
.modal-header p { font-size: 0.88rem; color: var(--gov-gray-600); margin: 0; }
.modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.9rem;
  color: var(--gov-gray-800);
  line-height: 1.6;
}
.modal-body p { margin-bottom: 14px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body .highlight-box {
  background: #fff8e6;
  border-left: 4px solid var(--gov-gold);
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
  font-size: 0.88rem;
}
.modal-body .highlight-box strong { color: #3d2f05; }
.modal-body ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}
.modal-body ul li::before {
  content: '•';
  position: absolute; left: 4px;
  color: var(--gov-blue);
  font-weight: 700;
}
.modal-body h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--gov-ink);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gov-gray-200);
}
.modal-body .legal-ref {
  font-size: 0.82rem;
  color: var(--gov-gray-600);
  font-style: italic;
  margin-top: 4px;
}
.modal-footer {
  padding: 18px 28px 22px;
  border-top: 1px solid var(--gov-gray-300);
  display: flex; gap: 12px; justify-content: flex-end;
  flex-shrink: 0;
  background: var(--gov-gray-100);
  flex-wrap: wrap;
}
.modal-footer .btn { min-width: 130px; }

.modal-close {
  background: none; border: 0;
  font-size: 1.5rem; line-height: 1;
  color: var(--gov-gray-600); cursor: pointer;
  padding: 4px 8px; border-radius: var(--radius);
}
.modal-close:hover { background: var(--gov-gray-100); color: var(--gov-ink); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--gov-blue-dark);
  color: #c5d4e8;
  padding: 48px 0 24px;
  font-size: 0.88rem;
  border-top: 6px solid var(--gov-gold);
  margin-top: 0;
}
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}
.footer-brand .logo { font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand .logo-mark { width: 38px; height: 38px; }
.footer-brand .logo-mark svg { width: 22px; height: 22px; }
.footer-brand p { color: #a8bdd6; line-height: 1.6; margin-bottom: 12px; }
.footer h4 {
  color: #fff; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer ul { display: grid; gap: 8px; }
.footer ul a { color: #c5d4e8; text-decoration: none; transition: color .15s; }
.footer ul a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 20px; font-size: 0.8rem; color: #8fa9c4;
}
.footer-bottom p { margin-bottom: 8px; }
.footer-bottom a { color: #c5d4e8; text-decoration: underline; }
.footer-disclaimer {
  background: rgba(0,0,0,.2);
  border-left: 3px solid var(--gov-gold);
  padding: 12px 16px; margin-bottom: 16px;
  font-size: 0.8rem; color: #a8bdd6; line-height: 1.6;
}

/* ---------- REVEAL ---------- */
.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 80px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .footer-grid { grid-template-columns: 2.5fr 1fr 1fr 1fr; }
}

@media (min-width: 1100px) {
  .form-body { padding: 28px; }
}

@media (max-width: 480px) {
  .modal-header { padding: 18px 20px 14px; }
  .modal-body { padding: 16px 20px; }
  .modal-footer { padding: 16px 20px 20px; }
  .modal-footer .btn { flex: 1; min-width: 0; }
  .success-banner { margin: 0 16px 16px; }
}

/* ---------- FORM LOCKED / UNLOCKED ---------- */
.form-locked {
  display: none;
  padding: 40px 24px;
  text-align: center;
  color: var(--gov-gray-600);
}
.form-locked.show { display: block; }
.form-locked svg {
  width: 48px; height: 48px;
  stroke: var(--gov-blue); fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  margin: 0 auto 16px;
}
.form-locked h3 { font-size: 1.05rem; color: var(--gov-ink); margin-bottom: 8px; }
.form-locked p { font-size: 0.9rem; margin-bottom: 18px; }
.form-unlocked { display: none; }
.form-unlocked.show { display: block; }

/* ---------- DETAIL GRID ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 16px;
}
.detail-grid dt {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gov-gray-600);
  font-weight: 700;
}
.detail-grid dd {
  font-size: .92rem;
  color: var(--gov-ink);
  margin-bottom: 10px;
}

/* ---------- HISTORY ---------- */
.history {
  margin-top: 16px;
  border-top: 1px solid var(--gov-gray-200);
  padding-top: 14px;
}
.history h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gov-blue);
  margin-bottom: 10px;
}
.history-item {
  border-left: 3px solid var(--gov-blue);
  padding: 6px 0 6px 14px;
  margin-bottom: 10px;
  font-size: .85rem;
}
.history-item .meta { color: var(--gov-gray-600); font-size: .78rem; margin-top: 2px; }

/* ---------- MODAL ROW2 ---------- */
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) {
  .modal .row2, .detail-grid { grid-template-columns: 1fr; }
}
/* ============================================================
   BUTTON SYSTEM — required for dashboard/admin/login
   ============================================================ */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-outline,
.btn-gold,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 4px;
  font-family: var(--font-sans, 'Public Sans', system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-outline:hover,
.btn-gold:hover,
.btn-ghost:hover { text-decoration: none; }

.btn-primary {
  background: #b8860b;
  color: #ffffff;
  border-color: #b8860b;
}
.btn-primary:hover {
  background: #9a7009;
  border-color: #9a7009;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.btn-secondary {
  background: #ffffff;
  color: #1a4480;
  border-color: #1a4480;
}
.btn-secondary:hover {
  background: #e8eef5;
}

.btn-danger {
  background: #ffffff;
  color: #b3261e;
  border-color: #b3261e;
}
.btn-danger:hover {
  background: #fdf2f2;
}

.btn-outline {
  background: transparent;
  color: #1a4480;
  border-color: #1a4480;
}
.btn-outline:hover {
  background: #e8eef5;
}

.btn-gold {
  background: #b8860b;
  color: #ffffff;
  border-color: #b8860b;
}
.btn-gold:hover {
  background: #9a7009;
  border-color: #9a7009;
}

.btn-ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,.6);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: #ffffff;
}

/* Sizes */
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

/* Disabled state */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Row actions in tables */
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.row-actions button {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* Section header used on dashboard / admin */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.toolbar h2 {
  font-family: var(--font-sans, 'Public Sans', system-ui, sans-serif);
  font-size: 1.15rem;
  color: #1b1b1b;
  margin: 0;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: #5c5c5c;
}
.empty svg {
  width: 56px;
  height: 56px;
  stroke: #a6a6a6;
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 16px;
}
.empty h3 { color: #1b1b1b; margin-bottom: 6px; }

/* Detail grid used in detail modal */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 16px;
}
.detail-grid dt {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #5c5c5c;
  font-weight: 700;
  margin-bottom: 2px;
}
.detail-grid dd {
  font-size: .92rem;
  color: #1b1b1b;
  margin: 0 0 10px;
}

/* History list */
.history {
  margin-top: 16px;
  border-top: 1px solid #e6e6e6;
  padding-top: 14px;
}
.history h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1a4480;
  margin-bottom: 10px;
}
.history-item {
  border-left: 3px solid #1a4480;
  padding: 6px 0 6px 14px;
  margin-bottom: 10px;
  font-size: .85rem;
}
.history-item .meta {
  color: #5c5c5c;
  font-size: .78rem;
  margin-top: 2px;
}

/* Status pills */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.s-submitted       { background: #e8eef5; color: #1a4480; }
.s-under_review    { background: #fff8e6; color: #8a6a16; }
.s-investigating   { background: #e3f2fd; color: #0d47a1; }
.s-action_required { background: #fdf2f2; color: #b3261e; }
.s-recovered       { background: #e8f5e9; color: #2e7d32; }
.s-closed          { background: #eceff1; color: #455a64; }

/* Complaint table */
.complaint-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.complaint-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f0f3f8;
  color: #1a4480;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid #d1d1d1;
}
.complaint-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: middle;
}
.complaint-table tr:hover td { background: #fafbfc; }
.ref {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #1a4480;
  font-size: .85rem;
}

@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  .complaint-table { font-size: .8rem; }
  .complaint-table th, .complaint-table td { padding: 8px 6px; }
}