/* ===========================
   RESET & GLOBAL
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #1e2d3d;
  --ink-mid:    #3d5166;
  --ink-pale:   #f0f4f8;
  --gold:       #c27c1a;
  --gold-light: #fef3c7;
  --text:       #1e293b;
  --text-muted: #64748b;
  --border:     #dde3eb;
  --bg:         #f7f9fb;
  --white:      #ffffff;
  --radius:     12px;
  --shadow:     0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Arial Hebrew', 'Arial', sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 17px;
}

a { color: var(--ink-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   HEADER
=========================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
}
.logo:hover { text-decoration: none; opacity: .8; }
.logo-icon { font-size: 1.5rem; }
.nav { display: flex; gap: 4px; }
.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
}
.nav-link:hover, .nav-link.active {
  background: var(--ink-pale);
  color: var(--ink);
  text-decoration: none;
}

/* ===========================
   HERO
=========================== */
.hero {
  background: linear-gradient(135deg, #1e2d3d 0%, #253545 55%, #1a2530 100%);
  color: var(--white);
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  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.04'%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");
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -1px;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: .88;
  max-width: 560px;
  margin: 0 auto 16px;
  line-height: 1.8;
}
.hero-disclaimer {
  font-size: .82rem;
  opacity: .65;
  margin-bottom: 32px;
}
.hero-disclaimer a { color: rgba(255,255,255,.8); }
.hero-deco {
  position: absolute;
  bottom: 16px;
  right: 50%;
  transform: translateX(50%);
  opacity: .2;
  font-size: 1rem;
  letter-spacing: 8px;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  font-family: inherit;
}
.btn-lg { padding: 15px 40px; font-size: 1.1rem; border-radius: 12px; }
.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: #b45309;
  border-color: #b45309;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217,119,6,.35);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink-pale);
  text-decoration: none;
}

/* ===========================
   QUIZ
=========================== */
.quiz-section {
  padding: 48px 0 60px;
  min-height: 70vh;
}
.quiz-container { max-width: 700px; }

.progress-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ink-mid), var(--gold));
  border-radius: 99px;
  transition: width .4s ease;
  width: 0%;
}
.progress-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: left;
}

.question-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  animation: fadeUp .3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.question-number {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-mid);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
}
.question-text {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
  color: var(--text);
}
.question-topic {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.answer-btn {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  text-align: right;
  font-size: 1rem;
  line-height: 1.55;
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
  color: var(--text);
  min-height: 54px;
}
.answer-btn:hover {
  border-color: var(--ink-mid);
  background: var(--ink-pale);
  color: var(--ink);
  transform: translateX(-2px);
}
.answer-btn.selected {
  border-color: var(--ink);
  background: var(--ink-pale);
  color: var(--ink);
  font-weight: 600;
}

.quiz-nav {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* ===========================
   RESULTS
=========================== */
.results-section { padding: 56px 0 72px; }
.results-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}
.results-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}
.result-row {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  animation: fadeUp .3s ease;
}
.result-row.top-match {
  border: 2px solid var(--gold);
  background: var(--gold-light);
}
.result-row.top-match .result-party-name { font-weight: 800; }
.result-party-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.result-badge {
  font-size: .72rem;
  font-weight: 700;
  background: var(--gold);
  color: white;
  padding: 2px 8px;
  border-radius: 99px;
}
.result-party-name { font-size: 1.05rem; font-weight: 700; }
.result-party-desc { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.result-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}
.result-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ink-mid), var(--ink));
  transition: width 1s ease;
}
.result-row.top-match .result-bar {
  background: linear-gradient(90deg, var(--gold), #b45309);
}
.result-pct {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  min-width: 56px;
  text-align: center;
}
.result-row.top-match .result-pct { color: var(--gold); }
.result-link {
  font-size: .8rem;
  color: var(--ink-mid);
  margin-top: 6px;
  display: inline-block;
}

.results-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.results-disclaimer {
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===========================
   HOW IT WORKS
=========================== */
.how-section {
  background: var(--white);
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.how-card {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.how-card:hover { box-shadow: var(--shadow); }
.how-icon { font-size: 2.2rem; margin-bottom: 14px; }
.how-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.how-card p { font-size: .88rem; color: var(--text-muted); }

/* ===========================
   PARTIES PAGE
=========================== */
.page-hero {
  background: linear-gradient(135deg, #1e2d3d 0%, #253545 100%);
  color: white;
  padding: 48px 0 36px;
  text-align: center;
}
.page-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.page-hero p { opacity: .85; }

.parties-section { padding: 48px 0; }

.bloc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.party-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-right: 5px solid var(--ink-mid);
}
.party-card.right-bloc { border-right-color: #dc2626; }
.party-card.haredi-bloc { border-right-color: #7c3aed; }
.party-card.center-bloc { border-right-color: #0891b2; }
.party-card.left-bloc { border-right-color: #16a34a; }
.party-card.arab-bloc { border-right-color: #ea580c; }

.party-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.party-name { font-size: 1.2rem; font-weight: 800; }
.party-leader { font-size: .85rem; color: var(--text-muted); margin-bottom: 4px; }
.party-tag {
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--ink-pale);
  color: var(--ink);
  white-space: nowrap;
}
.party-desc { font-size: .9rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.7; }
.party-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.pillar {
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.party-links { display: flex; gap: 12px; flex-wrap: wrap; }
.party-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-mid);
}

/* ===========================
   TAKANON PAGE
=========================== */
.takanon-section { padding: 56px 0 72px; }
.takanon-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
}
.takanon-content h2 { font-size: 1.4rem; font-weight: 700; margin: 28px 0 10px; color: var(--ink); }
.takanon-content h2:first-child { margin-top: 0; }
.takanon-content p { margin-bottom: 14px; font-size: .93rem; line-height: 1.8; }
.takanon-content ul { margin: 10px 0 14px 0; padding-right: 22px; }
.takanon-content ul li { margin-bottom: 6px; font-size: .93rem; line-height: 1.7; }
.takanon-meta {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.75);
  padding: 36px 0 28px;
  margin-top: auto;
}
.footer-inner { text-align: center; }
.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-nav a { color: rgba(255,255,255,.7); font-size: .88rem; }
.footer-nav a:hover { color: white; }
.footer-copy { font-size: .78rem; line-height: 1.8; }

/* ===========================
   LANGUAGE TOGGLE
=========================== */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--ink-pale);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}
.lang-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  letter-spacing: .4px;
  transition: all .18s;
  font-family: inherit;
  line-height: 1;
}
.lang-btn.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.lang-btn:hover:not(.active) { color: var(--ink); background: var(--border); }

/* ── show/hide by language (exclude the toggle buttons themselves) ── */
.lang-he [data-lang="en"]:not(.lang-btn) { display: none !important; }
.lang-en [data-lang="he"]:not(.lang-btn) { display: none !important; }

/* ===========================
   COMPASS LOGO SVG
=========================== */
.logo-svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: inherit;
}

/* ===========================
   LINKEDIN LINK
=========================== */
.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  transition: color .2s;
  text-decoration: none;
  margin-top: 8px;
}
.linkedin-link:hover { color: #fff; text-decoration: none; }
.linkedin-icon { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

/* ===========================
   RESPONSIVE
=========================== */

/* Tablet */
@media (max-width: 768px) {
  body { font-size: 17px; }

  .header-inner { gap: 8px; flex-wrap: wrap; }
  .nav { gap: 0; }
  .nav-link { padding: 9px 11px; font-size: 1rem; min-height: 44px; display:flex; align-items:center; }

  .hero { padding: 56px 0 44px; }
  .hero-title { font-size: clamp(2.2rem, 8vw, 3rem); }
  .hero-subtitle { font-size: 1.1rem; }

  .question-card { padding: 28px 22px; }
  .question-text { font-size: 1.25rem; }
  .answer-btn { padding: 16px 18px; font-size: 1.05rem; min-height: 56px; }

  .result-party-name { font-size: 1.1rem; }
  .result-pct { font-size: 1.6rem; }

  .how-card { padding: 24px 16px; }
  .how-card p { font-size: .95rem; }
}

/* Mobile */
@media (max-width: 480px) {
  body { font-size: 18px; }

  /* Header: logo left, lang-toggle right, nav wraps below */
  .header-inner { padding: 10px 0; }
  .logo { font-size: 1.15rem; }
  .nav { order: 3; width: 100%; justify-content: center; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
  .nav-link { font-size: 1rem; padding: 10px 12px; min-height: 44px; }
  .lang-toggle { margin-right: 0; }
  .lang-btn { padding: 7px 14px; font-size: .9rem; min-height: 38px; }

  .hero { padding: 48px 0 36px; }
  .hero-title { font-size: 2.4rem; }
  .hero-subtitle { font-size: 1.1rem; line-height: 1.9; }
  .hero-badge { font-size: .95rem; }

  .btn { font-size: 1.05rem; padding: 14px 26px; }
  .btn-lg { font-size: 1.15rem; padding: 17px 36px; }

  .question-card { padding: 24px 18px; border-radius: 10px; }
  .question-number { font-size: .9rem; }
  .question-text { font-size: 1.2rem; line-height: 1.55; }
  .question-topic { font-size: .95rem; }
  .answer-btn { padding: 18px 16px; font-size: 1.05rem; min-height: 60px; line-height: 1.5; border-radius: 10px; }

  .results-title { font-size: 1.7rem; }
  .results-subtitle { font-size: 1rem; }
  .result-row { grid-template-columns: 1fr; padding: 16px 18px; }
  .result-party-name { font-size: 1.1rem; }
  .result-party-desc { font-size: .9rem; }
  .result-pct { font-size: 1.5rem; text-align: right; }
  .result-link { font-size: .9rem; }

  .section-title { font-size: 1.5rem; }
  .how-icon { font-size: 2.4rem; }
  .how-card h3 { font-size: 1.1rem; }
  .how-card p { font-size: 1rem; }

  .party-name { font-size: 1.25rem; }
  .party-desc { font-size: .97rem; }

  .takanon-content { padding: 22px 18px; }
  .takanon-content h2 { font-size: 1.2rem; }
  .takanon-content p, .takanon-content li { font-size: 1rem; }

  .footer-copy { font-size: .9rem; }
}
