.pyr-portfolio-detail-page {
	background: linear-gradient(180deg, #f4f9ff 0%, #fff 36%);
}

.pyr-portfolio-detail-shell {
	padding: 44px 0 82px;
}

.pyr-portfolio-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 30px;
	color: #6d7d8e;
	font-size: 12px;
	font-weight: 700;
}

.pyr-portfolio-breadcrumb a {
	color: var(--pyramid-primary);
}

.pyr-portfolio-detail-layout {
	display: grid;
	grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
	gap: clamp(34px, 5vw, 68px);
	align-items: start;
}

.pyr-portfolio-facts {
	position: sticky;
	top: 110px;
	display: grid;
	overflow: hidden;
	padding: 8px 22px;
	border: 1px solid #d9e5f0;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 18px 50px rgba(7, 31, 63, 0.07);
}

.pyr-portfolio-fact {
	padding: 15px 0;
	border-bottom: 1px solid #e5edf4;
}

.pyr-portfolio-fact:last-child {
	border-bottom: 0;
}

.pyr-portfolio-fact span {
	display: block;
	margin-bottom: 5px;
	color: #748395;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.7px;
	text-transform: uppercase;
}

.pyr-portfolio-fact strong {
	color: var(--pyramid-primary-dark);
	font-size: 13px;
	line-height: 1.5;
}

.pyr-portfolio-project-content {
	min-width: 0;
}

.pyr-portfolio-detail-heading {
	margin-bottom: 24px;
	padding: clamp(26px, 4vw, 42px);
	border: 1px solid #d9e6f2;
	border-radius: 22px;
	background: linear-gradient(135deg, #fff, #eef6ff);
}

.pyr-portfolio-detail-heading > span {
	color: var(--pyramid-accent-dark);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}

.pyr-portfolio-detail-heading h1 {
	margin: 10px 0 13px;
	color: var(--pyramid-primary-dark);
	font-size: clamp(34px, 4vw, 50px);
	font-weight: 800;
	letter-spacing: -1.2px;
	line-height: 1.12;
}

.pyr-portfolio-detail-heading p {
	max-width: 780px;
	margin: 0;
	color: #5b6e82;
	font-size: 15px;
	line-height: 1.75;
}

.pyr-portfolio-detail-cover {
	overflow: hidden;
	margin: 0 0 28px;
	border: 1px solid #d8e4ef;
	border-radius: 20px;
	background: #eaf2fa;
	box-shadow: 0 20px 52px rgba(7, 31, 63, 0.08);
}

.pyr-portfolio-detail-cover img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.pyr-portfolio-story {
	display: grid;
	gap: 14px;
}

.pyr-portfolio-story-row {
	display: grid;
	grid-template-columns: 145px minmax(0, 1fr);
	gap: 26px;
	padding: 24px 25px;
	border: 1px solid #dfe8f0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 9px 28px rgba(7, 31, 63, 0.035);
}

.pyr-portfolio-story-row h2 {
	margin: 2px 0 0;
	color: var(--pyramid-primary);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.pyr-portfolio-richtext {
	color: #4e6277;
	font-size: 14.5px;
	line-height: 1.78;
}

.pyr-portfolio-richtext > :first-child {
	margin-top: 0;
}

.pyr-portfolio-richtext > :last-child {
	margin-bottom: 0;
}

.pyr-portfolio-gallery {
	display: grid;
	gap: 24px;
	margin-top: 40px;
}

.pyr-portfolio-gallery > h2 {
	margin: 0;
	color: var(--pyramid-primary-dark);
	font-size: 28px;
	font-weight: 800;
}

.pyr-portfolio-gallery figure {
	margin: 0;
}

.pyr-portfolio-gallery img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #dbe5ee;
	border-radius: 16px;
}

.pyr-portfolio-gallery figcaption {
	padding-top: 8px;
	color: #718194;
	font-size: 12px;
}

.pyr-portfolio-consultation-section {
	border-top: 1px solid #e1eaf2;
}

.pyr-portfolio-consultation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 34px;
	padding: 52px 0;
}

.pyr-portfolio-consultation h2 {
	max-width: 760px;
	margin: 10px 0 8px;
	color: var(--pyramid-primary-dark);
	font-size: clamp(27px, 3vw, 38px);
	font-weight: 800;
	line-height: 1.2;
}

.pyr-portfolio-consultation p {
	max-width: 720px;
	margin: 0;
	color: #607286;
}

.pyr-portfolio-related-section > .container > .pyr-portfolio-grid {
	margin-top: 30px;
}

.pyr-portfolio-related-navigation {
	display: none;
}

@media (max-width: 991px) {
	.pyr-portfolio-detail-layout {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.pyr-portfolio-facts {
		position: static;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		padding: 7px 16px;
	}

	.pyr-portfolio-fact {
		padding: 13px 9px;
		border-right: 1px solid #e5edf4;
		border-bottom: 0;
	}

	.pyr-portfolio-fact:last-child {
		border-right: 0;
	}
}

@media (max-width: 640px) {
	.pyr-portfolio-detail-shell {
		padding: 28px 0 58px;
	}

	.pyr-portfolio-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pyr-portfolio-fact {
		border-right: 0;
		border-bottom: 1px solid #e5edf4;
	}

	.pyr-portfolio-detail-heading {
		padding: 23px 20px;
		border-radius: 18px;
	}

	.pyr-portfolio-detail-cover img {
		height: auto;
		aspect-ratio: auto;
		object-fit: contain;
	}

	.pyr-portfolio-story-row {
		grid-template-columns: 1fr;
		gap: 8px;
		padding: 20px;
	}

	.pyr-portfolio-consultation {
		align-items: stretch;
		flex-direction: column;
	}

	.pyr-portfolio-consultation .pyramid-btn-primary {
		width: 100%;
	}

	.pyr-portfolio-related-slider {
		display: flex;
		grid-template-columns: none;
		gap: 0;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-behavior: smooth;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.pyr-portfolio-related-slider::-webkit-scrollbar {
		display: none;
	}

	.pyr-portfolio-related-slider > .pyr-portfolio-card {
		flex: 0 0 100%;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	.pyr-portfolio-related-navigation {
		display: flex;
		justify-content: center;
		gap: 12px;
		margin-top: 28px;
	}

	.pyr-portfolio-related-navigation button {
		display: inline-grid;
		width: 44px;
		height: 44px;
		padding: 0;
		place-items: center;
		border: 1px solid #dce6ef;
		border-radius: 50%;
		background: #fff;
		color: var(--pyramid-primary);
		font-size: 20px;
		line-height: 1;
		cursor: pointer;
		transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease;
	}

	.pyr-portfolio-related-navigation button:hover,
	.pyr-portfolio-related-navigation button:focus-visible {
		border-color: var(--pyramid-primary);
		color: var(--pyramid-accent-dark);
		outline: none;
	}

	.pyr-portfolio-related-navigation button:focus-visible {
		box-shadow: 0 0 0 3px rgba(22, 101, 216, 0.18);
	}

	.pyr-portfolio-related-navigation button:disabled {
		cursor: default;
		opacity: 0.35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pyr-portfolio-related-slider {
		scroll-behavior: auto;
	}
}
