/* =====================================================================
   RECICLAD'OR VIDEO GALLERY — frontend
   Layout 1: .ror-video-gallery   (pagina completă, grid + lightbox)
   Layout 2: .rdo-video-gallery   (homepage, hero + listă)
   Culorile / colțurile / coloanele vin din variabile CSS setate inline.
   ===================================================================== */

/* =====================================================================
   LAYOUT COMPLET — grid + lightbox
   ===================================================================== */

.ror-video-gallery {
	--ror-accent: #76a82b;
	--ror-accent-dark: #4f7c17;
	--ror-dark: #13231d;
	--ror-bg: #f5f8f3;
	--ror-radius: 22px;
	--ror-cols: 2;

	position: relative;
	width: 100%;
	padding: 70px 24px;
	overflow: hidden;
	background:
		radial-gradient(circle at 10% 10%, rgba(0, 0, 0, 0.04), transparent 30%),
		radial-gradient(circle at 90% 90%, rgba(0, 0, 0, 0.03), transparent 32%),
		var(--ror-bg);
}

.ror-video-gallery *,
.ror-video-gallery *::before,
.ror-video-gallery *::after {
	box-sizing: border-box;
}

.ror-video-container {
	position: relative;
	z-index: 2;
	width: min(1180px, 100%);
	margin: 0 auto;
}

.ror-video-header {
	max-width: 720px;
	margin: 0 auto 42px;
	text-align: center;
}

/* Titlul/subtitlul preiau stilul temei (heading-ul selectat). */
.ror-video-heading {
	margin: 0 0 14px;
	text-align: center;
	text-wrap: balance;
}

.ror-video-description {
	margin: 0;
	line-height: 1.7;
	opacity: 0.85;
}

.ror-video-grid {
	display: grid;
	grid-template-columns: repeat(var(--ror-cols), minmax(0, 1fr));
	gap: 24px;
}

.ror-video-card {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
	padding: 0;
	overflow: hidden;
	appearance: none;
	border: 0;
	border-radius: var(--ror-radius);
	background: #0d1713;
	box-shadow: 0 16px 40px rgba(19, 35, 29, 0.12);
	font: inherit;
	text-align: left;
	cursor: pointer;
	isolation: isolate;
	transform: translateY(0);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ror-video-card:hover,
.ror-video-card:focus-visible {
	transform: translateY(-7px);
	box-shadow: 0 24px 56px rgba(19, 35, 29, 0.2);
}

.ror-video-card:focus-visible {
	outline: 3px solid var(--ror-accent);
	outline-offset: 4px;
}

.ror-video-card--featured {
	grid-column: 1 / -1;
}

.ror-video-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.ror-video-card--featured .ror-video-media {
	min-height: 420px;
	aspect-ratio: 21 / 9;
}

.ror-video-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.01);
	transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
}

/* Zoom in la hover, revenire la mouse out. */
.ror-video-card:hover .ror-video-image {
	filter: saturate(1.08);
	transform: scale(1.07);
}

.ror-video-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	background: linear-gradient(
		180deg,
		rgba(7, 15, 11, 0.03) 15%,
		rgba(7, 15, 11, 0.22) 48%,
		rgba(7, 15, 11, 0.94) 100%
	);
}

.ror-video-number {
	position: absolute;
	top: 18px;
	right: 20px;
	z-index: 3;
	color: rgba(255, 255, 255, 0.75);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.1em;
}

.ror-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 4;
	display: grid;
	width: 74px;
	height: 74px;
	place-items: center;
	border-radius: 50%;
	color: #fff;
	background: var(--ror-accent);
	box-shadow: 0 0 0 12px rgba(118, 168, 43, 0.18), 0 14px 35px rgba(0, 0, 0, 0.28);
	pointer-events: none;
	transform: translate(-50%, -50%) scale(1);
	transition: transform 0.35s ease, background 0.35s ease;
}

.ror-video-play::before {
	width: 0;
	height: 0;
	margin-left: 5px;
	border-top: 11px solid transparent;
	border-bottom: 11px solid transparent;
	border-left: 17px solid currentColor;
	content: "";
}

.ror-video-card:hover .ror-video-play {
	background: var(--ror-accent-dark);
	transform: translate(-50%, -50%) scale(1.1);
}

.ror-video-card--featured .ror-video-play {
	width: 92px;
	height: 92px;
}

.ror-video-content {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	display: block;
	padding: 26px;
	color: #fff;
}

.ror-video-card--featured .ror-video-content {
	max-width: 900px;
	padding: 42px;
}

.ror-video-title {
	display: block;
	max-width: 760px;
	margin: 0;
	color: #fff;
	font-size: clamp(19px, 2vw, 25px);
	font-weight: 700;
	line-height: 1.3;
	text-wrap: balance;
}

.ror-video-card--featured .ror-video-title {
	font-size: clamp(28px, 4vw, 45px);
	line-height: 1.12;
}

.ror-video-more {
	display: flex;
	justify-content: center;
	margin-top: 44px;
}

.ror-video-more-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 56px;
	padding: 15px 32px;
	border: 2px solid var(--ror-accent);
	border-radius: 999px;
	color: #fff;
	background: var(--ror-accent);
	box-shadow: 0 8px 20px rgba(79, 124, 23, 0.18);
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.ror-video-more-button::after {
	font-size: 21px;
	line-height: 1;
	content: "→";
	transition: transform 0.25s ease;
}

.ror-video-more-button:hover,
.ror-video-more-button:focus-visible {
	/* Rămâne umplut cu culoare; doar se ridică ușor. */
	color: #fff;
	background: var(--ror-accent);
	border-color: var(--ror-accent);
	box-shadow: 0 12px 26px rgba(79, 124, 23, 0.28);
	transform: translateY(-2px);
}

.ror-video-more-button:hover::after {
	transform: translateX(5px);
}

.ror-video-more-button.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Modal / lightbox */
.ror-video-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ror-video-modal.is-open {
	visibility: visible;
	opacity: 1;
}

.ror-video-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 12, 8, 0.88);
	backdrop-filter: blur(10px);
}

.ror-video-modal-dialog {
	position: relative;
	z-index: 2;
	width: min(1100px, 100%);
	overflow: hidden;
	border-radius: 22px;
	background: #0a100d;
	box-shadow: 0 35px 100px rgba(0, 0, 0, 0.55);
	transform: scale(0.94) translateY(20px);
	transition: transform 0.3s ease;
}

.ror-video-modal.is-open .ror-video-modal-dialog {
	transform: scale(1) translateY(0);
}

.ror-video-modal-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.ror-video-modal-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ror-video-modal-footer {
	padding: 18px 24px 22px;
	background: #0f1814;
}

.ror-video-modal-title {
	margin: 0;
	color: #fff;
	font-size: 18px;
	line-height: 1.45;
}

.ror-video-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	display: grid;
	width: 44px;
	height: 44px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, 0.68);
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(8px);
	transition: background 0.2s ease, transform 0.2s ease;
}

.ror-video-modal-close:hover {
	background: var(--ror-accent-dark);
	transform: rotate(6deg) scale(1.05);
}

@media (max-width: 767px) {
	.ror-video-gallery {
		padding: 50px 16px;
	}

	.ror-video-header {
		margin-bottom: 30px;
	}

	.ror-video-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.ror-video-card--featured {
		grid-column: auto;
	}

	.ror-video-media,
	.ror-video-card--featured .ror-video-media {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

	.ror-video-content,
	.ror-video-card--featured .ror-video-content {
		padding: 22px;
	}

	.ror-video-title,
	.ror-video-card--featured .ror-video-title {
		font-size: 21px;
		line-height: 1.25;
	}

	.ror-video-play,
	.ror-video-card--featured .ror-video-play {
		width: 64px;
		height: 64px;
	}

	.ror-video-more {
		margin-top: 30px;
	}

	.ror-video-more-button {
		width: 100%;
		max-width: 320px;
	}

	.ror-video-modal {
		padding: 12px;
	}

	.ror-video-modal-dialog {
		border-radius: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ror-video-card,
	.ror-video-image,
	.ror-video-play,
	.ror-video-more-button,
	.ror-video-more-button::after,
	.ror-video-modal,
	.ror-video-modal-dialog {
		transition: none;
	}
}

/* =====================================================================
   LAYOUT HOMEPAGE — hero + listă
   ===================================================================== */

.rdo-video-gallery {
	--ror-accent: #76a82b;
	--ror-bg: #eef4f7;
}

.rdo-video-gallery,
.rdo-video-gallery * {
	box-sizing: border-box;
}

.rdo-video-gallery {
	width: 100%;
	padding: 65px 24px 40px;
	background: var(--ror-bg);
	font-family: inherit;
	color: #111c2e;
}

.rdo-video-gallery__inner {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
}

/* Titlul/subtitlul preiau stilul temei (heading-ul selectat). */
.rdo-video-gallery__heading {
	margin: 0 0 18px;
	padding: 0;
	text-align: center;
}

.rdo-video-gallery__subtitle {
	max-width: 720px;
	margin: 0 auto 40px;
	text-align: center;
	line-height: 1.7;
	opacity: 0.85;
}

.rdo-video-gallery__heading:last-child {
	margin-bottom: 45px;
}

.rdo-video-gallery__layout {
	display: grid;
	grid-template-columns: minmax(0, 2.15fr) minmax(300px, 1fr);
	gap: 22px;
	align-items: stretch;
}

.rdo-video-gallery__featured {
	min-width: 0;
}

.rdo-video-gallery__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
	border-radius: 2px;
	box-shadow: 0 15px 40px rgba(17, 28, 46, 0.12);
}

.rdo-video-gallery__iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.rdo-video-gallery__current-title {
	margin-top: 17px;
	color: #111c2e;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
}

.rdo-video-gallery__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	max-height: 455px;
	padding-right: 7px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #8e9699 transparent;
}

.rdo-video-gallery__list::-webkit-scrollbar {
	width: 7px;
}

.rdo-video-gallery__list::-webkit-scrollbar-track {
	background: transparent;
}

.rdo-video-gallery__list::-webkit-scrollbar-thumb {
	background: #8e9699;
	border-radius: 20px;
}

.rdo-video-gallery__item {
	display: grid;
	grid-template-columns: 46% minmax(0, 1fr);
	gap: 13px;
	align-items: center;
	width: 100%;
	min-height: 98px;
	margin: 0;
	padding: 5px;
	overflow: hidden;
	appearance: none;
	border: 2px solid transparent;
	border-radius: 12px;
	outline: none;
	background: transparent;
	color: #111c2e;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.22s ease, border-color 0.22s ease,
		transform 0.22s ease, box-shadow 0.22s ease;
}

.rdo-video-gallery__item:hover {
	background: rgba(255, 255, 255, 0.76);
	transform: translateY(-1px);
}

.rdo-video-gallery__item:focus-visible {
	border-color: var(--ror-accent);
	box-shadow: 0 0 0 3px rgba(0, 106, 59, 0.14);
}

.rdo-video-gallery__item.is-active {
	border-color: var(--ror-accent);
	background: #ffffff;
	box-shadow: 0 8px 22px rgba(17, 28, 46, 0.08);
}

.rdo-video-gallery__thumbnail {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 10px;
	background: #d7dee1;
}

.rdo-video-gallery__thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 0.35s ease;
}

/* Zoom in la hover, revenire la mouse out. */
.rdo-video-gallery__item:hover .rdo-video-gallery__thumbnail img {
	transform: scale(1.06);
}

.rdo-video-gallery__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 29px;
	border-radius: 8px;
	background: var(--ror-accent);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.85);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.rdo-video-gallery__item:hover .rdo-video-gallery__play,
.rdo-video-gallery__item.is-active .rdo-video-gallery__play {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.rdo-video-gallery__play span {
	display: block;
	width: 0;
	height: 0;
	margin-left: 2px;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 10px solid #ffffff;
}

.rdo-video-gallery__item-title {
	display: -webkit-box;
	overflow: hidden;
	color: #111c2e;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

@media (max-width: 1024px) {
	.rdo-video-gallery {
		padding: 55px 20px 35px;
	}

	.rdo-video-gallery__layout {
		grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
		gap: 17px;
	}

	.rdo-video-gallery__item {
		grid-template-columns: 43% minmax(0, 1fr);
		gap: 10px;
		min-height: 85px;
	}

	.rdo-video-gallery__item-title {
		font-size: 13px;
	}

	.rdo-video-gallery__current-title {
		font-size: 16px;
	}

	.rdo-video-gallery__list {
		max-height: 390px;
	}
}

@media (max-width: 767px) {
	.rdo-video-gallery {
		padding: 45px 16px 30px;
	}

	.rdo-video-gallery__layout {
		display: block;
	}

	.rdo-video-gallery__player {
		border-radius: 8px;
		box-shadow: 0 10px 28px rgba(17, 28, 46, 0.12);
	}

	.rdo-video-gallery__current-title {
		margin-top: 14px;
		font-size: 16px;
		line-height: 1.35;
	}

	.rdo-video-gallery__list {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(270px, 82vw);
		gap: 12px;
		width: calc(100% + 16px);
		max-height: none;
		margin-top: 24px;
		padding: 0 16px 13px 0;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-behavior: smooth;
		scroll-snap-type: x mandatory;
		scrollbar-width: thin;
	}

	.rdo-video-gallery__list::-webkit-scrollbar {
		width: auto;
		height: 5px;
	}

	.rdo-video-gallery__item {
		grid-template-columns: 43% minmax(0, 1fr);
		min-height: 96px;
		padding: 5px;
		scroll-snap-align: start;
	}

	.rdo-video-gallery__play {
		width: 36px;
		height: 26px;
	}
}

@media (max-width: 420px) {
	.rdo-video-gallery__list {
		grid-auto-columns: 88vw;
		width: calc(100% + 12px);
	}

	.rdo-video-gallery__current-title {
		font-size: 15px;
	}
}
