/* «Другие поводы» — partials/other-occasions.php. Six photo cards that lead to
   the sister pages of the city. Bento: four columns, the first and the last
   card are two columns wide. The hover lift lives on the inner box — the
   outer <a> is a child of [data-stagger] and its transform belongs to the
   scroll reveal of the page script. Tokens come from the page wrapper
   (.esc-den-rozhdenia and the like); the fallbacks are the canon values. */
.esc-also-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(220px, 19vw, 272px);
	gap: 20px;
}

.esc-also-card {
	position: relative;
	display: block;
	border-radius: var(--radius, 16px);
	color: var(--text, #fff);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.esc-also-card.is-wide {
	grid-column: span 2;
}

/* Shadow of the lifted card: opacity, not an animated box-shadow. */
.esc-also-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	box-shadow: 0 26px 50px -22px rgba(0, 0, 0, .85), 0 0 30px -12px rgba(255, 0, 4, .35);
	opacity: 0;
	pointer-events: none;
	transition: opacity .45s ease-in-out, transform .45s ease-in-out;
}

.esc-also .esc-also-in {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	border: 1px solid var(--border, rgba(255, 255, 255, .08));
	border-radius: inherit;
	background: var(--surface, #242424);
	overflow: hidden;
	isolation: isolate;
	transition: transform .45s ease-in-out, border-color .3s ease-in-out;
}

.esc-also-in > img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s ease-in-out;
}

/* ::after of the box is the loading shimmer (.esc-skel); the dimming is ::before. */
.esc-also-in::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(20, 20, 20, .06) 0%, rgba(20, 20, 20, .52) 42%, rgba(15, 15, 15, .96) 100%);
	pointer-events: none;
}

.esc-also-body {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 22px 20px;
	text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
}

.esc-also-tag {
	color: var(--accent-text, #ff6b6d);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.esc-also-title {
	color: #fff;
	font-size: clamp(19px, 1.6vw, 22px);
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
}

.esc-also-text {
	max-width: 46ch;
	color: var(--muted, #b3b3b3);
	font-size: 15px;
	line-height: 1.45;
	text-wrap: pretty;
}

.esc-also-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
}

.esc-also-more svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	transition: transform .3s ease-in-out;
}

.esc-also-card:focus-visible {
	outline: none;
}

.esc-also-card:focus-visible .esc-also-in {
	outline: 2px solid var(--accent, #ff0004);
	outline-offset: 2px;
}

@media (hover: hover) {
	.esc-also-card:hover .esc-also-in,
	.esc-also-card:focus-visible .esc-also-in {
		transform: translate3d(0, -6px, 0);
		border-color: rgba(255, 0, 4, .45);
	}

	.esc-also-card:hover::after,
	.esc-also-card:focus-visible::after {
		opacity: 1;
		transform: translate3d(0, -6px, 0);
	}

	.esc-also-card:hover .esc-also-in > img {
		transform: scale(1.06);
	}

	.esc-also-card:hover .esc-also-more svg {
		transform: translateX(4px);
	}
}

.esc-also-card:active .esc-also-in {
	border-color: rgba(255, 0, 4, .45);
}

@media (max-width: 1100px) {
	.esc-also-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: clamp(200px, 27vw, 250px);
		gap: 16px;
	}
}

/* Phone: two columns, the text line goes — the tag and the title carry the card. */
@media (max-width: 760px) {
	.esc-also-grid {
		grid-auto-rows: 176px;
		gap: 12px;
	}

	.esc-also-body {
		gap: 4px;
		padding: 14px 14px 13px;
	}

	.esc-also-tag {
		font-size: 11px;
		letter-spacing: .12em;
	}

	.esc-also-title {
		font-size: 17px;
	}

	.esc-also-text {
		display: none;
	}

	.esc-also-card.is-wide .esc-also-text {
		display: block;
		font-size: 14px;
	}

	.esc-also-more {
		margin-top: 4px;
		font-size: 13px;
	}

	.esc-also-more svg {
		width: 16px;
		height: 16px;
	}
}

@media (max-width: 360px) {
	.esc-also-title {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.esc-also .esc-also-in,
	.esc-also-in > img,
	.esc-also-card::after,
	.esc-also-more svg {
		transition: none;
	}

	.esc-also-card:hover .esc-also-in,
	.esc-also-card:hover::after,
	.esc-also-card:hover .esc-also-in > img,
	.esc-also-card:hover .esc-also-more svg {
		transform: none;
	}
}
