/**
 * Portfolio Grid Widget
 * Isolated styles: all selectors are scoped with .sp-pg-widget.
 */

.sp-pg-widget,
.sp-pg-widget * {
	box-sizing: border-box;
}

.sp-pg-widget {
	--sp-pg-card-duration: 300ms;
	--sp-pg-card-lift: 8px;
	--sp-pg-card-scale: 1;
	--sp-pg-image-zoom: 1.04;
	--sp-pg-image-zoom-duration: 400ms;
	--sp-pg-filter-duration: 300ms;
	position: relative;
	width: 100%;
	background: #050506;
	color: #fff;
}

.sp-pg-container {
	position: relative;
	width: 100%;
	margin-inline: auto;
}

.sp-pg-header {
	position: relative;
	margin-inline: auto;
}

.sp-pg-eyebrow,
.sp-pg-heading,
.sp-pg-header-description,
.sp-pg-title,
.sp-pg-description {
	margin-top: 0;
}

.sp-pg-heading {
	margin-left: 0;
	margin-right: 0;
}

.sp-pg-header-description {
	line-height: 1.65;
}

.sp-pg-eyebrow {
	font-size: 14px;
	font-weight: 700;
}

.sp-pg-heading {
	font-size: clamp(34px, 5vw, 58px);
	font-weight: 750;
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.sp-pg-header-description {
	font-size: 16px;
}

.sp-pg-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.sp-pg-description {
	font-size: 14px;
}

.sp-pg-button,
.sp-pg-filter,
.sp-pg-load-more {
	font-size: 14px;
	font-weight: 650;
}

.sp-pg-dot {
	position: absolute;
	display: block;
	border-radius: 50%;
	pointer-events: none;
}

.sp-pg-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.sp-pg-filter,
.sp-pg-load-more {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	border: 1px solid transparent;
	cursor: pointer;
	transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.sp-pg-filter:focus-visible,
.sp-pg-load-more:focus-visible,
.sp-pg-button:focus-visible,
.sp-pg-card-hitarea:focus-visible,
.sp-pg-image-frame:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.sp-pg-filter:hover,
.sp-pg-load-more:hover {
	transform: translateY(-1px);
}

.sp-pg-grid {
	display: grid;
	width: 100%;
	align-items: stretch;
}

.sp-pg-item {
	position: relative;
	min-width: 0;
	transition:
		opacity var(--sp-pg-filter-duration) ease,
		transform var(--sp-pg-filter-duration) ease,
		visibility var(--sp-pg-filter-duration) ease;
}

.sp-pg-widget.has-equal-height .sp-pg-item,
.sp-pg-widget.has-equal-height .sp-pg-card {
	height: 100%;
}

.sp-pg-item.is-filter-hidden,
.sp-pg-item.is-load-hidden {
	display: none !important;
}

.sp-pg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: #121316;
	border: 1px solid rgba(255, 255, 255, 0.08);
	isolation: isolate;
	transform: translateZ(0) scale(1);
	transform-style: preserve-3d;
	will-change: transform;
	transition:
		transform var(--sp-pg-card-duration) cubic-bezier(0.22, 1, 0.36, 1),
		background-color var(--sp-pg-card-duration) ease,
		border-color var(--sp-pg-card-duration) ease,
		box-shadow var(--sp-pg-card-duration) ease;
}

.sp-pg-widget.has-card-lift .sp-pg-card:hover {
	transform: translateY(calc(var(--sp-pg-card-lift) * -1)) scale(var(--sp-pg-card-scale));
}

.sp-pg-card.is-tilting {
	transition: transform 70ms linear;
}

.sp-pg-card.is-tilting:hover {
	transform: perspective(900px) rotateX(var(--sp-pg-rotate-x, 0deg)) rotateY(var(--sp-pg-rotate-y, 0deg)) translateY(calc(var(--sp-pg-card-lift) * -1)) scale(var(--sp-pg-card-scale));
}

.sp-pg-image-frame {
	position: relative;
	width: 100%;
	min-height: 1px;
	overflow: hidden;
	background: #08090c;
	flex: 0 0 auto;
	touch-action: pan-y;
	cursor: default;
}

.sp-pg-widget[data-settings*='"imageScroll":true'] .sp-pg-image-frame {
	cursor: ns-resize;
}

.sp-pg-image-track {
	position: relative;
	width: 100%;
	min-height: 100%;
	transform: translate3d(0, 0, 0);
	will-change: transform;
}

.sp-pg-image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 0;
	transform: scale(1);
	transform-origin: center center;
	transition: transform var(--sp-pg-image-zoom-duration) cubic-bezier(0.22, 1, 0.36, 1), filter 260ms ease;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.sp-pg-image-frame.is-static .sp-pg-image-track {
	height: 100%;
}

.sp-pg-image-frame.is-static .sp-pg-image {
	width: 100%;
	height: 100%;
}

.sp-pg-widget.has-image-zoom .sp-pg-card:hover .sp-pg-image {
	transform: scale(var(--sp-pg-image-zoom));
}

.sp-pg-image-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	opacity: 0;
	background: rgba(4, 10, 20, 0.5);
	transition: opacity 300ms ease;
}

.sp-pg-card-shine {
	--sp-pg-shine-color: rgba(255,255,255,.28);
	position: absolute;
	z-index: 5;
	top: -30%;
	left: -90%;
	width: 50%;
	height: 170%;
	pointer-events: none;
	background: linear-gradient(100deg, transparent 0%, var(--sp-pg-shine-color) 50%, transparent 100%);
	transform: skewX(-18deg);
	opacity: 0;
}

.sp-pg-widget.has-shine .sp-pg-card:hover .sp-pg-card-shine {
	animation: spPgShine 900ms ease forwards;
}

@keyframes spPgShine {
	0% { left: -90%; opacity: 0; }
	20% { opacity: .75; }
	100% { left: 140%; opacity: 0; }
}

.sp-pg-badges {
	position: absolute;
	z-index: 6;
	display: flex;
	flex-wrap: wrap;
	max-width: calc(100% - 28px);
	pointer-events: none;
}

.sp-pg-badges.position-top-left {
	top: var(--sp-pg-badge-y, 14px);
	left: var(--sp-pg-badge-x, 14px);
}

.sp-pg-badges.position-top-right {
	top: var(--sp-pg-badge-y, 14px);
	right: var(--sp-pg-badge-x, 14px);
	justify-content: flex-end;
}

.sp-pg-badges.position-bottom-left {
	bottom: var(--sp-pg-badge-y, 14px);
	left: var(--sp-pg-badge-x, 14px);
}

.sp-pg-badges.position-bottom-right {
	bottom: var(--sp-pg-badge-y, 14px);
	right: var(--sp-pg-badge-x, 14px);
	justify-content: flex-end;
}

.sp-pg-badge,
.sp-pg-featured {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	white-space: nowrap;
	transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.sp-pg-featured {
	position: absolute;
	z-index: 7;
	top: 14px;
	right: 14px;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sp-pg-badges.position-top-right + .sp-pg-featured {
	top: auto;
	bottom: 14px;
}

.sp-pg-content {
	position: relative;
	z-index: 4;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.sp-pg-title {
	transition: color 220ms ease;
}

.sp-pg-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.6;
}

.sp-pg-button-wrap {
	display: flex;
	flex-direction: column;
	margin-top: auto;
}

.sp-pg-button {
	position: relative;
	z-index: 10;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	text-decoration: none;
	text-align: center;
	border: 1px solid transparent;
	transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.sp-pg-button:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

.sp-pg-button-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	transition: transform 220ms ease;
}

.sp-pg-button:hover .sp-pg-button-icon:last-child {
	transform: translateX(3px);
}

.sp-pg-button:hover .sp-pg-button-icon:first-child {
	transform: translateX(-3px);
}

.sp-pg-button-icon svg {
	display: block;
	fill: currentColor;
}

.sp-pg-card-hitarea {
	position: absolute;
	z-index: 8;
	inset: 0;
	border-radius: inherit;
}

.sp-pg-load-more-wrap {
	display: flex;
	justify-content: center;
}

.sp-pg-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.sp-pg-load-more-icon,
.sp-pg-load-more-icon svg {
	display: inline-flex;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.sp-pg-load-more-wrap[hidden],
.sp-pg-empty[hidden] {
	display: none !important;
}

.sp-pg-empty {
	width: 100%;
	text-align: center;
}

/* Entrance animations. JS adds .is-visible. */
.sp-pg-widget.is-js-ready:not(.animation-none) .sp-pg-item {
	opacity: 0;
}

.sp-pg-widget.is-js-ready.animation-fade .sp-pg-item {
	transform: none;
}

.sp-pg-widget.is-js-ready.animation-fade-up .sp-pg-item {
	transform: translateY(28px);
}

.sp-pg-widget.is-js-ready.animation-zoom .sp-pg-item {
	transform: scale(.94);
}

.sp-pg-widget.is-js-ready.animation-slide-left .sp-pg-item {
	transform: translateX(-34px);
}

.sp-pg-widget.is-js-ready:not(.animation-none) .sp-pg-item.is-visible {
	opacity: 1;
	transform: none;
}

/* Filter exit variants. */
.sp-pg-widget.filter-animation-fade .sp-pg-item.is-filtering-out {
	opacity: 0;
}

.sp-pg-widget.filter-animation-fade-scale .sp-pg-item.is-filtering-out {
	opacity: 0;
	transform: scale(.94);
}

.sp-pg-widget.filter-animation-slide-up .sp-pg-item.is-filtering-out {
	opacity: 0;
	transform: translateY(-18px);
}

/* Editor safety: keep controls usable and cards visible while editing. */
.elementor-editor-active .sp-pg-widget.is-js-ready:not(.animation-none) .sp-pg-item {
	opacity: 1;
	transform: none;
}

@media (max-width: 1024px) {
	.sp-pg-card.is-tilting:hover {
		transform: translateY(calc(var(--sp-pg-card-lift) * -1)) scale(var(--sp-pg-card-scale));
	}
}

@media (max-width: 767px) {
	.sp-pg-badges {
		max-width: calc(100% - 20px);
	}

	.sp-pg-filter {
		flex: 0 0 auto;
	}

	.sp-pg-filters {
		overflow-x: auto;
		flex-wrap: nowrap;
		justify-content: flex-start !important;
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-pg-widget.respect-reduced-motion *,
	.sp-pg-widget.respect-reduced-motion *::before,
	.sp-pg-widget.respect-reduced-motion *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}

	.sp-pg-widget.respect-reduced-motion .sp-pg-item {
		opacity: 1 !important;
		transform: none !important;
	}
}
