@font-face { font-family: "Cairo"; src: url(../fonts/cairo-arabic.woff2) format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Cairo"; src: url(../fonts/cairo-latin-ext.woff2) format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cairo"; src: url(../fonts/cairo-latin.woff2) format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Marcellus"; src: url(../fonts/marcellus-latin-ext.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Marcellus"; src: url(../fonts/marcellus-latin.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Barakat Yahchouch - website styles. One file, no framework. Logical properties (inline-start / inline-end) so Arabic (RTL) and English (LTR) share the same rules. */

/* ------------------------------------------------------------------ fonts (self-hosted, swap: text shows at once in the fallback font) */

:root {
  --terra: #9a4527; --terra-d: #7a331b; --terra-l: #c46a45; --terra-soft: #f6e8e0;
  --cedar: #2f5340; --cedar-d: #1f3a2c; --cedar-soft: #e5eee8;
  --gold: #c8933f;
  --ink: #221c18; --text: #3a322d; --muted: #6f655d; --line: #e7ddd2;
  --bg: #fbf8f4; --tint: #f4ede4; --white: #fff;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(34, 28, 24, .06), 0 6px 20px rgba(34, 28, 24, .06);
  --shadow-lg: 0 18px 50px rgba(34, 28, 24, .16);
  --wrap: 1200px;
  --header: 76px;
  --f-body: Cairo, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --f-head: Marcellus, Cairo, Georgia, "Times New Roman", serif;   /* Marcellus has Latin letters only: Arabic headings fall back to Cairo */
  --fs: 17px; --lh: 1.7;
}
html[lang="ar"] {
  --fs: 18px; --lh: 1.85;
}

/* ------------------------------------------------------------------ base */
html { font-synthesis: none; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs)/var(--lh) var(--f-body); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra-d); }
h1, h2, h3, h4, .h1 { font-family: var(--f-head); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .h1 { font-weight: 600; letter-spacing: -.01em; }
h1, .h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.3vw, 2.35rem); }
h3 { font-size: 1.22rem; }
html[lang="ar"] h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[dir="rtl"] .ic-arrow, html[dir="rtl"] .ic-chevron { transform: scaleX(-1); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ buttons, tags */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-d); color: #fff; }
.btn-outline { border-color: var(--terra); color: var(--terra); background: transparent; }
.btn-outline:hover { background: var(--terra); color: #fff; }
.btn-light { background: #fff; color: var(--terra-d); }
.btn-light:hover { background: var(--tint); color: var(--terra-d); }
.btn-ghost { border-color: rgba(255, 255, 255, .8); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--tint); }
.icon-btn .ic { width: 22px; height: 22px; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.link-arrow:hover .ic { transform: translateX(3px); }
html[dir="rtl"] .link-arrow:hover .ic { transform: scaleX(-1) translateX(3px); }
.link-arrow .ic { transition: transform .2s; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin: 0 0 .7em; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.eyebrow.light { color: #f3d7b4; }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--terra); color: #fff; font-size: .78rem; font-weight: 600; line-height: 1.5; }
.tag-plain { background: var(--terra-soft); color: var(--terra-d); }
.tag-light { background: rgba(255, 255, 255, .9); color: var(--ink); }
.tag-announcement { background: var(--cedar); }
.tag-obituary { background: #4a4440; }
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 1.4em; }

/* ------------------------------------------------------------------ header */
.alert-bar { background: var(--cedar-d); color: #fff; font-size: .95rem; text-align: center; padding: 8px 0; }
.alert-bar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 244, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(34, 28, 24, .08); border-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 20px; min-height: var(--header); }
/* the logo lines up with the page content; the menu is compact so brand, 9 items and tools fit in the same width */
.site-header .nav { padding-inline: 8px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.logo-mark { width: 46px; height: 46px; color: var(--terra); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { white-space: nowrap; font-family: var(--f-head); font-weight: 700; font-size: 1.22rem; color: var(--ink); }
.brand-sub { font-size: .78rem; color: var(--muted); }
.nav { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; }
.nav-head, .nav-search { display: none; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.menu > li { position: relative; display: flex; align-items: center; border-radius: 10px; }
.menu > li > a { display: block; padding: 10px 8px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: .93rem; text-decoration: none; white-space: nowrap; }
html[lang="ar"] .menu > li > a { font-size: .98rem; padding-inline: 8px; }
.menu > li > a:hover, .menu > li.on > a { color: var(--terra); }
.menu > li.on { background: var(--terra-soft); }   /* the highlight is on the whole item, so the dropdown arrow sits inside it */
.menu > li.has-sub { padding-inline-end: 4px; }
.menu > li:hover > a { color: var(--terra); }
.sub-toggle { display: inline-grid; place-items: center; width: 22px; height: 30px; margin-inline-start: -8px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; }
.sub-toggle .ic { width: 16px; height: 16px; transition: transform .2s; }
.sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; inset-inline-start: 0; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 50; }
.menu > li.has-sub:hover > .sub, .menu > li.has-sub:focus-within > .sub, .menu > li.open > .sub { opacity: 1; visibility: visible; transform: none; }
.menu > li.has-sub:hover .sub-toggle .ic, .menu > li.open .sub-toggle .ic { transform: rotate(180deg); }
.sub a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .97rem; }
.sub a:hover, .sub a[aria-current] { background: var(--tint); color: var(--terra); }
.header-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.lang-switch { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; font-size: .95rem; }
.lang-switch:hover { border-color: var(--terra); color: var(--terra); }
html[lang="en"] .lang-switch { font-family: Cairo, Tahoma, sans-serif; }
.nav-toggle { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 1480px) {
  .header-in { gap: 16px; }
  .menu > li > a { padding-inline: 8px; font-size: .92rem; }
}
@media (max-width: 1300px) {
  /* a blurred header would become the "screen" of the menu panel inside it (position: fixed is measured from an element with a filter), so the panel would be only as tall as the header */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fbf8f4; }
  .nav-toggle { display: inline-grid; }
  .header-tools { margin-inline-start: auto; }   /* language button + menu button go to the far end of the bar (right in English, left in Arabic) */
  .nav { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(380px, 88vw); background: #fff; z-index: 60; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0 0 24px; overflow-y: auto; display: none; box-shadow: var(--shadow-lg); }
  body.nav-open .nav { display: flex; animation: navSlideIn .25s ease; }
  @keyframes navSlideIn { from { transform: translateX(105%); } to { transform: none; } }
  html[dir="rtl"] body.nav-open .nav { animation-name: navSlideInRtl; }
  @keyframes navSlideInRtl { from { transform: translateX(-105%); } to { transform: none; } }
  .nav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); position: sticky; top: 0; background: #fff; z-index: 1; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 10px; }
  .menu > li { flex-wrap: wrap; border-bottom: 1px solid #f1ebe4; }
  .menu > li > a { flex: 1; padding: 14px 10px; font-size: 1.05rem; }
  .menu > li.on, .menu > li.on > a { background: none; }
  .menu > li.has-sub { padding-inline-end: 0; }
  .sub-toggle { width: 48px; height: 48px; margin: 0; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px; min-width: 0; width: 100%; display: none; background: transparent; }
  .menu > li.open > .sub { display: block; }
  .menu > li.has-sub:hover > .sub { display: none; }
  .menu > li.has-sub.open:hover > .sub { display: block; }
  .sub a { padding: 10px 22px; color: var(--muted); }
  .nav-search { display: flex; margin: 16px 18px 0; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
  .nav-search input { flex: 1; border: 0; padding: 12px 16px; min-width: 0; background: transparent; }
  .nav-search button { border: 0; background: var(--terra); color: #fff; width: 52px; display: grid; place-items: center; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(20, 15, 12, .45); z-index: 55; opacity: 0; visibility: hidden; transition: opacity .25s; display: block; }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  /* the menu panel lives inside the header, so while it is open the header must sit above the dark overlay, otherwise the overlay catches every tap */
  body.nav-open .site-header { z-index: 70; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 560px) {
  :root { --header: 64px; }
  .logo-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 1.05rem; }
  .brand-sub { display: none; }
  .search-btn { display: none; }
  .lang-switch { padding: 0 12px; min-height: 38px; }
  .wrap { padding-inline: 16px; }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; background: var(--cedar-d); color: #fff; }
.hero-slides { position: relative; min-height: min(82vh, 760px); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; display: flex; align-items: flex-end; }
.hero-slide.active { opacity: 1; position: relative; min-height: min(82vh, 760px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 10, .15) 0%, rgba(20, 14, 10, .2) 40%, rgba(20, 14, 10, .78) 100%); }
html[dir="ltr"] .hero-shade { background: linear-gradient(180deg, rgba(20, 14, 10, .1), rgba(20, 14, 10, .25) 45%, rgba(20, 14, 10, .8)), linear-gradient(90deg, rgba(20, 14, 10, .45), transparent 60%); }
html[dir="rtl"] .hero-shade { background: linear-gradient(180deg, rgba(20, 14, 10, .1), rgba(20, 14, 10, .25) 45%, rgba(20, 14, 10, .8)), linear-gradient(270deg, rgba(20, 14, 10, .45), transparent 60%); }
.hero-in { position: relative; padding-top: 120px; padding-bottom: 150px; }
.hero h1, .hero .h1 { color: #fff; max-width: 15ch; font-size: clamp(2.3rem, 1.4rem + 4vw, 4.4rem); margin-bottom: .35em; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
html[lang="ar"] .hero h1, html[lang="ar"] .hero .h1 { max-width: 18ch; line-height: 1.3; }
.hero-text { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 40em; color: rgba(255, 255, 255, .92); margin-bottom: 1.6em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero-dots { position: absolute; bottom: 104px; inset-inline-end: max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); display: flex; gap: 8px; z-index: 2; }
.hero-dots { gap: 0; }
.hero-dots button { position: relative; width: 24px; height: 24px; border: 0; background: none; cursor: pointer; padding: 0; transition: width .3s; }   /* 24px target, 12px dot */
.hero-dots button::before { content: ""; position: absolute; top: 6px; inset-inline: 6px; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .55); transition: background .3s; }
.hero-dots button.on { width: 44px; }
.hero-dots button.on::before { background: #fff; }

/* quick links overlapping the hero */
.quick { position: relative; z-index: 3; margin-top: -84px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.quick-card { display: flex; align-items: center; gap: 14px; padding: 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.quick-card:hover { transform: translateY(-4px); color: var(--text); }
.quick-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--terra-soft); color: var(--terra); flex: none; }
.quick-ic .ic { width: 26px; height: 26px; }
.quick-card strong { display: block; color: var(--ink); font-size: 1.05rem; line-height: 1.3; }
.quick-card small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 2px; }
@media (max-width: 1000px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .hero-slides, .hero-slide.active { min-height: 78vh; }
  .hero-in { padding-top: 90px; padding-bottom: 120px; }
  .hero-dots { bottom: 92px; }
  .quick { margin-top: -64px; gap: 10px; }
  .quick-card { flex-direction: column; align-items: flex-start; padding: 16px; gap: 10px; }
  .quick-ic { width: 44px; height: 44px; }
  .quick-card small { display: none; }
}

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.tint { background: var(--tint); }
.about-home { padding-top: clamp(64px, 8vw, 104px); }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.row-head h2 { margin: 0; }
.center-head { justify-content: center; text-align: center; }
.sec-title { font-size: 1.5rem; margin: 0 0 22px; display: flex; align-items: center; gap: 10px; }
.count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--terra-soft); color: var(--terra-d); font-size: .85rem; font-family: var(--f-body); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split-article { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.split-map, .split-contact { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.split-faq { align-items: start; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 900px) { .split, .split-article, .split-map, .split-contact, .split-faq { grid-template-columns: minmax(0, 1fr); } }
.lead { font-size: clamp(1.08rem, 1rem + .35vw, 1.28rem); color: var(--muted); max-width: 46em; }
.lead-sm { font-size: 1.08rem; color: var(--muted); }
.photo-frame { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.photo-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-media .photo-frame::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }

/* rich text from the CMS */
.rich { overflow-wrap: break-word; }
.rich > *:last-child { margin-bottom: 0; }
.rich h2 { font-size: 1.6rem; margin-top: 1.6em; }
.rich h3 { margin-top: 1.4em; }
.rich ul, .rich ol { padding-inline-start: 1.3em; margin: 0 0 1em; }
.rich li { margin-bottom: .35em; }
.rich blockquote { margin: 1.5em 0; padding: 18px 22px; border-inline-start: 4px solid var(--gold); background: var(--tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.08em; color: var(--ink); }
html[dir="rtl"] .rich blockquote { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.rich img { border-radius: var(--radius-sm); margin: 1em 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95em; }
.rich th, .rich td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; }
.rich .embed { position: relative; aspect-ratio: 16 / 9; margin: 1.2em 0; border-radius: var(--radius-sm); overflow: hidden; }
.rich .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-body { font-size: 1.05em; }

/* stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; margin-top: clamp(40px, 5vw, 64px); }
.stats-row .stat { background: #fff; border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); border-top: 4px solid var(--terra); }
.stats-row .stat strong { display: block; font-family: var(--f-head); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); color: var(--terra); line-height: 1.1; margin-bottom: 4px; }
.stats-row .stat span { color: var(--muted); font-size: .97rem; line-height: 1.4; display: block; }
.stats-light .stat { background: rgba(255, 255, 255, .08); box-shadow: none; border-top-color: var(--gold); }
.stats-light .stat strong { color: #fff; }
.stats-light .stat span { color: rgba(255, 255, 255, .8); }
.stats-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.stats-compact { margin: 0 0 28px; }
.stats-compact .stat { padding: 16px 18px; }

/* ------------------------------------------------------------------ cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img .tag { position: absolute; top: 14px; inset-inline-start: 14px; }
.card-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--line); }
.ph-mark { width: 64px; height: 64px; color: #e2d5c6; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.18rem; line-height: 1.4; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--terra); }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card-body p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.65; }
.card-body time, .meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; margin: 0; }
.meta .ic, .card-body time .ic { color: var(--terra); }
.card-big { grid-column: span 2; flex-direction: row; }
.card-big .card-img { aspect-ratio: auto; flex: 1.2; min-height: 320px; }
.card-big .card-body { flex: 1; justify-content: center; padding: 32px; }
.card-big h3 { font-size: 1.5rem; }
@media (max-width: 1000px) { .card-big { grid-column: 1 / -1; } }
@media (max-width: 700px) { .card-big { flex-direction: column; } .card-big .card-img { min-height: 0; aspect-ratio: 16 / 10; } .card-big .card-body { padding: 20px 22px 24px; } }

/* events */
.event-card .card-body { flex-direction: row; align-items: flex-start; gap: 16px; }
.event-card .card-body > div:last-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event-card .tag { align-self: flex-start; }
.date-badge { flex: none; width: 64px; border-radius: 12px; background: var(--terra); color: #fff; text-align: center; padding: 8px 0; line-height: 1.1; box-shadow: 0 6px 16px rgba(154, 69, 39, .25); }
.date-badge strong { display: block; font-size: 1.6rem; font-family: var(--f-head); }
.date-badge span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
html[lang="ar"] .date-badge span { font-size: .8rem; letter-spacing: 0; }

/* places */
.place-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: repeat(2, 240px); gap: 18px; }
.place-card { position: relative; border-radius: var(--radius); overflow: hidden; display: block; color: #fff; text-decoration: none; }
.place-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.place-card:hover img { transform: scale(1.05); }
.place-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15, 10, 8, .78)); }
.place-in { position: absolute; inset-inline: 0; bottom: 0; padding: 20px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.place-in strong { font-size: 1.2rem; font-family: var(--f-head); line-height: 1.3; }
.place-big { grid-row: span 2; }
.place-big .place-in strong { font-size: 1.6rem; }
.place-grid .place-card:nth-child(4) { grid-column: span 2; }
@media (max-width: 900px) { .place-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 200px 200px; } .place-big { grid-column: span 2; grid-row: auto; } .place-grid .place-card:nth-child(4) { grid-column: auto; } }
@media (max-width: 520px) { .place-grid { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 220px; } .place-big { grid-column: auto; } }

/* NGO band */
.ngo-band { background: var(--cedar); color: rgba(255, 255, 255, .88); padding: clamp(64px, 8vw, 110px) 0; position: relative; overflow: hidden; }
.ngo-band::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 147, 63, .22), transparent 70%); top: -160px; inset-inline-end: -120px; }
.ngo-band.slim { padding: 40px 0; }
.ngo-band.slim .stats-row { margin-top: 0; }
.ngo-band h2 { color: #fff; }
.band-text { font-size: 1.12rem; max-width: 36em; }
.ngo-band .stats-row { margin-top: 30px; }
.prog-list { display: grid; gap: 14px; position: relative; }
.prog-item { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .12); transition: background .2s; }
.prog-item:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.prog-item img { width: 96px; height: 76px; object-fit: cover; border-radius: 10px; flex: none; }
.prog-item strong { display: block; font-size: 1.08rem; }
.prog-item small { display: block; color: rgba(255, 255, 255, .75); font-size: .92rem; line-height: 1.5; }

/* gallery */
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 12px; }
.mosaic a { display: block; overflow: hidden; border-radius: var(--radius-sm); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.mosaic a:hover img { transform: scale(1.06); }
.mosaic .m-0 { grid-column: span 2; grid-row: span 2; }
.mosaic .m-3 { grid-column: span 2; }
@media (max-width: 800px) { .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; } .mosaic .m-3 { grid-column: auto; } .mosaic a:nth-child(n+6) { display: none; } }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .album-grid { grid-template-columns: minmax(0, 1fr); } }
.album-card { display: block; text-decoration: none; color: var(--ink); }
.album-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--tint); box-shadow: var(--shadow); }
.album-img::before, .album-img::after { content: ""; }
.album-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.album-card:hover img { transform: scale(1.05); }
.album-count { position: absolute; bottom: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(20, 15, 12, .7); color: #fff; font-size: .88rem; font-weight: 600; }
.album-txt { display: block; padding: 14px 4px 0; }
.album-txt strong { display: block; font-size: 1.15rem; font-family: var(--f-head); }
.album-txt small { color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.photo-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--tint); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.photo-grid a:hover img { transform: scale(1.05); }
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 9, 7, .94); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 56px 16px 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox p { color: #eee; margin: 14px 0 0; text-align: center; max-width: 60em; }
.lb-btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-btn .ic { width: 26px; height: 26px; }
.lb-close { top: 14px; inset-inline-end: 14px; }
.lb-prev { inset-inline-start: 14px; top: 50%; }
.lb-next { inset-inline-end: 14px; top: 50%; }
.lb-prev .ic { transform: scaleX(-1); }
html[dir="rtl"] .lb-prev .ic { transform: none; }
html[dir="rtl"] .lb-next .ic { transform: scaleX(-1); }
.lb-count { position: absolute; top: 24px; inset-inline-start: 24px; color: #ccc; font-size: .9rem; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 1.04rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 10px; height: 10px; border-inline-end: 2px solid var(--terra); border-bottom: 2px solid var(--terra); transform: rotate(45deg); transition: transform .2s; flex: none; margin-top: -4px; }
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq-item[open] summary { color: var(--terra); }
.faq-item .rich { padding: 0 22px 20px; color: var(--text); }
.faq-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.faq-nav { position: sticky; top: calc(var(--header) + 20px); display: grid; gap: 6px; }
.faq-nav a { display: flex; justify-content: space-between; padding: 12px 16px; border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; box-shadow: var(--shadow); }
.faq-nav a:hover { color: var(--terra); }
.faq-nav span { color: var(--muted); }
.faq-group { margin-bottom: 40px; }
.faq-group h2 { font-size: 1.5rem; }
.faq-more { margin-top: 12px; }
@media (max-width: 900px) { .faq-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .faq-nav { position: static; display: flex; flex-wrap: wrap; } .faq-nav a { padding: 8px 14px; gap: 8px; } }

/* CTA */
.cta-band { background: linear-gradient(120deg, var(--terra-d), var(--terra) 60%, var(--terra-l)); color: #fff; padding: clamp(56px, 7vw, 88px) 0; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-in h2 { color: #fff; margin-bottom: .3em; }
.cta-in p { margin: 0; color: rgba(255, 255, 255, .9); max-width: 40em; font-size: 1.08rem; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------ inner page banner */
.page-banner { position: relative; background: var(--cedar-d); color: #fff; padding: clamp(56px, 8vw, 110px) 0 clamp(44px, 6vw, 72px); overflow: hidden; }
.page-banner:not(.has-img) { background: linear-gradient(120deg, var(--cedar-d), var(--cedar)); }
.page-banner.has-img { min-height: 360px; display: flex; align-items: flex-end; }
.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-banner.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 10, 8, .25), rgba(15, 10, 8, .72)); z-index: 1; }
.banner-in { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; margin-bottom: .3em; max-width: 20ch; }
.page-banner .lead { color: rgba(255, 255, 255, .9); margin: 0; }
.page-banner .eyebrow { color: #f3d7b4; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; margin-bottom: 18px; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-banner .crumbs, .person-head .crumbs { color: rgba(255, 255, 255, .78); }
@media (max-width: 640px) { .page-banner.has-img { min-height: 300px; } }

/* filters, pager */
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-chips a { padding: 9px 18px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; box-shadow: var(--shadow); border: 1.5px solid transparent; font-size: .97rem; }
.filter-chips a:hover { border-color: var(--terra); color: var(--terra); }
.filter-chips a.on { background: var(--terra); color: #fff; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pager a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); }
.pager a.on { background: var(--terra); color: #fff; }
.empty-note { padding: 28px; background: #fff; border-radius: var(--radius); text-align: center; color: var(--muted); box-shadow: var(--shadow); }

/* article pages */
.article h1 { margin-bottom: .35em; }
.article-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.article-meta .ic { color: var(--terra); }
.article-photo { margin: 28px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-photo img { width: 100%; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.event-layout .tag { margin-bottom: 12px; }
@media (max-width: 900px) { .event-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .event-layout .side { order: -1; } }
.side { display: grid; gap: 20px; position: sticky; top: calc(var(--header) + 20px); }
@media (max-width: 900px) { .side { position: static; } }
.info-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.info-card h2, .info-card h3 { font-size: 1.25rem; margin: 0; }
.info-card .meta { align-items: flex-start; font-size: 1rem; color: var(--text); }
.info-card .meta .ic { margin-top: 4px; }
.tree-cta .ic { width: 40px; height: 40px; color: var(--terra); }
.bank { border-inline-start: 4px solid var(--gold); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.share-row > span { font-weight: 600; color: var(--ink); margin-inline-end: 6px; }
.share-row a, .share-row button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; font-size: .92rem; }
.share-row a:hover, .share-row button:hover { border-color: var(--terra); color: var(--terra); }

/* timeline */
.timeline { list-style: none; margin: 32px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 58px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0; padding-bottom: 32px; position: relative; }
.timeline li::before { content: ""; position: absolute; top: 8px; inset-inline-start: 52px; width: 14px; height: 14px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 5px var(--tint); }
.tl-year { font-family: var(--f-head); font-weight: 700; color: var(--terra); font-size: 1.15rem; padding-top: 2px; text-align: end; padding-inline-end: 0; width: 44px; }
.tl-body { background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.tl-body h3 { margin: 0 0 6px; }
.tl-body img { border-radius: 10px; margin: 10px 0; }
.tl-body p { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .timeline::before { inset-inline-start: 7px; } .timeline li { grid-template-columns: minmax(0, 1fr); padding-inline-start: 30px; } .timeline li::before { inset-inline-start: 1px; } .tl-year { width: auto; text-align: start; margin-bottom: 6px; } }

/* team */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px; }
.member { text-align: center; background: #fff; padding: 26px 18px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.member strong { color: var(--ink); font-size: 1.08rem; margin-top: 10px; }
.member span { color: var(--muted); font-size: .95rem; }
.avatar, .avatar-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--terra-soft); color: var(--terra); font-family: var(--f-head); font-size: 2.2rem; font-weight: 700; }
.prog-card .card-body p { font-size: 1rem; }

/* forms */
.form-card { background: #fff; border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-lg); }
.form-card h2 { font-size: 1.5rem; }
.form-card form { display: grid; gap: 16px; }
.form-card label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 5px; font-weight: 600; color: var(--ink); font-size: .97rem; }
.form-card label > input, .form-card label > textarea, .form-card label > select { flex: 1 0 100%; }
.form-card label > i { font-style: normal; color: var(--terra); }
.form-card label i { color: var(--terra); font-style: normal; }
.form-card input, .form-card textarea, .list-filter input, .list-filter select, .search-box input { width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fdfbf8; font-weight: 400; transition: border-color .2s, box-shadow .2s; }
.form-card textarea { min-height: 140px; resize: vertical; }
.form-card input:focus, .form-card textarea:focus, .list-filter input:focus, .search-box input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(154, 69, 39, .12); background: #fff; }
.form-card label.err input, .form-card label.err textarea { border-color: #c0392b; background: #fdf1ef; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .two-cols { grid-template-columns: 1fr; } }
.notice { padding: 14px 18px; border-radius: 12px; margin: 0 0 16px; font-weight: 500; }
.notice.ok { background: var(--cedar-soft); color: var(--cedar-d); }
.notice.bad { background: #fbeae7; color: #8e2a1c; }
.contact-cards { display: grid; gap: 12px; margin-bottom: 28px; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
a.contact-card:hover { color: var(--terra); }
.contact-card .ic { width: 46px; height: 46px; padding: 11px; border-radius: 12px; background: var(--terra-soft); color: var(--terra); }
.contact-card small { display: block; color: var(--muted); font-size: .85rem; }
.contact-card strong { display: block; font-size: 1.05rem; word-break: break-word; }
.search-box { display: flex; gap: 10px; margin: 0 0 28px; }
.search-box .btn { flex: none; }
.not-found { padding-block: 20px; }
.big-404 { font-family: var(--f-head); font-size: clamp(4rem, 10vw, 7rem); font-weight: 700; color: var(--terra-soft); line-height: 1; margin: 0; }
.not-found .search-box { max-width: 520px; margin: 28px auto; }
.results { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 10px; }
.results a { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.results a:hover strong { color: var(--terra); }
.results strong { display: block; }
.results small { display: block; color: var(--muted); font-size: .92rem; }
.r-img { width: 76px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; }
.r-img img { width: 100%; height: 100%; object-fit: cover; }

/* map facade */
.map-facade { position: relative; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(140deg, #e8efe7, #f3ece1); color: var(--cedar); display: grid; place-items: center; box-shadow: var(--shadow); }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-in { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px; color: var(--ink); }
.map-pin .ic { width: 48px; height: 48px; color: var(--terra); }
.map-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.map-in small { color: var(--muted); }
.map-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------------------ family tree */
.tree-head { padding: 40px 0 26px; background: var(--tint); }
.tree-head-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tree-head h1 { margin: 0; font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); }
.tree-head .lead-sm { margin: 6px 0 0; }
.tabs { display: inline-flex; background: #fff; border-radius: 999px; padding: 5px; box-shadow: var(--shadow); }
.tabs a { padding: 10px 20px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
.tabs a.on { background: var(--terra); color: #fff; }
.tree-bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--header); z-index: 20; }
.bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-block: 12px; }
.tsearch { position: relative; flex: 1; min-width: 220px; }
.tsearch input, .tstart select { width: 100%; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.tres { position: absolute; top: 100%; inset-inline: 0; margin: 4px 0 0; padding: 6px; list-style: none; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 30; max-height: 320px; overflow-y: auto; }
.tres a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.tres a:hover { background: var(--tint); }
.tstart { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.tstart > span { white-space: nowrap; }
.tstart select { min-width: 200px; }
.tbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.tbtns button { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.tbtns button:hover { border-color: var(--terra); color: var(--terra); }
.tree-canvas { height: min(72vh, 760px); min-height: 460px; background: radial-gradient(circle at 1px 1px, #e8ded2 1px, transparent 0) 0 0 / 24px 24px, var(--bg); overflow: hidden; cursor: grab; position: relative; touch-action: none; }
.tree-canvas:active { cursor: grabbing; }
.tree-hint { color: var(--muted); font-size: .92rem; padding-block: 14px; }
.list-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.list-filter input { flex: 1; min-width: 220px; }
.list-filter select { width: auto; min-width: 180px; }
.people-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pcard, .rel { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-inline-start: 4px solid var(--terra-l); }
.pcard.g-F, .rel.g-F { border-inline-start-color: var(--gold); }
.pcard:hover strong, .rel:hover strong { color: var(--terra); }
.pc-photo, .rel-ph { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--terra-soft); display: grid; place-items: center; color: var(--terra); font-weight: 700; font-size: 1.3rem; }
.pc-photo img, .rel-ph img { width: 100%; height: 100%; object-fit: cover; }
.pc-text strong, .rel-t strong { display: block; line-height: 1.35; }
.pc-text small, .rel-t small { color: var(--muted); font-size: .88rem; }
.person-head { background: linear-gradient(120deg, var(--cedar-d), var(--cedar)); color: #fff; padding: 48px 0; }
.ph-in { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.ph-photo { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; border: 5px solid rgba(255, 255, 255, .25); flex: none; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 3.6rem; font-family: var(--f-head); }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-head h1 { color: #fff; margin: 0 0 .2em; }
.ph-nick, .ph-years { margin: 0; color: rgba(255, 255, 255, .85); font-size: 1.1rem; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.person-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .person-grid { grid-template-columns: minmax(0, 1fr); } }
.p-main { display: grid; gap: 20px; }
.panel { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.details { margin: 0; display: grid; gap: 0; }
.d-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1ebe4; }
.d-row:last-child { border: 0; }
.d-row dt { color: var(--muted); }
.d-row dd { margin: 0; color: var(--ink); font-weight: 500; }
@media (max-width: 560px) { .d-row { grid-template-columns: 1fr; gap: 0; } }
.rels { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.anc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.panel h3.subhead { margin: 18px 0 8px; color: var(--muted); font-family: var(--f-body); }
.qr-card { text-align: center; }
.qr { width: 190px; height: 190px; margin: 0 auto 10px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-name { font-weight: 700; color: var(--ink); margin: 0; }
.small-t { font-size: .9rem; }
.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; }
.p-side { display: grid; gap: 16px; position: sticky; top: calc(var(--header) + 20px); }
.p-side .share-row { margin-top: 0; border: 0; padding: 0; }
@media (max-width: 900px) { .p-side { position: static; } }

/* ------------------------------------------------------------------ footer */
.site-footer { background: #1d1714; color: rgba(255, 255, 255, .72); padding: clamp(56px, 7vw, 84px) 0 0; font-size: .97rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 36px 40px; padding-bottom: 44px; }
.footer-grid .f-about { grid-column: span 2; }
/* wide screens: the about text, the four menu groups and the contact block share ONE row */
@media (min-width: 1100px) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.35fr); gap: 36px 32px; }
  .footer-grid .f-about { grid-column: auto; }
}
.site-footer h2 { color: #fff; font-family: var(--f-body); font-size: 1rem; font-weight: 700; margin: 0 0 16px; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
/* buttons inside the footer keep their own colours (the generic footer link colour made the white button's text invisible) */
.site-footer a.btn, .site-footer a.btn:hover { text-decoration: none; }
.site-footer a.btn-light, .site-footer a.btn-light:hover { color: var(--terra-d); }
.site-footer a.btn-light:hover { background: var(--tint); }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-sub { color: rgba(255, 255, 255, .6); }
.brand-light .logo-mark { color: var(--terra-l); }
.f-about p { margin: 18px 0; max-width: 32em; }
.f-social { display: flex; gap: 10px; }
.f-social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.f-social a:hover { background: var(--terra); }
.f-contact li { display: flex; gap: 10px; align-items: flex-start; }
.f-contact li .ic { margin-top: 5px; color: var(--terra-l); }
.f-contact .btn { margin-top: 16px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .9rem; }
.f-links { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .f-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ motion + print */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .nav-backdrop, .share-row, .ph-actions, .qr-actions, .alert-bar, .tree-bar { display: none !important; }
  body { background: #fff; }
  .person-head { background: none; color: #000; padding: 0; } .person-head h1 { color: #000; }
  .panel, .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ------------------------------------------------------------------ interactive family tree (drawn by tree.js) */
.tree-canvas { direction: ltr; user-select: none; -webkit-user-select: none; }
.tree-canvas.drag { cursor: grabbing; }
.tree-canvas > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tree-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.tcard { cursor: pointer; }
.tcard rect.bg { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
.tcard.g-M rect.side { fill: #6f8696; } .tcard.g-F rect.side { fill: var(--terra-l); }
.tcard text { font-family: var(--f-body); fill: var(--ink); }
.tcard .nm { font-size: 13.5px; font-weight: 700; } .tcard .yr { font-size: 11.5px; fill: var(--muted); }
.tcard.dead .nm { font-weight: 500; }
.tcard:hover rect.bg, .tcard:focus rect.bg { stroke: var(--terra); stroke-width: 2.5; outline: none; }
.tcard.hit rect.bg { fill: var(--terra-soft); stroke: var(--terra); stroke-width: 2.5; }
.tlink { fill: none; stroke: #b9a89a; stroke-width: 1.6; }
.tspouse-link { stroke: var(--terra-l); stroke-width: 2; stroke-dasharray: 4 3; }
.ttoggle { cursor: pointer; } .ttoggle circle { fill: #fff; stroke: var(--terra); stroke-width: 1.8; }
.ttoggle text { font-size: 13px; font-weight: 700; fill: var(--terra-d); font-family: var(--f-body); }
.tsearch { position: relative; flex: 1 1 240px; max-width: 360px; }
.tres { position: absolute; inset-inline: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); list-style: none; margin: 4px 0 0; padding: 4px; max-height: 320px; overflow: auto; }
.tres[hidden] { display: none; }
.tres button { width: 100%; text-align: start; padding: 9px 12px; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 8px; display: flex; justify-content: space-between; gap: 12px; }
.tres button:hover, .tres button:focus { background: var(--tint); } .tres small { color: var(--muted); }

/* ------------------------------------------------------------------ print: the profile prints as one clean card (details, relatives, QR) */
@media print {
  @page { margin: 14mm; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body { background: #fff !important; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .nav-backdrop, .share-row, .ph-actions, .qr-actions, .alert-bar, .tree-bar, .breadcrumb, .skip { display: none !important; }
  .person-head { background: none !important; color: #000 !important; padding: 0 0 10px !important; border-bottom: 2px solid #000; }
  .person-head *, .person-head h1 { color: #000 !important; }
  .person-grid { display: flex !important; flex-direction: column-reverse; }
  .p-main, .p-side { display: block !important; position: static !important; }
  .panel, .card { box-shadow: none !important; border: 1px solid #bbb !important; break-inside: avoid; margin-bottom: 10px; display: block !important; opacity: 1 !important; }
  .qr-card { width: 64mm; margin: 0 auto 10px !important; padding: 8px !important; } .qr { width: 44mm; height: 44mm; }
  .rels { display: block !important; } .rel { display: inline-flex !important; width: 48%; box-shadow: none !important; border: 1px solid #ddd; margin: 0 1% 6px 0; }
  a { color: #000 !important; text-decoration: none !important; }
}

/* ------------------------------------------------------------------ no orphan cells: stats and photo mosaic always fill their last row */
@media (max-width: 760px) {
  .stats-row:not(.stats-stack) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .stats-row > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 801px) {
  .mosaic a:nth-child(5):last-child { grid-column: span 4; }
  .mosaic a:nth-child(5):nth-last-child(2), .mosaic a:nth-child(6):last-child { grid-column: span 2; }
  .mosaic a:nth-child(7):last-child { grid-column: span 2; }
}
/* three numbers always sit in one row; four fit as 4 across (wide column) or 2 x 2 (narrow column), never 3 + 1 */
@media (min-width: 561px) { .stats-row:not(.stats-stack):has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* key figures: the number and its label start on the same side (right in Arabic), and long values stay inside the card on phones */
html[dir="rtl"] .stats-row .stat strong { text-align: right; }
@media (max-width: 560px) { .stats-row .stat strong { font-size: 1.45rem; white-space: nowrap; } }

/* reCAPTCHA box above the send button; scaled down a little on very narrow phones so it never overflows */
.captcha-box { min-height: 78px; margin: 6px 0 14px; }
@media (max-width: 360px) { .captcha-box .g-recaptcha { transform: scale(.88); transform-origin: 0 0; } }

/* tables inside page text (photo credits...) scroll sideways inside their own box on phones instead of being wider than the screen */
@media (max-width: 700px) {
  .rich table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rich td, .rich th { min-width: 96px; vertical-align: top; }
}

/* the page never scrolls sideways on phones, whatever is placed off-screen */
html, body { overflow-x: clip; }

