/**
 * Josvi Selected Work
 * Scoped to .jm-selected-work and .jm-selected-work-section only.
 */

/* --------------------------------------------------------------------------
   Divi wrappers — this section only.
   -------------------------------------------------------------------------- */

.et_pb_section.et_section_regular.jm-selected-work-section {
	width: 100%;
	max-width: none;
	padding: 0 !important;
	margin: 0 !important;
	background-color: #141311 !important;
	background-image: none !important;
	position: relative;
	z-index: 1;
	overflow: visible;
}

.et_pb_section.et_section_regular.jm-selected-work-section::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	width: 100%;
	height: 180px;
	pointer-events: none;
	z-index: 0;
	background-image: linear-gradient(
		180deg,
		rgba(20, 19, 17, 0) 0%,
		rgba(20, 19, 17, 0.35) 48%,
		rgba(20, 19, 17, 0.78) 78%,
		#141311 100%
	);
}

.jm-selected-work-section .et_pb_row,
.jm-selected-work-section .et_pb_row_inner {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.jm-selected-work-section .et_pb_column {
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.jm-selected-work-section .et_pb_module,
.jm-selected-work-section .et_pb_code,
.jm-selected-work-section .et_pb_code_inner {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
}

/* --------------------------------------------------------------------------
   Component
   -------------------------------------------------------------------------- */

.jm-selected-work {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	overflow-x: clip;
	background-color: transparent;
	color: #f4f0e8;
	padding-inline: clamp(110px, 9vw, 180px);
	padding-block: clamp(40px, 3.5vw, 56px) clamp(40px, 4vw, 56px);
	font-family: Inter, "Inter Tight", sans-serif;
	scroll-margin-top: 120px;
}

body.admin-bar .jm-selected-work#work {
	scroll-margin-top: 156px;
}

.jm-selected-work *,
.jm-selected-work *::before,
.jm-selected-work *::after {
	box-sizing: border-box;
}

.jm-selected-work__header {
	margin: 0 0 clamp(20px, 2.4vw, 32px);
}

.jm-selected-work__label {
	margin: 0;
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: rgba(244, 240, 232, 0.72);
}

/* 2 — 1 — 2: equal pairs, centered Dowski, compact rhythm. */
.jm-selected-work__opening,
.jm-selected-work__secondary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: clamp(14px, 1.8vw, 28px);
	align-items: start;
}

.jm-selected-work .jm-work {
	min-width: 0;
	margin: 0;
	width: 100%;
}

.jm-selected-work .jm-work--opening-lead,
.jm-selected-work .jm-work--opening-echo,
.jm-selected-work .jm-work--pair-lead,
.jm-selected-work .jm-work--pair-follow {
	width: 100%;
	margin: 0;
	justify-self: stretch;
}

.jm-selected-work__dowski,
.jm-selected-work__secondary {
	position: relative;
	margin-top: clamp(22px, 2.8vw, 36px);
}

.jm-selected-work__dowski::before,
.jm-selected-work__secondary::before {
	content: "";
	display: block;
	width: 22px;
	height: 1px;
	background: rgba(244, 240, 232, 0.16);
	margin: 0 0 clamp(16px, 2.2vw, 26px);
	pointer-events: none;
}

.jm-selected-work__dowski::before {
	margin-left: 54%;
}

.jm-selected-work__secondary::before {
	grid-column: 1 / -1;
	margin-left: 36%;
}

.jm-selected-work .jm-work--feature {
	width: min(58%, 100%);
	max-width: none;
	margin-inline: auto;
}

.jm-selected-work .jm-work__media {
	display: block;
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: #171512;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	cursor: pointer;
	color: inherit;
}

.jm-selected-work .jm-work__media:disabled {
	cursor: default;
}

.jm-selected-work .jm-work__media:focus-visible {
	outline: 1px solid rgba(184, 155, 106, 0.8);
	outline-offset: 3px;
}

.jm-selected-work .jm-work__poster {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jm-selected-work .jm-work__poster--placeholder {
	position: absolute;
	inset: 0;
	background: #171512;
	border: 1px solid #2b2925;
}

.jm-selected-work .jm-work__play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 56px;
	height: 56px;
	border: 1px solid rgba(244, 240, 232, 0.85);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	transition: border-color 0.2s ease;
}

.jm-selected-work .jm-work__play::after {
	content: "";
	position: absolute;
	left: 53%;
	top: 50%;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent #f4f0e8;
	transform: translate(-40%, -50%);
}

.jm-selected-work .jm-work__media:hover .jm-work__play,
.jm-selected-work .jm-work__media:focus-visible .jm-work__play {
	border-color: #b89b6a;
}

.jm-selected-work .jm-work__media.is-playing .jm-work__play,
.jm-selected-work .jm-work__media.is-playing .jm-work__poster {
	opacity: 0;
	visibility: hidden;
}

.jm-selected-work .jm-work__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.jm-selected-work .jm-work__media:not(.is-playing) .jm-work__iframe {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.jm-selected-work .jm-work__title {
	margin: 14px 0 0;
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: clamp(15px, 1.05vw, 18px);
	line-height: 1.35;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #f4f0e8;
}

.jm-selected-work .jm-work__meta {
	margin: 8px 0 0;
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: clamp(11px, 0.78vw, 13px);
	line-height: 1.6;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #b8b2a8;
}

.jm-selected-work__cta-wrap {
	display: flex;
	justify-content: flex-end;
	margin: clamp(28px, 3.2vw, 44px) 0 0;
}

.jm-selected-work__cta {
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	color: rgba(244, 240, 232, 0.78);
	transition: color 0.2s ease;
}

.jm-selected-work__cta:hover,
.jm-selected-work__cta:focus-visible {
	color: #b89b6a;
}

@media (max-width: 980px) {
	.jm-selected-work {
		padding-inline: clamp(48px, 7vw, 72px);
	}

	.jm-selected-work .jm-work--feature {
		width: min(62%, 100%);
	}
}

@media (max-width: 767px) {
	.et_pb_section.et_section_regular.jm-selected-work-section::before {
		height: 120px;
	}

	.jm-selected-work {
		padding-inline: 24px;
		padding-block-start: 52px;
	}

	.jm-selected-work__opening,
	.jm-selected-work__secondary {
		display: flex;
		flex-direction: column;
		gap: clamp(20px, 4.5vw, 28px);
	}

	.jm-selected-work .jm-work--opening-echo,
	.jm-selected-work .jm-work--feature,
	.jm-selected-work .jm-work--pair-follow {
		width: 100%;
		max-width: none;
		margin: 0;
		justify-self: stretch;
	}

	.jm-selected-work__dowski,
	.jm-selected-work__secondary {
		margin-top: clamp(18px, 4vw, 28px);
	}

	.jm-selected-work__dowski::before,
	.jm-selected-work__secondary::before {
		width: 16px;
		background: rgba(244, 240, 232, 0.12);
		margin: 0 auto clamp(14px, 3.5vw, 20px);
	}

	.jm-selected-work__cta-wrap {
		justify-content: flex-start;
	}

	.jm-selected-work .jm-work__play {
		width: 48px;
		height: 48px;
	}
}
