/* ==========================================================================
   EZ Designs — Hebrew / RTL overrides.
   Loads LAST (after styles.css, staging.css, cinematic.css). Scoped to
   html[dir="rtl"] so it never touches the English pages. Grid/flex layouts
   already auto-mirror under dir="rtl"; the rules below only correct the
   properties that don't (physical left/right, letter-spacing on Hebrew
   glyphs, and widgets that assumed LTR).
   ========================================================================== */

/* --- Font stacks ---------------------------------------------------------
   Heebo (body) / David Libre 500 (display) cover the Hebrew block only (see
   fonts.css unicode-range); Latin letters and digits inside the same element
   fall through to the existing Manrope / Libre Baskerville faces
   automatically. Only the 500 weight of David Libre is shipped, so the display
   selectors pin font-weight: 500 (no synthesized bold). */
html[dir="rtl"] body {
  font-family: "Heebo", "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] .package-number,
html[dir="rtl"] .process-item span {
  font-family: "David Libre", "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-weight: 500;
}

html[dir="rtl"] .journey-live .j-scene figcaption strong {
  font-family: "David Libre", "Libre Baskerville", Georgia, serif;
  font-weight: 500;
}

/* --- Letter-spacing: drop tracking that was tuned for Latin caps --------- */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .badge,
html[dir="rtl"] .ba-tag,
html[dir="rtl"] .scroll-cue span,
html[dir="rtl"] .about-signoff,
html[dir="rtl"] .scene-rail a::before {
  letter-spacing: normal;
}

/* --- Skip link: off-canvas on the opposite physical edge ----------------- */
html[dir="rtl"] .skip-link {
  left: auto;
  right: -999px;
}

html[dir="rtl"] .skip-link:focus {
  right: 12px;
  left: auto;
}

/* --- Nav underline sweep: mirror the animation direction ----------------- */
html[dir="rtl"] .nav-links a::after,
html[dir="rtl"] .footer-links a::after {
  transform-origin: left;
}

html[dir="rtl"] .nav-links a:hover::after,
html[dir="rtl"] .footer-links a:hover::after {
  transform-origin: right;
}

/* --- Mobile nav: the CTA margin that makes room for the toggle was physical */
@media (max-width: 920px) {
  html[dir="rtl"] .nav-cta {
    margin-left: 12px;
    margin-right: auto;
  }
}

@media (max-width: 430px) {
  html[dir="rtl"] .nav-cta {
    margin-left: 0;
  }
}

/* --- Service card badge: text is now right-aligned, so the "Popular"
   badge has to move to the opposite (left) corner to avoid overlapping
   the package number -------------------------------------------------- */
html[dir="rtl"] .badge {
  right: auto;
  left: 17px;
}

/* --- Service card bullet list: bullet sits on the trailing (right) side -- */
html[dir="rtl"] .package-card li {
  padding-left: 0;
  padding-right: 19px;
}

html[dir="rtl"] .package-card li::before {
  left: auto;
  right: 0;
}

/* --- Scroll-journey caption: was hard-coded to left-align ----------------- */
html[dir="rtl"] .journey-live .j-scene figcaption {
  text-align: right;
}

/* --- Lightbox: tag spacing, and prev/next swap sides so the chevrons still
   point the way they lead. The slider itself (and its keyboard shortcuts in
   staging.js) are made direction-aware there too. ------------------------- */
html[dir="rtl"] .lb-tag {
  margin-left: 0;
  margin-right: 8px;
}

html[dir="rtl"] .lb-prev {
  left: auto;
  right: 3vw;
  transform: translateY(-50%) scaleX(-1);
}

html[dir="rtl"] .lb-next {
  right: auto;
  left: 3vw;
  transform: translateY(-50%) scaleX(-1);
}

@media (max-width: 700px) {
  html[dir="rtl"] .lb-prev {
    left: auto;
    right: 8px;
  }

  html[dir="rtl"] .lb-next {
    right: auto;
    left: 8px;
  }
}

/* --- Before/after slider: a spatial before/after image comparison, kept
   physically left-to-right on purpose (the photo doesn't change direction
   just because the page copy does). Lock the invisible range input to LTR
   so dragging still matches the clip-path math in staging.css. ---------- */
html[dir="rtl"] .ba-range {
  direction: ltr;
}

/* --- Mobile contact bar: the divider between the two buttons sits on the
   outer edge after the grid mirrors, not between them -------------------- */
html[dir="rtl"] .mobile-contact-bar a + a {
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

/* --- Cinematic scene rail: move to the opposite physical edge ------------ */
html[dir="rtl"] .scene-rail {
  right: auto;
  left: 22px;
}

html[dir="rtl"] .scene-rail a::before {
  right: auto;
  left: 32px;
}

/* --- Reviews carousel controls: the chevrons point the way the cards move.
   The row itself already mirrors (previous on the right) under dir="rtl". -- */
html[dir="rtl"] #reviews .reviews-ctl .ctl-chevron {
  transform: scaleX(-1);
}

/* Brand always reads "EZ Designs" left to right */
.brand, .footer-brand { direction: ltr; unicode-bidi: isolate; }
