/* LETR Filterable Video Gallery */

/* Elementor flex containers measure a widget's height before stretching it to
   full width; with aspect-ratio thumbnails that under-measures the gallery and
   the next element overlaps it. A definite width avoids that. */
.elementor-widget-letr_video_gallery {
	width: 100%;
	min-width: 0;
}

.letr-vg { width: 100%; }

.letr-vg__empty {
	padding: 24px;
	text-align: center;
	border: 1px dashed #bbb;
	color: #666;
	font-size: 14px;
}

/* ---------- Filters ---------- */
.letr-vg__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-bottom: 20px;
}

.letr-vg__filter {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	line-height: 1.2;
	padding: 5px 10px;
	color: #1a1a1a;
	background: #fff;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	transition: background-color .2s, color .2s, border-color .2s;
}

.letr-vg__filter:hover,
.letr-vg__filter:focus-visible {
	background: #e9edf3;
	color: #13294b;
}

.letr-vg__filter:focus-visible,
.letr-vg__trigger:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.letr-vg__filter.is-active {
	background: #13294b;
	border-color: #13294b;
	color: #fff;
}

/* ---------- Grid ---------- */
.letr-vg__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.letr-vg__item[hidden] { display: none !important; }

.letr-vg__item.is-entering {
	animation: letr-vg-in .35s ease both;
}

@keyframes letr-vg-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

.letr-vg .letr-vg__trigger {
	appearance: none;
	display: block;
	width: 100%;
	padding: 16px;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background-color: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .2s;
}

.letr-vg .letr-vg__trigger:hover,
.letr-vg .letr-vg__trigger:focus-visible {
	background-color: #f1f2f4;
	color: inherit;
	box-shadow: none;
}

.letr-vg__thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #13294b;
	background-size: cover;
	background-position: center;
	border-radius: 4px;
	overflow: hidden;
}

.letr-vg__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .35);
	opacity: 0;
	transition: opacity .25s;
}

.letr-vg__trigger:hover .letr-vg__thumb::after,
.letr-vg__trigger:focus-visible .letr-vg__thumb::after { opacity: 1; }

.letr-vg__play {
	position: relative;
	z-index: 1;
	width: 36px;
	height: 36px;
	color: #fff;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
	transition: transform .2s;
}

.letr-vg__trigger:hover .letr-vg__play { transform: scale(1.12); }

.letr-vg__meta {
	display: block;
	margin-top: 8px;
}

.letr-vg__title {
	display: block;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: #111;
}

.letr-vg__cta {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: #6b7280;
	transition: color .2s;
}

.letr-vg__trigger:hover .letr-vg__cta { color: #13294b; }

.letr-vg__no-results {
	text-align: center;
	color: #6b7280;
	margin: 24px 0 0;
}

/* ---------- Pop-up ---------- */
body.letr-vg-lock { overflow: hidden; }

.letr-vg-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 20px 20px;
	background: var(--letr-modal-bg, rgba(0, 0, 0, .85));
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s, visibility .25s;
}

.letr-vg-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.letr-vg-modal__inner {
	width: 100%;
	max-width: var(--letr-modal-w, 1100px);
	transform: scale(.96);
	transition: transform .25s;
}

.letr-vg-modal.is-open .letr-vg-modal__inner { transform: none; }

.letr-vg-modal__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: calc(100vh - 120px);
	margin: 0 auto;
	background: #000;
	border-radius: var(--letr-modal-r, 4px);
	overflow: hidden;
}

.letr-vg-modal__frame iframe,
.letr-vg-modal__frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

.letr-vg-modal__close {
	appearance: none;
	position: absolute;
	top: 10px;
	right: 14px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--letr-modal-close, #fff);
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	opacity: .85;
}

.letr-vg-modal__close:hover,
.letr-vg-modal__close:focus-visible { opacity: 1; }

.letr-vg-modal__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.letr-vg-modal__caption {
	margin: 12px 0 0;
	color: #fff;
	font-size: 15px;
	text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.letr-vg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.letr-vg__grid { grid-template-columns: 1fr; gap: 24px; }
	.letr-vg .letr-vg__trigger { padding: 0; }
	.letr-vg-modal { padding: 52px 10px 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.letr-vg *, .letr-vg-modal, .letr-vg-modal * { transition: none !important; animation: none !important; }
}
