/* ==========================================================================
   KanaanTex — extra.css (November 2026: languages, product pages, FAQ,
   privacy, consent banner, touch targets). Loaded after additions.css.
   An RTL copy (extra.rtl.css) is generated for the Arabic pages.
   ========================================================================== */

/* --- language switcher ------------------------------------------------------ */
.lang-switch { display: inline-flex; gap: 4px; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.16); }
.lang-switch a, .lang-switch .is-current { padding: 4px 6px; border-radius: 6px; }
.lang-switch .is-current { color: var(--lime); font-weight: 600; }
.nav__lang { display: none; }
@media (max-width: 900px) {
  .nav__lang { display: flex; gap: 10px; margin-top: 18px; }
  .nav .nav__lang a { border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: .95rem; }
}

/* --- six-figure stat strip (3 x 2 on desktop) ------------------------------- */
@media (min-width: 821px) {
  .stats__grid--6 { grid-template-columns: repeat(3, 1fr); }
  .stats__grid--6 .stat { border-left: 1px solid rgba(255,255,255,.1); padding-right: 28px; }
  .stats__grid--6 .stat:nth-child(3n) { border-left: 0; }
  .stats__grid--6 .stat:nth-child(3n+1) { padding-right: 0; }
  .stats__grid--6 .stat:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.1); }
}
@media (max-width: 820px) {
  .stats__grid--6 .stat:nth-child(2n+1) { border-left: 1px solid rgba(255,255,255,.1); }
}
@media (max-width: 460px) {
  .stats__grid--6 .stat:nth-child(n) { border-left: 0; }
}

/* six certification cards: 3 + 3 rather than 5 + 1 */
.badge-grid--6 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
@media (min-width: 1000px) { .badge-grid--6 { grid-template-columns: repeat(3, 1fr); } }

/* --- product detail pages --------------------------------------------------- */
.product-hero { align-items: center; }
.product-hero__art img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain;
  background: var(--paper); border-radius: var(--r-lg); padding: 18px;
}
.page-hero .flag { margin-bottom: 14px; }
.feature--top { align-items: start; }
.prose p + p { margin-top: 1em; }
.h-link { color: inherit; text-decoration: none; }
.h-link:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 6px; }

.related { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.related a {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 16px;
  font-family: 'IBM Plex Sans Arabic', Archivo, Inter, sans-serif; font-weight: 700; color: var(--ink); text-decoration: none;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.related a:hover { border-color: var(--lime-deep); transform: translateY(-2px); }
.related img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }

/* --- FAQ accordion ---------------------------------------------------------- */
.wrap.narrow { max-width: 880px; }
.faq { border-top: 1px solid var(--line); }
.faq__group { font-size: clamp(1.25rem, 2vw, 1.5rem); margin: 48px 0 14px; }
.faq__group:first-child { margin-top: 0; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 0 20px 44px; min-height: 48px;
  font-family: 'IBM Plex Sans Arabic', Archivo, Inter, sans-serif; font-weight: 700; font-size: 1.06rem; color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink); font-size: 1.2rem; line-height: 1;
}
.faq__item[open] summary::after { content: "–"; background: var(--lime); }
.faq__item summary:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 4px; }
.faq__a { padding: 0 0 22px 44px; color: var(--text-soft); }
.faq__a a { color: var(--ink); text-decoration-color: var(--lime); text-decoration-thickness: 2px; }

/* --- privacy / legal -------------------------------------------------------- */
.legal h2 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin: 40px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-soft); }
.legal ul { margin: 12px 0 0; padding-right: 22px; display: grid; gap: 8px; }
.legal a { color: var(--ink); text-decoration-color: var(--lime); text-decoration-thickness: 2px; }
.legal__date { margin-top: 40px; font-size: .9rem; }

/* --- cookie consent --------------------------------------------------------- */
.consent {
  position: fixed; right: 20px; bottom: 20px; z-index: 160; max-width: 440px;
  background: var(--ink); color: var(--on-dark-soft); border-radius: 16px;
  padding: 20px 22px; box-shadow: 0 14px 40px rgba(20,23,15,.35); font-size: .92rem;
}
.consent p { margin: 0 0 14px; }
.consent a { color: var(--lime); }
.consent__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.consent .btn--ghost:hover { background: rgba(255,255,255,.08); }
@media (max-width: 700px) { .consent { right: 12px; left: 12px; bottom: 84px; max-width: none; } }

/* --- touch targets: at least ~40px tall on phones -------------------------- */
@media (max-width: 900px) {
  .site-footer li a, .footer__bottom a { display: inline-block; padding: 8px 0; }
  .breadcrumb a { display: inline-block; padding: 8px 0; }
  .arrow-link { display: inline-flex; align-items: center; min-height: 44px; }
  .info-list a { display: inline-block; padding: 6px 0; }
  .subnav__list a { min-height: 40px; display: inline-flex; align-items: center; }
}

/* --- numbers and Latin names inside Arabic text ----------------------------- */
bdi { unicode-bidi: isolate; }

/* --- Arabic: letter-spacing breaks joined script ---------------------------- */
html[lang="ar"] body, html[lang="ar"] body * { letter-spacing: normal !important; }
html[lang="ar"] body { line-height: 1.75; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.35; }
html[lang="ar"] .eyebrow, html[lang="ar"] .flag, html[lang="ar"] .hero__badge { text-transform: none; font-size: .9rem; }

/* --- fixes ------------------------------------------------------------------ */
.prose .eyebrow + h2 { margin-top: 0; }
.topbar__inner { gap: 22px; }
.topbar a, .topbar span { white-space: nowrap; }
@media (max-width: 1240px) { .topbar__hours { display: none !important; } }
@media (max-width: 1060px) { .topbar__loc { display: none; } }
@media (max-width: 460px) {
  .stats__grid--6 { grid-template-columns: repeat(2, 1fr); }
  .stats__grid--6 .stat { padding: 20px 0 20px 12px !important; border-left: 1px solid rgba(255,255,255,.1) !important; }
  .stats__grid--6 .stat:nth-child(2n) { padding-right: 14px !important; border-left: 0 !important; }
  .stats__grid--6 .stat__label { font-size: .84rem; }
}

/* --- language dropdown (topbar, desktop) ------------------------------------ */
.lang-menu { position: relative; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.16); }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  color: var(--on-dark); font-weight: 600; padding: 4px 6px; border-radius: 6px;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 6px; height: 6px; border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: rotate(-45deg) translateY(-2px); margin-right: 2px; }
.lang-menu summary:hover { color: var(--lime); }
.lang-menu ul {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 300; min-width: 160px;
  list-style: none; margin: 0; padding: 6px; background: var(--ink); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; box-shadow: 0 14px 36px rgba(0,0,0,.35);
}
.lang-menu li a { display: block !important; padding: 8px 12px; border-radius: 6px; color: var(--on-dark-soft); }
.lang-menu li a:hover { background: rgba(255,255,255,.06); color: var(--lime); }
.lang-menu li a[aria-current] { color: var(--lime); font-weight: 600; }
@media (max-width: 900px) {
  .nav__lang { flex-wrap: wrap; }
  .nav .nav__lang a { padding: 9px 14px; font-size: .9rem; }
}

/* --- longer menu words (DE / FR / ES / IT) on small laptops ----------------- */
@media (max-width: 1080px) {
  .topbar__inner { gap: 14px; }
  .topbar a[href^="mailto"] { display: none; }
}
@media (min-width: 901px) and (max-width: 1120px) {
  .site-header__inner { gap: 14px; }
  .nav { gap: 0; }
  .nav a:not(.btn) { padding-right: 8px; padding-left: 8px; font-size: .9rem; }
  .header-cta .btn { padding-right: 14px; padding-left: 14px; font-size: .85rem; }
}
