/* ==========================================================================
   NDC Library — main stylesheet
   Logical properties throughout, so the same rules serve English (LTR) and
   Arabic (RTL).
   ========================================================================== */

/* Fonts (self-hosted) ----------------------------------------------------- */

@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(../fonts/plex-sans-var.woff2) format("woff2");
	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: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/plex-arabic-400.woff2) format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url(../fonts/plex-arabic-500.woff2) format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 600 700;
	font-display: swap;
	src: url(../fonts/plex-arabic-600.woff2) format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../fonts/source-serif-600.woff2) format("woff2");
	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;
}

/* Tokens ------------------------------------------------------------------ */

:root {
	--gold: #af8c45;
	--gold-hover: #9c7b37;
	--gold-deep: #7f6328;      /* gold for text on light backgrounds (AA) */
	--gold-light: #d9c294;     /* gold for text on dark backgrounds */
	--gold-wash: #f3ecdc;
	--ink: #17212b;
	--ink-2: #24303c;
	--text: #1d252e;
	--muted: #59626d;
	--line: #e2dccf;
	--line-strong: #c9c1b0;
	--sand: #f6f2ea;
	--paper: #fcfbf8;
	--white: #fff;
	--danger: #a23b2a;
	--ok: #2f6b4f;

	--font-sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-display: "Source Serif 4", Georgia, "Times New Roman", serif;

	--radius: 6px;
	--radius-lg: 10px;
	--shadow-sm: 0 1px 2px rgb(23 33 43 / 6%), 0 1px 1px rgb(23 33 43 / 4%);
	--shadow-md: 0 10px 30px -12px rgb(23 33 43 / 25%), 0 2px 6px rgb(23 33 43 / 6%);
	--shadow-lg: 0 24px 60px -20px rgb(23 33 43 / 35%);

	--container: 1200px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--header-h: 76px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

html[lang^="ar"] {
	--font-sans: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, Tahoma, Arial, sans-serif;
	--font-display: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, Tahoma, Arial, sans-serif;
}

/* Base -------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}
html.no-scroll { overflow: hidden; }

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
html[lang^="ar"] body { line-height: 1.75; }

img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
	margin: 0 0 .5em;
	line-height: 1.2;
	color: var(--ink);
	font-weight: 600;
	text-wrap: balance;
}
h1, h2 { font-family: var(--font-display); letter-spacing: -.01em; }
html[lang^="ar"] h1, html[lang^="ar"] h2 { letter-spacing: 0; line-height: 1.35; }

p { margin: 0 0 1em; }

a { color: var(--gold-deep); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible {
	outline: 2px solid var(--gold-deep);
	outline-offset: 2px;
	border-radius: 2px;
}

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--gold-wash); color: var(--ink); }

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.screen-reader-text {
	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: 1rem;
	top: -4rem;
	z-index: 1000;
	padding: .75rem 1rem;
	background: var(--ink);
	color: var(--white);
	border-radius: var(--radius);
	text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.site-main:focus { outline: none; }

.icon { flex: none; vertical-align: middle; }
[dir="rtl"] .icon-arrow { transform: scaleX(-1); }
.icon.flip { transform: scaleX(-1); }
[dir="rtl"] .icon.flip { transform: none; }

.muted { color: var(--muted); }

/* Decorative pattern (from the NDC star motif) */
.pattern { pointer-events: none; display: block; }

/* Buttons ----------------------------------------------------------------- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 46px;
	padding: .65rem 1.25rem;
	border: 1px solid var(--gold);
	border-radius: var(--radius);
	background: var(--gold);
	color: var(--ink);
	font-weight: 600;
	font-size: .975rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.button:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--ink); }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: .55; cursor: default; }

.button--quiet {
	background: var(--white);
	border-color: var(--line-strong);
	color: var(--ink);
}
.button--quiet:hover { background: var(--sand); border-color: var(--ink); color: var(--ink); }

.button--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.button--dark:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); }

.button--small { min-height: 38px; padding: .4rem .9rem; font-size: .9rem; }
.button--block { width: 100%; }
.button .icon { width: 18px; height: 18px; }

.text-button {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .25rem 0;
	border: 0;
	background: none;
	color: var(--gold-deep);
	font-weight: 500;
	font-size: .925rem;
	cursor: pointer;
}
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.text-button .icon { width: 17px; height: 17px; }

.icon-button {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: none;
	color: var(--ink);
	cursor: pointer;
}
.icon-button:hover { background: var(--sand); }
.icon-button[disabled] { opacity: .35; cursor: default; background: none; }

.text-link {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-weight: 600;
	color: var(--gold-deep);
	text-decoration: none;
}
.text-link:hover { color: var(--ink); }
.text-link .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
[dir="rtl"] .text-link:hover .icon { transform: scaleX(-1) translateX(3px); }

/* Form fields ------------------------------------------------------------- */

input[type="text"], input[type="search"], input[type="email"], input[type="number"], input[type="url"], input[type="tel"], select, textarea {
	width: 100%;
	min-height: 46px;
	padding: .6rem .85rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--white);
	color: var(--text);
	transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
select {
	appearance: none;
	padding-inline-end: 2.4rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2317212b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .7rem center;
	cursor: pointer;
}
[dir="rtl"] select { background-position: left .7rem center; }
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--gold-deep);
	box-shadow: 0 0 0 3px rgb(175 140 69 / 22%);
}
input::placeholder, textarea::placeholder { color: #8a929b; }

.field { display: grid; gap: .35rem; }
.field > label, .field > span { font-weight: 500; font-size: .925rem; color: var(--ink); }
.field__control { position: relative; }
.field__control .icon { position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field__control input { padding-inline-start: 2.6rem; }

.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.form-status { color: var(--ok); font-weight: 600; }

/* Header ------------------------------------------------------------------ */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	/* Solid, no backdrop-filter: a filter would trap the fixed-position mobile menu inside the header. */
	background: var(--white);
	border-bottom: 1px solid var(--line);
	transition: box-shadow .2s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
/* While the mobile menu is open the header (which holds the drawer) must sit above the page scrim. */
.site-header:has(.site-nav.is-open) { z-index: 80; }
.site-header.is-scrolled { box-shadow: 0 6px 24px -18px rgb(23 33 43 / 45%); }

.site-header__bar {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: var(--header-h);
}

.site-logo {
	display: inline-flex;
	align-items: center;
	gap: .9rem;
	text-decoration: none;
	color: var(--ink);
	flex: none;
}
.site-logo__img { height: 46px; width: auto; }
.site-logo__text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.site-logo__label {
	padding-inline-start: .9rem;
	border-inline-start: 1px solid var(--line-strong);
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--gold-deep);
	line-height: 1.1;
}
html[lang^="ar"] .site-logo__label { font-size: 1.1rem; }

.site-header__menu-btn {
	display: none;
	margin-inline-start: auto;
	align-items: center;
	gap: .4rem;
	padding: .5rem .75rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--white);
	font-weight: 500;
	cursor: pointer;
}

.site-nav {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 1.25rem;
	min-width: 0;
}
.site-nav__head { display: none; }

.nav { margin-inline-start: auto; }
.nav__list {
	display: flex;
	align-items: center;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nav__item { position: relative; display: flex; align-items: center; }
.nav__item > a,
.nav__parent {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .6rem .7rem;
	border: 0;
	background: none;
	color: var(--ink);
	font-size: .95rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	border-radius: var(--radius);
}
.nav__item > a:hover, .nav__parent:hover { color: var(--gold-deep); }
.nav__item > a[aria-current="page"],
.nav__item.current-menu-ancestor > .nav__parent,
.nav__item.current-menu-parent > .nav__parent {
	color: var(--gold-deep);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .55em;
}
.nav__toggle {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	margin-inline-start: -.5rem;
	border: 0;
	background: none;
	cursor: pointer;
	color: var(--ink);
}
.nav__chevron { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.nav__item.is-open .nav__chevron { transform: rotate(180deg); }

.nav__item .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-start: 0;
	min-width: 240px;
	margin: 0;
	padding: .5rem;
	list-style: none;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .15s, transform .15s var(--ease), visibility 0s .15s;
}
.nav__item.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .15s, transform .15s var(--ease);
}
.sub-menu .nav__item { display: block; }
.sub-menu a {
	display: block;
	padding: .55rem .75rem;
	border-radius: var(--radius);
	color: var(--ink);
	font-size: .95rem;
	text-decoration: none;
}
.sub-menu a:hover { background: var(--sand); color: var(--ink); }
.sub-menu a[aria-current="page"] { background: var(--gold-wash); }

.site-tools { display: flex; align-items: center; gap: .75rem; flex: none; }

.lang-switch {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .45rem .6rem;
	border-radius: var(--radius);
	color: var(--ink);
	font-weight: 500;
	font-size: .95rem;
	text-decoration: none;
}
.lang-switch:hover { background: var(--sand); color: var(--ink); }
.lang-switch .icon { width: 18px; height: 18px; color: var(--gold-deep); }
.lang-switch[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang-switch[lang="en"] { font-family: "IBM Plex Sans", sans-serif; }

.account { position: relative; }
.account__button {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .3rem .5rem .3rem .3rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	cursor: pointer;
	max-width: 220px;
}
[dir="rtl"] .account__button { padding: .3rem .3rem .3rem .5rem; }
.account__button:hover { border-color: var(--line-strong); }
.account__initials {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ink);
	color: var(--gold-light);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .03em;
	flex: none;
}
.account__initials--large { width: 56px; height: 56px; font-size: 1.15rem; }
.account__name { font-size: .9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__chevron { width: 16px; height: 16px; }
.account__menu {
	position: absolute;
	inset-inline-end: 0;
	top: calc(100% + 8px);
	min-width: 260px;
	padding: .5rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	z-index: 10;
}
.account__who { margin: 0; padding: .5rem .75rem .6rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.account__list { margin: .35rem 0; padding: 0; list-style: none; }
.account__list a, .account__logout {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .55rem .75rem;
	border-radius: var(--radius);
	color: var(--ink);
	text-decoration: none;
	font-size: .95rem;
}
.account__list a:hover, .account__logout:hover { background: var(--sand); color: var(--ink); }
.account__logout { border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); margin-top: .25rem; color: var(--muted); }
.account__logout .icon { width: 18px; height: 18px; }

.nav-scrim {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgb(23 33 43 / 45%);
}

@media (max-width: 1023px) {
	.site-header__menu-btn { display: inline-flex; }
	.site-logo__img { height: 40px; }

	.site-nav {
		position: fixed;
		inset-block: 0;
		inset-inline-end: 0;
		z-index: 70;
		width: min(380px, 90vw);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0 0 1.5rem;
		background: var(--white);
		box-shadow: var(--shadow-lg);
		overflow-y: auto;
		/* Closed panels stay in place (hidden) rather than off-screen, so they never widen the page. */
		opacity: 0;
		visibility: hidden;
		transform: scale(.98);
		transform-origin: top right;
		transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
	}
	[dir="rtl"] .site-nav { transform-origin: top left; }
	.site-nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .2s var(--ease), transform .2s var(--ease); }

	.site-nav__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: .75rem 1rem .75rem 1.25rem;
		border-bottom: 1px solid var(--line);
	}
	.site-nav__title { font-weight: 600; }

	.nav { margin: 0; padding: .5rem 0; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__item { flex-wrap: wrap; }
	.nav__item > a, .nav__parent {
		flex: 1;
		justify-content: space-between;
		padding: .85rem 1.25rem;
		font-size: 1.05rem;
		border-radius: 0;
	}
	.nav__item > a[aria-current="page"] { text-decoration: none; background: var(--gold-wash); }
	.nav__toggle { width: 52px; height: 48px; margin: 0; }
	.nav__item .sub-menu {
		position: static;
		flex-basis: 100%;
		min-width: 0;
		padding: 0 0 .5rem;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: var(--sand);
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}
	.nav__item.is-open > .sub-menu { display: block; }
	.sub-menu a { padding: .7rem 1.25rem .7rem 2.25rem; border-radius: 0; }
	[dir="rtl"] .sub-menu a { padding: .7rem 2.25rem .7rem 1.25rem; }

	.site-tools {
		flex-direction: column;
		align-items: stretch;
		gap: .75rem;
		margin-top: auto;
		padding: 1rem 1.25rem 0;
		border-top: 1px solid var(--line);
	}
	.lang-switch { justify-content: flex-start; padding-inline: 0; }
	.account__button { max-width: none; width: 100%; border-radius: var(--radius); }
	.account__menu { position: static; box-shadow: none; margin-top: .5rem; min-width: 0; }
}

/* Page header ------------------------------------------------------------- */

.page-head {
	position: relative;
	overflow: hidden;
	padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(2rem, 4vw, 3rem);
	background: var(--sand);
	border-bottom: 1px solid var(--line);
}
.page-head .container { position: relative; z-index: 1; }
.page-head__title { max-width: 22ch; margin-bottom: 0; font-size: clamp(2rem, 4.2vw, 2.9rem); }
html[lang^="ar"] .page-head__title { max-width: 28ch; }
.page-head__intro { max-width: 62ch; margin: 1rem 0 0; font-size: 1.15rem; color: var(--muted); }
.page-head__meta { margin: .75rem 0 0; color: var(--muted); }
.page-head__pattern {
	position: absolute;
	inset-inline-end: -60px;
	top: 50%;
	width: 360px;
	height: 360px;
	color: var(--gold);
	opacity: .35;
	transform: translateY(-50%);
}
@media (max-width: 700px) { .page-head__pattern { width: 240px; height: 240px; inset-inline-end: -110px; opacity: .25; } }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .9rem; }
.breadcrumb li { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-deep); text-decoration: underline; }

.page-body { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.page-body__media { margin: 0 0 2rem; max-width: 880px; }
.page-body__media img { border-radius: var(--radius-lg); }

/* Prose (editor content) -------------------------------------------------- */

.prose { max-width: 72ch; font-size: 1.05rem; }
.prose--lead { margin-bottom: 2rem; font-size: 1.1rem; color: var(--muted); }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose h2 { margin: 2.2em 0 .6em; font-size: 1.7rem; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.3rem; }
.prose h4 { margin: 1.5em 0 .5em; font-size: 1.1rem; }
.prose ul, .prose ol { padding-inline-start: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--gold-deep); }
.prose blockquote {
	margin: 1.5em 0;
	padding: 1.25rem 1.5rem;
	background: var(--sand);
	border-radius: var(--radius);
	font-family: var(--font-display);
	font-size: 1.15rem;
}
.prose img { border-radius: var(--radius); }
.prose figure { margin: 1.5em 0; }
.prose figcaption { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose table, .prose .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
}
.prose .wp-block-table { overflow-x: auto; margin: 1.5em 0; }
.prose th, .prose td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th, .prose tr:first-child td strong { color: var(--ink); }
.prose thead th { background: var(--sand); }
.prose .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--sand); }
.prose .wp-block-table.is-style-stripes { border-bottom: 0; }
.prose iframe { width: 100%; border: 0; border-radius: var(--radius); }

.callout {
	padding: 1rem 1.25rem;
	margin-bottom: 2rem;
	background: var(--gold-wash);
	border-radius: var(--radius);
}
.empty-note { color: var(--muted); }

/* Sign-in panel ----------------------------------------------------------- */

.signin-panel {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	padding: 1.75rem 2rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}
.signin-panel__icon {
	width: 52px;
	height: 52px;
	padding: 13px;
	border-radius: 50%;
	background: var(--gold-wash);
	color: var(--gold-deep);
}
.signin-panel__title { margin: 0 0 .25rem; font-size: 1.35rem; }
.signin-panel p { margin: 0; color: var(--muted); }
.signin-panel__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 700px) {
	.signin-panel { grid-template-columns: 1fr; padding: 1.5rem; gap: 1rem; }
}

/* Home: hero -------------------------------------------------------------- */

.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem);
	background:
		radial-gradient(ellipse 60% 80% at 85% 20%, rgb(175 140 69 / 16%), transparent 70%),
		var(--ink);
	color: #d5dae0;
}
[dir="rtl"] .hero { background: radial-gradient(ellipse 60% 80% at 15% 20%, rgb(175 140 69 / 16%), transparent 70%), var(--ink); }
.hero__pattern {
	position: absolute;
	inset-inline-end: -120px;
	top: 50%;
	width: min(720px, 80vw);
	height: auto;
	aspect-ratio: 1;
	color: var(--gold);
	opacity: .32;
	transform: translateY(-50%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__title {
	max-width: 18ch;
	margin-bottom: .5rem;
	color: var(--white);
	font-size: clamp(2.3rem, 5.5vw, 3.9rem);
	line-height: 1.08;
}
html[lang^="ar"] .hero__title { max-width: 22ch; line-height: 1.3; }
.hero__text { max-width: 56ch; margin-bottom: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #bfc6ce; }

.hero-search { max-width: 820px; margin-top: clamp(2rem, 4vw, 2.75rem); }
.hero-search__tabs { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: .9rem; }
.hero-search__tab { position: relative; cursor: pointer; }
.hero-search__tab input { position: absolute; opacity: 0; pointer-events: none; }
.hero-search__tab span {
	display: inline-block;
	padding-bottom: .3rem;
	color: #aab2bb;
	font-weight: 500;
	border-bottom: 2px solid transparent;
	transition: color .15s, border-color .15s;
}
.hero-search__tab:hover span { color: var(--white); }
.hero-search__tab input:checked + span { color: var(--white); border-bottom-color: var(--gold); }
.hero-search__tab input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 4px; }

.hero-search__box {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .45rem;
	padding-inline-start: 1.1rem;
	background: var(--white);
	border-radius: var(--radius-lg);
	box-shadow: 0 18px 50px -20px rgb(0 0 0 / 60%);
}
.hero-search__icon { width: 22px; height: 22px; color: var(--muted); }
.hero-search__box input {
	flex: 1;
	min-width: 0;
	min-height: 52px;
	padding: 0 .25rem;
	border: 0;
	background: none;
	font-size: 1.1rem;
	box-shadow: none;
}
.hero-search__box input:focus { box-shadow: none; }
.hero-search__box:focus-within { box-shadow: 0 0 0 3px rgb(175 140 69 / 55%), 0 18px 50px -20px rgb(0 0 0 / 60%); }
.hero-search__box .button { min-height: 52px; padding-inline: 1.6rem; font-size: 1.02rem; }
@media (max-width: 560px) {
	.hero-search__box { flex-wrap: wrap; padding: .5rem; }
	.hero-search__icon { display: none; }
	.hero-search__box input { flex-basis: 100%; padding: 0 .5rem; }
	.hero-search__box .button { flex: 1; }
}

.hero__signin { margin: 1.25rem 0 0; font-size: .95rem; color: #aab2bb; }
.hero__signin a { color: var(--gold-light); font-weight: 600; }
.hero__signin a:hover { color: var(--white); }

/* Home: quick links ------------------------------------------------------- */

.quick-links { background: var(--white); border-bottom: 1px solid var(--line); }
.quick-links__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.quick-link {
	display: grid;
	gap: .3rem;
	padding: 1.6rem 1.5rem;
	color: var(--ink);
	text-decoration: none;
	transition: background-color .15s;
}
.quick-link + .quick-link { border-inline-start: 1px solid var(--line); }
.quick-link:first-child { padding-inline-start: 0; }
.quick-link:hover { background: var(--sand); color: var(--ink); }
.quick-link:first-child:hover { padding-inline-start: 1.5rem; }
.quick-link__title { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.05rem; }
.quick-link__arrow { width: 18px; height: 18px; color: var(--gold-deep); transition: transform .2s var(--ease); }
.quick-link:hover .quick-link__arrow { transform: translateX(3px); }
[dir="rtl"] .quick-link:hover .quick-link__arrow { transform: scaleX(-1) translateX(3px); }
.quick-link__text { color: var(--muted); font-size: .93rem; }
@media (max-width: 700px) {
	.quick-link { padding-inline: 0; }
	.quick-link + .quick-link { border-inline-start: 0; border-top: 1px solid var(--line); }
	.quick-link:first-child:hover, .quick-link:hover { padding-inline: 0; background: none; }
}

/* Sections ---------------------------------------------------------------- */

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section--tight { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.section--sand { background: var(--sand); border-block: 1px solid var(--line); }
.section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}
.section__title { margin: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); }

/* New arrivals shelf */
.shelf-controls { display: flex; gap: .25rem; }
.shelf {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 168px;
	gap: 1.75rem;
	margin: 0;
	padding: .25rem 0 1rem;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}
.book { scroll-snap-align: start; }
.book__link { display: block; color: inherit; text-decoration: none; }
.book__cover {
	display: block;
	aspect-ratio: 2 / 3;
	margin-bottom: .9rem;
	overflow: hidden;
	background: var(--sand);
	border-radius: 3px;
	box-shadow: 0 1px 0 rgb(0 0 0 / 5%), 6px 10px 22px -12px rgb(23 33 43 / 55%);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__link:hover .book__cover { transform: translateY(-4px); box-shadow: 0 1px 0 rgb(0 0 0 / 5%), 8px 18px 30px -14px rgb(23 33 43 / 55%); }
.book__title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.4;
	color: var(--ink);
}
.book__author { display: block; margin-top: .25rem; font-size: .875rem; color: var(--muted); }

/* E-resources */
.resource-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.resource__link {
	display: grid;
	grid-template-rows: auto auto 1fr;
	gap: .35rem;
	height: 100%;
	padding: 1.25rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	color: var(--ink);
	text-decoration: none;
	transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease);
}
.resource__link:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--ink); }
.resource__logo {
	display: grid;
	place-items: center;
	height: 88px;
	margin-bottom: .75rem;
	padding: .5rem;
	border-radius: var(--radius);
	background: var(--paper);
}
.resource__logo img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.resource__initial {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--ink);
	color: var(--gold-light);
	font-family: var(--font-display);
	font-size: 1.5rem;
}
.resource__name { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.resource__ext { width: 17px; height: 17px; margin-top: .15rem; color: var(--muted); }
.resource__link:hover .resource__ext { color: var(--gold-deep); }
.resource__desc { font-size: .9rem; color: var(--muted); }

.resource-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem 1.25rem;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
}
.resource-filter .field--search { flex: 1 1 320px; max-width: 460px; }
.resource-filter .field:not(.field--search) { flex: 0 1 240px; }
.resource-filter__count { margin: 0 0 .7rem; color: var(--muted); font-size: .9rem; }

/* Promo banner */
.promo { display: block; overflow: hidden; border-radius: var(--radius-lg); }
.promo img { width: 100%; transition: transform .5s var(--ease); }
a.promo:hover img { transform: scale(1.015); }

/* FAQ */
.faq-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; }
.faq-split .section__title { margin-bottom: 1rem; }
@media (max-width: 860px) { .faq-split { grid-template-columns: 1fr; } }

.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__q {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.15rem 0;
	color: var(--ink);
	font-weight: 600;
	font-size: 1.05rem;
	line-height: 1.45;
	cursor: pointer;
	list-style: none;
}
.accordion__q::-webkit-details-marker { display: none; }
.accordion__q:hover { color: var(--gold-deep); }
.accordion__icon { width: 20px; height: 20px; margin-top: .15rem; color: var(--gold-deep); transition: transform .2s var(--ease); }
.accordion__item[open] .accordion__icon { transform: rotate(45deg); }
.accordion__a { padding: 0 0 1.35rem; color: var(--muted); font-size: 1rem; max-width: 68ch; }

.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; align-items: start; }
.faq-layout__toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.faq-layout__toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .15rem; }
.faq-layout__toc a { display: block; padding: .45rem .75rem; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.faq-layout__toc a:hover { background: var(--sand); }
.faq-group + .faq-group { margin-top: 3rem; }
.faq-group__title { font-size: 1.5rem; margin-bottom: 1rem; }
@media (max-width: 860px) {
	.faq-layout { grid-template-columns: 1fr; gap: 1.5rem; }
	.faq-layout__toc { position: static; }
	.faq-layout__toc ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
	.faq-layout__toc a { padding: 0; text-decoration: underline; color: var(--gold-deep); }
}

/* News -------------------------------------------------------------------- */

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem 1.75rem; }
.news-card { display: flex; flex-direction: column; }
.news-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	margin-bottom: 1rem;
	border-radius: var(--radius-lg);
	background: var(--ink);
}
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.03); }
.news-card__placeholder { width: 60%; height: 100%; margin-inline: auto; color: var(--gold); opacity: .5; }
.news-card__date { font-size: .875rem; color: var(--muted); }
.news-card__title { margin: .3rem 0 .5rem; font-size: 1.25rem; font-family: var(--font-display); }
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a:hover { color: var(--gold-deep); }
.news-card__excerpt { margin: 0; color: var(--muted); font-size: .95rem; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem; margin-top: 3rem; }
.pager .page-numbers, .pager__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	min-width: 42px;
	height: 42px;
	padding: 0 .75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
}
.pager a.page-numbers:hover, a.pager__link:hover { border-color: var(--ink); color: var(--ink); }
.pager .current, .pager__link.is-current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pager__link .icon { width: 17px; height: 17px; }
.pager__step--prev .icon { transform: scaleX(-1); }
[dir="rtl"] .pager__step--prev .icon { transform: none; }
.pager__gap { padding: 0 .25rem; color: var(--muted); }
.pager__note { flex-basis: 100%; margin: .75rem 0 0; text-align: center; color: var(--muted); font-size: .9rem; }

.link-list { margin: 0; padding: 0; list-style: none; max-width: 760px; }
.link-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.link-list a { font-weight: 600; font-size: 1.1rem; }
.link-list p { margin: .25rem 0 0; color: var(--muted); }

/* Contact ----------------------------------------------------------------- */

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.contact-layout--single { grid-template-columns: minmax(0, 1fr); }
.contact-layout__form { max-width: none; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-card {
	position: sticky;
	top: calc(var(--header-h) + 1.5rem);
	display: grid;
	gap: 1.4rem;
	padding: 1.75rem;
	background: var(--sand);
	border-radius: var(--radius-lg);
}
.contact-card__row { display: grid; grid-template-columns: 22px 1fr; gap: .9rem; }
.contact-card__row .icon { color: var(--gold-deep); margin-top: .2rem; }
.contact-card h2 { margin: 0 0 .2rem; font-family: var(--font-sans); font-size: .95rem; }
.contact-card p { margin: 0; color: var(--muted); }
.contact-card a { color: var(--ink); }
.contact-card__map { width: 100%; height: 240px; border: 0; border-radius: var(--radius); }

/* Profile ----------------------------------------------------------------- */

.profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.profile__card {
	padding: 1.75rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
}
.profile__card h2 { font-size: 1.35rem; }
.profile__me { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.25rem; background: var(--sand); border-color: transparent; }
.profile__me h2 { margin: 0; }
.profile__me p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } }

.saved-list { margin: 0; padding: 0; list-style: none; }
.saved-list__item { display: grid; grid-template-columns: 20px 1fr auto; gap: .75rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.saved-list__item:last-child { border-bottom: 0; }
.saved-list__icon { margin-top: .2rem; color: var(--gold-deep); }
.saved-list__body a { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.saved-list__meta { display: block; font-size: .85rem; color: var(--muted); }

/* 404 --------------------------------------------------------------------- */

.notice-page { position: relative; padding-block: clamp(4rem, 12vw, 8rem); text-align: center; overflow: hidden; }
.notice-page__pattern { width: 200px; height: 200px; margin: 0 auto 2rem; color: var(--gold); opacity: .6; }
.notice-page p { max-width: 50ch; margin-inline: auto; color: var(--muted); }
.notice-page__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Footer ------------------------------------------------------------------ */

.site-footer {
	position: relative;
	overflow: hidden;
	margin-top: auto;
	background: var(--ink);
	color: #b8c0c9;
	font-size: .95rem;
}
.site-footer__pattern {
	position: absolute;
	inset-inline-start: -140px;
	bottom: -180px;
	width: 520px;
	height: 520px;
	color: var(--gold);
	opacity: .14;
}
.site-footer__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: 2.5rem;
	padding-block: clamp(3rem, 6vw, 4.5rem);
}
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer__name { margin-bottom: .75rem; color: var(--white); font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
.site-footer__heading { margin: 0 0 1rem; color: var(--white); font-family: var(--font-sans); font-size: 1rem; font-weight: 600; }
.site-footer a { color: #d7dde3; text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.contact-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.contact-list li { display: grid; grid-template-columns: 20px 1fr; gap: .65rem; align-items: start; }
.contact-list .icon { width: 18px; height: 18px; margin-top: .2rem; color: var(--gold); }
.site-footer__links { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.site-footer__bottom { position: relative; border-top: 1px solid rgb(255 255 255 / 10%); font-size: .85rem; }
.site-footer__bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.25rem; }
.site-footer__bottom p { margin: 0; }

body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }

/* Gravity Forms (Orbital theme) fine-tuning ------------------------------- */

.gform_wrapper.gravity-theme, .gform-theme--foundation { --gf-ctrl-btn-bg-color-primary: var(--ink); }
.gform_wrapper .gform_heading { display: none; }
.prose .gform_wrapper { max-width: 760px; }
.gform-theme--framework .gform_footer .gform_button { min-height: 48px; }

/* Reduced motion ---------------------------------------------------------- */

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

/* Print ------------------------------------------------------------------- */

@media print {
	.site-header, .site-footer, .hero-search, .nav-scrim { display: none !important; }
	body { background: #fff; }
}

/* Narrow phones: keep the header on one line. */
@media (max-width: 440px) {
	.site-header__bar { gap: .75rem; }
	.site-logo { gap: .6rem; }
	.site-logo__img { height: 36px; }
	.site-logo__label { padding-inline-start: .6rem; font-size: 1.05rem; }
	.site-header__menu-btn { padding: .5rem; }
	.site-header__menu-btn span {
		position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
	}
}

/* Shown only when the site is opened by IP address (e.g. staging). */
.host-notice { margin: 0; padding: .6rem var(--gutter); background: var(--gold-wash); color: var(--ink); font-size: .9rem; text-align: center; border-bottom: 1px solid var(--line); }
