/* ================================
   DG Video Portfolio
================================ */

.dg-video-portfolio,
.dg-video-portfolio * {
	box-sizing: border-box;
}

.dg-video-portfolio {
	position: relative;
	isolation: isolate;
	width: 100vw;
	max-width: 100vw;
	margin-right: calc(50% - 50vw);
	margin-left: calc(50% - 50vw);
	padding: 96px 20px;
	overflow: hidden;
	background: var(--dg-bg, #1c1c1c);
	color: var(--dg-text, #ffffff);
}

.dg-video-portfolio::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.03), transparent 26%),
		radial-gradient(circle at 88% 84%, rgba(17, 228, 79, 0.07), transparent 34%);
	pointer-events: none;
}

.dg-video-portfolio-inner {
	width: min(100%, 1320px);
	margin: 0 auto;
}

.dg-video-portfolio-header {
	max-width: 940px;
	margin: 0 auto 48px;
	text-align: center;
}

.dg-video-portfolio-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin-bottom: 30px;
	padding: 0 20px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.045);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 999px;
	box-shadow:
		0 18px 42px rgba(0, 0, 0, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.045);
	font-family: var(--dg-font-body, "Montserrat", Arial, sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.dg-video-portfolio-title {
	max-width: 900px;
	margin: 0 auto;
	color: #ffffff;
	font-family: var(--dg-font-heading, "TT Firs Neue", "Montserrat", Arial, sans-serif);
	font-size: clamp(42px, 4.2vw, 56px);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: 0;
	text-wrap: balance;
}

.dg-video-portfolio-subtext {
	max-width: 700px;
	margin: 24px auto 0;
	color: rgba(255, 255, 255, 0.62);
	font-family: var(--dg-font-body, "Montserrat", Arial, sans-serif);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.48;
	letter-spacing: 0;
	text-wrap: balance;
}

.dg-video-portfolio-grid {
	--dg-video-portfolio-card-width: 280px;
	display: flex;
	gap: 16px;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.dg-video-portfolio-mobile-viewport {
	margin: -10px;
	padding: 10px;
	overflow: hidden;
	touch-action: pan-y;
}

.dg-video-portfolio-card {
	position: relative;
	flex: 0 0 min(var(--dg-video-portfolio-card-width), calc(100% - 20px));
	min-width: 0;
	aspect-ratio: 9 / 16;
	padding: 8px;
	overflow: hidden;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.018) 48%, rgba(255, 255, 255, 0.04)),
		rgba(255, 255, 255, 0.035);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 24px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.16),
		inset 0 -1px 0 rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(14px) saturate(125%);
	-webkit-backdrop-filter: blur(14px) saturate(125%);
}

.dg-video-portfolio-open {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	overflow: hidden;
	background: #111111;
	border: 0;
	border-radius: 16px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.dg-video-portfolio-open::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 45%, rgba(0, 0, 0, 0.22));
	pointer-events: none;
}

.dg-video-portfolio-open img,
.dg-video-portfolio-open video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}

.dg-video-portfolio-play {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #11e44f;
	color: #0b0b0b;
	box-shadow: 0 16px 38px rgba(17, 228, 79, 0.23);
	transform: translate(-50%, -50%);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dg-video-portfolio-play span {
	width: 0;
	height: 0;
	margin-left: 4px;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-left: 15px solid currentColor;
}

.dg-video-portfolio-open:hover .dg-video-portfolio-play,
.dg-video-portfolio-open:focus-visible .dg-video-portfolio-play {
	box-shadow: 0 19px 48px rgba(17, 228, 79, 0.30);
	transform: translate(-50%, -50%) scale(1.06);
}

.dg-video-portfolio-open:focus-visible {
	outline: 2px solid #11e44f;
	outline-offset: 3px;
}

.dg-video-portfolio-modal[hidden] {
	display: none;
}

.dg-video-portfolio-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.dg-video-portfolio-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 8, 0.84);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.dg-video-portfolio-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 470px);
	max-height: calc(100vh - 48px);
	padding: 8px;
	background: rgba(28, 28, 28, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 20px;
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.dg-video-portfolio-modal-video {
	display: block;
	width: 100%;
	max-height: calc(100vh - 64px);
	background: #000000;
	border-radius: 13px;
	aspect-ratio: 9 / 16;
}

.dg-video-portfolio-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	background: rgba(28, 28, 28, 0.76);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	color: #ffffff;
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.dg-video-portfolio-modal-close:hover,
.dg-video-portfolio-modal-close:focus-visible {
	background: rgba(17, 228, 79, 0.9);
	border-color: #11e44f;
	color: #0b0b0b;
	outline: none;
}

.dg-video-portfolio-mobile-navigation {
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-top: 32px;
}

.dg-video-portfolio-mobile-arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	padding: 0;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.13),
		0 12px 28px rgba(0, 0, 0, 0.18);
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.dg-video-portfolio-mobile-arrow::before {
	content: "";
	width: 13px;
	height: 13px;
	margin-left: 5px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(-135deg);
}

.dg-video-portfolio-mobile-arrow--next::before {
	margin-right: 5px;
	margin-left: 0;
	transform: rotate(45deg);
}

.dg-video-portfolio-mobile-arrow:hover,
.dg-video-portfolio-mobile-arrow:focus-visible {
	background: rgba(17, 228, 79, 0.12);
	border-color: rgba(17, 228, 79, 0.72);
	color: #11e44f;
	outline: none;
}

.dg-video-portfolio-mobile-arrow:disabled {
	opacity: 0.34;
	cursor: not-allowed;
}

.dg-video-portfolio-modal-close span,
.dg-video-portfolio-modal-close::before {
	content: "";
	position: absolute;
	width: 15px;
	height: 2px;
	background: currentColor;
}

.dg-video-portfolio-modal-close span {
	transform: rotate(45deg);
}

.dg-video-portfolio-modal-close::before {
	transform: rotate(-45deg);
}

@media (max-width: 1024px) {
	.dg-video-portfolio {
		padding-top: 82px;
		padding-bottom: 82px;
	}
}

@media (max-width: 767px) {
	.dg-video-portfolio {
		width: 100%;
		max-width: 100%;
		margin-right: 0;
		margin-left: 0;
		padding: 68px 16px;
	}

	.dg-video-portfolio-header {
		margin-bottom: 34px;
	}

	.dg-video-portfolio-label {
		min-height: 38px;
		margin-bottom: 24px;
		padding: 0 16px;
		font-size: 13px;
	}

	.dg-video-portfolio-title {
		font-size: clamp(34px, 10.6vw, 46px);
		line-height: 1;
	}

	.dg-video-portfolio-subtext {
		margin-top: 20px;
		font-size: 16px;
		line-height: 1.55;
	}

	.dg-video-portfolio-grid {
		--dg-video-portfolio-card-width: 250px;
		gap: 12px;
	}

	.dg-video-portfolio-card {
		padding: 7px;
		border: 1px solid rgba(255, 255, 255, 0.14);
		border-radius: 20px;
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, 0.13),
			inset 0 -1px 0 rgba(255, 255, 255, 0.035);
		backdrop-filter: blur(12px) saturate(120%);
		-webkit-backdrop-filter: blur(12px) saturate(120%);
	}

	.dg-video-portfolio-open {
		border-radius: 13px;
	}

	.dg-video-portfolio-play {
		width: 44px;
		height: 44px;
	}

	.dg-video-portfolio-play span {
		margin-left: 3px;
		border-top-width: 8px;
		border-bottom-width: 8px;
		border-left-width: 12px;
	}

	.dg-video-portfolio-modal {
		padding: 16px;
	}

	.dg-video-portfolio-modal-dialog {
		width: min(100%, 390px);
		max-height: calc(100vh - 32px);
	}

	.dg-video-portfolio-modal-video {
		max-height: calc(100vh - 48px);
	}

	.dg-video-portfolio-mobile-navigation {
		margin-top: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dg-video-portfolio-play,
	.dg-video-portfolio-open,
	.dg-video-portfolio-grid,
	.dg-video-portfolio-mobile-arrow {
		transition: none;
	}
}
