/**
 * LINK Panel - front-end slider ([link_slider]).
 *
 * Self-contained: the shortcode can sit inside any WPBakery / Woodmart column,
 * so every rule is scoped to .linkp-slider and the layout neutralises the
 * padding a parent column may impose.
 */

.linkp-slider {
	--linkp-sl-h: 620px;
	--linkp-sl-h-mobile: 480px;
	--linkp-sl-overlay: 0.2;
	--linkp-sl-focus: center 62%;
	--linkp-sl-accent: #00ff73;

	position: relative;
	z-index: 0;
	overflow: hidden;
	margin: 0;
	padding: 0;
	background: #07142f;
	touch-action: pan-y;
}

/* Break out of a constrained parent column and span the viewport. */
.linkp-slider.is-fullbleed {
	left: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
}

.linkp-slider-viewport {
	position: relative;
	width: 100%;
	height: var( --linkp-sl-h );
}

/* ------------------------------------------------------------------ *
 * Slides
 * ------------------------------------------------------------------ */

.linkp-slide {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	background: #07142f;
	transition: opacity .5s ease, visibility .5s ease;
}

.linkp-slide.is-active {
	z-index: 2;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.linkp-slide-media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* The overlay keeps white copy readable over bright frames. */
.linkp-slide-media::after {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	content: "";
	pointer-events: none;
	background: linear-gradient(
		to right,
		rgba( 3, 12, 32, calc( var( --linkp-sl-overlay ) + .25 ) ) 0%,
		rgba( 3, 12, 32, var( --linkp-sl-overlay ) ) 55%,
		rgba( 3, 12, 32, 0 ) 100%
	);
}

.linkp-slide-still,
.linkp-slide-video {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: cover !important;
	object-position: var( --linkp-sl-focus ) !important;
	pointer-events: none !important;
}

.linkp-slide-still {
	z-index: 0;
	opacity: 1;
	visibility: visible;
	transition: opacity .25s ease, visibility .25s ease;
}

.linkp-slide-video {
	z-index: 1;
	opacity: 0;
	background: transparent;
	transition: opacity .25s ease;
}

/* Cross-fade poster → video only once the video actually paints. */
.linkp-slide.is-playing .linkp-slide-video {
	opacity: 1;
}

.linkp-slide.is-playing .linkp-slide-still {
	opacity: 0;
	visibility: hidden;
}

.linkp-slider video {
	appearance: none !important;
	-webkit-appearance: none !important;
}

.linkp-slider video::-webkit-media-controls,
.linkp-slider video::-webkit-media-controls-panel,
.linkp-slider video::-webkit-media-controls-play-button,
.linkp-slider video::-webkit-media-controls-start-playback-button,
.linkp-slider video::-webkit-media-controls-overlay-play-button {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* ------------------------------------------------------------------ *
 * Content
 * ------------------------------------------------------------------ */

.linkp-slide-inner {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 1222px;
	height: 100%;
	margin: 0 auto;
	padding: 0 30px;
}

.linkp-slide-content {
	max-width: 620px;
	color: #fff;
}

.linkp-slide-logo {
	display: block;
	width: auto;
	max-width: 260px;
	height: auto;
	max-height: 62px;
	margin: 0 0 20px;
	object-fit: contain;
}

/* Text fallback when no logo image is picked. */
.linkp-slide-brand {
	display: inline-flex;
	align-items: center;
	margin: 0 0 16px;
	padding: 9px 18px;
	border: 1px solid rgba( 255, 255, 255, .72 );
	border-radius: 50px;
	background: rgba( 0, 0, 0, .12 );
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .8px;
	text-transform: uppercase;
	text-shadow: 0 1px 5px rgba( 0, 0, 0, .95 );
	backdrop-filter: blur( 3px );
	-webkit-backdrop-filter: blur( 3px );
}

.linkp-slider .linkp-slide-title {
	margin: 0 0 14px !important;
	padding: 0 !important;
	color: var( --linkp-sl-title-color, #fff ) !important;
	font-size: var( --linkp-sl-title-size, clamp( 26px, 2.6vw, 42px ) ) !important;
	font-weight: 700 !important;
	line-height: 1.18 !important;
	letter-spacing: -.2px;
	text-transform: none !important;
	text-shadow: 0 2px 6px rgba( 0, 0, 0, .8 );
	background: transparent !important;
}

.linkp-slider .linkp-slide-desc {
	margin: 0 !important;
	padding: 0 !important;
	color: #fff !important;
	font-size: clamp( 14px, 1.1vw, 17px ) !important;
	font-weight: 400;
	line-height: 1.5 !important;
	text-shadow: 0 2px 6px rgba( 0, 0, 0, .8 );
	background: transparent !important;
}

.linkp-slider .linkp-slide-cta {
	display: inline-block;
	margin: 26px 0 0;
	padding: 13px 30px;
	border: 0;
	border-radius: 5px;
	background: var( --linkp-sl-accent );
	color: #000;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .4px;
	text-decoration: none;
	text-transform: uppercase;
	transition: transform .2s ease, filter .2s ease;
}

.linkp-slider .linkp-slide-cta:hover,
.linkp-slider .linkp-slide-cta:focus {
	color: #000;
	filter: brightness( 1.08 );
	transform: translateY( -2px );
}

/* ------------------------------------------------------------------ *
 * Controls
 * ------------------------------------------------------------------ */

.linkp-slider-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba( 255, 255, 255, .45 );
	border-radius: 50%;
	background: rgba( 0, 0, 0, .25 );
	box-shadow: none;
	cursor: pointer;
	opacity: 0;
	transform: translateY( -50% );
	transition: opacity .25s ease, background .25s ease;
	backdrop-filter: blur( 3px );
	-webkit-backdrop-filter: blur( 3px );
}

.linkp-slider:hover .linkp-slider-arrow,
.linkp-slider-arrow:focus-visible {
	opacity: 1;
}

.linkp-slider-arrow:hover {
	background: rgba( 0, 0, 0, .5 );
}

.linkp-slider-arrow::before {
	display: block;
	width: 11px;
	height: 11px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	content: "";
}

.linkp-slider-prev {
	left: 22px;
}

.linkp-slider-prev::before {
	margin-left: 4px;
	transform: rotate( -135deg );
}

.linkp-slider-next {
	right: 22px;
}

.linkp-slider-next::before {
	margin-right: 4px;
	transform: rotate( 45deg );
}

.linkp-slider-dots {
	position: absolute;
	bottom: 22px;
	left: 50%;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0;
	padding: 0;
	transform: translateX( -50% );
	background: transparent;
}

.linkp-slider-dot {
	display: block;
	width: 7px;
	height: 7px;
	min-width: 7px;
	min-height: 7px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, .58 );
	box-shadow: none;
	cursor: pointer;
	transition: width .25s ease, border-radius .25s ease, background .25s ease;
}

.linkp-slider-dot.is-active {
	width: 20px;
	border-radius: 10px;
	background: #fff;
}

/* ------------------------------------------------------------------ *
 * Tablet
 * ------------------------------------------------------------------ */

@media ( max-width: 1024px ) {

	.linkp-slide-inner {
		padding: 0 24px;
	}

	.linkp-slide-content {
		max-width: 560px;
	}

	.linkp-slider-arrow {
		display: none;
	}
}

/* ------------------------------------------------------------------ *
 * Mobile: content drops to the bottom, matching the hand-built banner
 * ------------------------------------------------------------------ */

@media ( max-width: 767px ) {

	.linkp-slider-viewport {
		height: var( --linkp-sl-h-mobile );
	}

	.linkp-slide-media::after {
		background: linear-gradient(
			to top,
			rgba( 3, 12, 32, calc( var( --linkp-sl-overlay ) + .45 ) ) 0%,
			rgba( 3, 12, 32, var( --linkp-sl-overlay ) ) 55%,
			rgba( 3, 12, 32, 0 ) 100%
		);
	}

	.linkp-slide-inner {
		align-items: flex-end;
		padding: 0 18px 46px;
	}

	.linkp-slide-content {
		max-width: 420px;
	}

	.linkp-slide-logo {
		max-width: 170px;
		max-height: 44px;
		margin-bottom: 14px;
	}

	.linkp-slide-brand {
		margin-bottom: 12px;
		padding: 8px 15px;
		font-size: 18px;
	}

	.linkp-slider .linkp-slide-title {
		margin-bottom: 6px !important;
		font-size: var( --linkp-sl-title-size-m, clamp( 16px, 4.4vw, 20px ) ) !important;
		line-height: 1.16 !important;
	}

	.linkp-slider .linkp-slide-desc {
		font-size: 11px !important;
		line-height: 1.36 !important;
	}

	.linkp-slider .linkp-slide-cta {
		margin-top: 16px;
		padding: 11px 22px;
		font-size: 12px;
	}

	.linkp-slider-dots {
		bottom: 14px;
		gap: 6px;
	}

	.linkp-slider-dot {
		width: 6px;
		height: 6px;
		min-width: 6px;
		min-height: 6px;
	}

	.linkp-slider-dot.is-active {
		width: 18px;
	}
}

@media ( max-width: 380px ) {

	.linkp-slide-inner {
		padding: 0 15px 42px;
	}

	.linkp-slider .linkp-slide-desc {
		font-size: 10px !important;
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.linkp-slide,
	.linkp-slide-still,
	.linkp-slide-video,
	.linkp-slider-dot,
	.linkp-slider .linkp-slide-cta {
		transition: none !important;
	}
}
