/*
 * PL Works / Film
 *
 * New responsive archive:
 * - FILMPOLSKI.PL link
 * - large SHOWREEL #1
 * - 2-column Film grid from 768px
 * - 1 column on phones
 * - lightweight YouTube facades; iframe is created only after click
 */

.works-film {
	width: 100%;
	margin-top: 20px;
	box-sizing: border-box;
}

.works-film__inner {
	width: 100%;
	max-width: 1100px;
	margin-inline: auto;
	padding: 10px;
	box-sizing: border-box;
}

.works-film__filmpolski {
	display: block;
	width: fit-content;
	margin: 0 auto 34px;
	font-family: "Futura", Arial, sans-serif;
	font-size: clamp(28px, 3vw, 36px);
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	text-align: center;
	text-decoration: none;
}

.works-film__filmpolski:visited {
	color: #fff;
}

.works-film__filmpolski:hover,
.works-film__filmpolski:focus-visible {
	color: #b4b4b4;
}

.works-film__showreel {
	width: 100%;
	margin: 0 auto clamp(46px, 6vw, 72px);
}

.works-film__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(22px, 3vw, 40px);
	row-gap: clamp(34px, 5vw, 62px);
	align-items: start;
}

.works-film__item {
	min-width: 0;
}

.works-film__video {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: #000;
	cursor: pointer;
}

.works-film__video--hero {
	max-width: 1180px;
	margin-inline: auto;
}

.works-film__video-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 180ms ease, opacity 180ms ease;
}

.works-film__video:hover .works-film__video-image,
.works-film__video:focus-visible .works-film__video-image {
	transform: scale(1.015);
	opacity: 0.92;
}

.works-film__video-label {
	position: absolute;
	top: 18px;
	left: 20px;
	z-index: 2;
	font-family: "Futura", Arial, sans-serif;
	font-size: clamp(20px, 2.1vw, 28px);
	font-weight: 600;
	line-height: 1.1;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
	pointer-events: none;
}

.works-film__play {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 3;
	width: clamp(62px, 7vw, 86px);
	aspect-ratio: 1.35 / 1;
	transform: translate(-50%, -50%);
	border-radius: 20%;
	background: #ff0033;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
	pointer-events: none;
}

.works-film__play::after {
	content: "";
	position: absolute;
	left: 52%;
	top: 50%;
	width: 0;
	height: 0;
	transform: translate(-42%, -50%);
	border-top: 12px solid transparent;
	border-bottom: 12px solid transparent;
	border-left: 20px solid #fff;
}

.works-film__item-title {
	margin: 12px 0 0;
	font-family: "Futura", Arial, sans-serif;
	font-size: clamp(22px, 2vw, 30px);
	font-weight: 600;
	line-height: 1.18;
	text-align: center;
	color: #b4b4b4;
}

.works-film__item-title a,
.works-film__item-title a:visited,
.works-film__item-title span {
	color: #b4b4b4;
	text-decoration: none;
}

.works-film__item-title a:hover,
.works-film__item-title a:focus-visible {
	color: #fff;
}

.works-film__video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.works-film__empty {
	margin: 20px 0 0;
	font-family: "Futura", Arial, sans-serif;
	font-size: 23px;
	font-weight: 400;
	text-align: center;
	color: #fff;
}


/*
 * Laptop tightening without dropping to one column.
 */
@media (min-width: 768px) and (max-height: 900px) {

	.works-film__inner {
		max-width: 1100px;
	}

	.works-film__filmpolski {
		margin-bottom: 26px;
	}

	.works-film__showreel {
		/*
		 * Keep the hero width independent from viewport height.
		 * The previous 100dvh-based max-width collapsed toward 0
		 * when DevTools or a short browser viewport reduced the height.
		 */
		max-width: 100%;
		margin-bottom: 42px;
	}

	.works-film__grid {
		row-gap: 40px;
	}
}


/*
 * Phone: one column.
 */
@media (max-width: 767px) {

	.works-film__inner {
		max-width: 100%;
	}

	.works-film__filmpolski {
		margin-bottom: 28px;
		font-size: 28px;
	}

	.works-film__showreel {
		margin-bottom: 38px;
	}

	.works-film__grid {
		grid-template-columns: 1fr;
		column-gap: 0;
		row-gap: 38px;
	}

	.works-film__item-title {
		font-size: 25px;
	}

	.works-film__video-label {
		top: 12px;
		left: 14px;
		font-size: 20px;
	}
}


@media (prefers-reduced-motion: reduce) {

	.works-film__video-image {
		transition: none;
	}
}

/*
 * ĆWIR (Work ID 2620) now uses /wp-content/uploads/cwir.webp,
 * a native 16:9 thumbnail. The old 1.30x crop is no longer needed.
 * All videos share the normal 1.015x hover/focus treatment above.
 */
