/* FINNA i18n — language switcher + price visibility + RTL support.
   Shared across all 4 pages, loaded after each page's own <style> block. */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');

/* ---------- PRICE VISIBILITY ----------
   Every price-bearing element gets class="price" once (see shop.html).
   This single rule hides all of them for every locale except ru, including
   cart items re-rendered later by updateCartUI() — no per-render logic needed. */
html:not([data-prices="show"]) .price {
  display: none !important;
}

/* ---------- LANGUAGE SWITCHER ----------
   Native <select>, styled as a neutral bordered pill so it doesn't visually
   compete with the orange "Магазин"/cart CTA sitting next to it. */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238E8E93' stroke-width='1.5'%3E%3Cpath d='M5 8l5 5 5-5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1;
  width: 54px;
  text-align: center;
  padding: 6px 20px 6px 8px;
  transition: border-color 0.2s;
}

.lang-select:hover {
  border-color: var(--accent, #E8620A);
}

.lang-select option {
  background-color: #161616;
  color: #fff;
}

/* Desktop nav placement */
.nav-links .lang-select-item {
  display: flex;
  align-items: center;
}

/* Mobile menu placement — the switcher sits below the other links */
.mobile-menu [data-lang-switcher-mount] {
  margin-top: 4px;
}

.mobile-menu .lang-select {
  font-size: 20px;
  width: 64px;
  padding: 8px 24px 8px 10px;
}

@media (max-width: 768px) {
  .nav-links .lang-select-item { display: none; }
}

/* ---------- HERO SLOGAN FOOTNOTE ----------
   "SWIM TO SUCCESS" is shown as-is (English) on every locale; the star
   links it to a small translated note at the bottom of the page. */
.hero-star {
  color: var(--accent, #E8620A);
  font-size: 0.45em;
  margin-inline-start: 2px;
}

.hero-footnote {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 24px;
  text-align: center;
}

/* ---------- RTL (Egypt / Saudi Arabia) ----------
   Flexbox/grid auto-mirror most of the layout under dir="rtl" — this covers
   the parts that don't. Flagged in the project plan as needing a real visual
   QA pass before launch, not guaranteed pixel-perfect. */

[dir="rtl"] {
  font-family: 'Tajawal', 'Inter', -apple-system, sans-serif;
}

/* Explicit exception: the hero block (eyebrow/title/subtitle/buttons) stays
   left-aligned and left-positioned even on RTL locales — only the rest of
   the page mirrors. Arabic text inside still shapes/reads correctly; this
   only resets the block's overall alignment and button order back to LTR. */
[dir="rtl"] .hero-content {
  direction: ltr;
  align-items: flex-start;
  text-align: left;
}

[dir="rtl"] .section-body,
[dir="rtl"] .philosophy-text,
[dir="rtl"] .contacts-wrap {
  text-align: right;
}

[dir="rtl"] .step-label,
[dir="rtl"] .cart-item-name,
[dir="rtl"] .modal p {
  text-align: right;
}

/* Keep phone numbers/digits left-to-right even inside RTL text
   (wrapped in <bdi> in the HTML) so digits don't visually reorder. */
[dir="rtl"] bdi {
  unicode-bidi: isolate;
  direction: ltr;
}
