/**
 * RSI Toolkit — News listing widget + single news article.
 *
 * RSI design language: Alexandria, #bf0031 accent bar and meta, near-white
 * #f7f8f9 panels, 12px radius, hairline rules. The article hero reuses the job
 * page's .rsi-job__hero (careers.css), so both inner-page types match.
 *
 * Logical properties throughout — Arabic mirrors off `dir` with no rtl.css
 * entry. Mobile-first; the grid steps up at 640px and 1024px.
 *
 * Type sizes for headings / titles / body live in type.css (the last word on
 * type); only meta, labels and buttons are sized here.
 */

.rsi-news,
.rsi-news-single {
	--rsi-cr-accent: #bf0031;
	--rsi-nw-accent: #bf0031;
	--rsi-nw-panel: #f7f8f9;
	--rsi-nw-ink: #0a0a0a;
	--rsi-nw-muted: #5b6670;
	--rsi-nw-line: #e5e7eb;
	--rsi-nw-radius: 12px;
	--rsi-nw-ease: cubic-bezier(.16, 1, .3, 1);
}

.rsi-news {
	background: #ffffff;
}

.rsi-news__inner {
	max-width: 1350px;
	margin: 0 auto;
	padding: 64px 0;
}

/* ------------------------------- header --------------------------------- */
.rsi-news__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 32px;
}

/* Heading block on the reading edge, "View all news" on the far edge. */
.rsi-news__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 32px;
}

.rsi-news__top .rsi-news__head {
	margin-bottom: 0;
}

.rsi-news .rsi-news__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 10px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
	color: var(--rsi-nw-accent);
	text-decoration: none;
	border: 0;
	box-shadow: none;
	white-space: nowrap;
}

.rsi-news .rsi-news__all svg {
	transition: transform .35s var(--rsi-nw-ease);
}

[dir="rtl"] .rsi-news .rsi-news__all svg {
	transform: scaleX(-1);
}

.rsi-news .rsi-news__all:hover,
.rsi-news .rsi-news__all:focus-visible {
	color: var(--rsi-nw-accent);
	text-decoration: underline;
	text-underline-offset: 4px;
	outline: none;
}

.rsi-news .rsi-news__all:hover svg {
	transform: translateX(4px);
}

[dir="rtl"] .rsi-news .rsi-news__all:hover svg {
	transform: scaleX(-1) translateX(4px);
}

.rsi-news__bar {
	display: block;
	width: 48px;
	height: 9px;
	border-radius: 2px;
	background: var(--rsi-nw-accent);
}

.rsi-news__heading {
	margin: 0;
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	color: var(--rsi-nw-ink);
	text-align: start;
}

.rsi-news__intro {
	margin: 0;
	max-width: 680px;
	font-family: 'Alexandria', sans-serif;
	color: var(--rsi-nw-muted);
	text-align: start;
}

.rsi-news__empty {
	margin: 0;
	padding: 48px 24px;
	font-family: 'Alexandria', sans-serif;
	color: var(--rsi-nw-muted);
	text-align: center;
	background: var(--rsi-nw-panel);
	border-radius: var(--rsi-nw-radius);
}

/* -------------------------------- grid ---------------------------------- */
.rsi-news__feature {
	margin-bottom: 28px;
}

.rsi-news__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

@media (min-width: 640px) {
	.rsi-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.rsi-news__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px;
	}

	.rsi-news__grid--two {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Wider cards: a 16:10 photo would stand taller than the feature card. */
	.rsi-news__grid--two .rsi-news-card__media {
		aspect-ratio: 16 / 8;
	}
}

/* -------------------------------- card ---------------------------------- */
.rsi-news-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--rsi-nw-panel);
	border-radius: var(--rsi-nw-radius);
	overflow: hidden;
	transition: box-shadow .45s var(--rsi-nw-ease), transform .45s var(--rsi-nw-ease);
}

.rsi-news-card[hidden] {
	display: none;
}

.rsi-news-card.is-revealed {
	animation: rsi-news-in .7s var(--rsi-nw-ease) backwards;
}

@keyframes rsi-news-in {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
}

@media (hover: hover) {
	.rsi-news-card:hover {
		box-shadow: 0 18px 40px -22px rgba(10, 22, 38, .35);
		transform: translateY(-4px);
	}

	.rsi-news-card:hover .rsi-news-card__img {
		transform: scale(1.05);
	}

	.rsi-news-card:hover .rsi-news-card__title a {
		color: var(--rsi-nw-accent);
	}

	.rsi-news-card:hover .rsi-news-card__more svg {
		transform: translateX(4px);
	}

	[dir="rtl"] .rsi-news-card:hover .rsi-news-card__more svg {
		transform: scaleX(-1) translateX(4px);
	}
}

/* Two classes on links: Woodmart styles bare <a>. */
.rsi-news-card .rsi-news-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #0a1626;
	border: 0;
}

/* Woodmart ships img{height:auto!important}, so the cover fill needs it too. */
.rsi-news-card .rsi-news-card__img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .9s var(--rsi-nw-ease);
}

.rsi-news-card__ph {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #0a1626, #26324a);
}

.rsi-news-card__tag {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-start: 16px;
	padding: 6px 14px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	color: #ffffff;
	background: var(--rsi-nw-accent);
	border-radius: 999px;
}

.rsi-news-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 22px 22px 24px;
}

.rsi-news-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.4;
	color: var(--rsi-nw-accent);
	text-align: start;
}

.rsi-news-card__sep {
	opacity: .5;
}

/* Card and article titles are sized here, not in type.css: press headlines
   run long, and the H3 token (24/41) wraps them to five lines in a grid card. */
.rsi-news-card__title {
	margin: 0;
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	font-size: 19px;
	line-height: 30px;
	color: var(--rsi-nw-ink);
	text-align: start;
}

.rsi-news-card .rsi-news-card__title a {
	color: inherit;
	text-decoration: none;
	border: 0;
	box-shadow: none;
	transition: color .25s ease;
}

/* Whole card clickable through the title link. */
.rsi-news-card .rsi-news-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.rsi-news-card .rsi-news-card__title a:focus-visible {
	outline: none;
}

.rsi-news-card:focus-within {
	outline: 2px solid var(--rsi-nw-accent);
	outline-offset: 3px;
}

.rsi-news-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-family: 'Alexandria', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 25px;
	color: var(--rsi-nw-muted);
	text-align: start;
}

.rsi-news-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	color: var(--rsi-nw-ink);
}

.rsi-news-card__more svg {
	color: var(--rsi-nw-accent);
	transition: transform .35s var(--rsi-nw-ease);
}

[dir="rtl"] .rsi-news-card__more svg {
	transform: scaleX(-1);
}

/* ------------------------------ feature card ----------------------------- */
@media (min-width: 900px) {
	.rsi-news-card--feature {
		display: grid;
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
		min-height: 440px;
	}

	.rsi-news-card--feature .rsi-news-card__media {
		aspect-ratio: auto;
		height: 100%;
	}

	.rsi-news-card--feature .rsi-news-card__body {
		justify-content: center;
		gap: 16px;
		padding: 48px 52px;
	}

	.rsi-news-card--feature .rsi-news-card__more {
		margin-top: 8px;
	}

	.rsi-news-card--feature .rsi-news-card__title {
		font-size: 28px;
		line-height: 42px;
	}

	.rsi-news-card--feature .rsi-news-card__excerpt {
		-webkit-line-clamp: 5;
		font-size: 16px;
		line-height: 27px;
	}
}

/* -------------------------------- slider --------------------------------- */
/* Home-page teaser: a scroll-snap rail, three cards in view on desktop, two on
   tablets, one-and-a-bit on phones (the peek says "swipe"). Controls copy the
   testimonials slider ("Words that inspire us"): outlined round arrows on the
   start edge, dots with a red pill for the active one on the end edge. */
.rsi-news__rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 86%;
	gap: 20px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	/* Room for the card hover lift and shadow, which overflow would clip. */
	padding: 8px 0 28px;
	margin: -8px 0 -28px;
}

.rsi-news__rail::-webkit-scrollbar {
	display: none;
}

.rsi-news__rail:focus-visible {
	outline: 2px solid var(--rsi-nw-accent);
	outline-offset: 4px;
}

.rsi-news__rail > .rsi-news-card {
	scroll-snap-align: start;
}

@media (min-width: 640px) {
	.rsi-news__rail {
		grid-auto-columns: calc((100% - 28px) / 2);
		gap: 28px;
	}
}

@media (min-width: 1024px) {
	.rsi-news__rail {
		grid-auto-columns: calc((100% - 64px) / 3);
		gap: 32px;
	}
}

.rsi-news__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 40px;
}

.rsi-news__slider.is-static .rsi-news__controls {
	display: none;
}

.rsi-news__arrows {
	display: flex;
	gap: 16px;
}

.rsi-news__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	color: #0a0a0a;
	background: #ffffff;
	border: 1px solid #0a0a0a;
	border-radius: 50%;
	cursor: pointer;
	user-select: none;
	transition: border-color .2s, color .2s, background .2s;
}

/* Hover only on real pointers — on touch it sticks to the last tapped arrow. */
@media (hover: hover) {
	.rsi-news__arrow:hover {
		color: #ffffff;
		background: #0a0a0a;
	}
}

.rsi-news__arrow:focus-visible {
	outline: 2px solid #0a0a0a;
	outline-offset: 3px;
}

.rsi-news__arrow svg {
	display: block;
	width: 22px;
	height: 22px;
}

/* The row mirrors in Arabic; flip the chevrons so each points the way it goes. */
[dir="rtl"] .rsi-news__arrow svg {
	transform: scaleX(-1);
}

.rsi-news__dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.rsi-news__dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	background: #cfcfcf;
	border-radius: 50%;
	cursor: pointer;
	transition: width .2s, background .2s;
}

.rsi-news__dot.is-active {
	width: 28px;
	background: var(--rsi-nw-accent);
	border-radius: 4px;
}

.rsi-news__dot:focus-visible {
	outline: 2px solid #0a0a0a;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.rsi-news__arrow {
		width: 48px;
		height: 48px;
	}
}

/* ------------------------------ load more -------------------------------- */
.rsi-news__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.rsi-news__more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
	color: #ffffff;
	background: var(--rsi-nw-accent);
	border-radius: 999px;
	cursor: pointer;
	user-select: none;
	transition: opacity .25s ease;
}

.rsi-news__more-btn:hover,
.rsi-news__more-btn:focus-visible {
	opacity: .88;
	outline: none;
}

/* ============================ single article ============================== */
/* Press photos are people at a meeting: keep the upper part (faces) in frame
   rather than the job hero's dead centre. */
.rsi-news-single__hero {
	background-position: center 28%;
}

.rsi-news-single__hero-inner {
	max-width: 960px;
}

.rsi-news-single .rsi-news-single__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: rgba(255, 255, 255, .85);
	text-decoration: none;
	border: 0;
	box-shadow: none;
	transition: color .2s ease;
}

.rsi-news-single .rsi-news-single__back:hover,
.rsi-news-single .rsi-news-single__back:focus-visible {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
	outline: none;
}

.rsi-news-single__back-icon {
	display: inline-flex;
}

[dir="rtl"] .rsi-news-single__back-icon {
	transform: scaleX(-1);
}

.rsi-news-single__title {
	margin: 0;
	max-width: 900px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	font-size: 26px;
	line-height: 1.45;
	color: #ffffff;
	text-align: start;
}

@media (min-width: 768px) {
	.rsi-news-single__title {
		font-size: 38px;
		line-height: 1.4;
	}
}

.rsi-news-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 4px 0 0;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 15px;
	color: #ffffff;
	text-align: start;
}

.rsi-news-single__sep {
	opacity: .5;
}

.rsi-news-single__inner {
	max-width: 860px;
	margin: 0 auto;
	padding: 48px 20px 64px;
}

.rsi-news-single__lead {
	margin: 0 0 24px;
	font-family: 'Alexandria', sans-serif;
	color: var(--rsi-nw-ink);
	text-align: start;
}

.rsi-news-single__content {
	font-family: 'Alexandria', sans-serif;
	color: var(--rsi-nw-muted);
	text-align: start;
}

.rsi-news-single__content p {
	margin: 0 0 18px;
}

.rsi-news-single__content h2,
.rsi-news-single__content h3 {
	margin: 32px 0 12px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	color: var(--rsi-nw-ink);
}

.rsi-news-single__content h2 {
	font-size: 24px;
	line-height: 1.5;
}

.rsi-news-single__content h3 {
	font-size: 20px;
	line-height: 1.5;
}

.rsi-news-single__content img {
	border-radius: var(--rsi-nw-radius);
}

.rsi-news-single__content blockquote,
.rsi-news-single__content .wp-block-quote {
	margin: 28px 0;
	padding: 4px 0;
	padding-inline-start: 22px;
	border: 0;
	border-inline-start: 4px solid var(--rsi-nw-accent);
	font-weight: 600;
	color: var(--rsi-nw-ink);
	background: none;
}

.rsi-news-single__content blockquote p {
	margin: 0;
}

/* Article video: full column width, 16:9, rounded like the cards. */
.rsi-news-single__content .rsi-news-video,
.rsi-news-single__content .wp-block-video {
	margin: 0 0 32px;
}

.rsi-news-single__content video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	background: #0a1626;
	border-radius: var(--rsi-nw-radius);
}

/* Photo strip at the end of an article (seeded as a plain figure of imgs). */
.rsi-news-single__content .rsi-news-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 32px 0 0;
}

.rsi-news-single__content .rsi-news-gallery img {
	display: block;
	width: 100%;
	height: 100% !important;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 8px;
}

@media (min-width: 768px) {
	.rsi-news-single__content .rsi-news-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
}

.rsi-news-single__content a {
	color: var(--rsi-nw-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ------------------------------ source card ------------------------------ */
.rsi-news-single__source {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-top: 40px;
	padding: 26px 24px 28px;
	background: var(--rsi-nw-panel);
	border-radius: var(--rsi-nw-radius);
	border-inline-start: 4px solid var(--rsi-nw-accent);
}

.rsi-news-single__source-label {
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--rsi-nw-accent);
}

.rsi-news-single__source-text {
	margin: 0;
	font-family: 'Alexandria', sans-serif;
	font-size: 16px;
	line-height: 26px;
	color: var(--rsi-nw-ink);
	text-align: start;
}

.rsi-news-single .rsi-news-single__source-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	padding: 12px 24px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	color: #ffffff;
	text-decoration: none;
	background: var(--rsi-nw-accent);
	border: 0;
	border-radius: 999px;
	transition: opacity .25s ease;
}

.rsi-news-single .rsi-news-single__source-btn:hover,
.rsi-news-single .rsi-news-single__source-btn:focus-visible {
	color: #ffffff;
	opacity: .88;
	outline: none;
}

[dir="rtl"] .rsi-news-single__source-btn svg {
	transform: scaleX(-1);
}

.rsi-news-single__source-list {
	margin: 6px 0 0;
	padding: 0;
	padding-inline-start: 18px;
	font-family: 'Alexandria', sans-serif;
	font-size: 15px;
	line-height: 26px;
}

.rsi-news-single__source-list a {
	color: var(--rsi-nw-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --------------------------------- share --------------------------------- */
.rsi-news-single__share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--rsi-nw-line);
}

.rsi-news-single__share-label {
	margin-inline-end: 6px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 15px;
	color: var(--rsi-nw-ink);
}

.rsi-news-single .rsi-news-single__share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--rsi-nw-ink);
	background: var(--rsi-nw-panel);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease;
}

.rsi-news-single .rsi-news-single__share-btn:hover,
.rsi-news-single .rsi-news-single__share-btn:focus-visible {
	color: #ffffff;
	background: var(--rsi-nw-accent);
	outline: none;
}

.rsi-news-single__copied {
	font-family: 'Alexandria', sans-serif;
	font-size: 14px;
	color: var(--rsi-nw-muted);
}

/* ------------------------------- more news ------------------------------- */
.rsi-news-single__more {
	margin-inline: calc(50% - 50vw);
	background: #ffffff;
	border-top: 1px solid var(--rsi-nw-line);
}

.rsi-news-single__more-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	max-width: 1350px;
	margin: 0 auto;
	padding: 56px 35px 72px;
}

.rsi-news-single__more-title {
	margin: 0 0 22px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	color: var(--rsi-nw-ink);
	text-align: start;
}

.rsi-news-single__more .rsi-news__grid {
	width: 100%;
}

@media (min-width: 768px) {
	.rsi-news-single__inner {
		padding: 56px 24px 96px;
	}

	.rsi-news-single__source {
		padding: 30px 34px 32px;
	}

	.rsi-news-single__more-inner {
		padding: 80px 39px 96px;
	}
}
