:where([class^="ri-"])::before {
	content: "\f3c2";
}

body {
	font-family: 'Montserrat', sans-serif;
	color: #333;
}

.header-blur {
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	background-color: rgba(255, 255, 255, 0.8);
}

.masonry-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 50px));
	grid-auto-rows: 10px;
	grid-gap: 14px;
	justify-content: center;
}

.masonry-item {
	grid-row-end: span var(--span);
}

/* --- Modal image fit fix, красиво без искажений --- */
.modal-content {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	width: 100vw;
	box-sizing: border-box;
	padding: 0;
}

.before-after-slider {
	position: relative;
	width: 90vw;
	max-width: 1000px;
	height: 90vh;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.before-after-slider img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 16px;
	background: #222;
}

.before-after-slider .before,
.before-after-slider .after {
	object-fit: contain !important;
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: 100%;
}

.slider-handle {
	z-index: 2;
}

@media (max-width: 700px) {
	.before-after-slider {
		width: 98vw;
		height: 60vh;
		max-width: 100vw;
		max-height: 70vh;
	}
}

/* --- End modal image fit fix --- */

.before-after-slider .before,
.before-after-slider .after {
	position: absolute;
	top: 0;
	left: 0;
	max-width: 100%;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.before-after-slider .before {
	clip-path: polygon(0 0, var(--pos) 0, var(--pos) 100%, 0 100%);
}

.slider-handle {
	position: absolute;
	top: 0;
	left: var(--pos);
	width: 4px;
	height: 100%;
	background-color: white;
	cursor: ew-resize;
	transform: translateX(-50%);
	z-index: 10;
}

.slider-handle::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	background-color: white;
	border-radius: 50%;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
}

.slider-handle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(45deg);
	width: 20px;
	height: 20px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z' fill='%23000'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	overflow: hidden;
}

.modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	color: white;
	font-size: 30px;
	cursor: pointer;
	z-index: 1010;
}

.modal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: white;
	font-size: 30px;
	cursor: pointer;
	z-index: 1010;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
}

.modal-prev {
	left: 20px;
}

.modal-next {
	right: 20px;
}

.timeline {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
}

.timeline::after {
	content: '';
	position: absolute;
	width: 2px;
	background-color: #1a1a1a;
	top: 0;
	bottom: 0;
	left: 50%;
	margin-left: -1px;
}

.timeline-item {
	position: relative;
	width: 50%;
	padding: 10px 40px;
}

.timeline-item::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	background-color: white;
	border: 4px solid #1a1a1a;
	border-radius: 50%;
	top: 15px;
	z-index: 1;
}

.timeline-left {
	left: 0;
}

.timeline-right {
	left: 50%;
}

.timeline-left::after {
	right: -10px;
}

.timeline-right::after {
	left: -10px;
}

.timeline-content {
	padding: 20px;
	background-color: white;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
	.timeline::after {
		left: 31px;
	}

	.timeline-item {
		width: 100%;
		padding-left: 70px;
		padding-right: 25px;
	}

	.timeline-left::after,
	.timeline-right::after {
		left: 21px;
	}

	.timeline-right {
		left: 0;
	}
}

.custom-checkbox {
	display: none;
}

.custom-checkbox+label {
	position: relative;
	padding-left: 35px;
	cursor: pointer;
	display: inline-block;
	line-height: 25px;
}

.custom-checkbox+label:before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 25px;
	height: 25px;
	border: 2px solid #1a1a1a;
	background: #fff;
	border-radius: 4px;
}

.custom-checkbox:checked+label:after {
	content: '';
	position: absolute;
	left: 7px;
	top: 3px;
	width: 10px;
	height: 15px;
	border: solid #1a1a1a;
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

input[type="text"],
input[type="email"],
textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	margin-bottom: 20px;
	font-family: 'Montserrat', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
	outline: none;
	border-color: #1a1a1a;
}

.category-button {
	position: relative;
	overflow: hidden;
}

.category-button::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background-color: #1a1a1a;
	transition: all 0.3s ease;
	transform: translateX(-50%);
}

.category-button.active::after,
.category-button:hover::after {
	width: 100%;
}

#mobile-menu {
	display: none;
	transition: transform 0.3s, opacity 0.3s;
	transform: translateY(-100%);
	opacity: 0;
	z-index: 100;
}

#mobile-menu.open {
	display: block;
	transform: translateY(0);
	opacity: 1;
}

.lang-btn {
  transition: all 0.2s;
}
.lang-btn.active,
.lang-btn:active,
.lang-btn.selected {
  background-color: #1a1a1a !important;
  color: #fff !important;
  border-color: #1a1a1a !important;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.08);
}
.lang-btn:focus {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}