/* Front page story categories critical styles. */
.story-categories {
	padding: 0;
}

.story-categories__shell {
	padding: 22px 12px 14px;
	border: 1px solid rgba(200, 155, 91, 0.18);
	border-radius: 12px;
	background: #fffdfa;
	box-shadow: 0 18px 38px rgba(54, 28, 12, 0.05);
}

.story-categories__head {
	display: grid;
	justify-items: center;
	gap: 8px;
	margin-bottom: 20px;
	text-align: center;
}

.story-categories__eyebrow {
	color: #b48645;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.story-categories__head h2 {
	margin: 0;
	color: #3b2017;
	font-family: var(--psdv-heading-font);
	font-size: clamp(34px, 4vw, 58px);
	font-weight: 400;
	line-height: 1.02;
}

.story-categories__divider {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 170px;
	height: 52px;
}

.story-categories__divider::before,
.story-categories__divider::after {
	position: absolute;
	top: 50%;
	width: calc(50% - 34px);
	height: 1px;
	background: rgba(200, 155, 91, 0.6);
	content: '';
}

.story-categories__divider::before {
	left: 0;
}

.story-categories__divider::after {
	right: 0;
}

.story-categories__divider img {
	position: relative;
	z-index: 1;
	display: block;
	width: auto;
	height: 52px;
	object-fit: contain;
}

.story-categories__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 16px;
}

.story-category-card {
	position: relative;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	min-width: 0;
	overflow: hidden;
	border: 1px solid rgba(200, 155, 91, 0.16);
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 14px 32px rgba(54, 28, 12, 0.05);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.story-category-card:hover {
	border-color: rgba(72, 6, 10, 0.28);
	box-shadow: 0 18px 38px rgba(54, 28, 12, 0.1);
	transform: translateY(-2px);
}

.story-category-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #ede5d9;
}

.story-category-card__image img,
.story-category-card__image-el {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.32s ease;
}

.story-category-card:hover .story-category-card__image img,
.story-category-card:hover .story-category-card__image-el {
	transform: scale(1.025);
}

.story-category-card__body {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 12px;
	padding: 18px 18px 16px;
}

.story-category-card__body h3 {
	margin: 0;
	font-family: var(--psdv-heading-font);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.05;
}

.story-category-card__body h3 a {
	color: #3b2017;
	text-decoration: none;
}

.story-category-card__body p {
	margin: 0;
	color: #4f4339;
	font-size: 18px;
	line-height: 1.55;
}

.story-category-card__link {
	position: relative;
	isolation: isolate;
	align-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	margin-top: 2px;
	padding: 0 15px;
	overflow: hidden;
	border: 1px solid var(--psdv-button-border);
	border-radius: 999px;
	background: var(--psdv-button-bg);
	box-shadow: var(--psdv-button-shadow);
	color: var(--psdv-button-color);
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.story-category-card__link::before {
	position: absolute;
	z-index: -1;
	inset: 4px;
	border: 1px dashed rgba(255, 232, 176, 0.32);
	border-radius: inherit;
	content: "";
}

.story-category-card__link:hover {
	border-color: var(--psdv-button-border-hover);
	background: var(--psdv-button-bg-hover);
	box-shadow: var(--psdv-button-shadow-hover);
	color: #ffffff;
}

@media (max-width: 760px) {
	.story-categories__grid {
		grid-template-columns: 1fr;
	}

	.story-categories__shell {
		padding-inline: 10px;
	}

	.story-categories__head h2 {
		font-size: 38px;
	}

	.story-category-card__body h3 {
		font-size: 24px;
	}

	.story-category-card__body p,
	.story-category-card__link {
		font-size: 16px;
	}
}
/* Главная: мобильные категории — кликабельные фото-плитки */
@media (max-width: 760px) {
	.story-categories__grid {
		gap: 14px;
	}

	.story-category-card {
		position: relative;
		display: block;
		min-height: 440px;
		overflow: hidden;
		border: 1px solid rgba(200, 155, 91, 0.30);
		border-radius: 14px;
		background: #1b100e;
		box-shadow: 0 14px 30px rgba(42, 22, 14, 0.14);
	}

	/* Фотография — полноценный фон плитки */
	.story-category-card__image {
		position: absolute !important;
		inset: 0 !important;
		z-index: 0;
		display: block !important;
		width: 100% !important;
		height: 100% !important;
		aspect-ratio: auto !important;
		overflow: hidden;
		background: #1b100e;
	}

	.story-category-card__image img,
	.story-category-card__image-el {
		position: absolute !important;
		inset: 0 !important;
		display: block !important;
		width: 100% !important;
		height: 100% !important;
		max-width: none !important;
		object-fit: cover !important;
		object-position: center;
		transform: none !important;
	}

	/* Затемнение для читаемого текста поверх фото */
	.story-category-card__image::after {
		position: absolute;
		inset: 0;
		z-index: 1;
		background:
			linear-gradient(
				90deg,
				rgba(25, 13, 12, 0.80) 0%,
				rgba(25, 13, 12, 0.44) 52%,
				rgba(25, 13, 12, 0.10) 100%
			),
			linear-gradient(
				0deg,
				rgba(20, 10, 10, 0.72) 0%,
				rgba(20, 10, 10, 0.06) 62%
			);
		content: "";
	}

	/* Текст поверх изображения */
	.story-category-card__body {
		position: relative;
		z-index: 2;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-end;
		min-height: 440px;
		padding: 28px 24px;
		background: transparent !important;
		color: #fffaf6;
		pointer-events: none;
	}

	.story-category-card__body h3 {
		max-width: 84%;
		margin: 0 0 10px;
		font-size: 34px;
		font-weight: 400;
		line-height: 1;
		pointer-events: auto;
	}

	.story-category-card__body h3 a {
		position: static;
		color: #fffaf6;
		text-decoration: none;
	}

	/* Растягиваем ссылку заголовка на всю карточку */
	.story-category-card__body h3 a::after {
		position: absolute;
		z-index: 4;
		inset: 0;
		display: block;
		content: "";
		cursor: pointer;
	}

	.story-category-card__body p {
		max-width: 84%;
		margin: 0;
		color: rgba(255, 250, 246, 0.86);
		font-size: 16px;
		font-weight: 400;
		line-height: 1.42;
	}

	/* Отдельная кнопка больше не нужна */
	.story-category-card__link {
		display: none !important;
	}
}
/* Мобильные фото-плитки: возвращаем читаемые описания */
@media (max-width: 760px) {
	.story-category-card__body {
		justify-content: flex-end;
		padding: 28px 24px 56px;
	}

	.story-category-card__body h3 {
		margin-bottom: 12px;
	}

	.story-category-card__body p {
		display: -webkit-box;
		max-width: 86%;
		max-height: 4.3em;
		padding: 8px 10px;
		overflow: hidden;
		border-left: 1px solid rgba(202, 182, 146, 0.72);
		background: rgba(20, 11, 10, 0.28);
		color: rgba(255, 250, 246, 0.93);
		font-size: 15px;
		line-height: 1.42;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		backdrop-filter: blur(3px);
		-webkit-backdrop-filter: blur(3px);
	}
}
/* Мобильные фото-плитки: описание без размытия */
@media (max-width: 760px) {
	.story-category-card__body p {
		background: rgba(20, 11, 10, 0.18);
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
}
/* Мобильные фото-плитки: полное описание и ровная акцентная линия */
@media (max-width: 760px) {
	.story-category-card__body {
		padding-bottom: 38px;
	}

	.story-category-card__body h3 {
		margin-bottom: 18px;
	}

	.story-category-card__body p {
		display: block;
		width: min(100%, 31rem);
		max-width: 100%;
		max-height: none;
		min-height: 0;
		padding: 2px 0 2px 18px;
		overflow: visible;
		border: 0;
		border-left: 1px solid rgba(202, 182, 146, 0.78);
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		color: rgba(255, 250, 246, 0.94);
		font-size: 15px;
		line-height: 1.48;
		-webkit-box-orient: initial;
		-webkit-line-clamp: unset;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
}
/* Главная: ПК-версия категорий в стиле мобильных фото-плиток */
@media (min-width: 761px) {
	.story-category-card {
		position: relative;
		display: block;
		min-height: 560px;
		overflow: hidden;
		border: 1px solid rgba(200, 155, 91, 0.32);
		border-radius: 14px;
		background: #1b100e;
		box-shadow: 0 16px 36px rgba(42, 22, 14, 0.14);
	}

	.story-category-card__image {
		position: absolute;
		inset: 0;
		z-index: 0;
		display: block;
		width: 100%;
		height: 100%;
		aspect-ratio: auto;
		background: #1b100e;
	}

	.story-category-card__image img,
	.story-category-card__image-el {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		transition: transform 0.45s ease;
	}

	.story-category-card__image::after {
		position: absolute;
		inset: 0;
		z-index: 1;
		background:
			linear-gradient(
				90deg,
				rgba(24, 13, 12, 0.78) 0%,
				rgba(24, 13, 12, 0.38) 58%,
				rgba(24, 13, 12, 0.08) 100%
			),
			linear-gradient(
				0deg,
				rgba(20, 10, 10, 0.84) 0%,
				rgba(20, 10, 10, 0.08) 58%
			);
		content: "";
	}

	.story-category-card:hover {
		border-color: rgba(200, 155, 91, 0.62);
		box-shadow: 0 22px 46px rgba(42, 22, 14, 0.20);
		transform: translateY(-4px);
	}

	.story-category-card:hover .story-category-card__image img,
	.story-category-card:hover .story-category-card__image-el {
		transform: scale(1.045);
	}

	.story-category-card__body {
		position: relative;
		z-index: 2;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-end;
		min-height: 560px;
		padding: 34px 30px;
		background: transparent;
		color: #fffaf6;
		pointer-events: none;
	}

	.story-category-card__body h3 {
		max-width: 88%;
		margin: 0 0 18px;
		font-size: clamp(30px, 2.2vw, 40px);
		font-weight: 400;
		line-height: 1;
		pointer-events: auto;
	}

	.story-category-card__body h3 a {
		position: static;
		color: #fffaf6;
		text-decoration: none;
	}

	/* Вся плитка ведёт в соответствующую категорию */
	.story-category-card__body h3 a::after {
		position: absolute;
		z-index: 4;
		inset: 0;
		display: block;
		content: "";
		cursor: pointer;
	}

	.story-category-card__body p {
		display: block;
		width: 100%;
		max-width: 94%;
		margin: 0;
		padding: 2px 0 2px 18px;
		border: 0;
		border-left: 1px solid rgba(211, 190, 150, 0.78);
		background: transparent;
		box-shadow: none;
		color: rgba(255, 250, 246, 0.94);
		font-size: 17px;
		font-weight: 400;
		line-height: 1.48;
		overflow: visible;
		-webkit-line-clamp: unset;
		-webkit-box-orient: initial;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	/* Отдельная кнопка больше не требуется */
	.story-category-card__link {
		display: none;
	}
}