:root {
  --bg: #0b0b0e;
  --bg-alt: #121218;
  --card: #17171f;
  --border: #2a2a38;
  --text: #f5f5f7;
  --muted: #a4a4b5;
  --red: #e11d2e;
  --red-dark: #9f121e;
  --whatsapp: #22c55e;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
  overflow-wrap: break-word;
}

/* Media and embeds never exceed their container */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

iframe,
embed,
object {
  max-width: 100%;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 14, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-h,
.brand-rest {
  color: #ffffff;
}

.brand-m {
  color: var(--red);
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #ffffff;
}

/* 3-language segmented switcher (EN / עברית / عربي).
   Fixed LTR order so the buttons never jump around when the page direction flips. */
.lang-switch {
  display: inline-flex;
  direction: ltr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-opt {
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-opt:hover {
  color: #ffffff;
}

.lang-opt:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.lang-opt[aria-pressed="true"] {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(225, 29, 46, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger button — only shown on small screens */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.menu-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar.menu-open .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar.menu-open .menu-bar:nth-child(2) {
  opacity: 0;
}

.navbar.menu-open .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  padding: 64px 0;
  background: radial-gradient(circle at 80% 20%, rgba(225, 29, 46, 0.22), transparent 55%),
              var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(225, 29, 46, 0.16);
  color: #ff6b78;
  border: 1px solid rgba(225, 29, 46, 0.45);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--red);
  color: #ffffff;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #07160c;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border);
  width: 100%;
  margin-top: 14px;
}

.btn-outline:hover {
  border-color: var(--red);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
}

.hero-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card {
  background: linear-gradient(160deg, #1b1b24, #101015);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.car-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ff6b78;
  margin-bottom: 16px;
}

.car-specs-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.car-specs-preview small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.car-specs-preview strong {
  font-size: 1.05rem;
}

.accent {
  color: #ff4d5e;
}

.arrow {
  color: var(--red);
  font-size: 1.3rem;
  font-weight: 900;
}

.car-note {
  color: var(--muted);
  font-size: 0.88rem;
}

code {
  background: #22222e;
  padding: 2px 6px;
  border-radius: 5px;
  color: #ffffff;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
}

.calc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--muted);
}

.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  color: #ffffff;
  border: 1px solid var(--border);
  font-size: 0.98rem;
}

.gauges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.gauge-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}

.gauge-card.tuned {
  border-color: rgba(225, 29, 46, 0.65);
}

.gauge-title {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.gauge-value {
  font-size: 2rem;
  font-weight: 900;
}

.gauge-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 4px;
}

.calc-summary {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #86efac;
  margin-bottom: 20px;
}

.calc-cta-row {
  text-align: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 18px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.price-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.price-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.price-tag {
  font-size: 1.75rem;
  font-weight: 900;
  color: #ff5b6a;
}

.sol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.info-card h3 {
  margin-bottom: 8px;
}

.info-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: #08080a;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 6px;
}

/* ===== Black Friday sale ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-links a.nav-bf {
  color: #ffffff;
  background: var(--red);
  padding: 2px 10px;
  border-radius: 6px;
}

.nav-links a.nav-bf:hover {
  background: #ff2a3d;
}

.nav-links a[hidden],
.bf[hidden] {
  display: none !important;
}

.bf {
  --racing: #e10600;
  --racing-hot: #ff2a1f;
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(225, 6, 0, 0.35), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(225, 6, 0, 0.25), transparent 50%),
    #050505;
  border-top: 3px solid var(--racing);
  border-bottom: 3px solid var(--racing);
}

.bf-stripes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0 60px,
    rgba(225, 6, 0, 0.07) 60px 64px,
    transparent 64px 76px,
    rgba(255, 255, 255, 0.035) 76px 78px
  );
}

.bf-inner {
  position: relative;
}

.bf-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
}

.bf-kicker {
  display: inline-block;
  background: #ffffff;
  color: #050505;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 4px;
  transform: skewX(-12deg);
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}

.bf-title {
  font-size: clamp(2.8rem, 9vw, 5.6rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.bf-title-red {
  color: var(--racing);
  text-shadow: 0 0 28px rgba(225, 6, 0, 0.55);
}

.bf-title-white {
  color: #ffffff;
}

.bf-lead {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
}

.bf-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 20px;
  margin-bottom: 24px;
}

.bf-valid {
  background: var(--racing);
  color: #ffffff;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(225, 6, 0, 0.35);
}

.bf-countdown {
  display: flex;
  gap: 8px;
  direction: ltr;
}

.bf-cd-unit {
  min-width: 62px;
  background: #0f0f10;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 2px solid var(--racing);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}

.bf-cd-unit strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.bf-cd-unit small {
  display: block;
  font-size: 0.75rem;
  color: #c9c9d1;
}

.bf-vag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.bf-vag-label {
  color: #c9c9d1;
  font-weight: 700;
}

.bf-vag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
}

.vag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.vag-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--racing);
}

.bf-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: start;
}

.bf-poster {
  position: sticky;
  top: 90px;
}

.bf-poster-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid var(--racing);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(225, 6, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bf-poster-btn img {
  display: block;
  width: 100%;
  height: auto;
}

.bf-poster-btn:hover,
.bf-poster-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), 0 0 55px rgba(225, 6, 0, 0.45);
}

.bf-poster-zoom {
  position: absolute;
  bottom: 12px;
  inset-inline-start: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.bf-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #161618 0%, #0a0a0b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-inline-start: 4px solid var(--racing);
  border-radius: 14px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bf-card:hover,
.bf-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(225, 6, 0, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(225, 6, 0, 0.35), 0 0 30px rgba(225, 6, 0, 0.2);
}

.bf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.bf-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--racing-hot);
}

.bf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(225, 6, 0, 0.7);
  background: rgba(225, 6, 0, 0.08);
}

.bf-icon svg {
  width: 22px;
  height: 22px;
}

.bf-plus {
  color: var(--racing-hot);
  font-weight: 900;
}

.bf-tag {
  background: var(--racing);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.bf-tag-alt {
  background: #ffffff;
  color: #050505;
}

.bf-card-title {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
}

.bf-card-sub {
  color: #c9c9d1;
  font-weight: 600;
  margin-bottom: 14px;
}

.bf-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  margin-bottom: 16px;
}

.bf-price {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.bf-was {
  font-size: 1.15rem;
  font-weight: 700;
  color: #9a9aa5;
  text-decoration: line-through;
  text-decoration-color: var(--racing-hot);
  text-decoration-thickness: 2px;
}

.bf-book {
  gap: 8px;
  width: 100%;
  min-height: 44px;
  background: var(--racing);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(225, 6, 0, 0.3);
}

.bf-book:hover,
.bf-book:focus-visible {
  background: var(--racing-hot);
}

.wa-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.bf-note {
  text-align: center;
  color: #c9c9d1;
  margin-top: 28px;
}

.bf-dialog {
  max-width: min(560px, 94vw);
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 2px solid #e10600;
  border-radius: 14px;
  background: #000;
  overflow: auto;
}

.bf-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.bf-dialog img {
  display: block;
  width: 100%;
  height: auto;
}

.bf-dialog-close {
  position: fixed;
  top: 12px;
  inset-inline-end: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #e10600;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .bf-card,
  .bf-poster-btn {
    transition: none;
  }

  .bf-card:hover,
  .bf-card:focus-within,
  .bf-poster-btn:hover,
  .bf-poster-btn:focus-visible {
    transform: none;
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .controls-grid,
  .gauges-grid,
  .sol-grid {
    grid-template-columns: 1fr;
  }

  /* Anchored sections land below the sticky header */
  section[id],
  footer[id] {
    scroll-margin-top: 80px;
  }

  /* Header: brand + language + menu button */
  .nav-inner {
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    font-size: 1.25rem;
    min-width: 0;
  }

  .lang-switch {
    padding: 0;
  }

  .lang-opt {
    min-height: 44px;
    min-width: 44px;
    padding: 0 10px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  /* Collapsed navigation dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 8px 4%;
    background: rgba(11, 11, 14, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  }

  .navbar.menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 8px;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  /* Readable body text (16px minimum) */
  .hero-copy p,
  .hero-perks,
  .car-note,
  .car-specs-preview small,
  .section-head p,
  .field label,
  .field select,
  .gauge-title,
  .price-sub,
  .info-card p,
  .footer p {
    font-size: 1rem;
  }

  /* Tap targets at least 44 x 44 */
  .btn {
    min-height: 44px;
    max-width: 100%;
    text-align: center;
  }

  .field select {
    min-height: 44px;
  }

  /* Spacing tuned for narrow screens */
  .hero,
  .section {
    padding: 44px 0;
  }

  .calc-box {
    padding: 20px;
  }

  .hero-card {
    padding: 18px;
  }

  .car-specs-preview {
    flex-wrap: wrap;
  }

  .gauge-card {
    padding: 18px;
  }

  /* Black Friday: cards first, poster below */
  .bf {
    padding: 52px 0;
  }

  .bf-layout {
    grid-template-columns: 1fr;
  }

  .bf-poster {
    position: static;
    order: 2;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
  }

  .nav-links a.nav-bf {
    padding: 0 8px;
    border-radius: 0;
    background: rgba(225, 6, 0, 0.9);
  }

  .bf-cd-unit small,
  .bf-tag,
  .vag-badge {
    font-size: 0.85rem;
  }
}

@media (max-width: 560px) {
  .bf-cards {
    grid-template-columns: 1fr;
  }

  .bf-cd-unit {
    min-width: 56px;
  }
}

@media (max-width: 480px) {
  /* Header: brand + menu on the first row, full-width language switch below */
  .nav-inner {
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 8px 0;
  }

  .nav-actions {
    display: contents;
  }

  .menu-toggle {
    order: 2;
  }

  .lang-switch {
    order: 3;
    flex: 1 0 100%;
  }

  .lang-opt {
    flex: 1 1 0;
  }

  section[id],
  footer[id] {
    scroll-margin-top: 124px;
  }

  .hero-actions .btn,
  .calc-cta-row .btn,
  .footer-inner .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .car-specs-preview {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .car-specs-preview .arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  .calc-box {
    padding: 16px;
  }

  .btn-lg {
    padding: 14px 18px;
  }
}

@media (max-width: 360px) {
  .brand {
    font-size: 1.1rem;
  }
}
