/* Facebook video – priekšskatījums ar pogu; atskaņotājs ielādējas pēc klikšķa */
.esd-fbvideo {
	aspect-ratio: var(--esd-ar, 16 / 9);
	background: #111;
	border-radius: 8px;
	margin: 24px auto;
	max-width: min(100%, calc(78vh * var(--esd-ar-num, 1.7778)));
	overflow: hidden;
	position: relative;
}

.esd-fbvideo .esd-fbvideo-poster,
.esd-fbvideo iframe {
	border: 0;
	display: block;
	height: 100% !important;
	inset: 0;
	object-fit: cover;
	position: absolute;
	width: 100% !important;
}

.esd-fbvideo-play {
	align-items: center;
	text-decoration: none;
	background: rgba(0, 0, 0, .55);
	border: 2px solid rgba(255, 255, 255, .85);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 76px;
	justify-content: center;
	left: 50%;
	padding: 0;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: background .15s ease, transform .15s ease;
	width: 76px;
	z-index: 1;
}

.esd-fbvideo-play svg {
	fill: currentColor;
	height: 34px;
	margin-left: 4px;
	width: 34px;
}

.esd-fbvideo-play:hover,
.esd-fbvideo-play:focus-visible {
	background: #c8142b;
	border-color: #c8142b;
	transform: translate(-50%, -50%) scale(1.06);
}

.esd-fbvideo-note {
	background: linear-gradient(0deg, rgba(0, 0, 0, .65), transparent);
	bottom: 0;
	color: rgba(255, 255, 255, .9);
	font-size: 1.25rem;
	left: 0;
	margin: 0;
	padding: 24px 14px 10px;
	pointer-events: none;
	position: absolute;
	right: 0;
	text-align: left;
}

.esd-fbvideo.is-playing .esd-fbvideo-note {
	display: none;
}

/* Video lapa (YouTube kanāls): jaunākais liels, pārējie režģī */
.esd-videos .esd-fbvideo {
	margin: 0;
	max-width: 100%;
}

.esd-video-featured {
	margin-bottom: 36px;
}

.esd-video-body {
	padding-top: 12px;
}

.esd-video-date {
	color: var(--esd-muted, #5c6165);
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.esd-video-date {
	display: block;
}

.esd-videos .esd-video-title,
.esd-sheet .page-content .esd-videos .esd-video-title {
	color: var(--esd-ink, #17191b);
	font-size: 1.7rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 4px 0 0;
}

.esd-video-featured .esd-video-title,
.esd-sheet .page-content .esd-video-featured .esd-video-title {
	font-size: clamp(2.2rem, 3vw, 2.8rem);
	letter-spacing: -.01em;
}

.esd-video-desc {
	color: var(--esd-muted, #5c6165);
	font-size: 1.5rem;
	line-height: 1.6;
	margin: 8px 0 0;
}

.esd-video-list-title,
.esd-sheet .page-content .esd-video-list-title {
	border-top: 1px solid var(--esd-line, rgba(23, 25, 27, .1));
	color: var(--esd-ink, #17191b);
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: .08em;
	margin: 0 0 16px;
	padding-top: 24px;
	text-transform: uppercase;
}

.esd-video-list-title span {
	color: var(--esd-muted, #5c6165);
	margin-left: 4px;
}

.esd-video-grid,
.esd-sheet .page-content > .esd-videos .esd-video-grid {
	display: grid;
	gap: 22px 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.esd-video-grid > li {
	margin: 0;
	padding: 0;
}

.esd-video-grid > li::before {
	display: none;
}

.esd-sheet .page-content a.esd-video-item {
	color: var(--esd-ink, #17191b);
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-decoration: none;
}

.esd-video-thumb {
	aspect-ratio: 16 / 9;
	background: #111;
	border-radius: 8px;
	display: block;
	margin-bottom: 6px;
	overflow: hidden;
	position: relative;
}

.esd-video-thumb img {
	border-radius: 0 !important;
	display: block;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease, opacity .2s ease;
	width: 100%;
}

a.esd-video-item:hover .esd-video-thumb img {
	transform: scale(1.04);
}

.esd-video-now {
	background: #c8142b;
	border-radius: 4px;
	bottom: 8px;
	color: #fff;
	display: none;
	font-size: 1.1rem;
	font-weight: 700;
	left: 8px;
	letter-spacing: .04em;
	padding: 3px 7px;
	position: absolute;
	text-transform: uppercase;
}

a.esd-video-item.is-current .esd-video-thumb {
	outline: 3px solid #c8142b;
	outline-offset: 2px;
}

a.esd-video-item.is-current .esd-video-now {
	display: block;
}

a.esd-video-item.is-current .esd-video-thumb img {
	opacity: .75;
}

.esd-video-item .esd-video-title {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.35;
}

a.esd-video-item:hover .esd-video-title {
	color: #c8142b;
}

@media screen and (max-width: 760px) {
	.esd-video-grid,
	.esd-sheet .page-content > .esd-videos .esd-video-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 420px) {
	.esd-video-grid,
	.esd-sheet .page-content > .esd-videos .esd-video-grid {
		grid-template-columns: 1fr;
	}
}

.esd-videos .esd-fbvideo-play {
	height: 60px;
	width: 60px;
}

.esd-video-featured .esd-fbvideo-play {
	height: 84px;
	width: 84px;
}

.esd-video-more,
.esd-sheet .page-content .esd-video-more {
	border-top: 1px solid var(--esd-line, rgba(23, 25, 27, .1));
	margin: 44px 0 0;
	padding-top: 28px;
	text-align: center;
}

.esd-videos a.esd-video-channel {
	border: 2px solid var(--esd-ink, #17191b);
	border-radius: 999px;
	color: var(--esd-ink, #17191b);
	display: inline-block;
	font-weight: 600;
	padding: 10px 22px;
	text-decoration: none;
}

.esd-videos a.esd-video-channel:hover {
	background: var(--esd-solid, #17191b);
	color: var(--esd-on-solid, #fff);
}

/* Video lapa telefonā – kā YouTube lietotnē: atskaņotājs līdz lapas malām, saraksts kompaktās rindās */
@media screen and (max-width: 600px) {
	.esd-sheet .esd-video-featured .esd-fbvideo {
		border-radius: 0;
		margin-left: calc(-1 * var(--esd-sheet-pad, 24px));
		margin-right: calc(-1 * var(--esd-sheet-pad, 24px));
		max-width: none;
	}

	.esd-video-featured {
		margin-bottom: 24px;
	}

	.esd-video-featured .esd-video-desc {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
	}

	.esd-video-grid,
	.esd-sheet .page-content > .esd-videos .esd-video-grid {
		gap: 14px;
		grid-template-columns: 1fr;
	}

	.esd-sheet .page-content a.esd-video-item {
		align-items: start;
		column-gap: 12px;
		display: grid;
		grid-template-columns: 44% 1fr;
		grid-template-rows: auto auto;
		align-content: center; /* nosaukums + datums vertikāli centrā blakus sīktēlam, ne zem tā */
		row-gap: 4px;
	}

	.esd-video-item .esd-video-thumb {
		align-self: center;
		grid-column: 1;
		grid-row: 1 / span 2;
		margin: 0;
	}

	.esd-video-item .esd-video-title {
		display: -webkit-box;
		align-self: end;
		font-size: 1.4rem;
		grid-column: 2;
		grid-row: 1;
		line-height: 1.3;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	.esd-video-item .esd-video-date {
		align-self: start;
		font-size: 1.1rem;
		grid-column: 2;
		grid-row: 2;
	}

	.esd-video-now {
		bottom: 4px;
		font-size: 1rem;
		left: 4px;
		padding: 2px 5px;
	}

	.esd-video-more,
	.esd-sheet .page-content .esd-video-more {
		margin-top: 28px;
		padding-top: 20px;
	}

	.esd-videos a.esd-video-channel {
		display: block;
		font-size: 1.4rem;
		padding: 12px 16px;
		text-align: center;
	}
}

/* ļoti šauri ekrāni – lielāks sīktēls, mazāks teksts, lai viss ietilpst sīktēla augstumā */
@media screen and (max-width: 360px) {
	.esd-sheet .page-content a.esd-video-item {
		column-gap: 10px;
		grid-template-columns: 50% 1fr;
	}
	.esd-video-item .esd-video-title {
		font-size: 1.3rem;
	}
	.esd-video-item .esd-video-date {
		font-size: 1rem;
	}
}
