/* Zaman Alwsl Leaks — hand-written, no framework. RTL, mobile first. */

:root {
  --bg: #faf7f5;
  --surface: #ffffff;
  --surface-2: #f4eeeb;
  --ink: #231d1b;
  --muted: #6b5f5b;
  --line: #e5dcd7;
  --brand: #b3122c;
  --brand-ink: #ffffff;
  --brand-soft: #fbe8eb;
  --focus: #1f6fd1;
  --warn-bg: #fff4d6;
  --warn-ink: #5c4300;
  --hdr-from: #7a0a1d;
  --hdr-to: #b3122c;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(35 29 27 / .06), 0 4px 14px rgb(35 29 27 / .05);
  --font: "Alyamama", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151110;
    --surface: #1e1918;
    --surface-2: #272020;
    --ink: #f2eae7;
    --muted: #b4a7a2;
    --line: #3a302d;
    --hdr-from: #2a0d13;
    --hdr-to: #5e1424;
    --brand: #ff5c74;
    --brand-ink: #1a0508;
    --brand-soft: #3a1b21;
    --focus: #6aa8ff;
    --warn-bg: #3a2f10;
    --warn-ink: #ffe7a6;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.75 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.main { flex: 1; padding-block: 20px 40px; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 100; background: var(--surface); padding: .5em 1em; border-radius: 8px; }
[hidden] { display: none !important; }
.small { font-size: .9rem; color: var(--muted); }
.nil { color: var(--muted); opacity: .6; }

/* ---------- header / navigation ---------- */
.site-header { position: relative; z-index: 20; box-shadow: 0 2px 10px rgb(35 29 27 / .12); }
.bar-top {
  background: linear-gradient(135deg, var(--hdr-from), var(--hdr-to));
  color: #fff; position: relative; overflow: hidden;
}
.bar-top::after { /* soft decorative glow */
  content: ""; position: absolute; inset-block: -60% -60%; inset-inline-end: -8%; width: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / .14), transparent 68%); pointer-events: none;
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { flex: none; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 2px 8px rgb(0 0 0 / .25); width: 56px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text strong { font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); font-weight: 700; letter-spacing: .01em; }
.brand-text small { color: rgb(255 255 255 / .8); font-size: .85rem; }

.nav-toggle {
  display: none; align-items: center; gap: 10px; font: inherit; font-weight: 500; cursor: pointer;
  background: rgb(255 255 255 / .14); color: #fff; border: 1px solid rgb(255 255 255 / .35); border-radius: 10px; padding: .45em .95em;
}
.nav-toggle:hover { background: rgb(255 255 255 / .24); }
.nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: "";
}
.nav-toggle-icon::before { position: absolute; top: -6px; }
.nav-toggle-icon::after { position: absolute; top: 6px; }

.site-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav-list > li > a, .nav-list summary {
  display: flex; align-items: center; padding: .85em 1em; color: var(--ink); text-decoration: none; font-weight: 500; cursor: pointer;
  list-style: none; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color .15s, background-color .15s, border-color .15s;
}
.nav-list summary::-webkit-details-marker { display: none; }
.nav-list summary::after {
  content: ""; width: .4em; height: .4em; margin-inline-start: .6em; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-.1em) rotate(45deg); opacity: .6; transition: transform .2s;
}
.nav-list details[open] > summary::after { transform: translateY(.1em) rotate(-135deg); }
.nav-list a:hover, .nav-list summary:hover, .nav-list details[open] > summary { background: var(--brand-soft); color: var(--brand); }
.nav-list > li > a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.nav-group { position: relative; }
.nav-panel {
  list-style: none; margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(35 29 27 / .18); position: absolute; inset-inline-start: 0; top: calc(100% + 4px); width: min(400px, 92vw); max-height: 70vh; overflow: auto; z-index: 30;
}
.nav-panel a { display: block; padding: .55em .8em; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.5; }
.nav-panel a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .nav-list { flex-direction: column; padding-block: 6px; }
  .nav-list > li > a, .nav-list summary { border-bottom: 0; border-radius: 8px; margin-bottom: 0; }
  .nav-list > li > a[aria-current="page"] { background: var(--brand-soft); }
  .nav-list summary { justify-content: space-between; }
  .nav-panel { position: static; width: auto; max-height: none; box-shadow: none; margin: 0 0 6px; }
  .brand img { width: 46px; }
}

/* ---------- page header, notices ---------- */
.page-head { margin-bottom: 18px; }
.page-head .lead { color: var(--muted); max-width: 78ch; }
.page-head .lead p:last-child { margin-bottom: 0; }
.highlight { background: var(--brand-soft); color: var(--brand); border-radius: var(--radius); padding: .7em 1em; font-weight: 700; }
.notice { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1em; color: var(--muted); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); border: 0; }
.result-count { margin: 18px 0 8px; color: var(--muted); }
.prose { max-width: 75ch; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: justify; }
.prose .about { text-align: center; margin-top: 2em; color: var(--muted); }

/* ---------- buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; font: inherit; font-weight: 500; cursor: pointer;
  min-height: 44px; padding: .5em 1.2em; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { min-height: 36px; padding: .2em .9em; font-size: .9rem; }

.search-form { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin: 14px 0 6px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 4px; }
input[type="search"], input[type="text"], select {
  width: 100%; min-height: 46px; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: .4em .8em;
}
input[type="search"]::-webkit-search-cancel-button { margin-inline-start: .4em; }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.hint { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { padding: .25em .9em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .92rem; }
.chip:hover, .chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* ---------- data tables ---------- */
.table-tools { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.table-tools input { max-width: 320px; }
.table-count { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: 75vh; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: .6em .8em; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th {
  position: sticky; top: 0; background: var(--surface-2); font-weight: 700; white-space: nowrap; z-index: 1;
}
.js table.data thead th { cursor: pointer; user-select: none; }
table.data th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
table.data th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }
table.data tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
table.data tbody tr:hover { background: var(--brand-soft); }
.more { display: block; margin: 14px auto; font: inherit; font-weight: 500; cursor: pointer; padding: .6em 2em; border-radius: 10px; border: 1px solid var(--brand); background: transparent; color: var(--brand); }
.more:hover { background: var(--brand); color: var(--brand-ink); }

@media (max-width: 719px) {
  .table-wrap { border: 0; background: transparent; max-height: none; overflow: visible; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data tr { background: var(--surface) !important; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 0; box-shadow: var(--shadow); }
  table.data td { border: 0; display: grid; grid-template-columns: 38% 1fr; gap: 8px; padding: .3em .9em; }
  table.data td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
  table.data td:empty { display: none; }
}

/* ---------- galleries ---------- */
.thumbs { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.thumbs a { display: block; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); aspect-ratio: 7 / 8; }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.thumbs a:hover img { transform: scale(1.04); }
.stack { display: grid; gap: 16px; justify-items: center; }
img.full { display: block; margin-inline: auto; border-radius: 8px; background: var(--surface-2); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.pg, .pager .gap { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .8em; border-radius: 10px; }
.pg { border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.pg:hover { border-color: var(--brand); }
.pg.current { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }

.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.viewer-nav { display: flex; gap: 8px; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lightbox::backdrop { background: rgb(0 0 0 / .88); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; background: rgb(255 255 255 / .16); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 28px; cursor: pointer; line-height: 1; }
.lightbox button:hover { background: rgb(255 255 255 / .3); }
.lb-close { top: 14px; inset-inline-start: 14px; }
.lb-prev { inset-inline-start: 12px; top: 50%; }
.lb-next { inset-inline-end: 12px; top: 50%; }

/* ---------- cards: persons, news, home ---------- */
.cards, .news, .tiles, .list-links { list-style: none; margin: 0; padding: 0; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.person { display: flex; gap: 14px; padding: 12px; }
.person-img img { border-radius: 10px; display: block; }
.person-body { min-width: 0; }
.person-body h2 { font-size: 1.1rem; margin-bottom: .3em; }
.person-body h2 a { color: var(--ink); text-decoration: none; }
dl { margin: 0 0 .6em; }
dl div { display: flex; gap: .5em; }
dt { color: var(--muted); }
dt::after { content: ":"; }
dd { margin: 0; }
.detail { padding: 16px; display: grid; gap: 14px; justify-items: start; }
.detail-img { border-radius: 10px; max-width: 100%; }
.facts { width: 100%; }

.hero { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000)); color: #fff; border-radius: var(--radius); padding: 28px 20px; margin-bottom: 18px; }
.hero h1 { margin-bottom: .3em; }
.hero p { max-width: 62ch; opacity: .95; }
.finder { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 16px; }
.finder select, .finder input { background: #fff; color: #231d1b; border-color: transparent; }
.finder .btn.primary { background: #231d1b; border-color: #231d1b; color: #fff; }
@media (min-width: 720px) { .finder { grid-template-columns: minmax(200px, 1.2fr) 2fr auto; } }

.section-title { margin: 28px 0 12px; padding-inline-start: 12px; border-inline-start: 4px solid var(--brand); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tile { display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.45; }
.tile:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tile-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem; }
.news { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.news-item a { display: block; color: var(--ink); text-decoration: none; height: 100%; }
.news-item img { width: 100%; aspect-ratio: 370 / 214; object-fit: cover; display: block; background: var(--surface-2); }
.news-item h3 { font-size: 1rem; padding: 10px 12px 0; margin: 0; }
.news-item time { display: block; padding: 2px 12px 12px; color: var(--muted); font-size: .85rem; }
.list-links { columns: 2 280px; column-gap: 24px; }
.list-links li { break-inside: avoid; padding: .3em 0; border-bottom: 1px solid var(--line); }
.list-links a { text-decoration: none; }
.list-links a:hover { text-decoration: underline; }

/* ---------- AdSense: reserve space, collapse when unfilled ---------- */
.ad { margin: 20px 0; text-align: center; min-height: 100px; position: relative; overflow: hidden; }
.ad-label { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .04em; margin-bottom: 2px; }
.ad ins { min-height: 90px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-article ins { min-height: 120px; }

/* ---------- footer ---------- */
.site-footer { background: #2a2220; color: #e9dfdb; padding-block: 32px 20px; margin-top: auto; }
.site-footer a { color: #f3e9e6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.site-footer h2 { font-size: 1rem; color: #fff; border-bottom: 2px solid var(--brand); display: inline-block; padding-bottom: 4px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.site-footer li { padding: .2em 0; line-height: 1.5; }
.copyright { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid #4a3f3c; text-align: center; font-size: .85rem; color: #b9aca8; }

@media print {
  .site-header, .site-footer, .ad, .search-form, .chips, .table-tools, .more, .pager { display: none !important; }
  body { background: #fff; color: #000; }
  .table-wrap { max-height: none; overflow: visible; border: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- share row, footer QR ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; font-size: .9rem; }
.share-label { color: var(--muted); }
.share a, .share button { font: inherit; cursor: pointer; padding: .25em .9em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; }
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand); }
.qr { display: block; width: max-content; margin: 14px 0 0; }
.qr img { display: block; border-radius: 8px; background: #fff; }
@media print { .share, .qr { display: none !important; } }

.share a.ico, .share button.ico { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.share a.ico-facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share a.ico-x:hover { background: #000; border-color: #000; color: #fff; }
.share a.ico-whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share a.ico-telegram:hover { background: #229ed9; border-color: #229ed9; color: #fff; }
.social { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; margin: 14px 0 0; padding: 0; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgb(255 255 255 / .1); font-size: 1.25rem; }
.social a:hover { background: var(--brand); text-decoration: none; }
.svg { width: 1.2em; height: 1.2em; display: block; }
.share a.ico, .share button.ico { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.shareaholic-canvas { min-height: 44px; margin-bottom: 14px; }

/* footer: زمان الوصل first (rightmost in RTL), the long regime list in two columns */
@media (min-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 2fr 1fr 1fr; }
  .fc-regime ul { columns: 2; column-gap: 24px; }
  .fc-regime li { break-inside: avoid; }
}
