/* ==========================================================================
   Al-Aloum Al-Takhasosiya - shared styles
   Page-specific styles live in /css and /products/css.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #f3f5f7;
  --paper-3: #e7ebef;
  --white: #ffffff;
  --ink: #0f1d2b;
  --ink-2: #3b4855;
  --muted: #6a7682;
  --line: #e2e6ea;
  --line-strong: #c9d0d7;
  --blue: #1670b0;
  --blue-dark: #0f5a90;
  --blue-deep: #0a2a47;
  --red: #b21f24;

  --font-sans: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: var(--font-sans);
  --font-mono: var(--font-sans);

  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
  --fs-2xl: clamp(1.85rem, 1.35rem + 1.9vw, 2.75rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 2.8vw, 3.5rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --nav-h: 76px;
  --radius: 4px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
h1, .h2, .page-hero h1 { font-weight: 700; letter-spacing: -0.025em; color: var(--blue-deep); }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- gentle page fade between pages (supporting browsers) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
.site-header { view-transition-name: site-header; }

/* ---------- utilities ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.cta-band .eyebrow { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.eyebrow.on-dark { color: #9ccbee; }
.h2 { font-size: var(--fs-2xl); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--blue); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bg); border-radius: var(--radius);
  font-weight: 500; font-size: .95rem;
  transition: background .2s, border-color .2s, color .2s;
}
.btn::after { content: "→"; transition: transform .2s; }
.btn:hover { --bg: var(--blue-dark); border-color: var(--blue-dark); }
.btn:hover::after { transform: translateX(3px); }
.btn.light { --bg: #fff; --fg: var(--ink); }
.btn.light:hover { --bg: #eef3f7; }
.btn.ghost { --fg: var(--ink); background: transparent; border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.ghost.on-dark { --fg: #fff; border-color: rgba(255,255,255,.45); }
.btn.ghost.on-dark:hover { border-color: #fff; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--blue); }
.link-arrow svg { width: 13px; height: 13px; transition: transform .2s; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- subtle fade-in on scroll (site.js) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- loader (first visit per session) ---------- */
.loading { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: #fff; transition: opacity .4s; }
.loading.fade-out { opacity: 0; pointer-events: none; }
.loading.skip { display: none; }
.loading .spinner { width: 36px; height: 36px; border: 3px solid var(--paper-3); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.loading .spinner i { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Header / navigation - always white and fixed
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 9000; height: var(--nav-h);
  background: #fff; color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 4px 16px rgba(20, 33, 45, .07); }
body.menu-open .site-header { box-shadow: none; }

.site-header .bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 64px; height: 64px; object-fit: contain; margin-left: -8px; }
.brand-word { display: none; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.brand-word small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); }

.main-nav { display: none; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a, .main-nav .nav-trigger {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: var(--nav-h); padding: 0 14px; font-size: .95rem; font-weight: 500; color: var(--ink-2);
  transition: color .2s;
}
.main-nav > ul > li > a:hover, .main-nav .nav-trigger:hover, .main-nav .has-sub:focus-within .nav-trigger { color: var(--blue); }
.main-nav > ul > li > a::after, .main-nav .nav-trigger::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--blue);
  transform: scaleX(0); transition: transform .25s var(--ease-out);
}
.main-nav > ul > li > a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--ink); }
.nav-trigger svg { width: 10px; height: 10px; transition: transform .25s; }
.has-sub:hover .nav-trigger svg, .has-sub:focus-within .nav-trigger svg { transform: rotate(180deg); }

.sub-panel {
  position: absolute; top: 100%; left: 0; width: 300px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 40px -12px rgba(20, 33, 45, .2);
  display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.has-sub:hover .sub-panel, .has-sub:focus-within .sub-panel { opacity: 1; visibility: visible; transform: none; }
.sub-panel a { display: grid; gap: 1px; padding: 10px 12px; border-radius: 4px; transition: background .15s; }
.sub-panel a:hover { background: var(--paper-2); }
.sub-panel strong { font-weight: 500; font-size: .95rem; color: var(--ink); }
.sub-panel em { font-style: normal; font-size: .8rem; color: var(--muted); }
.sub-panel a.all { grid-template-columns: 1fr auto; align-items: center; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 4px 4px; padding-top: 12px; }
.sub-panel a.all strong { color: var(--blue); }
.sub-panel a.all svg { width: 13px; height: 13px; color: var(--blue); }

.header-cta { display: none; }

.menu-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; margin-right: -6px; }
.menu-btn span { position: absolute; left: 11px; width: 22px; height: 2px; background: currentColor; transition: transform .3s, top .3s, opacity .2s; }
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 26px; }
.menu-btn.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-btn.active span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* mobile menu: drops down under the white bar */
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 8999;
  background: #fff; padding: 12px var(--gutter) 32px; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.mobile-menu.active { opacity: 1; visibility: visible; transform: none; }
.mobile-menu > ul > li { border-bottom: 1px solid var(--line); }
.mobile-menu > ul > li > a, .mobile-submenu-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px 0; font-size: 1.1rem; font-weight: 500; color: var(--ink); text-align: start;
}
.mobile-menu a[aria-current="page"] { color: var(--blue); }
.mobile-submenu-toggle .plus { position: relative; width: 14px; height: 14px; }
.mobile-submenu-toggle .plus::before, .mobile-submenu-toggle .plus::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: currentColor; transition: transform .25s; }
.mobile-submenu-toggle .plus::after { transform: rotate(90deg); }
.mobile-submenu-toggle.active .plus::after { transform: rotate(0); }
.mobile-submenu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.mobile-submenu.active { grid-template-rows: 1fr; }
.mobile-submenu > div { overflow: hidden; }
.mobile-submenu a { display: block; padding: 10px 0 10px 14px; color: var(--ink-2); border-left: 2px solid var(--line); }
.mobile-submenu a:last-child { margin-bottom: 14px; }
.mobile-submenu a:hover { color: var(--blue); border-left-color: var(--blue); }
.mobile-meta { display: grid; gap: 6px; margin-top: 28px; font-size: .92rem; color: var(--muted); }
.mobile-meta a { color: var(--blue); }

@media (min-width: 1024px) {
  .main-nav { display: block; }
  .header-cta { display: inline-flex; height: 44px; padding: 0 20px; }
  .menu-btn, .mobile-menu { display: none; }
}
@media (min-width: 1240px) { .brand-word { display: block; } }

/* ==========================================================================
   Contact rail (left) + mobile WhatsApp
   ========================================================================== */
.sticky-nav { position: fixed; left: 0; top: 50%; z-index: 1000; transform: translateY(-50%); display: none; }
.sticky-nav .nav-list { display: flex; flex-direction: column; background: var(--blue-deep); border-radius: 0 6px 6px 0; box-shadow: 0 8px 24px rgba(20,33,45,.18); }
.sticky-nav li:first-child .nav-link { border-top-right-radius: 6px; }
.sticky-nav li:last-child .nav-link { border-bottom-right-radius: 6px; }
.sticky-nav .nav-link { position: relative; display: grid; place-items: center; width: 46px; height: 46px; color: rgba(255,255,255,.85); transition: background .2s, color .2s; }
.sticky-nav .nav-link:hover { background: var(--blue); color: #fff; }
.sticky-nav .nav-link.whatsapp { background: #25d366; color: #fff; }
.sticky-nav .nav-icon { width: 18px; height: 18px; }
.sticky-nav li { position: relative; }
.sticky-nav .nav-text {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 4px; white-space: nowrap;
  background: var(--ink); color: #fff; font-size: .8rem;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sticky-nav .nav-link:hover .nav-text, .sticky-nav .nav-link:focus-visible .nav-text { opacity: 1; }
.wa-fab { position: fixed; right: 16px; bottom: 16px; z-index: 1000; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 6px 18px rgba(20,33,45,.25); }
.wa-fab svg { width: 26px; height: 26px; }
@media (min-width: 1280px) { .sticky-nav { display: block; } .wa-fab { display: none; } }

/* ==========================================================================
   Shared building blocks
   ========================================================================== */
main { display: block; }

.page-hero { padding: calc(var(--nav-h) + clamp(40px, 6vw, 80px)) 0 clamp(36px, 5vw, 60px); background: var(--paper-2); border-bottom: 1px solid var(--line); margin-bottom: clamp(32px, 5vw, 56px); }
.page-hero .wrap { display: grid; gap: 16px; }
.page-hero h1 { font-size: var(--fs-3xl); max-width: 22ch; }
.page-hero .hero-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.page-hero .hero-meta p { max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--line-strong); }

.hero-figure { margin-top: 12px; aspect-ratio: 21 / 8; border-radius: var(--radius); overflow: hidden; background: var(--paper-3); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .hero-figure { aspect-ratio: 4 / 3; } }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { display: grid; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); }
@media (min-width: 900px) {
  .section-head.split { grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; }
  .section-head.split p { justify-self: end; max-width: 46ch; }
}

/* product tile */
.tile { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, border-color .25s; }
.tile:hover { border-color: var(--ink); }
.tile-media { aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.tile-media img { width: 78%; height: 78%; object-fit: contain; transition: transform .4s var(--ease-out); }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile-body { display: flex; flex-direction: column; gap: 6px; padding: 18px; flex: 1; }
.tile-cat { font-size: .78rem; font-weight: 600; color: var(--blue); }
.tile-body h3 { font-size: 1.08rem; }
.tile-body h3 br { display: none; }
.tile-foot { margin-top: auto; padding-top: 12px; font-size: .92rem; font-weight: 500; color: var(--blue); }
.tile-foot .arrow-c { display: inline-block; vertical-align: middle; margin-left: 4px; transition: transform .2s; }
.tile-foot .arrow-c svg { width: 13px; height: 13px; }
.tile:hover .tile-foot .arrow-c { transform: translateX(3px); }
.tile > a.cover { position: absolute; inset: 0; z-index: 2; }

/* image + text rows (about, services) */
.chapters { padding-top: 0; }
.chapter { display: grid; gap: 24px; padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; padding-top: 0; }
.chapter-media { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.chapter-media img { width: 100%; height: 100%; object-fit: cover; }
.chapter-text { display: grid; gap: 14px; align-content: center; }
.chapter-text p { font-size: 1.05rem; max-width: 62ch; }
.chapter-text h4 { font-size: 1rem; color: var(--blue); }
@media (min-width: 960px) {
  .chapter { grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 72px); align-items: center; }
  .chapter.reverse .chapter-media { order: 2; }
}

/* legal pages */
.legal-body { padding-bottom: clamp(56px, 8vw, 100px); }
.legal-grid { display: grid; gap: 32px; }
.toc-title { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.legal-toc ol { display: grid; margin-top: 10px; border-top: 1px solid var(--line); }
.legal-toc a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .93rem; }
.legal-toc a:hover { color: var(--blue); }
.legal-section { display: grid; gap: 10px; padding: 26px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.legal-section:first-child { border-top: 0; padding-top: 0; }
.legal-section h2 { font-size: var(--fs-xl); }
.legal-section p { max-width: 68ch; }
.legal-section a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 960px) {
  .legal-grid { grid-template-columns: 260px 1fr; gap: 72px; align-items: start; }
  .legal-toc { position: sticky; top: calc(var(--nav-h) + 24px); }
}

/* CTA band */
.cta-band { background: var(--blue-deep); color: rgba(255,255,255,.8); }
.cta-band .wrap { display: grid; gap: 24px; padding-block: clamp(48px, 7vw, 80px); }
.cta-band h2 { color: #fff; font-size: var(--fs-2xl); max-width: 26ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .cta-band .wrap { grid-template-columns: 1.4fr 1fr; align-items: center; } .cta-band .actions { justify-content: flex-end; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--ink); color: rgba(255,255,255,.65); }
.footer a { transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-top { display: grid; gap: 40px; padding-block: clamp(48px, 7vw, 80px) 40px; }
.footer-logo { width: 220px; height: auto; display: block; }
@media (max-width: 700px) { .footer-logo { width: 190px; } }
.footer-lead p { margin-top: 16px; max-width: 42ch; font-size: .95rem; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
.footer-cols h3 { font-size: .95rem; font-weight: 600; color: #fff; margin-bottom: 14px; }
.footer-cols li + li { margin-top: 9px; }
.footer-cols a, .footer-cols li { font-size: .93rem; color: rgba(255,255,255,.72); }
.footer-cols .contact-list li { display: flex; gap: 10px; align-items: baseline; }
.footer-cols .contact-list i { width: 14px; font-size: .8rem; color: #7fb8e3; flex: none; }
.footer .social-links { display: flex; gap: 8px; margin-top: 20px; }
.footer .social-links a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: background .2s; }
.footer .social-links a:hover { background: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }
.footer-bottom .footer-row { display: flex; gap: 20px; }
.footer-bottom a { color: rgba(255,255,255,.85); }
@media (min-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1.8fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 1023px) {
  :root { --nav-h: 68px; }
  .brand img { width: 56px; height: 56px; }
}
@media (max-width: 700px) {
  :root { --nav-h: 62px; }
  html, body { overflow-x: clip; }
  .brand img { width: 50px; height: 50px; margin-left: -6px; }
  .page-hero { padding-top: calc(var(--nav-h) + 28px); }
  .page-hero .hero-meta { flex-direction: column; align-items: flex-start; gap: 14px; }
  .lead { font-size: 1.03rem; }
  .section { padding: 48px 0; }
  .chapter { gap: 18px; padding-block: 36px; }
  .cta-band .actions .btn { width: 100%; }
  .footer-cols > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   Header extras: dropdown icons, language switcher, scroll progress
   ========================================================================== */
.sub-panel { width: 330px; }
.sub-panel a:not(.all) { grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }
.sub-panel a:not(.all) > span:last-child { display: grid; gap: 1px; }
.sp-icon { width: 38px; display: grid; place-items: center; color: var(--blue); font-size: 1rem; }
.has-sub:hover .sub-panel a, .has-sub:focus-within .sub-panel a { animation: drop-in .35s var(--ease-out) backwards; }
.sub-panel a:nth-child(2) { animation-delay: .04s !important; }
.sub-panel a:nth-child(3) { animation-delay: .08s !important; }
.sub-panel a:nth-child(4) { animation-delay: .12s !important; }
.sub-panel a:nth-child(5) { animation-delay: .16s !important; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }

.bar-end { display: flex; align-items: center; gap: 10px; }
.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .85rem; font-weight: 600; color: var(--ink-2); transition: border-color .2s, color .2s; }
.lang-btn .fa-globe { color: var(--blue); }
.lang-btn svg { width: 9px; height: 9px; transition: transform .25s; }
.lang-btn:hover, .lang-switch.open .lang-btn { border-color: var(--blue); color: var(--blue); }
.lang-switch.open .lang-btn svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 150px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px -12px rgba(20,33,45,.22);
  display: grid; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 5;
}
.lang-switch.open .lang-menu, .lang-switch:focus-within .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { padding: 9px 12px; border-radius: 4px; font-size: .95rem; color: var(--ink-2); }
.lang-menu a:hover { background: var(--paper-2); color: var(--blue); }
.lang-menu a[aria-current="true"] { color: var(--blue); font-weight: 600; background: #eef5fb; }
.lang-menu a[lang="ku"], .lang-menu a[lang="ar"], .mobile-langs a[lang="ku"], .mobile-langs a[lang="ar"] { font-family: "Noto Sans Arabic", var(--font-sans); }

.mobile-langs { display: flex; gap: 8px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.mobile-langs a { flex: 1; text-align: center; padding: 9px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 500; color: var(--ink-2); }
.mobile-langs a[aria-current="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue); transform-origin: left; transform: scaleX(var(--p, 0)); }
@media (max-width: 400px) { .lang-btn { padding: 0 9px; } .lang-btn svg { display: none; } }

/* back to top with a progress ring */
.to-top-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 999; width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  display: grid; place-items: center; background: #fff; color: var(--ink);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9); transition: opacity .3s, transform .3s var(--ease-out), visibility .3s;
}
.to-top-btn.show { opacity: 1; visibility: visible; transform: none; }
.to-top-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.to-top-btn svg.ring { display: none; }
.to-top-btn i { font-size: .9rem; }
@media (max-width: 1279px) { .to-top-btn { bottom: 84px; right: 20px; width: 46px; height: 46px; } }

/* ==========================================================================
   More motion (all respects reduced-motion settings)
   ========================================================================== */
/* page headers rise in on load */
.page-hero .wrap > *, .category-page .hero-content > *, .hero-section .hero-content > *, .back-product > * {
  animation: rise .8s var(--ease-out) backwards;
}
.page-hero .wrap > :nth-child(2), .category-page .hero-content > :nth-child(2), .hero-section .hero-content > :nth-child(2) { animation-delay: .08s; }
.page-hero .wrap > :nth-child(3), .category-page .hero-content > :nth-child(3), .hero-section .hero-content > :nth-child(3) { animation-delay: .16s; }
.page-hero .wrap > :nth-child(4), .category-page .hero-content > :nth-child(4) { animation-delay: .24s; }
.page-hero .wrap > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* reveal variants */
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal="none"] { opacity: 1; transform: none; }
[dir="rtl"].js [data-reveal="left"], .js[dir="rtl"] [data-reveal="left"] { transform: translateX(40px); }
.js[dir="rtl"] [data-reveal="right"] { transform: translateX(-40px); }
.js [data-reveal].is-in { transform: none; }


/* cards: quiet hover */
.tile, .brand-card, .partner-cell, .cat-link, .product-card, .explore-row { position: relative; transition: border-color .2s, box-shadow .25s; }
.tile:hover, .brand-card:hover, .partner-cell:hover, .cat-link:hover, .product-card:hover { border-color: var(--ink); box-shadow: none; }

/* logos come to life on hover */
.brand-logo img, .partner-cell img { filter: grayscale(1); opacity: .75; transition: filter .4s, opacity .4s, transform .5s var(--ease-out); }
.brand-card:hover .brand-logo img, .partner-cell:hover img { filter: none; opacity: 1; transform: scale(1.06); }

/* image zoom on hover */
.chapter-media img, .info-image img, .hero-figure img { transition: transform 1.2s var(--ease-out); }
.chapter-media:hover img, .info-image:hover img { transform: scale(1.05); }


/* ==========================================================================
   Right-to-left (Kurdish & Arabic)
   ========================================================================== */
html[dir="rtl"] { --font-sans: "Noto Sans Arabic", "IBM Plex Sans", Tahoma, sans-serif; }
html[dir="rtl"] body { line-height: 1.85; }
html[dir="rtl"] *, html[dir="rtl"] *::before, html[dir="rtl"] *::after { letter-spacing: 0 !important; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.45; }
html[dir="rtl"] .brand img { margin-left: 0; margin-right: -8px; }
html[dir="rtl"] .sub-panel { left: auto; right: 0; }
html[dir="rtl"] .btn::after { content: "←"; }
html[dir="rtl"] .btn:hover::after { transform: translateX(-3px); }
html[dir="rtl"] .ex-link::after { content: " ←"; }
html[dir="rtl"] .brand-info::after { content: none; }
html[dir="rtl"] .link-arrow svg, html[dir="rtl"] .tile-foot svg, html[dir="rtl"] .cat-cta svg, html[dir="rtl"] .sub-panel a.all svg, html[dir="rtl"] .product-card .arrow { transform: scaleX(-1); }
html[dir="rtl"] .link-arrow:hover svg, html[dir="rtl"] .tile:hover .tile-foot .arrow-c svg { transform: scaleX(-1) translateX(3px); }
html[dir="rtl"] .tile:hover .tile-foot .arrow-c, html[dir="rtl"] .cat-link:hover .arrow-c { transform: none; }
html[dir="rtl"] .product-card .arrow { display: inline-block; }
html[dir="rtl"] .tile-foot .arrow-c, html[dir="rtl"] .cat-cta .arrow-c { margin-left: 0; margin-right: 4px; }
html[dir="rtl"] .scroll-progress, html[dir="rtl"] .tab-bar b { transform-origin: right; }
html[dir="rtl"] .main-nav > ul > li > a::after { transform-origin: center; }
html[dir="rtl"] .mobile-submenu a { padding: 10px 14px 10px 0; border-left: 0; border-right: 2px solid var(--line); }
html[dir="rtl"] .mobile-submenu a:hover { border-right-color: var(--blue); }
/* contact rail moves to the right edge */
html[dir="rtl"] .sticky-nav { left: auto; right: 0; }
html[dir="rtl"] .sticky-nav .nav-list { border-radius: 6px 0 0 6px; }
html[dir="rtl"] .sticky-nav li:first-child .nav-link { border-radius: 6px 0 0 0; }
html[dir="rtl"] .sticky-nav li:last-child .nav-link { border-radius: 0 0 0 6px; }
html[dir="rtl"] .sticky-nav .nav-text { left: auto; right: calc(100% + 8px); }
html[dir="rtl"] .to-top-btn { right: auto; left: 18px; }
@media (min-width: 1280px) { html[dir="rtl"] .to-top-btn { left: 18px; } }
/* phone numbers, emails and codes keep left-to-right order */
a[href^="tel:"], a[href^="mailto:"], a[href^="https://wa.me"], .mobile-meta a { unicode-bidi: isolate; }
html[dir="rtl"] a[href^="tel:"], html[dir="rtl"] a[href^="mailto:"], html[dir="rtl"] .mobile-meta a, html[dir="rtl"] .contact-list a[href^="https://wa.me"] { direction: ltr; }
html[dir="rtl"] .feature-box li, html[dir="rtl"] .feature-box p { unicode-bidi: plaintext; }

/* ==========================================================================
   Header search
   ========================================================================== */
.search-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); color: var(--muted); font-size: .88rem; transition: border-color .2s, color .2s, background .2s; }
.search-btn:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.search-btn i { color: var(--blue); }
.search-btn kbd { font: 600 .7rem var(--font-sans); padding: 2px 6px; border-radius: 4px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.search-hint, .search-btn kbd { display: none; }
@media (min-width: 1240px) { .search-hint, .search-btn kbd { display: inline; } .search-btn { min-width: 200px; } }

.search-panel { position: fixed; inset: 0; z-index: 9500; display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; }
.search-panel[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgba(10, 30, 50, .45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.search-box { position: relative; width: min(640px, 100%); max-height: 76vh; display: grid; grid-template-rows: auto auto 1fr; background: #fff; border-radius: 12px; box-shadow: 0 40px 80px -20px rgba(10,30,50,.45); overflow: hidden; opacity: 0; transform: translateY(-12px) scale(.98); transition: opacity .2s, transform .25s var(--ease-out); }
.search-panel.open .search-backdrop { opacity: 1; }
.search-panel.open .search-box { opacity: 1; transform: none; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-field > i { color: var(--blue); }
.search-field input { flex: 1; height: 60px; border: 0; outline: 0; font-size: 1.05rem; background: transparent; color: var(--ink); min-width: 0; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-close kbd { font: 600 .72rem var(--font-sans); padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.search-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-cats a { padding: 5px 12px; border-radius: 999px; background: var(--paper-2); font-size: .82rem; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; }
.search-cats a:hover { background: var(--blue); color: #fff; }
.search-results { overflow-y: auto; padding: 8px; }
.search-results li a { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 8px; transition: background .15s; }
.search-results li[aria-selected="true"] a, .search-results li a:hover { background: #eef5fb; }
.sr-img { width: 52px; height: 52px; border-radius: 8px; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.sr-img img { width: 84%; height: 84%; object-fit: contain; }
.sr-text { display: grid; min-width: 0; }
.sr-text strong { color: var(--ink); font-weight: 600; }
.sr-text span { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-cat { font-size: .75rem; font-weight: 600; color: var(--blue); background: #e8f1f8; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.sr-empty { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 560px) { .sr-cat { display: none; } .search-results li a { grid-template-columns: 46px 1fr; } .search-panel { padding-top: 12px; } }

/* header fit: keep everything on one line */
.btn, .search-btn, .lang-btn { white-space: nowrap; }
.search-btn kbd { display: none !important; }
@media (min-width: 1240px) { .search-btn { min-width: 0; } .brand-word { display: none; } }
@media (min-width: 1400px) { .search-btn kbd { display: inline !important; } .search-btn { min-width: 190px; } }
@media (min-width: 1360px) { .brand-word { display: block; } }
@media (min-width: 1024px) and (max-width: 1239px) { .main-nav > ul > li > a, .main-nav .nav-trigger { padding: 0 10px; } }

/* header fit for the longer Kurdish / Arabic labels */
.main-nav > ul > li > a, .main-nav .nav-trigger { white-space: nowrap; }
@media (max-width: 1599px) {
  html[dir="rtl"] .brand-word, html[dir="rtl"] .search-hint, html[dir="rtl"] .search-btn kbd { display: none !important; }
  html[dir="rtl"] .search-btn { min-width: 0; }
  html[dir="rtl"] .main-nav > ul > li > a, html[dir="rtl"] .main-nav .nav-trigger { padding: 0 10px; font-size: .92rem; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  html[dir="rtl"] .header-cta { display: none; }
}
