.ros-single-trek__gallery-trigger {
	position: relative;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
}

.ros-single-trek__gallery-trigger:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.9);
	outline-offset: -6px;
}

.ros-single-trek__gallery-item:focus-within {
	box-shadow: 0 24px 50px rgba(38, 27, 18, 0.16);
}

.ros-single-trek__gallery-overlay {
	pointer-events: none;
}

.ros-single-trek__gallery-mobile {
	display: none;
}

.ros-single-trek__gallery-grid--count-1 {
	grid-template-columns: 1fr;
	grid-template-rows: minmax(420px, 1fr);
}

.ros-single-trek__gallery-grid--count-1 .ros-single-trek__gallery-item--1 {
	grid-row: auto;
}

.ros-single-trek__gallery-grid--count-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: minmax(320px, 1fr);
}

.ros-single-trek__gallery-grid--count-2 .ros-single-trek__gallery-item--1,
.ros-single-trek__gallery-grid--count-3 .ros-single-trek__gallery-item--1,
.ros-single-trek__gallery-grid--count-4 .ros-single-trek__gallery-item--1 {
	grid-row: auto;
}

.ros-single-trek__gallery-grid--count-3 {
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	grid-template-rows: repeat(2, minmax(220px, 1fr));
}

.ros-single-trek__gallery-grid--count-3 .ros-single-trek__gallery-item--1 {
	grid-row: 1 / span 2;
}

.ros-single-trek__gallery-grid--count-4 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(220px, 1fr));
}

.ros-trek-gallery-modal[hidden] {
	display: none;
}

.ros-trek-gallery-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ros-trek-gallery-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 13, 22, 0.84);
	backdrop-filter: blur(10px);
}

.ros-trek-gallery-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 1180px);
	max-height: min(92vh, 940px);
	padding: 24px;
	border-radius: 32px;
	background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(10, 15, 26, 0.98));
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
	outline: none;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ros-trek-gallery-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ros-trek-gallery-modal__close:hover,
.ros-trek-gallery-modal__close:focus-visible {
	background: rgba(255, 255, 255, 0.18);
	outline: none;
	transform: translateY(-1px);
}

.ros-trek-gallery-modal__header {
	padding-right: 64px;
}

.ros-trek-gallery-modal__eyebrow {
	margin: 0 0 8px;
	color: #c98a61;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ros-trek-gallery-modal__header h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(2rem, 4vw, 3.2rem);
	line-height: 1.04;
}

.ros-trek-gallery-modal__count {
	margin: 10px 0 0;
	color: rgba(255, 255, 255, 0.72);
	font-weight: 600;
}

.ros-trek-gallery-modal__body {
	margin-top: 22px;
	flex: 1 1 auto;
	min-height: 0;
}

.ros-trek-gallery-modal__stage {
	position: relative;
	height: 100%;
}

.ros-trek-gallery-modal__slider {
	overflow: hidden;
	border-radius: 24px;
	height: 100%;
}

.ros-trek-gallery-modal__slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ros-trek-gallery-modal__figure {
	width: 100%;
	height: min(62vh, 680px);
	margin: 0;
	border-radius: 24px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

.ros-trek-gallery-modal__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #0f172a;
}

.ros-trek-gallery-modal__controls {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 18px;
	pointer-events: none;
	z-index: 2;
}

.ros-trek-gallery-modal__nav {
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	pointer-events: auto;
}

.ros-trek-gallery-modal__nav:hover,
.ros-trek-gallery-modal__nav:focus-visible {
	background: rgba(255, 255, 255, 0.18);
	outline: none;
	transform: translateY(-1px);
}

.ros-trek-gallery-modal__pagination {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: max-content;
	max-width: calc(100% - 124px);
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(8, 13, 22, 0.48);
	backdrop-filter: blur(8px);
	pointer-events: auto;
}

.ros-trek-gallery-modal__pagination.swiper-pagination-horizontal {
	left: 50%;
	right: auto;
	width: max-content;
}

.ros-trek-gallery-modal__pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0 !important;
	background: rgba(255, 255, 255, 0.34);
	opacity: 1;
}

.ros-trek-gallery-modal__pagination .swiper-pagination-bullet-active {
	background: #fff;
	transform: scale(1.15);
}

.ros-trek-gallery-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.ros-single-trek__gallery-grid {
		display: none;
	}

	.ros-single-trek__gallery-mobile {
		display: block;
		overflow: hidden;
	}

	.ros-single-trek__gallery-mobile-slide {
		height: auto;
	}

	.ros-single-trek__gallery-mobile-card {
		margin: 0;
		overflow: hidden;
		border-radius: 28px;
		background: #d8d2ca;
		box-shadow: 0 24px 50px rgba(38, 27, 18, 0.08);
		aspect-ratio: 1 / 1;
	}

	.ros-single-trek__gallery-mobile-image {
		width: 100%;
		height: 100%;
		display: block;
		object-fit: cover;
	}

	.ros-single-trek__gallery-mobile-meta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 14px 6px 0;
	}

	.ros-single-trek__gallery-mobile-pagination {
		position: static;
		inset: auto;
		width: auto;
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.ros-single-trek__gallery-mobile-pagination .swiper-pagination-bullet {
		width: 8px;
		height: 8px;
		margin: 0 !important;
		background: rgba(31, 41, 51, 0.28);
		opacity: 1;
	}

	.ros-single-trek__gallery-mobile-pagination .swiper-pagination-bullet-active {
		background: #1f2933;
		transform: scale(1.12);
	}

	.ros-single-trek__gallery-mobile-count {
		color: rgba(31, 41, 51, 0.72);
		font-size: 0.88rem;
		font-weight: 700;
		white-space: nowrap;
	}

	.ros-trek-gallery-modal {
		padding: 14px;
	}

	.ros-trek-gallery-modal__dialog {
		padding: 18px 14px 16px;
		border-radius: 24px;
	}

	.ros-trek-gallery-modal__header {
		padding-right: 52px;
	}

	.ros-trek-gallery-modal__figure {
		height: min(50vh, 420px);
		border-radius: 20px;
	}

	.ros-trek-gallery-modal__controls {
		padding: 0 10px;
	}

	.ros-trek-gallery-modal__nav {
		width: 42px;
		height: 42px;
		font-size: 24px;
	}

	.ros-trek-gallery-modal__pagination {
		bottom: 12px;
		padding: 8px 12px;
	}
}

@media (max-height: 820px) {
	.ros-trek-gallery-modal__dialog {
		max-height: calc(100vh - 24px);
		padding-bottom: 18px;
	}

	.ros-trek-gallery-modal__body {
		margin-top: 16px;
	}

	.ros-trek-gallery-modal__figure {
		height: min(52vh, 560px);
	}
}

@media (max-height: 700px) {
	.ros-trek-gallery-modal {
		padding: 12px;
	}

	.ros-trek-gallery-modal__dialog {
		padding: 16px 14px 14px;
		border-radius: 22px;
	}

	.ros-trek-gallery-modal__header h2 {
		font-size: clamp(1.7rem, 3vw, 2.6rem);
	}

	.ros-trek-gallery-modal__count {
		margin-top: 6px;
	}

	.ros-trek-gallery-modal__figure {
		height: min(46vh, 420px);
		border-radius: 18px;
	}
}
