/* ═══════════════════════════════════════════════════════
   WiseIQ — Global Stylesheet
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0B1F3A;
  --navy-mid:   #132d52;
  --navy-light: #1e3a5f;
  --blue:       #1A6FD4;
  --blue-light: #3B8BF5;
  --teal:       #0EA5E9;
  --green:      #10B981;
  --green-dark: #059669;
  --amber:      #F59E0B;
  --red:        #EF4444;
  --white:      #FFFFFF;
  --off-white:  #F8FAFC;
  --gray-50:    #F9FAFB;
  --gray-100:   #F1F5F9;
  --gray-200:   #E2E8F0;
  --gray-300:   #CBD5E1;
  --gray-400:   #94A3B8;
  --gray-500:   #64748B;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1E293B;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:  0 24px 64px rgba(11,31,58,0.14), 0 8px 24px rgba(11,31,58,0.08);
  --max-w:      1120px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { line-height: 1.15; letter-spacing: -0.4px; color: var(--navy); font-weight: 800; }
p { line-height: 1.65; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 10px;
}
.section-title { font-size: clamp(26px, 3.5vw, 40px); font-weight: 900; margin-bottom: 14px; letter-spacing: -0.8px; }
.section-sub { font-size: 17px; color: var(--gray-600); max-width: 560px; line-height: 1.65; }

/* ── NAVIGATION ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.08); }
.nav-inner { max-width: var(--max-w); width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.nav-logo-mark {
  width: 34px; height: 34px; background: var(--navy); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0;
}
.nav-logo-mark svg { width: 18px; height: 18px; }
.nav-logo-mark img { width: 34px; height: 34px; object-fit: cover; display: block; border-radius: 9px; }
.nav-logo-name { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--gray-600);
  padding: 7px 12px; border-radius: 8px; text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--navy); background: var(--gray-100); }
.nav-links a.active { color: var(--navy); font-weight: 600; }
.nav-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy); color: var(--white);
  font-size: 14px; font-weight: 600; padding: 9px 18px;
  border-radius: 100px; text-decoration: none;
  transition: all 0.2s; box-shadow: 0 2px 8px rgba(11,31,58,0.20);
}
.nav-cta-btn:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(11,31,58,0.25); text-decoration: none; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: all 0.3s; }

/* ── DROPDOWN NAV ── */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--gray-600);
  padding: 7px 12px; border-radius: 8px; text-decoration: none;
  transition: color 0.15s, background 0.15s; cursor: pointer;
  user-select: none;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-wrapper:hover .nav-dropdown-trigger { color: var(--navy); background: var(--gray-100); text-decoration: none; }
.nav-dropdown-trigger.active { color: var(--navy); font-weight: 600; }
.nav-dropdown-trigger svg { transition: transform 0.2s; }
.nav-dropdown-wrapper:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  padding: 10px; min-width: 220px; z-index: 2000;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  transform: translateX(-50%) translateY(-6px);
}
/* Invisible bridge fills the gap between trigger and dropdown panel */
.nav-dropdown::before {
  content: ''; position: absolute;
  top: -14px; left: 0; right: 0; height: 14px;
}
.nav-dropdown-wrapper:hover .nav-dropdown {
  opacity: 1; pointer-events: all; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-header {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray-400);
  padding: 6px 10px 8px; border-bottom: 1px solid var(--gray-100); margin-bottom: 4px;
}
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--navy);
  text-decoration: none; transition: background 0.12s;
}
.nav-dropdown-item:hover { background: var(--gray-50); text-decoration: none; }
.nav-dropdown-icon {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--blue); background: rgba(26,111,212,0.08);
  border-radius: 7px; padding: 4px;
}
.nav-dropdown-item:hover .nav-dropdown-icon { background: rgba(26,111,212,0.14); }
.nav-simulator-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--blue);
  background: rgba(26,111,212,0.09); border: 1.5px solid rgba(26,111,212,0.20);
  border-radius: 100px; padding: 6px 14px; text-decoration: none;
  transition: all 0.15s; white-space: nowrap;
}
.nav-simulator-cta:hover, .nav-simulator-cta.active {
  background: var(--blue); color: #fff; border-color: var(--blue); text-decoration: none;
}
.nav-simulator-cta svg { flex-shrink: 0; }
.nav-dropdown-view-all {
  display: block; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--blue);
  padding: 9px 10px 5px; margin-top: 4px;
  border-top: 1px solid var(--gray-100); text-decoration: none;
}
.nav-dropdown-view-all:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  padding: 13px 24px; border-radius: 100px; cursor: pointer;
  border: none; text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); box-shadow: 0 4px 16px rgba(11,31,58,0.22); }
.btn-primary:hover { background: var(--navy-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(11,31,58,0.28); text-decoration: none; }
.btn-apply {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: var(--white); font-size: 14px; font-weight: 700;
  padding: 10px 20px; border-radius: 100px; border: none; cursor: pointer;
  transition: all 0.2s; box-shadow: 0 3px 12px rgba(26,111,212,0.30);
  white-space: nowrap;
}
.btn-apply:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,111,212,0.40); }
.btn-apply-lg {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: var(--white); font-size: 16px; font-weight: 700;
  padding: 14px 32px; border-radius: 100px; border: none; cursor: pointer;
  transition: all 0.2s; box-shadow: 0 4px 20px rgba(26,111,212,0.30);
}
.btn-apply-lg:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,111,212,0.40); }
.btn-outline {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--gray-200); font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: 100px; cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--navy); background: var(--gray-50); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  letter-spacing: 0.02em; white-space: nowrap;
}
.badge-strong { background: rgba(16,185,129,0.12); color: #059669; }
.badge-likely { background: rgba(26,111,212,0.10); color: var(--blue); }
.badge-stretch { background: rgba(245,158,11,0.12); color: #D97706; }
.badge-featured { background: rgba(245,158,11,0.15); color: #B45309; }
.badge-new { background: rgba(14,165,233,0.12); color: #0284C7; }

/* ── OFFER CARD ── */
.offer-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 24px;
  transition: all 0.2s; position: relative;
}
.offer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gray-300); }
.offer-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.offer-card-brand { display: flex; align-items: center; gap: 10px; }
.offer-brand-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.offer-brand-name { font-size: 15px; font-weight: 700; color: var(--navy); }
.offer-brand-sub { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.offer-headline { font-size: 22px; font-weight: 900; color: var(--navy); margin-bottom: 8px; letter-spacing: -0.4px; }
.offer-sub { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; line-height: 1.5; }
.offer-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.offer-highlight {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--gray-600); font-weight: 500;
}
.offer-highlight::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 12px; }
.offer-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--gray-100); flex-wrap: wrap; }
.offer-meta { font-size: 12px; color: var(--gray-400); }
.offer-disclosure { font-size: 11px; color: var(--gray-400); margin-top: 10px; font-style: italic; }

/* ── COMPARISON TABLE ── */
.comparison-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.comparison-table th {
  background: var(--navy); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 14px 16px; text-align: left;
}
.comparison-table th:first-child { border-radius: 12px 0 0 0; }
.comparison-table th:last-child { border-radius: 0 12px 0 0; }
.comparison-table td { padding: 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; vertical-align: middle; }
.comparison-table tr:hover td { background: var(--gray-50); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:last-child td:first-child { border-radius: 0 0 0 12px; }
.comparison-table tr:last-child td:last-child { border-radius: 0 0 12px 0; }
.table-wrapper { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
.table-offer-name { font-weight: 700; color: var(--navy); font-size: 14px; }
.table-offer-sub { font-size: 12px; color: var(--gray-400); font-weight: 400; }
.table-highlight { font-weight: 700; color: var(--navy); }
.table-featured td { background: rgba(26,111,212,0.03); }

/* ── QUIZ ── */
.quiz-container {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); overflow: hidden; max-width: 680px; margin: 0 auto;
}
.quiz-progress { height: 4px; background: var(--gray-100); }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width 0.4s ease; border-radius: 2px; }
.quiz-body { padding: 40px 40px 32px; }
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.quiz-question { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 8px; letter-spacing: -0.3px; }
.quiz-hint { font-size: 14px; color: var(--gray-500); margin-bottom: 28px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border: 2px solid var(--gray-200);
  border-radius: var(--radius); cursor: pointer; transition: all 0.15s;
  background: var(--white); text-align: left; font-family: var(--font);
}
.quiz-option:hover { border-color: var(--blue); background: rgba(26,111,212,0.03); }
.quiz-option.selected { border-color: var(--blue); background: rgba(26,111,212,0.06); }
.quiz-option-icon { font-size: 24px; flex-shrink: 0; }
.quiz-option-label { font-size: 15px; font-weight: 700; color: var(--navy); }
.quiz-option-sub { font-size: 13px; color: var(--gray-500); font-weight: 400; }
.quiz-footer { padding: 0 40px 32px; display: flex; align-items: center; justify-content: space-between; }
.quiz-step-indicator { font-size: 13px; color: var(--gray-400); font-weight: 500; }

/* ── RESULTS ── */
.results-section { display: none; }
.results-section.active { display: block; }
.score-hero {
  text-align: center; padding: 48px 40px 32px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}
.score-display { position: relative; width: 140px; height: 140px; margin: 0 auto 16px; }
.score-display svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-track { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 10; }
.score-fill { fill: none; stroke: url(#sg); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 345; transition: stroke-dashoffset 1.5s ease; }
.score-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 40px; font-weight: 900; color: var(--white); line-height: 1; }
.score-title { font-size: 14px; color: rgba(255,255,255,0.65); font-weight: 500; }
.score-grade { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.results-offers { padding: 32px 40px 40px; }
.results-offers-title { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 20px; }
.results-grid { display: grid; gap: 16px; }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 100px; border: 1.5px solid var(--gray-200);
  font-size: 13px; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all 0.15s; background: var(--white);
  font-family: var(--font);
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ── FOOTER ── */
#footer {
  background: var(--navy); color: rgba(255,255,255,0.60);
  padding: 56px 24px 32px;
}
.footer-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand-name { font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.footer-brand-desc { font-size: 14px; line-height: 1.6; max-width: 260px; }
.footer-col-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.40); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.60); text-decoration: none; margin-bottom: 10px; font-weight: 500; transition: color 0.15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { max-width: var(--max-w); margin: 0 auto; padding-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.footer-copy { font-size: 13px; }
.footer-disclosure { font-size: 12px; color: rgba(255,255,255,0.30); line-height: 1.6; max-width: 900px; }

/* ── UTILITY ── */
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-muted { color: var(--gray-500); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.bg-off-white { background: var(--off-white); }
.bg-navy { background: var(--navy); }
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
}
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .quiz-body { padding: 28px 24px 20px; }
  .quiz-footer { padding: 0 24px 24px; }
  .results-offers { padding: 24px 24px 32px; }
  .score-hero { padding: 36px 24px 24px; }
  .comparison-table { font-size: 13px; }
  .comparison-table td, .comparison-table th { padding: 12px; }
}
