/* Страница «Реализованные проекты» — по макету Figma Steps / 36 */

.rp-page {
	width: 100%;
	max-width: 1220px;
	margin: 0 auto;
	padding: 0 0 40px;
	box-sizing: border-box;
}

/* H1 страницы (внутри .white-block вместе с контентом) */
body .white-block:has(.rp-page) #pagetitlee {
	font-family: Roboto, sans-serif;
	font-weight: 500;
	font-size: 52px;
	line-height: 1.15;
	color: #333333;
	margin: 0 0 32px;
	clear: both;
}

.rp-page__grid {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
}

.rp-page__row {
	display: flex;
	flex-direction: row;
	gap: 24px;
	width: 100%;
	align-items: stretch;
}

.rp-page__item {
	position: relative;
	overflow: hidden;
	min-width: 0;
	background: #fff;
}

.rp-page__item--narrow {
	flex: 0 0 390px;
	width: 390px;
	max-width: 32%;
}

.rp-page__item--wide {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

.rp-page .realized-project {
	position: relative;
	width: 100%;
	height: 480px;
	overflow: hidden;
}

.rp-page .realized-project__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.rp-page .realized-project__pin {
	position: absolute;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 100px;
	background: #c52323;
	backdrop-filter: blur(15.3px);
	-webkit-backdrop-filter: blur(15.3px);
	transform: translate(-50%, -50%);
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.rp-page .realized-project__pin-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transform: translate(-50%, -50%);
}

.rp-page .realized-project__pin.is-active .realized-project__pin-dot,
.rp-page .realized-project__pin:hover .realized-project__pin-dot {
	width: 10px;
	height: 10px;
}

.rp-page .realized-project__popup {
	position: absolute;
	z-index: 3;
	display: none;
	width: 289px;
	max-width: calc(100% - 24px);
	padding: 16px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.11);
	transform: translate(-50%, calc(-100% - 30px));
	--popup-arrow-left: 50%;
}

.rp-page .realized-project__popup.is-open {
	display: block;
}

.rp-page .realized-project__popup.is-below {
	transform: translate(-50%, 30px);
}

.rp-page .realized-project__popup::after {
	content: "";
	position: absolute;
	left: var(--popup-arrow-left);
	bottom: -10px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 10px 9px 0 9px;
	border-color: #fff transparent transparent transparent;
	transform: translateX(-50%);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
	pointer-events: none;
}

.rp-page .realized-project__popup.is-below::after {
	bottom: auto;
	top: -10px;
	border-width: 0 9px 10px 9px;
	border-color: transparent transparent #fff transparent;
}

.rp-page .realized-project__popup-close {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.rp-page .realized-project__popup-close:before,
.rp-page .realized-project__popup-close:after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 2px;
	background: #888;
}

.rp-page .realized-project__popup-close:before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.rp-page .realized-project__popup-close:after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.rp-page .realized-project__popup-title {
	display: block;
	margin-right: 16px;
	margin-bottom: 16px;
	color: #c52323;
	font-family: Roboto, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.43;
	text-decoration: none;
}

.rp-page .realized-project__popup-title:hover {
	color: #a01c1c;
}

.rp-page .realized-project__popup-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.rp-page .realized-project__popup-price {
	flex: 1 1 auto;
	min-width: 0;
	color: #333333;
	font-family: Roboto, sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}

.rp-page .realized-project__popup-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: #c52323;
	cursor: pointer;
	flex-shrink: 0;
}

.rp-page .realized-project__popup-cart:hover {
	opacity: 0.9;
}

.rp-page .realized-project__popup-cart.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.rp-page .realized-project__popup-cart.is-added {
	background: #2e7d32;
}

.rp-page .realized-project__popup-cart--preorder {
	width: auto;
	min-width: 110px;
	padding: 0 12px;
	font-family: Roboto, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: #fff;
	background: #949494;
	text-decoration: none;
	box-sizing: border-box;
}

.rp-page__empty {
	padding: 48px 0;
	text-align: center;
	font-family: Roboto, sans-serif;
	font-size: 16px;
	color: #8d8d8d;
}

.rp-page__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	width: 100%;
	margin-top: 64px;
}

.rp-page__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #cc2929;
	font-family: Roboto, sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.71;
	cursor: pointer;
}

.rp-page__more:hover {
	opacity: 0.85;
}

.rp-page__more.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.rp-page__more-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}

.rp-page__pager {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
}

.rp-page__pager-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	border-radius: 6px;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 2.4;
	color: #333333;
	text-decoration: none;
	box-sizing: border-box;
}

.rp-page__pager-num.is-active {
	background: #cc2929;
	color: #ffffff;
	font-weight: 500;
	pointer-events: none;
}

.rp-page__pager-num:hover:not(.is-active) {
	background: #f5f5f5;
}

.rp-page__pager-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: 0 4px;
	color: #333333;
	text-decoration: none;
}

.rp-page__pager-arrow.is-disabled {
	color: #8d8d8d;
	pointer-events: none;
	opacity: 0.7;
}

.rp-page__pager-arrow--prev {
	margin-right: 8px;
}

.rp-page__pager-arrow--next {
	margin-left: 8px;
}

@media (max-width: 1280px) {
	.rp-page__item--narrow {
		flex: 0 0 32%;
		width: 32%;
		max-width: 32%;
	}
}

@media (max-width: 900px) {
	body .white-block:has(.rp-page) #pagetitlee {
		font-size: 32px;
		margin-bottom: 24px;
	}

	.rp-page__row {
		flex-direction: column;
		gap: 16px;
	}

	.rp-page__item--narrow,
	.rp-page__item--wide {
		flex: 1 1 auto;
		width: 100%;
		max-width: 100%;
	}

	.rp-page .realized-project {
		height: 420px;
	}

	.rp-page__footer {
		margin-top: 40px;
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.rp-page .realized-project__pin {
		width: 24px;
		height: 24px;
	}

	.rp-page .realized-project__pin-dot {
		width: 12px;
		height: 12px;
	}

	.rp-page .realized-project__pin.is-active .realized-project__pin-dot,
	.rp-page .realized-project__pin:hover .realized-project__pin-dot {
		width: 8px;
		height: 8px;
	}

	.rp-page .realized-project__popup {
		width: min(289px, calc(100% - 16px));
	}
}
