/**
 * RSI Toolkit — Projects Videos widget.
 *
 * Baked to the 2026 Figma "Featured Projects" section: light band, heading, a
 * grid of video cards (poster + play badge + title) that open a lightbox, and a
 * centred "More videos" link. Columns / colours / sizes are controls.
 */

.rsi-projects {
	/* Background + padding come from the Elementor container, not the widget. */
}

.rsi-projects__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.rsi-projects__top {
	margin-bottom: 36px;
}

.rsi-projects__title {
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	font-size: 34px;
	line-height: 41px;
	color: #0a0a0a;
	margin: 0;
}

/* Drag/scroll rail: left edge aligns to content, right edge bleeds to the
   viewport so cards run off to the right and you scroll/drag left to reveal
   them (ported from the skydonate reels carousel). */
/* Rail bleeds to the viewport's right edge (0 right padding): cards run off
   the right and you scroll/drag left, like the skydonate reels widget. */
.rsi-projects__grid {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
	padding-bottom: 6px;
	margin-right: calc(50% - 50vw);
	-webkit-overflow-scrolling: touch;
}

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

.rsi-projects__card {
	flex: 0 0 400px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 10px;
	cursor: pointer;
}

.rsi-projects__thumb {
	position: relative;
	height: 240px;
	border-radius: 8px;
	overflow: hidden;
	background: #d9d9d9;
}

.rsi-projects__thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}

.rsi-projects__card:hover .rsi-projects__thumb img,
.rsi-projects__card:focus-visible .rsi-projects__thumb img {
	transform: scale(1.04);
}

.rsi-projects__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.rsi-projects__play svg {
	width: 56px;
	height: 56px;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35));
}

.rsi-projects__play circle {
	fill: rgba(0, 0, 0, .45);
}

.rsi-projects__play path {
	fill: #fff;
}

.rsi-projects__label {
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 24px;
	letter-spacing: .15px;
	color: #0a0a0a;
	text-align: left;
	padding: 0;
}

/* Controls row: pill button on the left, scroll arrows on the right. */
.rsi-projects__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 28px;
}

.rsi-projects__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .3px;
	color: #fff;
	background: #bf0031;
	border-radius: 999px;
	padding: 13px 26px;
	text-decoration: none;
	transition: filter .15s;
}

.rsi-projects__more:hover {
	filter: brightness(1.08);
	color: #fff;
}

.rsi-projects__more svg {
	width: 20px;
	height: 20px;
}

.rsi-projects__arrows {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rsi-projects__arrow {
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid rgba(11, 18, 32, .14);
	color: #0a0a0a;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform .15s, filter .15s;
}

.rsi-projects__arrow:hover {
	transform: translateY(-1px);
	filter: brightness(.97);
}

.rsi-projects__arrow svg {
	width: 22px;
	height: 22px;
}

/* -------- Lightbox -------- */
.rsi-projects__lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
}

.rsi-projects__lightbox.is-open {
	display: flex;
}

.rsi-projects__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .85);
}

.rsi-projects__dialog {
	position: relative;
	width: min(1100px, 92vw);
	aspect-ratio: 16 / 9;
	z-index: 1;
}

.rsi-projects__frame,
.rsi-projects__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 8px;
	display: block;
	background: #000;
}

.rsi-projects__close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 36px;
	height: 36px;
	background: none;
	border: 0;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}

/* Mobile: card is full width with a slim peek of the next on the right. */
@media (max-width: 767px) {
	.rsi-projects__title {
		font-size: 24px;
		line-height: 30px;
	}

	.rsi-projects__card {
		flex-basis: 85vw;
	}

	.rsi-projects__thumb {
		height: 180px;
	}

	.rsi-projects__play svg {
		width: 44px;
		height: 44px;
	}
}
