/* ==========================================================================
   Hua Quan — Arabic / RTL stylesheet
   Reuses the English master stylesheet, then overrides only the
   direction-sensitive rules. Keep this file small: if the English
   style.css changes, the Arabic site follows automatically.
   ========================================================================== */

@import url("../style.css");

/* ---------- Typography ---------- */
/* Arabic script must never use letter-spacing — it breaks letter joining. */
html[dir="rtl"] body,
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .badge,
html[dir="rtl"] .logo-text small,
html[dir="rtl"] .hero .stat .lbl,
html[dir="rtl"] .pd-header .eyebrow,
html[dir="rtl"] .contact-info .ci-item .lbl,
html[dir="rtl"] .news-card .nc-meta span.cat,
html[dir="rtl"] .article-hero .article-meta .cat {
  letter-spacing: normal;
}

html[dir="rtl"] body {
  font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, "Noto Naskh Arabic",
               "Arabic Typesetting", Arial, sans-serif;
  line-height: 1.85;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5 {
  line-height: 1.45;
}

/* Latin product names and technical units stay LTR inside Arabic sentences */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* ---------- Top bar / header ---------- */
html[dir="rtl"] .topbar .links span { margin-right: 0; margin-left: 6px; }
html[dir="rtl"] .topbar .links span[style] { margin-left: 0 !important; margin-right: 16px !important; }

/* ---------- Product cards ---------- */
html[dir="rtl"] .product-card ul li {
  padding-left: 0;
  padding-right: 18px;
}
html[dir="rtl"] .product-card ul li::before {
  content: "‹";
  left: auto;
  right: 0;
}
html[dir="rtl"] .product-card .more::after { content: " ←"; }
html[dir="rtl"] .product-card:hover .more::after { margin-left: 0; margin-right: 4px; }

/* Image badge sits in the visual top-right in RTL layouts */
html[dir="rtl"] .product-card .badge { left: auto; right: 12px; }

/* ---------- Timeline ---------- */
html[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 32px;
  border-left: 0;
  border-right: 2px solid var(--c-accent);
}
html[dir="rtl"] .timeline-item::before { left: auto; right: -38px; }

/* ---------- Accent strips ---------- */
html[dir="rtl"] .adv-strip,
html[dir="rtl"] .note-box,
html[dir="rtl"] .warning-box,
html[dir="rtl"] .key-takeaway {
  border-left: 0;
  border-right: 4px solid var(--c-accent);
}

/* ---------- Article / news body ---------- */
html[dir="rtl"] .article-body > h2 {
  padding-left: 0;
  padding-right: 14px;
  border-left: 0;
  border-right: 4px solid var(--c-accent);
}
html[dir="rtl"] .article-body > ul,
html[dir="rtl"] .article-body > ol,
html[dir="rtl"] .key-takeaway ul,
html[dir="rtl"] .article-related ul {
  padding-left: 0;
  padding-right: 24px;
}
html[dir="rtl"] .article-hero .article-meta > span:not(.cat)::before {
  margin-right: 0;
  margin-left: 10px;
}
html[dir="rtl"] .article-body table { text-align: right; }

/* ---------- Footer separators ---------- */
html[dir="rtl"] .footer-bottom span + span::before,
html[dir="rtl"] footer .footer-bottom span::before {
  margin-right: 0;
  margin-left: 10px;
}

/* ---------- Floating WhatsApp button moves to the visual left ---------- */
html[dir="rtl"] .float-wa { right: auto; left: 24px; }

/* ---------- Numbers stay readable ---------- */
html[dir="rtl"] .stat .num,
html[dir="rtl"] .fact-card .num,
html[dir="rtl"] .pc-spec .val {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---------- Slight Arabic size tuning (Arabic reads larger at same px) ---------- */
html[dir="rtl"] .hero h1 { font-size: 40px; line-height: 1.35; }
html[dir="rtl"] .section-head h2 { line-height: 1.4; }

@media (max-width: 900px) {
  html[dir="rtl"] .hero h1 { font-size: 30px; }
}
@media (max-width: 600px) {
  html[dir="rtl"] .hero h1 { font-size: 25px; }
}

/* ============================================================
   صفحة الأسئلة الشائعة + كثافة القائمة  (2026-11-20)
   ============================================================ */
html[dir="rtl"] section[id] { scroll-margin-top: 92px; }

html[dir="rtl"] .faq-item summary { padding: 18px 24px 18px 52px; }
html[dir="rtl"] .faq-item summary::after {
  right: auto; left: 24px;
}
html[dir="rtl"] .faq-item p { padding: 0 24px 18px; max-width: 78ch; }
html[dir="rtl"] .faq-item p a { color: var(--c-accent); text-decoration: underline; }
html[dir="rtl"] .faq-item ul {
  padding: 0 44px 18px 24px; margin: 0;
  font-size: 14.5px; line-height: 1.8; color: var(--c-text);
}
html[dir="rtl"] .faq-item ul li { margin-bottom: 6px; }
html[dir="rtl"] .section-head[style*="text-align:left"] { text-align: right !important; }

/* عناصر القائمة أصبحت 7 في النسخة العربية */
@media (max-width: 1150px) {
  html[dir="rtl"] nav.main-nav { gap: 14px; }
  html[dir="rtl"] nav.main-nav a { font-size: 13.5px; }
}
