/*
 * F4L Videot – episode + episode-list pages.
 * Figma: F4L_Desktop_jakso / F4L_Desktop_jaksot (1728px) and
 *        F4L_Mobile_jakso / F4L_Mobile_jaksot (402px).
 * Between the two the layout scales fluidly.
 */

body.f4l-page {
	--f4l-ink: #1b1b1b;
	--f4l-black: #000;
	--f4l-pink: #ff1d84;
	--f4l-cream: #f4f0ea;
	--f4l-head: "Archivo Black", "Archivo", sans-serif;
	--f4l-body: "Hanken Grotesk", sans-serif;
	--f4l-gut: clamp(24px, 5.8vw, 100px);
	margin: 0;
	background: #fff;
}

/* Texture placement taken from the Figma image crops (scaled with the viewport). */
body.f4l-page .wp-site-blocks {
	padding: 0 !important;
	background-color: #fff;
	background-image: var(--f4l-tex, none);
	background-repeat: no-repeat;
	/* single video: 1728 × 1092 at y −209 (F4L_Desktop_jakso) */
	background-size: 100% 63.22vw;
	background-position: 0 -12.1vw;
}

/* list: 1728 × 1188 at y −347 (F4L_Desktop_jaksot hero) */
body.f4l-page.post-type-archive-videot .wp-site-blocks,
body.f4l-page.tax-videot_tyyppi .wp-site-blocks {
	background-size: 100% 68.75vw;
	background-position: 0 -20.08vw;
}

@media (max-width: 767px) {
	/* single: 718 × 621 at x −158 (F4L_Mobile_jakso hero) */
	body.f4l-page .wp-site-blocks {
		background-size: 178.73vw 154.58vw;
		background-position: -39.38vw 0;
	}
	/* list: 718 × 472 at x −158 (F4L_Mobile_jaksot hero) */
	body.f4l-page.post-type-archive-videot .wp-site-blocks,
	body.f4l-page.tax-videot_tyyppi .wp-site-blocks {
		background-size: 178.73vw 117.41vw;
		background-position: -39.38vw 0;
	}
}

body.f4l-page .wp-site-blocks > * {
	margin-block: 0 !important;
}

.f4l-ep,
.f4l-ep *,
.f4l-ep *::before,
.f4l-ep *::after {
	box-sizing: border-box;
}

.f4l-ep {
	font-family: var(--f4l-body);
	color: var(--f4l-ink);
	-webkit-font-smoothing: antialiased;
}

.f4l-ep h1,
.f4l-ep h2,
.f4l-ep h3,
.f4l-ep p {
	margin: 0;
	letter-spacing: normal;
}

.f4l-wrap {
	width: 100%;
	max-width: calc(1528px + 2 * var(--f4l-gut));
	margin: 0 auto;
	padding: 0 var(--f4l-gut);
}

/* ---------- Video player (real YouTube embed) ---------- */

.f4l-player {
	position: relative;
	width: 100%;
	aspect-ratio: 483 / 271;
	border-radius: 20px;
	overflow: hidden;
	background: #606060;
	isolation: isolate;
}

.f4l-player--main {
	aspect-ratio: 1528 / 859;
}

.f4l-player iframe,
.f4l-player img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	object-fit: cover;
}

/* ---------- Single video: intro ---------- */

.f4l-intro {
	padding: 0 0 100px;
}

.f4l-intro .f4l-wrap {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.f4l-intro__text {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.f4l-eyebrow {
	font: 700 15px/26px var(--f4l-body);
	text-transform: uppercase;
	color: var(--f4l-pink);
}

.f4l-intro__title,
.f4l-listhero__title {
	font: 400 clamp(44px, 4.17vw, 72px) / 1.3056 var(--f4l-head);
	color: var(--f4l-black);
}

.f4l-intro__lead,
.f4l-listhero__lead {
	font: 900 20px/34px var(--f4l-body);
	color: var(--f4l-ink);
}

/* ---------- Cards ---------- */

.f4l-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	width: 100%;
}

.f4l-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.f4l-card__tag {
	font: 700 15px/26px var(--f4l-body);
	text-transform: uppercase;
	color: var(--f4l-pink);
}

.f4l-card__title {
	font: 400 clamp(22px, 1.62vw, 28px) / 1.2857 var(--f4l-head);
	color: var(--f4l-ink);
}

.f4l-card__title a {
	color: inherit;
	text-decoration: none;
}

.f4l-card__title a:hover,
.f4l-card__title a:focus-visible {
	text-decoration: underline;
}

.f4l-card__desc {
	font: 400 17px/26px var(--f4l-body);
	color: var(--f4l-ink);
}

/* ---------- Single video: "Katso myös" ---------- */

.f4l-more {
	background: #fff;
	padding: 80px 0;
}

.f4l-more .f4l-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
}

.f4l-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
	text-align: center;
}

.f4l-head__title {
	font: 400 clamp(36px, 2.55vw, 44px) / 1.2955 var(--f4l-head);
	color: var(--f4l-ink);
}

.f4l-head__lead {
	font: 900 20px/34px var(--f4l-body);
	max-width: 1000px;
}

.f4l-more__all {
	display: inline-block;
	padding: 5px 0;
	font: 400 15px/13px var(--f4l-head);
	color: var(--f4l-ink);
	text-decoration: none;
}

.f4l-more__all:hover,
.f4l-more__all:focus-visible {
	text-decoration: underline;
}

/* ---------- All videos list ---------- */

.f4l-listhero {
	padding: 24px 0 106px;
	text-align: center;
}

.f4l-listhero .f4l-wrap {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.f4l-list {
	background: var(--f4l-cream);
	padding: 64px 0 100px;
}

.f4l-list .f4l-wrap {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.f4l-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	padding-bottom: 20px;
}

.f4l-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 20px 60px;
	border-radius: 55px;
	font: 400 15px/13px var(--f4l-head);
	color: var(--f4l-ink);
	text-decoration: none;
	background: transparent;
	box-shadow: inset 0 0 0 3px var(--f4l-ink);
	transition: background-color .15s, color .15s;
}

.f4l-pill:hover,
.f4l-pill:focus-visible {
	background: rgba(27, 27, 27, .08);
}

.f4l-pill.is-active {
	background: var(--f4l-ink);
	color: #fff;
	box-shadow: none;
}

.f4l-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	padding: 20px 0;
	border-radius: 16px;
}

.f4l-pg {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: #fff;
	color: var(--f4l-black);
	font: 400 15px/13px var(--f4l-head);
	text-decoration: none;
}

a.f4l-pg:hover,
a.f4l-pg:focus-visible {
	background: #e4e0da;
}

.f4l-pg.is-current {
	background: var(--f4l-black);
	color: #fff;
}

.f4l-empty {
	text-align: center;
	font: 900 20px/34px var(--f4l-body);
}

/* ---------- Site header on these pages (Figma: dark links + dark icons) ---------- */

body.f4l-page .ucx-site-header .ucx-nav__menu a:not(#f4l-a):not(#f4l-b) {
	color: #000 !important;
}

body.f4l-page .ucx-site-header .ucx-nav__social .ucx-social-link:not(#f4l-a):not(#f4l-b) {
	background-color: var(--f4l-ink) !important;
}

@media (min-width: 1025px) and (max-width: 1727px) {
	body.f4l-page .ucx-site-header .ucx-nav:not(#f4l-a):not(#f4l-b) {
		padding: 0 clamp(32px, 5.8vw, 100px) !important;
	}
	body.f4l-page .ucx-site-header .ucx-nav__main:not(#f4l-a):not(#f4l-b) {
		width: auto;
		flex: 1 1 auto;
		min-width: 0;
		gap: clamp(32px, 3.47vw, 60px);
	}
}

/* ---------- Tablet ---------- */

@media (min-width: 768px) and (max-width: 1199px) {
	.f4l-grid {
		gap: 24px;
	}
	.f4l-card__desc {
		font-size: 15px;
		line-height: 23px;
	}
}

/* ---------- Mobile (Figma 402) ---------- */

@media (max-width: 767px) {
	body.f4l-page {
		--f4l-gut: 30px;
	}

	/* single */
	.f4l-intro {
		padding: 36px 0 0;
	}
	.f4l-intro__text {
		gap: 10px;
	}
	.f4l-ep--single .f4l-eyebrow {
		font: 900 14px/24px var(--f4l-body);
	}
	.f4l-intro__title,
	.f4l-listhero__title {
		font-size: 36px;
		line-height: 47px;
	}
	.f4l-intro__lead,
	.f4l-listhero__lead {
		font-size: 18px;
		line-height: 31px;
	}
	.f4l-player--main {
		width: auto;
		margin: 0 calc(var(--f4l-gut) * -1);
		aspect-ratio: 402 / 226;
	}
	.f4l-more {
		padding: 40px 0;
	}
	.f4l-more .f4l-wrap {
		gap: 20px;
	}
	.f4l-more .f4l-head {
		gap: 10px;
		align-items: stretch;
	}
	.f4l-more .f4l-head__title {
		font-size: 24px;
		line-height: 31px;
		text-align: left;
	}
	.f4l-head__lead {
		font-size: 18px;
		line-height: 31px;
	}
	.f4l-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}
	.f4l-player {
		aspect-ratio: 342 / 192;
	}
	.f4l-card__title {
		font-size: 20px;
		line-height: 24px;
	}
	.f4l-card__desc {
		font-size: 15px;
		line-height: 21px;
	}
	.f4l-more__all {
		padding: 20px 40px;
		border-radius: 55px;
		background: var(--f4l-ink);
		color: #fff;
	}

	/* list */
	.f4l-listhero {
		padding: 21px 0 56px;
	}
	.f4l-listhero .f4l-wrap {
		gap: 10px;
		padding: 0 40px;
	}
	.f4l-list {
		padding: 40px 0 80px;
	}
	.f4l-filters {
		justify-content: flex-start;
		gap: 8px;
		padding-bottom: 0;
	}
	.f4l-pill {
		padding: 20px 30px;
		font-size: 14px;
	}
	.f4l-pagination {
		padding: 0;
	}
	.f4l-pg {
		font-size: 14px;
	}

	/* site header + footer (same as the home page on mobile) */
	body.f4l-page .ucx-site-header .ucx-logo:not(#f4l-a):not(#f4l-b) {
		zoom: .847 !important;
	}
	body.f4l-page .ucx-footer__nav li:not(#f4l-a):not(#f4l-b) {
		line-height: 18px;
		height: 18px;
	}
	body.f4l-page .ucx-footer__nav a:not(#f4l-a):not(#f4l-b) {
		display: block;
		line-height: 18px;
	}
	body.f4l-page .ucx-footer__social:not(#f4l-a):not(#f4l-b) {
		margin: 0 0 30px 0;
	}
	body.f4l-page .ucx-site-footer .ucx-social-row:not(#f4l-a):not(#f4l-b) {
		gap: 30.25px !important;
		height: 38px;
		align-items: center;
	}
	body.f4l-page .ucx-site-footer .ucx-social-link:not(#f4l-a):not(#f4l-b),
	body.f4l-page .ucx-site-footer .ucx-social-link img:not(#f4l-a):not(#f4l-b) {
		width: 38px;
		height: 38px;
	}
}

/* Small phones: keep headings from breaking awkwardly (402+ stays exact). */
@media (max-width: 401px) {
	.f4l-intro__title,
	.f4l-listhero__title {
		font-size: clamp(30px, 8.96vw, 36px);
		line-height: 1.3056;
	}
	.f4l-pill {
		padding: 20px clamp(18px, 7.46vw, 30px);
	}
}
