/**
 * News (post / الأخبار) single-page GLUE — acs-news-head + acs-news-related.
 * Loaded on is_singular('post') (register.php) and from each element's
 * enqueue_scripts(). RTL.
 *
 * The title/image/body stack REUSES the publication single's elements
 * (acs-post-figure + acs-post-content) and their shared styles: the share bar,
 * the − Aa + resizer, the mint pull-quote, the image caption and the tag chips
 * all come from single.css; the breadcrumb, the section-title accent and the
 * .acs-card / .acs-grid / .acs-newscards card rules come from homepage.css.
 * This file only styles the news page's OWN classes and the spacing between
 * the sections (the publication single's 24/32px rhythm).
 */

/* ---------- رأس الخبر (acs-newshead): breadcrumb → h1 → date ---------- */

.acs-newshead {
	display: flex;
	flex-direction: column;
	gap: 8px;
	/* head → featured image (acs-post-figure), publication rhythm */
	margin-bottom: 24px;
}

/* Page h1 — Readex 32/600 per the shared typography scale; wraps to 2 lines. */
.acs-newshead__title {
	margin: 0;
	font-family: 'Readex Pro', sans-serif;
	font-size: 32px;
	font-weight: 600;
	line-height: 150%;
	color: #231F20;
}

/* Meta row under the title: the date (right in RTL); pills only if toggled on. */
.acs-newshead__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

/* Date — Readex 12/400 grey, same as every card meta date site-wide. */
.acs-newshead__date {
	font-family: 'Readex Pro', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 150%;
	color: #9C999A;
}

/* Link pills to a related program / workshop / event — kept behind the
   element's toggle, which now defaults OFF (not in the approved design). */
.acs-newshead__pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.acs-newshead__pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	border: 0.5px solid #068788;
	border-radius: 4px;
	background: #fff;
	font-family: 'Readex Pro', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 150%;
	color: #068788;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.acs-newshead__pill:hover {
	background: #068788;
	color: #fff;
}

.acs-newshead__pill-label {
	font-weight: 500;
}

/* ---------- section rhythm (this file loads on the news single only) ------ */

/* featured image + caption (acs-post-figure) → share/resizer bar
   (acs-post-content renders its bar first, then 24px down to the body). */
.acs-postfigure {
	margin-bottom: 24px;
}

/* ---------- أخبار ذات صلة (acs-newsrelated) ---------- */

/* Same 32px breathing room as the publication single's related section. */
.acs-newsrelated {
	padding: 32px 0;
}

/* Figma (client-verified): 5 cards per row, 16px gap, card title Readex 16/500
   right-aligned. All three are inherited as-is — the 16px gap from
   .acs-grid{gap:var(--acs-gap)} (--acs-gap:16px, homepage.css) and the title
   from .acs-newscards .acs-card__title (16px/500/150%/right) — so no overrides
   are needed here; the element's default columns/count are 5 (news-related.php). */

.acs-newsrelated .acs-section__head {
	margin-bottom: 24px;
}

/* Design: card titles clamp at 3 lines here (client). */
.acs-newsrelated .acs-card__title {
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* Client: 10px under the card body, in أخبار ذات صلة only. */
.acs-newsrelated .acs-card__body {
	margin-bottom: 10px;
}

/* homepage.css collapses only grid--3/--4; cover the 5-column option too. */
@media (max-width: 900px) {
	.acs-newsrelated .acs-grid--5 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.acs-newsrelated .acs-grid--5 {
		grid-template-columns: 1fr;
	}

	.acs-newshead__title {
		font-size: 24px;
	}
}

/* ── phones ── the article stack (image / share bar / body / pull-quote) is
   already responsive via the shared publication-single styles (single.css); the
   600px rule above drops the title to 24px and the related grid to one column.
   This is just phone spacing polish for the news-only head + related section. */
@media (max-width: 478px) {
	.acs-newshead { margin-bottom: 16px; }
	.acs-newshead__meta { gap: 8px; }
	.acs-newsrelated { padding: 24px 0; }
	.acs-newsrelated .acs-section__head { margin-bottom: 16px; }

	/* «أخبار ذات صلة» → the shared swipe carousel, exactly like «منشورات ذات صلة».
	   Track/snapping/arrows come from the .acs-cslider component (homepage.css);
	   two classes on the track so display:flex beats .acs-grid's display:grid, and
	   a fixed card width so a slice of the next card peeks. */
	.acs-cslider__track.acs-newsrelated__grid { display: flex; gap: 16px; }
	.acs-newsrelated__grid .acs-card {
		width: 300px;
		box-sizing: border-box;
	}
}
