/* =========================================================================
   Photos — «Аксҳо»
   Крупное фото слева + сетка 2×2 справа, слайдер стрелками в заголовке
   ========================================================================= */

.photos-section {
	padding-block: 40px 32px;
	background: #FFFFFF;
}

.photos-gallery {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 20px;
	align-items: stretch;
	max-height: 420px;
}

.photos-gallery__main {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: var(--toj-bg-light);
	min-height: 0;
	height: 420px;
}

.photos-gallery__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 20px;
	min-height: 0;
	height: 420px;
}

.photos-gallery__thumb {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: var(--toj-bg-light);
	min-height: 0;
}

.photos-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	will-change: opacity, transform;
	/* Базовый плавный переход; JS при смене усиливает через inline + !important. */
	transition:
		opacity .55s cubic-bezier(0.22, 1, 0.36, 1) ,
		transform .55s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.photos-gallery__img--incoming {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
	pointer-events: none;
	opacity: 0;
	transform: scale(1.04);
}

.photos-gallery--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	max-height: none;
	background: var(--toj-bg-light);
	border: 1px dashed var(--toj-border);
	border-radius: 14px;
}

@media (max-width: 1100px) {
	.photos-gallery {
		max-height: 280px;
	}

	.photos-gallery__main,
	.photos-gallery__grid {
		height: 280px;
	}
}

@media (max-width: 900px) {
	.photos-gallery {
		grid-template-columns: 1fr;
		gap: 10px;
		max-height: none;
	}

	.photos-gallery__main {
		height: 240px;
	}

	.photos-gallery__grid {
		height: 200px;
		gap: 10px;
	}
}

@media (max-width: 540px) {
	.photos-section {
		padding-block: 28px 20px;
	}

	.photos-gallery__main {
		height: 200px;
		border-radius: 12px;
	}

	.photos-gallery__grid {
		height: 160px;
		gap: 8px;
	}

	.photos-gallery__thumb {
		border-radius: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.photos-gallery__img,
	.photos-gallery__img--incoming {
		transition: none !important;
		transform: none !important;
	}
}