.mena-fatwas-archive,
.mena-fatwa-single {
	max-width: 1000px;
	margin: 0 auto;
	padding: 40px 20px;
}

.mena-fatwa-single {
	padding-top: 0;
}

.mena-fatwa-banner {
	background: #0072bc;
	color: #fff;
	margin: 0 -20px 30px;
	padding: 40px 20px;
}

.mena-fatwa-banner-inner {
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.mena-fatwa-banner-text h1 {
	margin: 8px 0;
	color: #fff;
}

.mena-fatwa-banner-text time {
	opacity: 0.85;
	font-size: 14px;
}

.mena-fatwa-banner .mena-fatwa-cats a {
	color: #fff;
	opacity: 0.85;
}

/* Figma node 2209:3649 — a rounded-square glass card (not a circle), the
   logo image filling it with a small inset margin and object-fit:cover. */
.mena-fatwa-org-badge {
	/* The banner Cover's "banner-icon" utility class (dev.scss) overlays a
	   decorative watermark via a ::after pseudo-element with no z-index of
	   its own, generated after the Cover's real content — so it paints on
	   top of this badge unless the badge claims an explicit stack level of
	   its own within the Cover's stacking context (same technique as the
	   "hero-phone-overlap" utility class in dev.scss). Still needed now that
	   the badge is absolutely positioned — position:absolute alone doesn't
	   change paint order, only an explicit z-index does. */
	z-index: 2;
	flex-shrink: 0;
	width: 22%;
	max-width: 100%;
	aspect-ratio: 322 / 310;
	border-radius: 20px;
	border: 1px solid #bebebe;
	background: #fff;
	backdrop-filter: blur(22px);
	overflow: hidden;
	padding: 20px 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	inset-inline-end: 0;
	margin-top: 90px !important;
	width: 320px;
}

.mena-fatwa-org-badge img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mena-fatwa-list-intro {
	font-weight: 600;
	margin-top: 24px;
}

.mena-fatwa-parameters {
	margin: 16px 0;
	padding-inline-start: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mena-fatwa-parameters li {
	line-height: 1.6;
}

.mena-fatwa-conclusion {
	margin-top: 20px;
}

.mena-fatwa-pdf-button {
	display: inline-block;
	margin: 10px 0 20px;
	padding: 12px 24px;
	background: #0072bc;
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
}

.mena-fatwa-pdf-button:hover {
	background: #005a94;
	color: #fff;
}

.mena-fatwas-search {
	display: flex;
	gap: 8px;
	margin-bottom: 30px;
	max-width: 400px;
}

.mena-fatwas-search input[type="search"] {
	flex: 1;
	padding: 8px 12px;
}

.mena-fatwas-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.mena-fatwa-card {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.mena-fatwa-card-thumb img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.mena-fatwa-card-body {
	padding: 16px;
}

.mena-fatwa-card-cats a,
.mena-fatwa-cats a {
	display: inline-block;
	font-size: 12px;
	text-transform: uppercase;
	margin-inline-end: 8px;
	opacity: 0.7;
}

.mena-fatwa-card-body h3 {
	margin: 8px 0;
}

.mena-fatwas-pagination {
	margin-top: 30px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.mena-fatwas-pagination a,
.mena-fatwas-pagination span {
	padding: 6px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
}

.mena-fatwa-featured-image img {
	width: 100%;
	border-radius: 8px;
	margin: 20px 0;
}

.mena-fatwa-video {
	margin: 20px 0;
}

.mena-fatwa-video iframe {
	border-radius: 8px;
	aspect-ratio: 16 / 9;
	height: auto;
}

.mena-fatwa-content {
	line-height: 1.7;
	margin: 20px 0;
}

.mena-fatwa-share {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 30px 0;
	flex-wrap: wrap;
}

.mena-fatwa-share a {
	padding: 6px 14px;
	border-radius: 4px;
	border: 1px solid #e5e7eb;
	font-size: 13px;
}

.mena-fatwa-related {
	margin-top: 50px;
	border-top: 1px solid #e5e7eb;
	padding-top: 30px;
}

/* Figma node 2209:3584 ("featured-fatwa") — body copy, governance
   parameters list and the PDF download button, now built from native
   ACF Field blocks (core-blocks/acf-field) rather than a bespoke render
   callback. Scoped to .single-mena_fatwa (WordPress's own body class for
   this CPT's native singular template) rather than styling the ACF Field
   block's own generic classes directly, since that block is shared with
   other, unrelated projects. */

.single-mena_fatwa .wp-block-post-content p,
.single-mena_fatwa .acf-field-text,
.single-mena_fatwa .acf-field-html {
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 18px;
	line-height: 1.6;
	color: #495057;
}

.single-mena_fatwa .acf-field-repeater {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.single-mena_fatwa .acf-field-repeater-row {
	display: flex;
	/* baseline (not flex-start) — the marker is 14px against 18px text, so
	   top-aligning their boxes leaves the marker sitting visibly higher
	   than the text; baseline lines up the two regardless of the font-size
	   mismatch, and for wrapped rows still anchors to the first line only. */
	align-items: baseline;
	gap: 8px;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 18px;
	line-height: 1.5;
	color: #495057;
}

.single-mena_fatwa .acf-field-repeater-row::before {
	content: "•";
	flex-shrink: 0;
	font-size: 14px;
	line-height: normal;
}

/* Mobile only — the row's text was rendering centered (each wrapped line
   centering independently) instead of left-aligned like desktop, most
   likely from an inherited text-align on a mobile-specific ancestor
   style rather than anything set here. Forcing it directly on the row is
   a safe, certain fix regardless of where that inherited value comes
   from, and only applies at this breakpoint — desktop is untouched. */
@media (max-width: 768px) {
	.single-mena_fatwa .acf-field-repeater-row {
		text-align: start;
	}
}

.single-mena_fatwa .acf-field-repeater-row strong {
	font-weight: 700;
}

.single-mena_fatwa a.acf-field-url {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #0072bc;
	color: #fff;
	padding: 12px 24px;
	border-radius: 6px;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.single-mena_fatwa a.acf-field-url:hover {
	opacity: 0.85;
}

.single-mena_fatwa .wp-block-separator {
	border-top: 1px solid #e9ecef;
	opacity: 1;
}

/* List Intro Text is now also HTML display type (was Text-only before),
   so .acf-field-html is no longer unique to Conclusion — can't target it
   generically any more. On the Conclusion ACF Field block, set "Custom
   CSS Class" (Display Options panel) to "fatwa-conclusion-divider". */
.single-mena_fatwa .fatwa-conclusion-divider {
	padding-bottom: 24px;
	border-bottom: 1px solid #e9ecef;
}

/* Space between the conclusion/divider and the PDF button — overrides the
   theme's default 1.2rem inter-block gap (:where(.is-layout-constrained) >
   *), which has zero specificity so this wins without !important. Targets
   the block wrapper only (.acf-field-block), not the inner <a> that
   shares the same "acf-field-url" class. */
.single-mena_fatwa .acf-field-block.acf-field-url {
	margin-block-start: 24px;
}

/* Mobile only — the Columns wrapping Title/Org Logo stack on narrow
   screens, so the badge's "static position" (where position:absolute
   without a top falls back to) is now below the title in that stacked
   column instead of beside it. Its 90px margin-top (desktop.mena-fatwa-org-badge
   above) then pushes it well past the banner's shrunk height, landing on
   top of the page content below instead of staying inside the blue Cover.
   Dropping back to normal flow with a small top margin keeps it inline
   right under the title, still inside the banner, without touching the
   desktop absolute-positioned layout at all. */
@media (max-width: 768px) {
	.mena-fatwa-org-badge {
		position: absolute;
        margin-top: -30px !important;
        width: 100px;
	}
}
