/* ========================================================================
   Single Portfolio Elementor Widget
   Fully isolated styles. Existing plugin widgets are intentionally untouched.
   ======================================================================== */

.spf-single-portfolio-wrapper {
	position: relative;
	width: 100%;
	background: #050505;
	color: #ffffff;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.spf-single-portfolio-wrapper *,
.spf-single-portfolio-wrapper *::before,
.spf-single-portfolio-wrapper *::after {
	box-sizing: border-box;
}

.spf-single-portfolio-container {
	width: 100%;
	max-width: 1140px;
	margin-inline: auto;
	padding: 60px 40px 80px;
}

/* Header ---------------------------------------------------------------- */
.spf-back-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 24px;
	color: rgba(255, 255, 255, 0.58);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.25s ease, transform 0.25s ease;
}

.spf-back-link:hover,
.spf-back-link:focus-visible {
	color: #ffffff;
	text-decoration: none;
	transform: translateX(-2px);
}

.spf-back-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	line-height: 1;
}

.spf-back-link-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.spf-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
}

.spf-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 12px;
	border: 1px solid rgba(69, 123, 255, 0.35);
	border-radius: 999px;
	background: rgba(69, 123, 255, 0.13);
	color: #7ca4ff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.65px;
	text-transform: uppercase;
	text-decoration: none;
	transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

a.spf-badge:hover,
a.spf-badge:focus-visible {
	transform: translateY(-1px);
	color: #ffffff;
	border-color: #4e83ff;
	background: rgba(78, 131, 255, 0.28);
	text-decoration: none;
}

.spf-header {
	margin: 0 0 40px;
}

.spf-project-title {
	margin: 0 0 14px;
	color: #ffffff;
	font-size: clamp(30px, 4.4vw, 48px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.spf-project-subtitle {
	max-width: 690px;
	margin: 0;
	color: rgba(255, 255, 255, 0.58);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.75;
}

/* Browser preview ------------------------------------------------------- */
.spf-mockup-wrap {
	position: relative;
	margin: 0 0 64px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	background: #0b0b0b;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
	isolation: isolate;
}

.spf-mockup-bar {
	position: relative;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	padding: 10px 15px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	background: #171717;
}

.spf-mockup-dots {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.spf-mockup-dot {
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.spf-mockup-dot-red { background: #ff5f57; }
.spf-mockup-dot-yellow { background: #febc2e; }
.spf-mockup-dot-green { background: #28c840; }

.spf-mockup-url {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	min-height: 28px;
	flex: 1 1 auto;
	padding: 5px 10px;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.045);
	color: rgba(255, 255, 255, 0.48);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

a.spf-mockup-url:hover,
a.spf-mockup-url:focus-visible {
	background: rgba(59, 121, 246, 0.16);
	color: #a9c5ff;
	text-decoration: none;
}

.spf-url-lock {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.spf-url-lock svg {
	width: 11px;
	height: 11px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.spf-url-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.spf-browser-nav {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.spf-browser-nav button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.07);
	color: rgba(255, 255, 255, 0.68);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.spf-browser-nav button:hover,
.spf-browser-nav button:focus-visible {
	border-color: rgba(78, 131, 255, 0.58);
	background: rgba(78, 131, 255, 0.24);
	color: #ffffff;
}

.spf-browser-nav svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.spf-mockup-stage {
	position: relative;
	background: #090909;
}

.spf-mockup-viewport {
	--spf-scrollbar-width: 8px;
	--spf-scrollbar-track: rgba(255, 255, 255, 0.04);
	--spf-scrollbar-thumb: rgba(78, 131, 255, 0.6);
	--spf-scrollbar-thumb-hover: rgba(78, 131, 255, 0.9);
	position: relative;
	width: 100%;
	height: 420px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: auto;
	outline: none;
	background: #0a0a0a;
	scrollbar-color: var(--spf-scrollbar-thumb) var(--spf-scrollbar-track);
	scrollbar-width: thin;
}

.spf-mockup-viewport:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(78, 131, 255, 0.82);
}

.spf-mockup-viewport::-webkit-scrollbar {
	width: var(--spf-scrollbar-width);
}

.spf-mockup-viewport::-webkit-scrollbar-track {
	background: var(--spf-scrollbar-track);
}

.spf-mockup-viewport::-webkit-scrollbar-thumb {
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--spf-scrollbar-thumb);
	background-clip: padding-box;
}

.spf-mockup-viewport::-webkit-scrollbar-thumb:hover {
	background: var(--spf-scrollbar-thumb-hover);
	background-clip: padding-box;
}

.spf-scrollbar-hidden .spf-mockup-viewport {
	scrollbar-width: none;
}

.spf-scrollbar-hidden .spf-mockup-viewport::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.spf-scrollbar-auto .spf-mockup-viewport {
	scrollbar-color: transparent transparent;
}

.spf-scrollbar-auto .spf-mockup-viewport:hover,
.spf-scrollbar-auto .spf-mockup-viewport:focus,
.spf-scrollbar-auto .spf-mockup-viewport.spf-is-dragging {
	scrollbar-color: var(--spf-scrollbar-thumb) var(--spf-scrollbar-track);
}

.spf-preview-link {
	display: block;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.spf-mockup-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: #0a0a0a;
	image-rendering: auto;
	-webkit-user-drag: none;
	user-select: none;
	transform: none !important;
	backface-visibility: visible;
}

.spf-mockup-viewport.spf-drag-enabled {
	cursor: grab;
}

.spf-mockup-viewport.spf-is-dragging {
	cursor: grabbing;
	user-select: none;
}

.spf-scroll-buttons {
	position: absolute;
	top: 50%;
	right: 14px;
	z-index: 7;
	display: flex;
	flex-direction: column;
	gap: 7px;
	transform: translateY(-50%);
}

.spf-scroll-buttons-left .spf-scroll-buttons {
	left: 14px;
	right: auto;
}

.spf-scroll-buttons-right .spf-scroll-buttons {
	left: auto;
	right: 14px;
}

.spf-scroll-button,
.spf-play-pause {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 7px;
	background: rgba(5, 5, 5, 0.76);
	color: rgba(255, 255, 255, 0.82);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
	cursor: pointer;
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.spf-scroll-button:hover,
.spf-scroll-button:focus-visible,
.spf-play-pause:hover,
.spf-play-pause:focus-visible {
	border-color: rgba(78, 131, 255, 0.82);
	background: rgba(53, 112, 238, 0.88);
	color: #ffffff;
	transform: translateY(-1px);
}

.spf-scroll-button:disabled {
	opacity: 0.28;
	cursor: not-allowed;
	transform: none;
}

.spf-scroll-button svg,
.spf-play-pause svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.spf-play-pause {
	position: absolute;
	left: 14px;
	bottom: 14px;
	z-index: 7;
}

.spf-play-pause svg {
	fill: currentColor;
	stroke: none;
}

.spf-play-icon {
	display: none;
}

.spf-play-pause.spf-is-paused .spf-pause-icon {
	display: none;
}

.spf-play-pause.spf-is-paused .spf-play-icon {
	display: inline-flex;
}

.spf-scroll-hint {
	position: absolute;
	left: 50%;
	bottom: 16px;
	z-index: 6;
	padding: 7px 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.7);
	color: rgba(255, 255, 255, 0.74);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.15px;
	white-space: nowrap;
	pointer-events: none;
	transform: translateX(-50%);
	transition: opacity 0.35s ease, transform 0.35s ease;
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
}

.spf-scroll-hint.spf-hint-hidden {
	opacity: 0;
	transform: translate(-50%, 8px);
}

.spf-scroll-progress {
	position: relative;
	z-index: 8;
	width: 100%;
	height: 3px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.07);
}

.spf-scroll-progress-fill {
	display: block;
	width: 0;
	height: 100%;
	background: #4D7CFE;
	transform-origin: left center;
	transition: width 0.08s linear;
}

/* Content and sidebar --------------------------------------------------- */
.spf-content-grid {
	--spf-sidebar-width: 340px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--spf-sidebar-width);
	align-items: start;
	gap: 40px;
	margin: 0 0 64px;
}

.spf-single-portfolio-wrapper:not(.spf-has-sidebar) .spf-content-grid,
.spf-single-portfolio-wrapper:not(.spf-has-content) .spf-content-grid {
	grid-template-columns: minmax(0, 1fr);
}

.spf-main-content {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 38px;
}

.spf-order-content_sidebar .spf-main-content { order: 1; }
.spf-order-content_sidebar .spf-sidebar-card { order: 2; }
.spf-order-sidebar_content .spf-sidebar-card { order: 1; }
.spf-order-sidebar_content .spf-main-content { order: 2; }

.spf-content-block {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0 solid transparent;
	background: transparent;
}

.spf-content-block-inner {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.spf-content-block-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.spf-content-block-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: var(--spf-block-icon-color, #4e83ff);
	font-size: 18px;
	line-height: 1;
}

.spf-content-block-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.spf-content-block-title {
	margin: 0 0 13px;
	color: var(--spf-block-title-color, #ffffff);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.015em;
}

.spf-content-block-description {
	margin: 0;
	color: var(--spf-block-text-color, rgba(255, 255, 255, 0.58));
	font-size: 14px;
	font-weight: 400;
	line-height: 1.78;
}

.spf-content-block-description > :first-child { margin-top: 0; }
.spf-content-block-description > :last-child { margin-bottom: 0; }
.spf-content-block-description a { color: #7ca4ff; }

.spf-sidebar-card {
	position: relative;
	padding: 28px;
	border: 1px solid rgba(255, 255, 255, 0.085);
	border-radius: 14px;
	background: #111111;
	box-shadow: 0 14px 48px rgba(0, 0, 0, 0.24);
}

.spf-sidebar-info-list {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.spf-sidebar-row {
	display: flex;
	align-items: flex-start;
	gap: 11px;
}

.spf-sidebar-row-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--spf-row-icon-color, #6f9cff);
	font-size: 15px;
	line-height: 1;
}

.spf-sidebar-row-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.spf-sidebar-row-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.spf-sidebar-label {
	margin: 0 0 6px;
	color: var(--spf-row-label-color, rgba(255, 255, 255, 0.38));
	font-size: 10px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 1.15px;
	text-transform: uppercase;
}

.spf-sidebar-value {
	display: inline-block;
	margin: 0;
	color: var(--spf-row-value-color, #ffffff);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	text-decoration: none;
}

a.spf-sidebar-value:hover,
a.spf-sidebar-value:focus-visible {
	color: #8eb0ff;
	text-decoration: none;
}

.spf-tech-stack-section {
	margin-top: 24px;
}

.spf-tech-stack-label {
	margin-bottom: 10px;
}

.spf-tech-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.spf-tech-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.055);
	color: rgba(255, 255, 255, 0.77);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.spf-tech-tag:hover,
.spf-tech-tag:focus-visible {
	border-color: rgba(78, 131, 255, 0.46);
	background: rgba(78, 131, 255, 0.16);
	color: #a9c5ff;
	text-decoration: none;
	transform: translateY(-1px);
}

.spf-cta-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 24px 0 0;
	padding: 13px 20px;
	border: 1px solid #4D7CFE;
	border-radius: 6px;
	background: #4D7CFE;
	color: #ffffff;
	box-shadow: 0 8px 26px rgba(59, 130, 246, 0.24);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	transition: color 0.23s ease, background-color 0.23s ease, border-color 0.23s ease, box-shadow 0.23s ease, transform 0.23s ease;
}

.spf-cta-button:hover,
.spf-cta-button:focus-visible {
	border-color: #4D7CFE;
	background: #4D7CFE;
	color: #ffffff;
	box-shadow: 0 12px 34px rgba(37, 99, 235, 0.36);
	transform: translateY(-2px);
	text-decoration: none;
}

.spf-cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.spf-cta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Testimonial ---------------------------------------------------------- */
.spf-testimonial-wrap {
	margin: 0;
}

.spf-testimonial-card {
	position: relative;
	overflow: hidden;
	padding: 48px 52px;
	border: 1px solid rgba(59, 130, 246, 0.68);
	border-radius: 15px;
	background: #090909;
	box-shadow: inset 0 0 70px rgba(59, 130, 246, 0.025);
	text-align: center;
}

.spf-testimonial-card::before {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.12), transparent 45%);
	content: "";
	pointer-events: none;
}

.spf-testimonial-card > * {
	position: relative;
	z-index: 1;
}

.spf-testimonial-quote-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 14px;
	color: #315da8;
	font-size: 34px;
	line-height: 1;
}

.spf-testimonial-quote-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.spf-testimonial-stars {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	margin: 0 0 22px;
}

.spf-testimonial-stars svg {
	width: 18px;
	height: 18px;
	fill: #ffc107;
}

.spf-testimonial-text {
	max-width: 760px;
	margin: 0 auto 26px;
	padding: 0;
	border: 0;
	color: rgba(255, 255, 255, 0.94);
	font-size: 18px;
	font-weight: 500;
	font-style: normal;
	line-height: 1.55;
}

.spf-testimonial-author-image {
	display: block;
	width: 52px;
	height: 52px;
	margin: 0 auto 12px;
	border-radius: 50%;
	object-fit: cover;
}

.spf-testimonial-author-name {
	margin: 0 0 4px;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.spf-testimonial-author-title {
	margin: 0;
	color: rgba(255, 255, 255, 0.48);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.35;
	text-transform: uppercase;
	letter-spacing: 0.55px;
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
	.spf-single-portfolio-container {
		padding-inline: 28px;
	}

	.spf-content-grid {
		--spf-sidebar-width: 300px;
		gap: 32px;
	}

	.spf-mockup-viewport {
		height: 340px;
	}
}

@media (max-width: 767px) {
	.spf-single-portfolio-container {
		padding: 42px 22px 60px;
	}

	.spf-project-title {
		font-size: clamp(28px, 9vw, 40px);
	}

	.spf-mockup-bar {
		gap: 8px;
		padding-inline: 10px;
	}

	.spf-mockup-dots {
		gap: 4px;
	}

	.spf-mockup-dot {
		width: 8px;
		height: 8px;
	}

	.spf-browser-nav button {
		width: 27px;
		height: 27px;
	}

	.spf-mockup-viewport {
		height: 230px;
	}

	.spf-scroll-buttons {
		right: 9px;
	}

	.spf-scroll-buttons-left .spf-scroll-buttons {
		left: 9px;
	}

	.spf-scroll-button,
	.spf-play-pause {
		width: 31px;
		height: 31px;
	}

	.spf-play-pause {
		left: 9px;
		bottom: 9px;
	}

	.spf-scroll-hint {
		bottom: 10px;
		max-width: calc(100% - 95px);
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.spf-content-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 34px;
	}

	.spf-mobile-order-content_sidebar .spf-main-content { order: 1; }
	.spf-mobile-order-content_sidebar .spf-sidebar-card { order: 2; }
	.spf-mobile-order-sidebar_content .spf-sidebar-card { order: 1; }
	.spf-mobile-order-sidebar_content .spf-main-content { order: 2; }

	.spf-testimonial-card {
		padding: 36px 25px;
	}

	.spf-testimonial-text {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.spf-single-portfolio-container {
		padding-inline: 16px;
	}

	.spf-mockup-viewport {
		height: 205px;
	}

	.spf-sidebar-card {
		padding: 23px;
	}

	.spf-testimonial-card {
		padding: 30px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spf-single-portfolio-wrapper *,
	.spf-single-portfolio-wrapper *::before,
	.spf-single-portfolio-wrapper *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
