/* =========================================================================
   Sanad Blocks - shell styles
   Values measured from the original site (its generated CSS and computed
   styles) rather than eyeballed, so this matches it rather than
   approximating it.
   ========================================================================= */

:root {
	--sanad-text:        #0A0E07;  /* near-black body text                 */
	--sanad-orange:      #FE8534;  /* accent + footer background           */
	--sanad-yellow:      #FCCA46;  /* sidebar rail + card backgrounds      */
	--sanad-cream:       #FFF9EB;  /* page background                      */
	--sanad-gray:        #8C8C8C;  /* muted text                           */
	--sanad-gray-2:      #54595F;  /* secondary gray                       */
	--sanad-rail:        90px;     /* fixed sidebar width                  */
	--sanad-content-max: 1140px;   /* original boxed container width      */
}

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

body {
	background-color: var(--sanad-cream);
	color: var(--sanad-text);
	padding-left: var(--sanad-rail);   /* clears the fixed rail */

	/* Deliberate on production (Customizer CSS): blocks text selection
	   site-wide. Kept per client decision -- note it also prevents
	   copying quotes/citations out of the resource library. */
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	cursor: default;
}

/* RTL: the rail flips to the right-hand edge. */
[dir="rtl"] body,
body.rtl,
html[lang^="ar"] body {
	padding-left: 0;
	padding-right: var(--sanad-rail);
}

/* The previous parent theme reset link underlines site-wide; losing it is why every link (Shelf category cards, announcement titles)
   came back underlined. Restore the reset, but keep an underline on hover so
   links remain discoverable without a mouse-free way to tell them apart. */
a {
	text-decoration: none;
}

a:hover,
a:focus-visible {
	text-decoration: underline;
}

/* Form fields must stay selectable even with user-select disabled. */
input,
textarea,
select,
[contenteditable] {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

/* ---------- Fixed sidebar rail --------------------------------------- */

.sanad-sidebar {
	position: fixed;
	inset-block: 0;
	left: 0;
	z-index: 100;

	width: var(--sanad-rail);
	min-height: 100vh;
	background-color: var(--sanad-yellow);

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	/* Offsets measured on the original at a 900px-tall viewport: wordmark box
	   from 25px, ع/M pinned 51px off the bottom. */
	padding-block: 25px 51px;
	box-sizing: border-box;
	box-shadow: inset 0 0 10.4px 0 rgba(0, 0, 0, 0.43);
}

[dir="rtl"] .sanad-sidebar,
html[lang^="ar"] .sanad-sidebar {
	left: auto;
	right: 0;
}

/* Cream instead of yellow, only where the page background is itself the same
   yellow (currently just Who We Are) -- otherwise the rail disappears into
   the page. Applied via inc/sidebar.php based on which template is active, so
   it stays in sync automatically if another page adopts the full-bleed
   template. Every other page keeps the yellow rail unchanged. */
.sanad-sidebar--on-yellow-bg {
	background-color: var(--sanad-cream);
}

/* Rotated SANAD wordmark. The source asset is a wide black wordmark
   (739x327); constrained to 30px tall and turned 90deg it reads top-to-
   bottom down the rail, exactly as on production. */
.sanad-sidebar__brand {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 90px;       /* vertical room for the rotated wordmark */
	flex: 0 0 auto;
}

.sanad-sidebar__brand img {
	height: 30px;
	width: auto;
	max-width: none;
	object-fit: contain;
	transform: rotate(90deg);
}

.sanad-sidebar__brand-text {
	writing-mode: vertical-rl;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--sanad-text);
}

.sanad-sidebar__nav,
.sanad-sidebar__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Icon rows sit 57px apart on the original, and the group is centred ~12px
   above the midpoint of the free space (hence the bottom margin). */
.sanad-sidebar__nav {
	gap: 21px;
	margin-bottom: 25px;
}

/* ع and M: 39px apart, centre to centre. */
.sanad-sidebar__meta {
	gap: 3px;
}

.sanad-sidebar__lang img {
	display: block;
	width: 13px;
	height: 20px;
}

.sanad-sidebar__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 6px;
	border-radius: 20px;
	color: var(--sanad-text);
	text-decoration: none;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.sanad-sidebar__icon {
	width: 24px;
	height: 24px;
	display: block;
}

.sanad-sidebar__icon--m {
	width: 14px;
	height: 14px;
}

/* Hover + current-page share one treatment. On production the current-page
   state was applied by jQuery comparing href to location.href and writing
   inline styles; here it's resolved server-side (aria-current) so it also
   survives trailing slashes, query strings and pagination. */
.sanad-sidebar__link:hover,
.sanad-sidebar__link:focus-visible,
.sanad-sidebar__link.is-active {
	background-color: var(--sanad-orange);
	color: #FFFFFF;
}

.sanad-sidebar__lang {
	font-size: 22px;
	line-height: 1;
	font-weight: 500;
}

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

/* Geometry measured from the original footer template (post-12): two groups
   pushed apart -- [logo | about] and [links | links] -- each with an 80px
   inner gap; 60px/55px padding. Below 1025px everything stacks in the
   original's order: logo, both link lists, then the about text. */
.sanad-footer {
	margin-top: 0;
	padding: 60px 55px;
	background-color: var(--sanad-orange);
	color: #FFFFFF;
}

.sanad-footer a {
	color: inherit;
	text-decoration: none;
}

.sanad-footer a:hover,
.sanad-footer a:focus-visible {
	text-decoration: underline;
}

.sanad-footer__inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
}

.sanad-footer__group {
	display: flex;
	align-items: flex-start;
	gap: 80px;
}

.sanad-footer__logo {
	display: block;
	flex: 0 0 238px;
	height: 110px;
}

.sanad-footer__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.sanad-footer__about {
	flex: 0 0 278px;
}

.sanad-footer__about p {
	margin: 0;
	font-size: 20px;
	line-height: 22px;
}

.sanad-footer__about .sanad-footer__email {
	margin-top: 20px;
	font-size: 16px;
	line-height: 24px;
}

.sanad-footer__email a {
	text-decoration: underline;
}

.sanad-footer__nav {
	flex: 0 0 207px;
}

.sanad-footer__nav--resources {
	flex-basis: 238px;
}

.sanad-footer__links {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 18px;
	line-height: 27px;
	color: var(--sanad-cream);
}

/* ---------- Homepage --------------------------------------------------- */
/* Measured from the original at 1440px: a 1140px top row (title + the text
   pages' search pill), then an 800px / 40px / 400px grid inset 55px from the
   rail, cards starting 213px down. */

.sanad-main {
	max-width: 1560px;
	margin-inline: auto;
	padding: 34px 40px 60px;
	box-sizing: border-box;
}

/* <main> is a flow-layout group, which spaces its children 24px apart. */
.sanad-main--home > * {
	margin-block: 0;
}

.sanad-home-top {
	box-sizing: border-box;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	width: min(1140px, 100% - 20px);
	margin-inline: auto;
	padding: 20px 10px 20px;
}

.sanad-home-top__title {
	margin: 0;
	font-size: 40px;
	line-height: 40px;
	font-weight: 600;
	font-style: italic;
	color: var(--sanad-text);
}

.sanad-home-top__title span {
	font-weight: 400;
	color: #606060;
}

/* The shared search bar, sized as the original's 550px widget. */
.sanad-home-top .sanad-searchbar {
	flex: 0 1 550px;
	width: auto;
	margin: 0;
	padding: 0;
}

/* Two-column body: featured publication (2fr) + announcements (1fr). */
.sanad-home-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	column-gap: 40px;
	align-items: start;
	padding: 50px 55px;
}

.sanad-section-title {
	margin: 0 0 5px;
	font-size: 28px;
	line-height: 25px;
	font-weight: 600;
	font-style: italic;
	color: var(--sanad-text);
}

.sanad-home-col--announcements .sanad-section-title {
	font-size: 32px;
}

.sanad-section-sub {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 33px;
	font-style: italic;
	color: var(--sanad-text);
}

/* Featured publication card: 1px outline, 12px radius, 24px yellow stripe. */
.sanad-featured {
	display: flex;
	border: 1px solid var(--sanad-text);
	border-radius: 12px;
	overflow: hidden;
	background-color: var(--sanad-cream);
}

.sanad-featured__stripe {
	flex: 0 0 24px;
	background-color: var(--sanad-yellow);
}

.sanad-featured__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 60px 0;
	text-align: center;
	color: #7A7A7A;
}

.sanad-featured__icon {
	display: block;
	width: 50px;
	height: 50px;
	margin: 0 auto 30px;
}

/* Title keeps the original's size, colour and glow; only the font changed
   (the pasted 'Fira Sans Condensed' was never loaded -- per client decision
   it uses Karol Sans instead of falling back to Times). */
.sanad-featured__title {
	margin: 0 0 55px;
	font-size: 36px;
	line-height: 54px;
	font-weight: 700;
	color: #404040;
	text-shadow: rgba(0, 0, 0, 0.3) 0 0 10px;
}

.sanad-featured__date {
	margin: 0 0 39px;
	font-size: 28px;
	line-height: 33.6px;
}

.sanad-featured__desc {
	margin: 0 0 14.4px;
	font-size: 16px;
	line-height: 24px;
}

/* Announcements column: the [custom_slider] carousel renders inside here
   (markup in custom_slider_slide() / custom_slider_shortcode(),
   inc/legacy-functions.php). Values measured from the original. */
.sanad-announcements {
	position: relative;
}

/* Slide = a column of up to three announcement cards. */
.sanad-announcements .sanad-ann-list {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* Card: 1px outline, 12px radius, coloured stripe down the leading edge. */
.sanad-announcements .sanad-ann {
	display: flex;
	flex-direction: row;
	gap: 10px;
	min-width: 0;
	width: 100%;
	margin-bottom: 25px;
	border: 1px solid #333333;
	border-radius: 12px;
	overflow: hidden;
	box-sizing: border-box;
	font-size: 16px;
	line-height: 24px;
	color: #333333;
}

/* Accent stripe. Its colour is set inline from the announcement's `color`
   field, so only geometry is defined here. */
.sanad-announcements .sanad-ann__stripe {
	flex: 0 0 20px;
	align-self: stretch;
	border-radius: 12px 0 0 12px;
}

[dir="rtl"] .sanad-announcements .sanad-ann__stripe {
	border-radius: 0 12px 12px 0;
}

.sanad-announcements .sanad-ann__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding: 10px;
}

/* Icon + title row */
.sanad-announcements .sanad-ann__head {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.sanad-announcements .sanad-ann__icon svg,
.sanad-announcements img.custom-slider-image {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.sanad-announcements .sanad-ann__title {
	margin: 0;
	font-family: "Karol Sans", sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 24px;
	color: var(--sanad-gray-2);
}

.sanad-announcements .sanad-ann__title a {
	color: inherit;
	text-decoration: none;
	text-transform: uppercase;
}

.sanad-announcements .sanad-ann__title a:hover {
	color: #000000;
}

/* Category label (orange) */
.sanad-announcements .sanad-ann__category {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 16px;
	color: var(--sanad-orange);
}

/* Author line (only when an author is passed). */
.sanad-announcements .sanad-ann__author {
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	text-transform: capitalize;
}

/* Excerpt: italic grey. The extra 4px top margin stands in for the empty
   author row the original always rendered between category and excerpt. */
.sanad-announcements .sanad-ann__excerpt {
	margin: 4px 0 0;
	font-size: 14px;
	font-weight: 400;
	font-style: italic;
	line-height: 2;
	color: var(--sanad-gray);
}

/* Prev / next: dark circular buttons with yellow arrows. */
.sanad-announcements .custom-slider-arrows {
	position: static;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	width: auto !important;
	height: auto !important;
	margin-top: 0;
	padding: 4px 7px;
}

/*
 * The arrow buttons carry Swiper's own "swiper-button-prev"/"-next" classes
 * (Swiper's navigation finds them by those), and swiper-bundle.min.css sets
 * those to position:absolute; top:50% of the nearest positioned ancestor --
 * the whole column -- which floated them over the middle of the carousel.
 */
.sanad-announcements .custom-slider-arrows .swiper-button-prev,
.sanad-announcements .custom-slider-arrows .swiper-button-next {
	position: static !important;
	top: auto !important;
	margin-top: 0 !important;
	width: auto !important;
	height: auto !important;
}

.sanad-announcements .sanad-ann-arrow {
	padding: 9px;
	border-radius: 100px;
	background-color: var(--sanad-text);
	line-height: 0;
}

/* A 14px square icon box inside 9px of padding: a 32px circle, as on the
   original. */
.sanad-announcements .sanad-ann-arrow a {
	display: block;
	width: 14px;
	height: 14px;
	font-size: 14px;
	line-height: 14px;
	text-align: center;
	color: var(--sanad-yellow);
}

.sanad-announcements .sanad-ann-arrow i {
	display: block;
	line-height: 14px;
}

/* Only the arrow glyph (the <a>) dims at either end; the dark circle around
   it stays solid. Swiper's own .swiper-button-disabled would fade the whole
   button, which the original never did. */
.sanad-announcements .custom-slider-arrows a.disabled {
	pointer-events: none;
	opacity: 0.4;
}

.sanad-announcements .custom-slider-arrows .swiper-button-disabled {
	opacity: 1;
}

/* ---------- The Sanad Shelf: listing / search ------------------------- */
/* Header strip, then a 183px filter column and the results column -- 992px
   at 1440, exactly five 184px cards with 18px gaps -- as on the original. */

.sanad-content.sanad-pagehead--compact {
	padding: 26px 55px;
}

.sanad-shelf__body {
	display: grid;
	grid-template-columns: 183px minmax(0, 1fr);
	column-gap: 55px;
	align-items: start;
	padding: 40px 55px 40px 65px;
}

/* 24px orange circle; on the original it links to the homepage. Block-level
   flex so it never sits on a text baseline. */
.sanad-shelf__back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-bottom: 7px;
	border-radius: 50%;
	background-color: var(--sanad-orange);
	color: #FFFFFF;
	text-decoration: none;
}

[dir="rtl"] .sanad-shelf__back svg {
	transform: rotate(180deg);
}

/* The [knowledge_filters] shortcode emits a flat <form> of
   .knowledge-taxonomy-block groups; stack them into a sidebar panel.
   .knowledge-taxonomy-block / .label_flex already carry base styling from
   the Customizer CSS, so only the column layout is added here. */
.sanad-shelf__filters .knowledge-filter-form {
	display: flex;
	flex-direction: column;
}

.sanad-shelf__filters .knowledge-taxonomy-block strong {
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
}

.sanad-shelf__filters .label_flex {
	font-size: 14px;
	line-height: 24px;
	cursor: pointer;
}

/* Search + sort row above the grid. */
.sanad-shelf__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
}

.sanad-shelf__search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 0 1 714px;
	height: 40px;
	border-radius: 20px;
	background-color: rgba(96, 96, 96, 0.05);
}

.sanad-shelf__search svg {
	position: absolute;
	left: 13px;
	color: #292C27;
	pointer-events: none;
}

[dir="rtl"] .sanad-shelf__search svg {
	left: auto;
	right: 13px;
}

.sanad-shelf__search input[type="search"] {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 20px;
	background: transparent;
	padding: 0 0 0 40px;
	font: inherit;
	font-size: 15px;
	color: #000000;
}

[dir="rtl"] .sanad-shelf__search input[type="search"] {
	padding: 0 40px 0 0;
}

.sanad-shelf__search input[type="search"]::placeholder {
	color: var(--sanad-gray);
}

.sanad-shelf__sort .sort_by_dropdown {
	gap: 10px;
}

/* Card icons: the original page CSS fixed them at 43px tall. */
.sanad-shelf .post-thumbnail img {
	width: auto;
	max-width: 100%;
	height: 43px;
	object-fit: contain;
}

@media (max-width: 1024px) {
	.sanad-shelf__body {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 10px;
	}

	/* 18.549% is a 5-up grid; relax it on tablets. */
	.knowledge-post {
		max-width: calc(50% - 9px) !important;
	}
}

@media (max-width: 767px) {
	.sanad-content.sanad-pagehead--compact {
		padding: 30px 10px;
	}

	.sanad-content.sanad-pagehead--compact .sanad-pagehead__title {
		padding-inline-start: 50px;
	}

	.sanad-shelf__body {
		padding: 30px 20px 40px;
	}

	.sanad-shelf__filters {
		max-width: 305px;
		padding: 0 10px;
	}

	.sanad-shelf__toolbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	.sanad-shelf__search {
		flex: none;
		width: 72%;
	}

	/* One card per row on phones. */
	.sanad-shelf .knowledge-post {
		max-width: 100% !important;
	}
}

/* ---------- Mobile menu (hamburger + full-screen overlay) ------------- */
/* Reproduces the [custom_popup] shortcode used in production's header
   template: a hamburger button that opens a full-screen yellow overlay with
   the logo, the same three nav destinations (this time icon + label, in a
   column), and the language/Moltaqa links. Rebuilt as a semantic block
   (inc/sidebar.php) sharing the same $nav data as the desktop rail, rather
   than kept as its own uniqid()-scoped shortcode instance. */

/* Original: a 44px yellow circle pinned to the top-left of the page
   (position:absolute, so it scrolls away with the content, not fixed). */
.sanad-mobile-menu-button {
	display: none;              /* shown only <=1024px, see above */
	position: absolute;
	top: 0;
	left: 10px;
	z-index: 100001;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	/* It's a direct child of .wp-site-blocks, which would otherwise give it
	   core's 24px block-gap margin. */
	margin: 0 !important;
	padding: 10px;
	border: 0;
	border-radius: 50%;
	background-color: var(--sanad-yellow);
	cursor: pointer;
}

[dir="rtl"] .sanad-mobile-menu-button {
	left: auto;
	right: 10px;
}

.sanad-mobile-menu-button svg {
	width: 22px;
	height: 14px;
}

.sanad-mobile-menu {
	position: fixed;
	inset: 0;
	/* Direct child of .wp-site-blocks: cancel core's 24px block-gap margin. */
	margin: 0 !important;
	z-index: 100002;
	display: none;
	background-color: rgba(0, 0, 0, 0.6);
}

.sanad-mobile-menu.is-open {
	display: flex;
}

/* Measured from the original overlay: full-screen rail yellow, logo 202px
   down, three icon-over-label items ~92px apart, then ع / M. */
.sanad-mobile-menu__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 202px 24px 40px;
	box-sizing: border-box;
	overflow-y: auto;
	background-color: var(--sanad-yellow);
}

.sanad-mobile-menu__close {
	position: absolute;
	top: 10px;
	right: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #000000;
	cursor: pointer;
}

[dir="rtl"] .sanad-mobile-menu__close {
	right: auto;
	left: 15px;
}

.sanad-mobile-menu__close svg {
	width: 30px;
	height: 30px;
}

.sanad-mobile-menu__logo img {
	display: block;
	width: auto;
	height: 43px;
}

.sanad-mobile-menu__nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 34px;
	margin-top: 84px;
}

.sanad-mobile-menu__nav a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	font-size: 18px;
	line-height: 21.6px;
	font-weight: 500;
	color: #000000;
}

.sanad-mobile-menu__nav svg {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
}

.sanad-mobile-menu__nav a.is-active {
	color: var(--sanad-orange);
}

.sanad-mobile-menu__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 27px;
	margin-top: 100px;
}

.sanad-mobile-menu__meta a {
	display: flex;
	color: var(--sanad-text);
	font-size: 20px;
	line-height: 26px;
}

.sanad-mobile-menu__meta svg {
	width: 26px;
	height: 26px;
}

/* ---------- Resource detail popup ------------------------------------ */
/* Values recovered from the original popup template CSS. */

.loop_knowledge {
	width: 100%;
}

.loop_knowledge h3.post-title {
	font-size: 15px;
	min-width: 154px;
}

/* Sit above the fixed sidebar rail (z-index 100) and anything else. The base
   rule in legacy-functions uses 9999; raised here so no future overlay can
   slip on top of an open panel. */
#postPopup {
	z-index: 100000 !important;
}

/* Opaque, NOT the #00096A9E (62% alpha) from the legacy inline styles. With
   the alpha version the boundary between .top_row_pop (#F0EADD) and the panel
   background (#FFF9EB) reads straight through the tile as a hairline crossing
   it. #5b5f96 is exactly that colour composited, so it looks identical while
   hiding the seam. */
.popup-thumbnail {
	background-color: #5b5f96 !important;
	z-index: 3;
}

.popup-thumbnail img {
	height: 100%;
	width: 34%;
	min-width: 60px;
	object-fit: contain;
}

/* Font Awesome fallback (<i class="fas fa-book">) when a resource has neither
   a featured image nor a category image -- scale it to match the img above
   instead of leaving it at the inherited ~16px. */
.popup-thumbnail i {
	font-size: 96px;
	line-height: 1;
	color: #FFFFFF;
}

/* Loading state: the panel opens instantly on click and shows a spinner until
   the AJAX content lands, so a slow response no longer looks like a dead click. */
#postPopup.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border: 3px solid rgba(254, 133, 52, 0.25);
	border-top-color: var(--sanad-orange);
	border-radius: 50%;
	animation: sanad-spin 0.8s linear infinite;
}

@keyframes sanad-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Respect users who've asked for reduced motion: keep the affordance, drop
   the spin. */
@media (prefers-reduced-motion: reduce) {
	#postPopup.is-loading::after {
		animation: none;
		border-top-color: rgba(254, 133, 52, 0.25);
		opacity: 0.6;
	}
}

/* ---------- Static pages --------------------------------------------- */
/* Who We Are, Contact, Privacy, Terms, FAQ, Peer Support, Shelf landing.
   Every value here was measured from the original site's computed styles
   (1440px and 390px viewports), not estimated. */

/* .sanad-main--full / .sanad-page--full: no max-width or padding on <main>,
   so each page's own markup controls its geometry (full-bleed yellow field,
   full-width header strips, the 1140px reading column). */
/* Doubled class so the responsive `.sanad-main { padding }` rule further down
   can't re-pad a full-bleed page on tablets and phones. */
.sanad-main.sanad-main--full {
	max-width: none;
	/* The original's content area was at least one screen tall, so on short
	   pages (Contact, the Shelf landing) the footer starts below the fold. */
	min-height: 100vh;
	padding: 0;
	/* <main> follows the sidebar block as a sibling under .wp-site-blocks, and
	   core's flow layout gives every such sibling a margin-top -- that's the
	   cream sliver that showed above the content. */
	margin-block-start: 0 !important;
}

.sanad-page--full {
	max-width: none;
}

/* WordPress's core "flow" layout (appearanceTools:true in theme.json) injects
   margin-block-start between direct children of .entry-content via a
   `> * + *` selector, by raw DOM adjacency. Zeroed so the page markup's own
   spacing is the only spacing. */
.sanad-page--full .entry-content > * {
	margin-block: 0 !important;
}

/* Same mechanism at the root: .wp-site-blocks puts that gap between <main>
   and the footer template part. */
.sanad-main--full + * {
	margin-block-start: 0 !important;
}

/* Base type. The original inherited it from its parent theme's reset plus
   its global type settings: 16px/1.5 Karol Sans, p 0 0 .9rem, headings 500/1.2 with
   .5rem/1rem margins. Restated here, scoped to page content, because theme.json's
   global element styles (600-weight headings, 1.6 line-height) differ. */
.sanad-content {
	font-size: 16px;
	line-height: 1.5;
	color: var(--sanad-text);
}

.sanad-content p {
	margin: 0 0 0.9rem;
}

.sanad-content :is(h1, h2, h3, h4, h5, h6) {
	margin: 0.5rem 0 1rem;
	font-weight: 500;
	font-style: normal;
	line-height: 1.2;
	color: inherit;
}

.sanad-content h1 { font-size: 2.5rem; }
.sanad-content h2 { font-size: 2rem; }
.sanad-content h3 { font-size: 1.75rem; }
.sanad-content h4 { font-size: 1.5rem; }
.sanad-content h5 { font-size: 1.25rem; }
.sanad-content h6 { font-size: 1rem; }

.sanad-hl {
	color: var(--sanad-orange);
}

/* ---- Who We Are: cream panels on a full-bleed yellow field ---- */

.sanad-panels {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 60px 90px;
	background-color: var(--sanad-yellow);
}

.sanad-panels__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.sanad-panel {
	min-width: 0;
	padding: 30px 0;
	border-radius: 12px;
	background-color: var(--sanad-cream);
}

.sanad-panel--support {
	padding-bottom: 40px;
}

.sanad-panel--wide {
	padding-bottom: 20px;
}

.sanad-content .sanad-panel__title {
	margin: 0 0 20px;
	padding: 0 35px 5px;
	border-bottom: 1px solid rgba(96, 96, 96, 0.25);
	font-size: 40px;
	line-height: 65px;
	font-style: italic;
	color: #000000;
}

.sanad-panel__body {
	padding: 0 35px;
	font-size: 18px;
	line-height: 27px;
}

.sanad-panel__body p {
	margin: 0;
}

/* Consecutive blocks on the original were spaced by a 20px gap. */
.sanad-stack {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* "Our Approach" icon boxes: icon beside the text. */
.sanad-feature {
	display: flex;
	align-items: flex-start;
	gap: 35px;
}

.sanad-feature > svg {
	flex: 0 0 24px;
}

.sanad-content .sanad-feature__title {
	margin: 0;
	font-size: 18px;
	line-height: 21.6px;
	font-weight: 600;
	color: var(--sanad-orange);
}

/* Yellow label ("Activities", "How We Take Action"). Top margin is 30, not
   10: it collapses with the title's 20px bottom margin. */
.sanad-content .sanad-pill {
	width: fit-content;
	margin: 30px 0 30px;
	padding: 4px 13px;
	border-radius: 7px;
	background-color: var(--sanad-yellow);
	font-size: 28px;
	line-height: 28px;
	font-weight: 300;
	color: #2A2A2A;
}

.sanad-content .sanad-pill--outdent {
	margin: 20px 0 40px;
	margin-inline-start: -10px;
	color: #000000;
}

.sanad-intro {
	max-width: 937px;
}

.sanad-closing {
	max-width: 1101px;
}

/* An initiative: long-arrow heading, indented copy, orange-dot list, ↗ link. */
.sanad-initiative {
	margin-top: 20px;
}

.sanad-content .sanad-arrowhead {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	margin: 0 0 4px;
	padding-inline-start: 5px;
	font-size: 25px;
	line-height: 37.5px;
	font-weight: 600;
	font-style: italic;
	color: #000000;
}

.sanad-arrowhead svg {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
}

/* Copy and list indent separately: on phones the original pulls the copy in
   to 10px but keeps the list at 35px. */
.sanad-initiative__body > p {
	padding-inline-start: 35px;
}

.sanad-initiative .sanad-dots {
	margin-inline-start: 35px;
}

.sanad-dots {
	margin: 20px 0 0;
	margin-inline-end: 80px;
	padding: 0;
	list-style: none;
	font-size: 18px;
	line-height: 25px;
	color: #000000;
}

.sanad-dots li {
	position: relative;
	padding-inline-start: 25px;
}

.sanad-dots li + li {
	margin-top: 5px;
}

.sanad-dots li::before {
	content: "";
	position: absolute;
	top: 9px;
	inset-inline-start: 0;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background-color: var(--sanad-orange);
}

.sanad-dots strong {
	font-weight: 600;
}

.sanad-content .sanad-cta {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 24px;
	margin: 20px 0 0;
	padding-inline-start: 34px;
	font-size: 18px;
	line-height: 18px;
	font-weight: 600;
	color: var(--sanad-orange);
}

.sanad-cta svg {
	flex: 0 0 16px;
}

.sanad-cta a {
	color: inherit;
}

/* "Support Our Work" uses the smaller 16px text-editor style. */
.sanad-panel--support .sanad-panel__body {
	padding: 0 0 0 40px;
	font-size: 16px;
	line-height: 24px;
}

.sanad-panel--support ul {
	margin: 15px 0 0;
	padding-inline-start: 95px;
}

.sanad-content .sanad-textlink {
	margin: 20px 0 0;
	font-size: 18px;
	line-height: 18px;
}

.sanad-textlink a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 24px;
	color: var(--sanad-text);
}

.sanad-textlink svg {
	width: 16px;
	height: 18px;
}

/* ---- Text pages: Terms, Privacy, FAQ ---- */

/* Search bar at the head of the page: a 515px pill right-aligned in the
   1140px column (the original widget was 550px with 35px start padding). */
.sanad-searchbar {
	box-sizing: border-box;
	display: flex;
	justify-content: flex-end;
	width: min(1140px, 100% - 20px);
	margin-inline: auto;
	padding: 20px 10px 0;
}

.sanad-searchbar__form {
	display: flex;
	width: 515px;
	max-width: calc(100% - 35px);
	height: 50px;
	overflow: hidden;
	border-radius: 39px;
	background-color: rgba(84, 89, 95, 0.09);
}

.sanad-searchbar__form:focus-within {
	outline: 2px solid var(--sanad-orange);
	outline-offset: 2px;
}

.sanad-searchbar__input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0 16.67px;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	line-height: 15px;
	color: #484646;
	-webkit-appearance: none;
	appearance: none;
}

.sanad-searchbar__input:focus {
	outline: none;
}

.sanad-searchbar__submit {
	display: flex;
	flex: 0 0 50px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background-color: rgba(84, 89, 95, 0.09);
	color: #FFFFFF;
	cursor: pointer;
}

/* The reading column: 1140px, the original's boxed-container width. */
/* Spacing is padding, not margin: page content's direct children have their
   block margins zeroed (see .sanad-page--full above). */
.sanad-doc {
	box-sizing: border-box;
	width: min(1140px, 100% - 20px);
	margin-inline: auto;
	padding: 30px 0 10px;
	color: #000000;
}

.sanad-content .sanad-doc__title {
	font-size: 32px;
	line-height: 38.4px;
	font-weight: 400;
	color: #000000;
}

/* The original's base text colour was the kit grey; only the words were
   wrapped in black spans, so list markers stayed grey. */
.sanad-doc__updated,
.sanad-doc li::marker {
	color: #7A7A7A;
}

/* Links in running text: the original Terms/Privacy pages' own rule
   (underlined, 600) on the site-wide black link colour. */
.sanad-doc a {
	color: #000000;
	font-weight: 600;
	text-decoration: underline;
}

/* FAQ: title, italic group labels, bordered accordions -- spaced by the kit's
   20px widget gap, plus the 25px spacers between groups. */
.sanad-doc.sanad-doc--faq {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-bottom: 100px;
}

.sanad-content .sanad-faq-group {
	margin: 0;
	font-size: 14px;
	line-height: 12px;
	font-weight: 700;
	font-style: italic;
	color: #000000;
}

.sanad-content .sanad-faq-group--spaced {
	margin-top: 45px;
}

.sanad-faq__q {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid #D5D8DC;
	color: #1F2124;
	list-style: none;
	cursor: pointer;
}

.sanad-faq__q::-webkit-details-marker {
	display: none;
}

/* The original filled its chevron paths, so they read as solid triangles:
   ▲ closed, ▼ open. */
.sanad-faq__icon {
	flex: 0 0 12px;
	fill: #000000;
}

.sanad-faq__icon--open,
.sanad-faq__item[open] .sanad-faq__icon--closed {
	display: none;
}

.sanad-faq__item[open] .sanad-faq__icon--open {
	display: block;
}

.sanad-faq__a {
	padding: 20px;
	border: 1px solid #D5D8DC;
	color: #7A7A7A;
}

.sanad-doc--faq .sanad-faq__a a {
	font-weight: 400;
	text-decoration: none;
}

.sanad-faq-cta {
	margin: 80px 27.5px 0;
	text-align: center;
	color: #000000;
}

/* "Didn't find…" is followed by an empty line in the original (an h4 holding
   only a non-breaking space), hence the deep bottom margin. */
.sanad-content .sanad-faq-cta__title {
	margin: 0.5rem 0 60.8px;
	font-size: 24px;
	line-height: 28.8px;
	font-weight: 700;
}

.sanad-content .sanad-faq-cta__text {
	margin: 0 0 1rem;
	font-size: 24px;
	line-height: 28.8px;
}

.sanad-content .sanad-faq-cta__link {
	margin: 36px 0 0;
	font-size: 28px;
	line-height: 28px;
	font-weight: 600;
}

.sanad-faq-cta__link a {
	text-decoration: none;
}

/* ---- Header strip: Contact, Shelf landing ---- */

.sanad-pagehead {
	padding: 40px 55px;
	border-bottom: 1px solid var(--sanad-text);
}

.sanad-content .sanad-pagehead__title {
	margin: 0;
	font-size: 40px;
	line-height: 40px;
	font-weight: 600;
	font-style: italic;
	color: var(--sanad-text);
}

.sanad-pagehead__title span {
	font-weight: 400;
	color: #606060;
}

.sanad-content.sanad-pagehead--intro .sanad-pagehead__title {
	margin-bottom: 20px;
}

.sanad-content .sanad-pagehead__lead {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
}

.sanad-content .sanad-pagehead__lead p,
.sanad-content .sanad-pagehead__intro p {
	margin: 0;
	font-size: 18px;
	line-height: 24px;
}

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

.sanad-contact {
	padding: 40px 55px 0;
}

.sanad-content .sanad-contact__lead {
	margin: 0 0 50px;
	font-size: 48px;
	line-height: 48px;
	font-weight: 700;
	color: var(--sanad-text);
}

/* On the original the parent theme's `input[type=email]` padding outranked
   the form's own `.textarea-field { padding: 8px 0 }`; base-reset.css is
   zero-specificity, so that outcome is restated here. */
.form-container input[type="email"] {
	padding: 8px 16px;
}

/* ---- Sanad Shelf landing ---- */

/* Left-icon search pill under the header strip. */
.sanad-searchbar.sanad-searchbar--shelf {
	justify-content: flex-start;
	width: auto;
	padding: 30px 55px 0;
}

.sanad-searchbar--shelf .sanad-searchbar__form {
	width: 558px;
	max-width: 100%;
	height: 40px;
	border-radius: 20px;
	background-color: rgba(96, 96, 96, 0.05);
}

.sanad-searchbar--shelf .sanad-searchbar__submit {
	order: -1;
	flex-basis: 40px;
	background-color: transparent;
	color: #292C27;
}

.sanad-searchbar--shelf .sanad-searchbar__submit svg {
	width: 14px;
	height: 14px;
}

.sanad-searchbar--shelf .sanad-searchbar__input {
	padding: 0;
	color: #000000;
}

.sanad-shelf-landing {
	padding: 30px 55px 40px;
}

/* The original page CSS turned each card row into a single horizontally
   scrolling strip (post-249: flex-wrap unset; overflow-x scroll). */
.sanad-shelf-landing .taxonomy-terms-wrapper {
	flex-wrap: nowrap;
	overflow-x: scroll;
}

/* ---- Peer Support & Accompaniment ---- */

.sanad-peer {
	padding: 20px 34px 20px 70px;
	font-size: 18px;
	line-height: 27px;
}

.sanad-peer .sanad-initiative {
	margin-top: 0;
}

/* The original separated these paragraphs with empty lines (blank <p>s);
   reproduced as margins: one 27px line between paragraphs, 31px after a list
   (the 20px widget gap plus the blank line, less the editor's -16px offset). */
.sanad-peer .sanad-initiative__body > p {
	margin: 0;
}

.sanad-peer .sanad-initiative__body > p + p {
	margin-top: 27px;
}

.sanad-peer .sanad-initiative__body > ul + p {
	margin-top: 31px;
}

.sanad-peer .sanad-initiative__body > p.sanad-tight {
	margin-top: 0;
}

.sanad-initiative .sanad-dots--narrow {
	max-width: 675px;
}

/* Directional icons point the reading direction in Arabic. */
[dir="rtl"] .sanad-arrowhead svg,
[dir="rtl"] .sanad-cta svg,
[dir="rtl"] .sanad-textlink svg {
	transform: scaleX(-1);
}

@media (max-width: 767px) {
	.sanad-panels {
		gap: 10px;
		padding: 20px 15px;
	}

	.sanad-panels__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.sanad-panel {
		padding: 20px 10px;
	}

	.sanad-content .sanad-panel__title {
		padding: 0 0 0 10px;
	}

	.sanad-panel__body {
		padding: 0 10px;
	}

	/* "What We Do" content runs to the card edge on phones. */
	.sanad-panel--wide .sanad-panel__body {
		padding: 0;
	}

	.sanad-content .sanad-pill,
	.sanad-content .sanad-pill--outdent {
		margin: 20px 0;
		margin-inline-start: 15px;
	}

	.sanad-intro,
	.sanad-closing {
		padding-inline-start: 20px;
	}

	.sanad-initiative__body > p {
		padding-inline: 10px;
	}

	.sanad-dots {
		margin-inline-end: 0;
	}

	/* The original's link column is ~266px wide on phones, so these links
	   wrap onto two lines there; match the measure rather than the content. */
	.sanad-content .sanad-cta {
		padding-block: 2px;
		padding-inline-end: 16px;
	}

	.sanad-panel--support .sanad-panel__body {
		padding: 0 10px;
	}

	.sanad-panel--support ul {
		padding-inline-start: 40px;
	}

	.sanad-searchbar {
		padding-top: 40px;
	}

	.sanad-faq-cta {
		margin-inline: 10px;
	}

	.sanad-pagehead {
		padding: 40px 10px 30px;
	}

	.sanad-content .sanad-pagehead__title {
		font-size: 28px;
		line-height: 28px;
	}

	/* The Shelf header starts higher and indents its title past the menu
	   button. */
	.sanad-pagehead.sanad-pagehead--intro {
		padding: 20px 10px 30px;
	}

	.sanad-content.sanad-pagehead--intro .sanad-pagehead__title {
		padding-inline-start: 50px;
	}

	.sanad-contact {
		padding: 40px 10px 0;
	}

	.sanad-content .sanad-contact__lead {
		margin-bottom: 40px;
	}

	.sanad-searchbar.sanad-searchbar--shelf {
		padding: 30px 10px 0;
	}

	.sanad-shelf-landing {
		padding: 30px 10px 50px;
	}

	.sanad-shelf-landing .taxonomy-term {
		width: max-content !important;
	}

	.sanad-peer {
		padding: 20px;
	}
}

/* ---------- Layout helpers ------------------------------------------- */

.sanad-container {
	max-width: var(--sanad-content-max);
	margin-inline: auto;
	padding-inline: 24px;
}

/* Skip link must never be trapped behind the fixed rail. */
.skip-link:focus {
	z-index: 200;
}

/* ---------- Responsive ------------------------------------------------ */

/* Below the tablet breakpoint the rail is hidden and the menu button shows. */
@media (max-width: 1024px) {
	/*
	 * Production doesn't turn the rail into a bottom bar -- it hides the rail
	 * entirely below this breakpoint and replaces it with a fixed hamburger
	 * button (top:20px, left:10px on the original's own custom CSS) that opens
	 * a full-screen overlay. That overlay is its own always-visible-in-DOM
	 * block below; only the trigger button and the rail's visibility toggle
	 * live in this media query.
	 */
	body,
	[dir="rtl"] body,
	body.rtl,
	html[lang^="ar"] body {
		padding-left: 0;
		padding-right: 0;
	}

	.sanad-sidebar {
		display: none;
	}

	.sanad-mobile-menu-button {
		display: flex;
	}

	/* Footer stacks: logo, both link lists, then the about text. The two
	   groups dissolve (display:contents) so their children can be ordered. */
	.sanad-footer {
		padding: 20px;
	}

	.sanad-footer__inner {
		flex-direction: column;
		gap: 40px;
	}

	.sanad-footer__group {
		display: contents;
	}

	.sanad-footer__logo {
		order: 1;
		flex: none;
		height: 168px;
	}

	.sanad-footer__logo img {
		width: auto;
	}

	.sanad-footer__nav {
		order: 2;
		flex: none;
	}

	.sanad-footer__about {
		order: 3;
		flex: none;
	}

	.sanad-main {
		padding: 28px 24px 48px;
	}

	/* One markup tree plus a breakpoint (the original duplicated sections
	   per screen size).
	   minmax(0, 1fr), not 1fr: a bare 1fr track has an automatic minimum,
	   which let the Swiper carousel inside grow the column to the browser's
	   16.7M px width limit on phones. */
	.sanad-home-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.sanad-footer__logo {
		height: 103px;
	}

	/* Homepage, phones: title (clear of the menu button) above a full-width
	   search; then the original's fixed 325px column, centred. */
	.sanad-home-top {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		width: auto;
		padding: 20px 20px 0;
	}

	.sanad-home-top__title {
		padding-inline-start: 50px;
		font-size: 28px;
		line-height: 28px;
	}

	.sanad-home-top .sanad-searchbar {
		flex: none;
	}

	.sanad-home-top .sanad-searchbar__form {
		width: 100%;
		max-width: none;
	}

	.sanad-home-grid {
		width: 325px;
		max-width: 100%;
		margin-inline: auto;
		padding: 40px 10px 50px;
	}

	.sanad-section-title {
		margin-bottom: 20px;
		padding-inline-start: 10px;
	}

	.sanad-section-sub {
		padding-inline-start: 10px;
	}

	/* No outline on phones: the yellow stripe becomes a bar across the top. */
	.sanad-featured {
		flex-direction: column;
		border: 0;
		border-radius: 0;
	}

	.sanad-featured__stripe {
		flex-basis: 20px;
	}

	.sanad-featured__body {
		padding: 40px 20px 36px;
	}

	/* Announcement cards: colour stripe across the top. */
	.sanad-announcements .sanad-ann {
		flex-direction: column;
		gap: 0;
	}

	.sanad-announcements .sanad-ann__stripe,
	[dir="rtl"] .sanad-announcements .sanad-ann__stripe {
		flex-basis: 10px;
		border-radius: 12px 12px 0 0;
	}
}
