﻿/* ===================== 1) PAGE HERO ===================== */
.page-hero {
	padding: 1.75rem 0 0.5rem;
}

.page-hero h1 {
	margin: 0 0 12px;
	font-size: var(--section-title-size);
	font-weight: var(--section-title-weight);
	color: var(--ink);
	text-align: center;
	line-height: 1.2;
}

/* ===================== PROJECT FILTERS ===================== */
.project-filters {
	padding-bottom: 0;
	margin-bottom: 0.75rem;
}

.filters-form {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 1.1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.filters-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.filter-field {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.field-label {
	font-weight: 700;
}

.project-filters input[type='search'] {
	width: 100%;
	padding: 0.8rem 1rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	font: inherit;
	color: var(--ink);
	background: var(--chip);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-filters input[type='search']:focus {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.15);
	outline: none;
}

.price-inputs {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.price-inputs__dash {
	color: var(--muted, #98a2b3);
	font-size: 1.1rem;
}

.price-input {
	box-sizing: border-box;
	width: 10rem;
	padding: 0.45rem 0.6rem;
	padding-left: 2.1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font: inherit;
	color: var(--ink);
	background: var(--chip);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.price-input-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	width: 10rem;
}

.price-inline-label {
	position: absolute;
	left: 0.6rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: rgba(0, 0, 0, 0.45);
	font-size: 0.9rem;
	z-index: 2;
}

.price-input:focus {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.15);
	outline: none;
}

@media (max-width: 720px) {
	.price-input {
		width: 100%;
	}

	.price-inputs {
		width: 100%;
	}
}

.filter-range {
	margin-top: 10px;
	padding: 0.05rem 0 0.15rem;
}

.range-track {
	position: relative;
	height: 0.3rem;
	background: #e4e7ec;
	border-radius: 999px;
}

.range-progress {
	position: absolute;
	inset: 0;
	background: var(--primary, var(--blue));
	border-radius: inherit;
}

.range-inputs {
	position: relative;
	height: 1.1rem;
	margin-top: -0.55rem;
}

.filter-range input[type='range'] {
	position: absolute;
	width: 100%;
	top: 0;
	left: 0;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.filter-range input[type='range']::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--primary, var(--blue));
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
	transition: transform 0.2s ease;
	cursor: pointer;
}

.filter-range input[type='range']::-moz-range-thumb {
	pointer-events: auto;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--primary, var(--blue));
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
	transition: transform 0.2s ease;
	cursor: pointer;
}

.filter-range input[type='range']:hover::-webkit-slider-thumb {
	transform: scale(1.18);
}

.filter-range input[type='range']:hover::-moz-range-thumb {
	transform: scale(1.18);
}

/* ===================== Tags ===================== */
.tags-field .tag-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.tag-button {
	border: 1px solid var(--line);
	background: var(--chip, #f2f4f7);
	color: var(--ink);
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tag-button:hover {
	border-color: var(--blue);
	color: var(--blue);
}

.tag-button.is-active {
	background: var(--blue);
	color: #fff;
	border-color: var(--blue);
	box-shadow: 0 6px 16px rgba(47, 118, 255, 0.3);
}

.filters-actions {
	display: flex;
	justify-content: flex-start;
	margin-top: 0;
}

.filters-reset {
	border: 1px solid var(--line);
	background: transparent;
	color: var(--ink);
	font-weight: 600;
	padding: 0.5rem 1.25rem;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 2.5rem;
}

.filters-reset:hover {
	border-color: var(--blue);
	color: var(--blue);
}

@media (max-width: 720px) {
	.project-filters {
		margin-bottom: 0.5rem;
	}

	.filters-form {
		padding: 0.9rem 1rem;
		gap: 0.6rem;
		border-radius: 1.25rem;
	}

	.filters-row {
		flex-direction: column;
	}

	.filter-field {
		flex-basis: 100%;
	}
}

@media (max-width: 540px) {
	.project-filters input[type='search'] {
		padding: 0.75rem 0.9rem;
	}

	.range-inputs {
		height: 0.95rem;
		margin-top: -0.45rem;
	}

	.filters-actions {
		justify-content: stretch;
	}

	.filters-reset {
		width: 100%;
	}
}

/* ===================== 2) PROJECTS LIST & CARDS ===================== */
.projects-grid {
	display: grid;
	gap: 1.125rem;
	grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
}

.project-card {
	height: 100%;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(17, 25, 40, 0.04);
	display: flex;
	flex-direction: column;
	cursor: pointer;
	transition: transform 0.2s ease;
}

.project-card:hover {
	transform: scale(1.03);
	position: relative;
	z-index: 5;
}

.project-card-link {
	display: block;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.card-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	background: #ddd;
	overflow: hidden;
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-overlay {
	position: absolute;
	inset: auto 0 0 0;
	padding: 1.125rem;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0) 0%,
		rgba(14, 17, 23, 0.65) 80%
	);
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	justify-content: flex-end;
	text-align: center;
}

.card-overlay.dark {
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.05) 0%,
		rgba(8, 10, 15, 0.75) 85%
	);
}

.card-overlay h3 {
	margin: 0;
	font-size: clamp(1.125rem, 2.4vw, 1.5rem);
	font-weight: 800;
}

.card-overlay .price {
	font-weight: 600;
	white-space: nowrap;
}

.project-card .features {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.875rem 1.125rem;
	list-style: none;
	margin: 0.875rem 1rem 0.625rem;
	padding: 0;
}

.project-card .features li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--ink);
	white-space: normal;
	min-width: 0;
}

.project-card .features img {
	width: 1.125rem;
	height: 1.125rem;
	opacity: 0.9;
	flex: 0 0 auto;
	margin-top: 2px;
}

.project-card .features .feature-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.project-card .features .feature-text span {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--muted);
}

.project-card .features .feature-text strong {
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--ink);
}

.project-card .tags-wrapper {
	margin: 0.5rem 0 0;
	padding: 0 0.5rem 0.5rem;
}

.project-card .tags {
	display: flex;
	flex-wrap: wrap;
	column-gap: 0.5rem;
	row-gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.project-card .tags li {
	display: inline-flex;
	align-items: center;
	font-size: 0.8125rem;
	padding: 0.375rem 0.75rem;
	background: var(--chip);
	border: 1px solid var(--line);
	color: #29323d;
	border-radius: 999px;
	line-height: 1;
	white-space: nowrap;
}

.project-card-link.is-hidden,
.project-card.is-hidden {
	display: none !important;
}

.projects-empty {
	margin-top: 1.5rem;
	padding: 1.25rem;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	text-align: center;
	background: #fff;
	color: var(--muted, #667085);
	font-weight: 600;
}

.projects-empty[hidden] {
	display: none !important;
}

@media (min-width: 1037px) {
	.projects-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.project-card {
		max-width: 100%; /* убираем ограничение */
	}
}

@media (min-width: 1037px) {
	.projects-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.project-card {
		max-width: 100%; /* убираем ограничение */
	}
}

@media (max-width: 1037px) {
	.projects-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.project-card {
		max-width: 100%; /* убираем ограничение */
	}
}

@media (max-width: 640px) {
	.projects-grid {
		grid-template-columns: repeat(1, 1fr);
	}

	.project-card {
		max-width: 100%; /* убираем ограничение */
	}
}
