/* Feature layout (design): one wide photo, then two side by side, repeating. */
.tce-gallery--feature {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.tce-gallery--feature .tce-gallery__item {
	height: 387px;
}

.tce-gallery--feature .tce-gallery__item:nth-child(3n + 1) {
	grid-column: 1 / -1;
	height: 535px;
}

.tce-gallery--feature .tce-gallery__item:last-child:nth-child(3n + 2) {
	grid-column: 1 / -1;
}

/* Grid and carousel tiles */
.tce-gallery--tiles .tce-gallery__item {
	aspect-ratio: 4 / 3;
}

.tce-gallery__item {
	display: block;
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	background: var(--tce-mist);
}

.tce-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.tce-gallery__item:hover img {
	transform: scale(1.03);
}

.tce-gallery__item:focus-visible {
	outline: 3px solid var(--tce-accent);
	outline-offset: 3px;
}

/* Lightbox */
.tce-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px 72px;
	background: rgba(0, 10, 45, 0.92);
}

.tce-lightbox img {
	max-width: 100%;
	max-height: calc(100vh - 120px);
	border-radius: 12px;
}

.tce-lightbox p {
	margin: 0;
	font-family: "Inter", system-ui, sans-serif;
	font-size: 15px;
	color: #c9d3ea;
}

.tce-lightbox button {
	position: absolute;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.tce-lightbox button:hover,
.tce-lightbox button:focus-visible {
	border-color: #49e1d4;
	color: #49e1d4;
}

.tce-lightbox__close {
	top: 16px;
	right: 16px;
}

.tce-lightbox__prev,
.tce-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.tce-lightbox__prev {
	left: 16px;
}

.tce-lightbox__next {
	right: 16px;
}

@media (max-width: 1024px) {
	.tce-gallery--feature .tce-gallery__item {
		height: 300px;
	}

	.tce-gallery--feature .tce-gallery__item:nth-child(3n + 1) {
		height: 420px;
	}
}

@media (max-width: 767px) {
	.tce-gallery--feature {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.tce-gallery--feature .tce-gallery__item,
	.tce-gallery--feature .tce-gallery__item:nth-child(3n + 1) {
		grid-column: auto;
		height: 240px;
	}

	.tce-lightbox {
		padding: 64px 12px;
	}

	.tce-lightbox__prev,
	.tce-lightbox__next {
		top: auto;
		bottom: 16px;
		transform: none;
	}
}
