/* ===========================================
   הכנסת ה-25 AI — Design System
   Colors: Israeli Blue #0038B8, Gold #C5A55A
   Font: Heebo | Direction: RTL
   =========================================== */

:root {
  --blue-900: #001a5e;
  --blue-700: #0028a0;
  --blue-600: #0038B8;
  --blue-500: #1a5cd6;
  --blue-400: #4080e8;
  --blue-300: #6fa0f0;
  --blue-100: #d0e0fc;
  --blue-50: #eef4ff;
  --gold-600: #a08940;
  --gold-500: #C5A55A;
  --gold-400: #d4b86e;
  --gold-300: #e0cc90;
  --gold-100: #f8f0e0;
  --red-500: #dc3545;
  --green-500: #28a745;
  --gray-900: #1a1a2e;
  --gray-800: #2d2d44;
  --gray-700: #404060;
  --gray-600: #606080;
  --gray-500: #8080a0;
  --gray-400: #a0a0b8;
  --gray-300: #c0c0d0;
  --gray-200: #e0e0e8;
  --gray-100: #f0f0f5;
  --gray-50: #f8f8fc;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Heebo', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === HEADER === */
.site-header {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--blue-600) 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 11px;
  opacity: 0.8;
  font-weight: 400;
}

.header-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-btn:hover, .nav-btn.active {
  background: rgba(255,255,255,0.2);
}

.nav-btn.active {
  background: var(--gold-500);
  color: var(--blue-900);
  font-weight: 700;
}

.nav-btn.quiz-nav {
  background: var(--gold-500);
  color: var(--blue-900);
  font-weight: 700;
}

.hamburger {
  display: none;
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 22px;
  color: white;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hamburger:hover { background: rgba(255,255,255,0.2); }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, #002080 0%, var(--blue-600) 100%);
  color: var(--white);
  padding: 36px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><text x="10" y="50" font-size="80" fill="white">🏛️</text></svg>') center/400px repeat;
  opacity: 0.3;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero h1 span { color: var(--gold-400); }

.hero p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.hero-actions {
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 36px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--blue-900);
  border-radius: 60px;
  font-family: 'Heebo', sans-serif;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(197,165,90,0.35);
  border: none;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(197,165,90,0.5);
}

/* === SEARCH === */
.search-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 14px 22px 14px 52px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 60px;
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  direction: rtl;
}

.search-input::placeholder { color: rgba(255,255,255,0.6); }
.search-input:focus {
  outline: none;
  border-color: var(--gold-400);
  background: rgba(255,255,255,0.25);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.7;
}

.search-results {
  position: absolute;
  top: 100%;
  right: 0; left: 0;
  background: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.search-results.active { display: block; }

.search-result-item {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
  text-align: right;
  color: var(--gray-900);
}

.search-result-item:hover { background: var(--blue-50); }
.search-result-item .result-type { font-size: 11px; color: var(--gray-500); margin-bottom: 2px; }
.search-result-item .result-title { font-size: 14px; font-weight: 600; }
.search-result-item .result-sub { font-size: 12px; color: var(--gray-500); }

/* === STATS BAR === */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  margin-top: -32px;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: 1400px;
  margin: 0 auto;
  gap: 1px;
  background: var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.stat-card {
  background: var(--white);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover { background: var(--blue-50); }

.stat-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--blue-600);
  line-height: 1;
}

.stat-number.gold { color: var(--gold-600); }
.stat-number.green { color: var(--green-500); }

.stat-label {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 4px;
  font-weight: 500;
}

/* === MAIN CONTENT === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon { font-size: 28px; }

.see-all {
  color: var(--blue-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.see-all:hover { color: var(--blue-400); }

/* === GRID LAYOUTS === */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.page-section { margin-bottom: 48px; }

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-body { padding: 20px; }

/* === VOTE ITEMS === */
.vote-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vote-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.vote-item:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-sm);
  transform: translateX(-4px);
  border-right: 3px solid var(--blue-500);
}

.vote-info { flex: 1; min-width: 0; }

.vote-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vote-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
}

.vote-meta .date { font-weight: 500; }

.vote-type {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.vote-type.electronic { background: var(--blue-100); color: var(--blue-600); }
.vote-type.named { background: var(--gold-100); color: var(--gold-600); }
.vote-type.hand { background: var(--gray-100); color: var(--gray-600); }
.vote-type.secret { background: #f0e0f0; color: #806; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red-500);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  animation: pulse-badge 2s infinite;
}

.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === BILL CARDS === */
.bill-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.bill-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-sm);
}

.bill-type {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.bill-type.gov { background: var(--blue-100); color: var(--blue-600); }
.bill-type.private { background: var(--gold-100); color: var(--gold-600); }
.bill-type.committee { background: #e0f0e0; color: #060; }

.bill-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bill-date { font-size: 12px; color: var(--gray-500); }

/* === FACTION BAR === */
.faction-bar-container { margin-bottom: 48px; }

.faction-bar {
  display: flex;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.faction-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  min-width: 8px;
}

.faction-segment:hover { filter: brightness(1.15); z-index: 2; }

.faction-segment .tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  background: var(--gray-900);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}

.faction-segment:hover .tooltip { display: block; }

.faction-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.faction-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.faction-legend-item:hover { color: var(--blue-600); }

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* === MK GRID & CARDS === */
.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.mk-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.mk-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.mk-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mk-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  border: 3px solid var(--gray-200);
}

.mk-name { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.mk-faction { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }

.mk-stats { display: flex; justify-content: center; gap: 16px; font-size: 12px; }
.mk-stat { text-align: center; }
.mk-stat-value { font-size: 18px; font-weight: 800; }
.mk-stat-value.for { color: var(--green-500); }
.mk-stat-value.against { color: var(--red-500); }
.mk-stat-label { color: var(--gray-500); font-size: 11px; }

.mk-vote-mini { display: flex; gap: 4px; justify-content: center; margin-top: 8px; font-size: 11px; }
.mk-vote-mini span { padding: 2px 6px; border-radius: 4px; }
.mk-vote-mini .for-mini { background: #dcfce7; color: #15803d; }
.mk-vote-mini .against-mini { background: #fef2f2; color: #dc2626; }

/* === CHARTS === */
.chart-container {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 0 10px;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar {
  width: 100%;
  max-width: 60px;
  border-radius: 6px 6px 0 0;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.bar:hover { filter: brightness(1.1); }
.bar-label { font-size: 12px; color: var(--gray-600); margin-top: 8px; font-weight: 600; }
.bar-value { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* === COALITION === */
.coalition-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.coalition-box { padding: 20px; border-radius: var(--radius-md); text-align: center; }
.coalition-box.coal { background: linear-gradient(135deg, #1e3a5f 0%, #2d5986 100%); color: white; }
.coalition-box.opp { background: linear-gradient(135deg, #5f1e3a 0%, #862d59 100%); color: white; }
.coalition-pct { font-size: 48px; font-weight: 900; }
.coalition-label { font-size: 14px; opacity: 0.8; margin-top: 4px; }
.coalition-detail { font-size: 12px; opacity: 0.6; margin-top: 8px; }

/* === TOPICS === */
.topic-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.topic-chip {
  padding: 10px 16px;
  border-radius: var(--radius-xl);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.topic-count {
  background: var(--blue-600);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

/* === AI BADGE === */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* === MODALS === */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-close {
  background: var(--gray-100);
  border: none;
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 24px; }

/* Vote Detail */
.vote-result-badge { display: inline-block; padding: 6px 16px; border-radius: 20px; font-weight: 700; font-size: 14px; }
.vote-result-badge.accepted { background: #dcfce7; color: #15803d; }
.vote-result-badge.rejected { background: #fef2f2; color: #dc2626; }
.vote-mk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 16px; }
.vote-mk-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--gray-50); font-size: 13px; }
.vote-mk-item.for { border-right: 3px solid var(--green-500); }
.vote-mk-item.against { border-right: 3px solid var(--red-500); }
.vote-mk-item.present { border-right: 3px solid var(--gray-400); }
.vote-mk-item.abstain { border-right: 3px solid var(--gold-500); }
.vote-mk-item .mk-link { color: var(--blue-600); cursor: pointer; font-weight: 600; }
.vote-mk-item .mk-link:hover { text-decoration: underline; }
.vote-counters { display: flex; gap: 16px; margin: 16px 0; flex-wrap: wrap; }
.counter-box { padding: 12px 20px; border-radius: var(--radius-sm); text-align: center; min-width: 80px; }
.counter-box.for { background: #dcfce7; color: #15803d; }
.counter-box.against { background: #fef2f2; color: #dc2626; }
.counter-box.present { background: #f0f0f5; color: #606080; }
.counter-box.abstain { background: #fef9c3; color: #a16207; }
.counter-num { font-size: 28px; font-weight: 800; }
.counter-label { font-size: 12px; margin-top: 4px; }

/* MK Profile Modal */
.mk-profile-header { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.mk-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  overflow: hidden;
}

.mk-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mk-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.mk-stat { text-align: center; padding: 12px; border-radius: var(--radius-sm); background: var(--gray-50); }
.mk-stat-num { font-size: 22px; font-weight: 800; }
.mk-year-bars { display: flex; gap: 8px; align-items: flex-end; height: 120px; margin: 16px 0; }
.mk-year-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mk-year-bar .bar { min-width: 24px; border-radius: 4px 4px 0 0; background: var(--blue-500); }
.mk-year-bar .label { font-size: 10px; color: var(--gray-500); }

/* === QUIZ === */
.quiz-container { max-width: 800px; margin: 0 auto; }

.quiz-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.quiz-progress-bar { flex: 1; height: 8px; background: var(--gray-200); border-radius: 8px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-600), var(--gold-500)); border-radius: 8px; transition: width 0.5s ease; }
.quiz-progress-text { font-size: 14px; font-weight: 600; color: var(--gray-600); white-space: nowrap; }

.quiz-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-topic { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.quiz-question { font-size: 22px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.quiz-desc { font-size: 15px; color: var(--gray-600); line-height: 1.6; margin-bottom: 24px; }
.quiz-buttons { display: flex; gap: 12px; }

.quiz-btn {
  flex: 1;
  padding: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.quiz-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quiz-btn.for-btn:hover, .quiz-btn.for-btn.selected { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.quiz-btn.against-btn:hover, .quiz-btn.against-btn.selected { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.quiz-btn.skip-btn:hover, .quiz-btn.skip-btn.selected { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-600); }
.quiz-btn .btn-icon { font-size: 28px; }
.quiz-btn .btn-label { font-size: 14px; }

.quiz-result { text-align: center; }

.quiz-match-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.quiz-match-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quiz-match-pct { font-size: 32px; font-weight: 900; min-width: 80px; text-align: center; }
.quiz-match-info { flex: 1; text-align: right; }
.quiz-match-name { font-size: 18px; font-weight: 700; }
.quiz-match-faction { font-size: 14px; margin-top: 2px; }
.quiz-match-bar { height: 6px; background: var(--gray-200); border-radius: 6px; margin-top: 8px; overflow: hidden; }
.quiz-match-fill { height: 100%; border-radius: 6px; transition: width 1s ease; }

.quiz-restart {
  margin-top: 24px;
  padding: 14px 32px;
  background: var(--blue-600);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-restart:hover { background: var(--blue-700); transform: translateY(-2px); }

/* === QUIZ HERO BANNER === */
.quiz-hero-banner {
  background: linear-gradient(135deg, #001a5e 0%, #0038B8 60%, #1a5cd6 100%);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  margin: -20px auto 40px;
  max-width: 1400px;
  position: relative;
  overflow: hidden;
  z-index: 5;
  box-shadow: 0 12px 40px rgba(0,56,184,0.3);
  text-align: center;
  color: var(--white);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: block;
}

.quiz-hero-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 50px rgba(0,56,184,0.4);
}

.quiz-hero-banner::before {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(197,165,90,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.quiz-hero-banner::after {
  content: '';
  position: absolute;
  bottom: -40%; right: -5%;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(197,165,90,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.quiz-hero-banner .banner-icon {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
  animation: qhb-float 3s ease-in-out infinite;
  position: relative;
}

@keyframes qhb-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.quiz-hero-banner h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  margin-bottom: 8px;
  position: relative;
}

.quiz-hero-banner h2 span { color: var(--gold-400); }

.quiz-hero-banner p {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.quiz-hero-banner .banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 44px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--blue-900);
  border: none;
  border-radius: 60px;
  font-family: 'Heebo', sans-serif;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(197,165,90,0.4);
  position: relative;
}

.quiz-hero-banner .banner-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(197,165,90,0.5);
}

.quiz-hero-banner .banner-meta {
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.6;
  position: relative;
}

/* === SHARE === */
.share-section {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.share-btn.whatsapp { background: #25D366; color: white; }
.share-btn.telegram { background: #0088cc; color: white; }
.share-btn.twitter { background: #1DA1F2; color: white; }
.share-btn.copy { background: var(--gray-200); color: var(--gray-800); }

/* === FOOTER === */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 24px 24px;
  margin-top: 48px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .logo-text { color: var(--white); font-size: 20px; }
.footer-brand p { font-size: 13px; margin-top: 8px; line-height: 1.6; }

.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
  transition: var(--transition);
}

.footer-col a:hover { color: var(--gold-400); }

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-bottom a { color: var(--gold-400); text-decoration: none; }

/* === LOADING & ANIMATIONS === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  font-size: 18px;
  color: var(--gray-500);
}

.loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid var(--blue-100);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Page transitions */
#homePage, #votesPage, #billsPage, #mksPage, #quizPage, #aboutPage {
  animation: page-fade-in 0.3s ease;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-overlay .lo-spinner {
  font-size: 40px;
  animation: spin 2s linear infinite;
}

.loading-overlay .lo-text {
  font-family: 'Heebo', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-600);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; left: 0;
    background: linear-gradient(180deg, var(--blue-900), #002080);
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 4px;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: nav-slide-down 0.25s ease;
  }

  .header-nav.open { display: flex; }

  @keyframes nav-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .header-nav .nav-btn {
    width: 100%;
    text-align: right;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
  }

  .header-top {
    padding: 10px 16px;
    position: relative;
  }

  .logo-text { font-size: 18px; }
  .logo-sub { font-size: 10px; }
  .logo-icon { width: 34px; height: 34px; font-size: 18px; }

  .hero { padding: 28px 16px 44px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; margin-bottom: 20px; }
  .hero-cta { font-size: 15px; padding: 11px 28px; }

  .stats-bar { margin-top: -24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .main-content { padding: 24px 16px; }

  .mk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mk-card { padding: 16px 12px; }
  .mk-name { font-size: 14px; }
  .mk-faction { font-size: 11px; }

  .footer-content { grid-template-columns: 1fr 1fr; }

  .quiz-hero-banner {
    margin: -16px 12px 32px;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .quiz-hero-banner .banner-icon { font-size: 40px; }
  .quiz-hero-banner .banner-cta { font-size: 16px; padding: 12px 32px; width: 100%; justify-content: center; }

  .modal-content { max-height: 95vh; border-radius: var(--radius-md); }
  .mk-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .coalition-compare { grid-template-columns: 1fr; }
  .vote-mk-list { grid-template-columns: 1fr; }
  .mk-profile-header { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .three-col { grid-template-columns: 1fr; }
  .quiz-buttons { flex-direction: column; }
  .quiz-question { font-size: 18px; }
  .quiz-card { padding: 20px; }
  .quiz-match-pct { font-size: 24px; min-width: 60px; }
}

@media (max-width: 480px) {
  .footer-content { grid-template-columns: 1fr; }
  .mk-grid { grid-template-columns: 1fr; }
  .quiz-hero-banner { padding: 20px 16px; margin: -12px 8px 24px; }
  .quiz-hero-banner h2 { font-size: 20px; }
  .quiz-hero-banner p { font-size: 13px; }
}

/* === ACCESSIBILITY === */
.nav-btn:focus-visible,
.search-input:focus-visible,
.quiz-btn:focus-visible,
.hero-cta:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
