.page-directory__inner {
	max-width: 1400px;
	margin: 0 auto;
}

/* заголовок */


/* ===== FILTERS ===== */
.filters__body {
	display: flex;
	align-items: center;
	justify-content: start;
	width: 100%;
	column-gap: 32px;
}

.directory-filters {
	display: flex;
	align-items: center;
	justify-content: start;
	column-gap: 32px;
	row-gap: 12px;
	align-items: center;
	margin-bottom: 42px;
}

/* поиск */
.directory-filters__search {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
	width: 100%;
	height: 50px;
	max-height: 50px;
	max-width: 520px;
}

.directory-filters__search input {
	width: 100%;
	padding: 10px 0px 16px 0px;
	color: #626262;
	border-bottom: 1px solid #09071433;
	font-size: 18px;
	line-height: 120%;
	font-weight: 400;
	outline: none;
}

.directory-filters__search input::placeholder {
	color: #626262;
}

.directory-filters__search-icon {
	position: absolute;
	right: 0px;
	width: 24px;
	height: 24px;
	opacity: 1;
}

/* селект */
.directory-filters__select {
	position: relative;
	width: 100%;
	max-width: 380px;
	min-width: 0;
}

.directory-filters__select select {
	width: 100%;
	max-height: 50px;
	padding: 12px 0px 18px 0px;
	border-bottom: 1px solid #09071433;
	background: #fff;
	color: #626262;
	appearance: none;
	font-size: 18px;
	line-height: 120%;
	font-weight: 400;
	outline: none;
}

.directory-filters__select::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid #111827;
	border-bottom: 1.5px solid #111827;
	transform: translateY(-50%) rotate(45deg);
	pointer-events: none;
}

/* этажи */
.directory-filters__floors {
	display: flex;
	align-items: center;
	justify-content: start;
	gap: 16px;
	width: 100%;
	max-width: 250px;
}

.directory-filters__label {
	font-size: 16px;
	font-weight: 400;
	color: #000000;
}

.directory-filters__group {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.directory-filters__btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #0907144D;
	background: transparent;
	cursor: pointer;
	font-size: 16px;
	font-weight: 400;
	line-height: 120%;
	color: #4b5563;
}

.directory-filters__btn.is-active {
	background: #111827;
	color: #fff;
}

/* план этажей */
.directory-filters__plan {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 18px 0px;
	height: 54px;
	width: 100%;
	max-width: 196px;
	border-radius: 30px;
	justify-content: center;
	border: 1px solid #111827;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	font-weight: 500;
	line-height: 120%;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	align-self: start;
}

.directory-filters__plan span {
	white-space: nowrap;
}

.directory-filters__plan svg {
	width: 16px;
	height: 16px;
}

/* кастомный селект */
.directory-filters__select {
	position: relative;
	width: 100%;
	max-width: 280px;
	font-family: inherit;
}

.custom-select__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 10px 14px;
	font-size: 16px;
	background: #fff;
	cursor: pointer;
}

.custom-select__label {
	font-size: 16px;
	color: #333;
}

.custom-select__arrow {
	fill: #666;
	transition: transform 0.3s ease;
}

.directory-filters__select.open .custom-select__arrow {
	transform: rotate(180deg);
}

.custom-select__options {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	outline: 1px solid #ccc;
	border-top: none;
	z-index: 10;
	border-radius: 12px;
	max-height: 0;
	overflow: hidden;
	list-style: none;
	margin: 0;
	padding: 0;
	transition: max-height 0.3s ease;
}

.directory-filters__select.open .custom-select__options {
	max-height: 500px;
}

.custom-select__options li {
	padding: 10px 14px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.custom-select__options li:hover {
	background: #f0f0f0;
}

/* ===== GRID ===== */

.directory-flex {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 карточки в ряд на больших экранах */
	gap: 16px;
}

/* 3 карточки в ряд ≤ 1440px */
@media (max-width: 1440px) {
	.directory-flex {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* 2 карточки в ряд ≤ 768px */
@media (max-width: 768px) {
	.directory-flex {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* 1 карточка в ряд ≤ 560px */
@media (max-width: 560px) {
	.directory-flex {
		grid-template-columns: 1fr;
	}
}

/* ===== CARD ===== */

.directory-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 20px;
	background: #fff;
	border-radius: 18px;
	border: 1px solid #5858584D;
	width: 100%;
	transition:
		box-shadow 0.18s ease,
		transform 0.18s ease,
		border-color 0.18s ease;
}

.directory-card:hover {
	transform: translateY(-2px);
	border-color: #5858584D;
}

.directory-card__floor {
	padding: 10px 10px;
	border-radius: 999px;
	background: #F7F7F7;
	font-size: 18px;
	color: #090714;
	width: 100%;
	max-width: 98px;
	font-weight: 400;
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: end;
	margin-bottom: 26px;
	align-self: end;
}

.directory-card__logo {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	flex: 1 1 132px;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin-bottom: 40px;
	max-height: 132px;
}

.directory-card__logo img {
	width: 100%;
	max-width: 320px;
	height: 100%;
	max-height: 132px;
	object-fit: contain;
	display: block;
}

.directory-card__body {
	display: flex;
	flex-direction: column;
	row-gap: 6px;
}

.directory-card__title {
	margin: 0;
	font-size: 22px;
	font-weight: 500;
	text-transform: uppercase;
	color: #111827;
}

.directory-card__subtitle {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	color: #626262;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ===== ADAPTIVE ===== */
@media (max-width: 1300px) {
	.filters__body {
		flex-wrap: wrap;
		row-gap: 33px;
	}

	.directory-filters__search,
	.directory-filters__select {
		flex: 1 1 250px;
	}

	.directory-filters__floors {
		flex: 1 1 100%;
	}
}

@media (max-width: 1024px) {
	.directory-filters {
		position: relative;
	}

	.directory-filters__floors {
		justify-content: flex-start;
	}

	.directory-filters__plan {
		align-self: end;
		position: absolute;
		bottom: 0;
		right: 0;
	}
}

.news__body {
	padding-bottom: 0;
}

@media (max-width: 640px) {
	.page-directory {
		padding: 24px 12px 40px;
	}

	.directory-filters__search,
	.directory-filters__select {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.directory-flex {
		justify-content: center;
	}

	.directory-filters {
		flex-direction: column;
		row-gap: 32px;
	}

	.directory-filters__plan {
		width: 100%;
		position: static;
		justify-content: center;
	}
}
