/* Faoutara – marketing site
   One stylesheet for every page. Brand colours come from the previous site
   (#364f6b slate blue for Faoutara, #3fc1c9 teal for Vendera).
   Logical properties (inline/block) keep the layout correct in RTL (Arabic). */

:root {
  --ink: #0d1b2a;
  --text: #3b4a5c;
  --muted: #627085;
  --brand: #364f6b;
  --brand-strong: #22384f;
  --brand-soft: #eef2f7;
  --accent: #3fc1c9;
  --accent-strong: #0d7178;
  --accent-soft: #e6f7f8;
  --bg: #ffffff;
  --surface: #f6f8fb;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --focus: #0d7178;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .06);
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 10px 30px -12px rgba(13, 27, 42, .16);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
}

html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Noto Kufi Arabic", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
button { font: inherit; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 780px; }
.section { padding-block: var(--section); }
.section--surface { background: var(--surface); }
.section--tight { padding-block: clamp(48px, 6vw, 72px); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { font-size: 1.075rem; color: var(--muted); margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--accent { color: var(--accent-strong); }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }

.grid { display: grid; gap: clamp(16px, 2.5vw, 24px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  border: 1.5px solid transparent; font-weight: 650; font-size: .975rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -8px rgba(54, 79, 107, .7); }
.btn--primary:hover { background: var(--brand-strong); color: #fff; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #31adb5; color: var(--ink); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--brand-soft); color: var(--ink); }
.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--outline-light:hover { border-color: #fff; color: #fff; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .18s ease; }
.link-arrow:hover svg { transform: translateX(3px); }
[dir="rtl"] .link-arrow:hover svg { transform: translateX(-3px); }
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--brand-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .link-vendera { color: var(--accent-strong); font-weight: 650; text-decoration: none; font-size: .95rem; display: inline-flex; gap: 4px; align-items: center; }
.header-actions .link-vendera svg { width: 15px; height: 15px; }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--text);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--surface); }
.lang summary svg { width: 18px; height: 18px; }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 170px;
  list-style: none; margin: 0; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang li a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-weight: 600; }
.lang li a:hover, .lang li a[aria-current="true"] { background: var(--surface); color: var(--ink); }

.nav-toggle {
  display: none; margin-inline-start: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close, .site-header[data-open="true"] .nav-toggle .icon-open { display: none; }
.site-header[data-open="true"] .nav-toggle .icon-close { display: block; }

@media (max-width: 1080px) {
  .header-actions .link-vendera { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-panel {
    position: fixed; inset: 72px 0 auto 0; max-height: calc(100dvh - 72px); overflow: auto;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 12px var(--gutter) 24px; display: none; flex-direction: column; align-items: stretch; gap: 16px;
  }
  .site-header[data-open="true"] .header-panel { display: flex; }
  .site-nav { flex-direction: column; align-items: stretch; margin: 0; gap: 2px; }
  .site-nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 1.02rem; }
  .header-actions { flex-direction: column; align-items: stretch; }
  .header-actions .btn { width: 100%; }
  .header-actions .link-vendera { display: inline-flex; justify-content: center; padding: 10px; }
  .lang ul { position: static; box-shadow: none; margin-top: 6px; }
}
@media (min-width: 961px) { .header-panel { display: flex; align-items: center; gap: 20px; flex: 1; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .55;
}
.hero h1 { max-width: 19ch; font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
html[lang="ar"] .hero h1 { max-width: 20ch; }
.hero .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
@media (max-width: 960px) { .hero .split { grid-template-columns: 1fr; } }
.hero .lead { max-width: 56ch; margin-bottom: 28px; }
.hero-note { margin-top: 18px; font-size: .95rem; }
.hero--page h1 { max-width: 20ch; }

/* ---------- Ecosystem diagram (schematic, not a screenshot) ---------- */
.diagram { position: relative; }
.diagram figcaption { margin-top: 12px; font-size: .82rem; color: var(--muted); text-align: center; }
.diagram-board {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0;
  padding: clamp(18px, 3vw, 28px); border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.diagram-app { border-radius: var(--radius); padding: 14px; min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.diagram-app--faoutara { border-top: 4px solid var(--brand); }
.diagram-app--vendera { border-top: 4px solid var(--accent); }
.diagram-app header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.diagram-app header div strong { display: block; color: var(--ink); font-size: 1.02rem; line-height: 1.2; }
.diagram-app header div span { display: block; font-size: .8rem; color: var(--muted); }
.diagram-app ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.diagram-app li {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink); line-height: 1.3;
}
.diagram-app li svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.diagram-app--vendera li svg { color: var(--accent-strong); }
.diagram-flow { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-inline: 10px; text-align: center; }
.diagram-flow span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); max-width: 9ch; line-height: 1.3; }
html[lang="ar"] .diagram-flow span { letter-spacing: 0; font-size: .8rem; }
.diagram-flow svg { width: 44px; height: 24px; color: var(--accent-strong); }
@media (max-width: 560px) {
  .diagram-board { grid-template-columns: 1fr; }
  .diagram-flow { flex-direction: row; justify-content: center; padding-block: 12px; }
  .diagram-flow svg { transform: rotate(90deg); }
  .diagram-flow span { max-width: none; }
}

.app-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 800; font-size: 1.05rem;
}
.app-mark--faoutara { background: var(--brand); }
.app-mark--vendera { background: var(--accent); color: var(--ink); }
.app-mark svg { width: 20px; height: 20px; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card--link { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.icon-tile {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 18px;
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile--accent { background: var(--accent-soft); color: var(--accent-strong); }

.feature p { color: var(--muted); font-size: .97rem; }

/* Product cards (home ecosystem section) */
.product-card { display: flex; flex-direction: column; gap: 4px; padding: clamp(26px, 3.5vw, 40px); overflow: hidden; }
.product-card--faoutara { border-top: 4px solid var(--brand); }
.product-card--vendera { border-top: 4px solid var(--accent); }
.product-card .tag {
  align-self: flex-start; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px;
}
html[lang="ar"] .product-card .tag { letter-spacing: 0; }
.product-card--vendera .tag { background: var(--accent-soft); color: var(--accent-strong); }
.product-card .card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.product-card .card-head h3 { margin: 0; font-size: 1.35rem; }
.product-card p { color: var(--muted); }
.product-card .chips { margin: 8px 0 22px; }
.product-card .card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }

.eco-link {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: .95rem;
  width: fit-content; margin-inline: auto; text-align: center;
}
.eco-link svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--ink);
  text-decoration: none;
}
a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 550; }
.check-list svg { width: 22px; height: 22px; flex: none; color: var(--accent-strong); margin-top: 1px; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 28px); counter-reset: step; }
.steps > li { position: relative; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 18px; position: relative; z-index: 1;
}
.steps > li:last-child .step-num { background: var(--accent); color: var(--ink); }
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; top: 22px; inset-inline-start: 56px; inset-inline-end: -16px;
  border-top: 2px dashed var(--line-strong);
}
.step-app { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
html[lang="ar"] .step-app { letter-spacing: 0; }
.steps p { color: var(--muted); margin: 0; }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .steps, .steps--4 { grid-template-columns: 1fr; gap: 0; }
  .steps > li { padding-inline-start: 64px; padding-bottom: 28px; }
  .steps > li:last-child { padding-bottom: 0; }
  .step-num { position: absolute; inset-inline-start: 0; top: 0; margin: 0; }
  .steps > li:not(:last-child)::after { top: 48px; bottom: 4px; inset-inline-start: 21px; inset-inline-end: auto; border-top: 0; border-inline-start: 2px dashed var(--line-strong); }
}
.steps--vertical { grid-template-columns: 1fr; gap: 0; }
.steps--vertical > li { padding-inline-start: 64px; padding-bottom: 26px; }
.steps--vertical > li:last-child { padding-bottom: 0; }
.steps--vertical .step-num { position: absolute; inset-inline-start: 0; top: 0; margin: 0; }
.steps--vertical h3 { margin: 0; }
.steps--vertical > li:not(:last-child)::after { top: 48px; bottom: 4px; inset-inline-start: 21px; inset-inline-end: auto; border-top: 0; border-inline-start: 2px dashed var(--line-strong); }
.steps--card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); }
.note { display: flex; gap: 10px; align-items: flex-start; margin-top: 32px; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .93rem; }
.note svg { width: 20px; height: 20px; flex: none; color: var(--brand); margin-top: 2px; }
.section--surface .note { background: #fff; }

/* ---------- Platforms ---------- */
.platforms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); } .platform .btn { white-space: normal; } }
.platform {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 24px 14px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
}
.platform .icon-tile { margin-bottom: 10px; }
.platform strong { color: var(--ink); font-size: 1.05rem; }
.platform span { color: var(--muted); font-size: .86rem; }
.platform .btn { margin-top: 12px; }

/* ---------- Device frame for real screenshots ---------- */
.shot { margin: 0; }
.shot-frame { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); padding: 10px; box-shadow: var(--shadow); }
.shot-frame img { border-radius: 14px; width: 100%; }
.shot figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.5vw, 28px); }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.post-card .thumb { aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .thumb img { transform: scale(1.03); }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line-strong); }
.thumb-fallback svg { width: 44px; height: 44px; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.post-card h3 { font-size: 1.1rem; line-height: 1.4; margin-bottom: 10px; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

.page-hero { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 10px; }
.page-hero .lead { margin: 0; max-width: 62ch; }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

.blog-toolbar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; max-width: 460px; }
.search input {
  flex: 1; min-width: 0; min-height: 46px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  font: inherit; color: var(--ink); background: #fff;
}
.search input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(13, 113, 120, .18); }
.results-info { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 24px; color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; padding-inline: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; background: #fff;
}
.pagination a:hover { border-color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination svg { width: 16px; height: 16px; }

.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); }

/* Article */
.article-head { padding-block: clamp(36px, 5vw, 64px) 24px; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.25; }
html[lang="ar"] .article-head h1 { line-height: 1.5; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: .95rem; }
.article-cover { margin: 8px auto 0; max-width: 1040px; padding-inline: var(--gutter); }
.article-cover img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 8; object-fit: cover; background: var(--surface); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 64px); padding-block: clamp(32px, 5vw, 56px) var(--section); }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }
.aside-block { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; background: #fff; }
.aside-block h2 { font-size: 1rem; margin-bottom: 14px; }
.aside-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.aside-posts a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; line-height: 1.4; }
.aside-posts img, .aside-posts .thumb-fallback { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.aside-posts .thumb-fallback svg { width: 20px; height: 20px; }
.aside-posts a:hover span { text-decoration: underline; }
.aside-cta { background: var(--ink); color: #c9d4e1; border-color: var(--ink); }
.aside-cta h2 { color: #fff; font-size: 1.15rem; }
.aside-cta p { font-size: .93rem; }
@media (min-width: 961px) { .article-aside { position: sticky; top: 96px; align-self: start; } }

.author { display: flex; gap: 14px; align-items: center; margin-top: 40px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); }
.author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.author strong { display: block; color: var(--ink); }
.author span { color: var(--muted); font-size: .92rem; }

/* Rich text */
.prose { font-size: 1.075rem; line-height: 1.8; color: #2a3848; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
/* Articles imported from WordPress/Elementor carry fixed widths: keep them inside the column. */
.prose * { max-width: 100%; }
.prose div, .prose section, .prose figure { width: auto !important; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 .6em; }
.prose h3 { font-size: 1.3rem; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 1.1rem; margin: 1.6em 0 .5em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table { margin: 0 0 1.25em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); margin: 1.5em auto; height: auto !important; }
.prose blockquote { border-inline-start: 4px solid var(--accent); padding: .4em 1.2em; color: var(--ink); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; }
.prose a { color: var(--accent-strong); }
.prose iframe { max-width: 100%; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px;
  font-weight: 650; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform .2s ease; color: var(--muted); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--text); }
.faq .answer p:last-child { margin: 0; }

/* ---------- Contact ---------- */
.contact-card { display: flex; flex-direction: column; gap: 4px; }
.contact-card .value { font-size: 1.1rem; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: break-word; }
.contact-card a.value:hover { color: var(--brand); text-decoration: underline; }
.contact-card p { color: var(--muted); font-size: .95rem; }
.quick-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.quick-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 650; background: #fff;
}
.quick-links a:hover { border-color: var(--ink); }
.quick-links svg { width: 18px; height: 18px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: clamp(20px, 3vw, 32px);
  background: var(--ink); color: #c9d4e1; padding: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center;
}
.cta-band::after {
  content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  border: 48px solid rgba(63, 193, 201, .14); pointer-events: none;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { margin: 0; max-width: 56ch; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 64px 28px; margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--muted); max-width: 36ch; margin-top: 14px; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 14px; }
html[lang="ar"] .site-footer h2 { letter-spacing: 0; font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .88rem; }
.ext { display: inline-flex; align-items: center; gap: 4px; }
.ext svg { width: 13px; height: 13px; opacity: .7; }

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between;
  background: var(--ink); color: #dbe3ec; padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow); font-size: .9rem;
}
.cookie[hidden] { display: none; }
.cookie > div { flex: 1 1 260px; }
.cookie p { margin: 0; }

/* ---------- About ---------- */
.about-image img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-block: clamp(72px, 12vw, 140px); }
.not-found .code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 8px; letter-spacing: -.04em; }
.not-found .btn-row { justify-content: center; margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
