/* ==========================================================================
   Auto-extrahiert aus detail.css (Hygiene-Split 2026-05-31)
   ========================================================================== */

/* ==========================================================================
   GALLERY MODULE
   ========================================================================== */

.immo-gallery-module {
	position: relative;
	width: 100%;
	user-select: none;
	-webkit-user-select: none;
}

.immo-gallery-module *,
.immo-gallery-module *:focus,
.immo-gallery-module *:active,
.immo-gallery-module *:visited {
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

/* Hero Mode */
.immo-gallery-hero {
	position: relative;
}

.immo-gallery-hero .immo-gallery-main {
	height: calc(100vh - var(--immo-header-height, 80px));
	aspect-ratio: unset;
	margin-bottom: 0;
}

.immo-gallery-hero .immo-gallery-thumbs-wrapper,
.immo-gallery-hero .immo-gallery-actions {
	display: none;
}

.immo-gallery-hero .immo-gallery-main-nav {
	width: 50px;
	height: 100px;
}

.immo-gallery-hero .immo-gallery-main-prev::after,
.immo-gallery-hero .immo-gallery-main-next::after {
	width: 16px;
	height: 16px;
	border-width: 4px;
}

/* Slider Mode */
.immo-gallery-slider-mode .immo-gallery-thumbs-wrapper,
.immo-gallery-slider-mode .immo-gallery-actions {
	display: none;
}

.immo-gallery-dots {
	position: absolute;
	bottom: 60px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 15px 0;
	z-index: 100;
	background-color: transparent;
}

.immo-gallery-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #fff;
	background-color: transparent;
	cursor: pointer;
	padding: 0;
	transition: all 0.2s ease;
	outline: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
	box-sizing: content-box;
}

.immo-gallery-dot:hover {
	background-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 1);
}

.immo-gallery-dot:focus {
	outline: none;
}

.immo-gallery-dot-active {
	background-color: #fff;
}

/* Gallery Counter (mobile) */
.immo-gallery-counter {
	display: none;
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	background-color: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	z-index: 100;
	white-space: nowrap;
}

.immo-gallery-counter-separator {
	margin: 0 4px;
	opacity: 0.7;
}

/* Many images (>10): counter instead of dots */
.immo-gallery-many-images .immo-gallery-dots {
	display: none;
}

.immo-gallery-many-images .immo-gallery-counter {
	display: block;
	left: auto;
	right: calc(80px + 60px + 30px);
	transform: none;
	bottom: 60px;
}

/* Slider mode navigation */
.immo-gallery-slider-mode .immo-gallery-main-nav {
	width: 60px;
	height: 60px;
	top: auto;
	bottom: 50px;
	transform: none;
	background-color: transparent;
}

.immo-gallery-slider-mode .immo-gallery-main-nav:hover,
.immo-gallery-slider-mode .immo-gallery-main-nav:active {
	background-color: transparent;
	box-shadow: none;
}

.immo-gallery-slider-mode .immo-gallery-main-prev::after,
.immo-gallery-slider-mode .immo-gallery-main-next::after {
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.immo-gallery-slider-mode .immo-gallery-main-prev:hover::after {
	transform: translate(calc(-30% - 5px), -50%) rotate(45deg);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 1));
}

.immo-gallery-slider-mode .immo-gallery-main-next:hover::after {
	transform: translate(calc(30% + 5px), -50%) rotate(-135deg);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 1));
}

.immo-gallery-slider-mode .immo-gallery-main-prev {
	left: 80px;
}

.immo-gallery-slider-mode .immo-gallery-main-next {
	right: 80px;
}

.immo-gallery-slider-mode .immo-gallery-main-prev::after {
	border-color: #fff;
	border-width: 3px;
	width: 36px;
	height: 36px;
	left: 50%;
	transform: translate(-30%, -50%) rotate(45deg);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.immo-gallery-slider-mode .immo-gallery-main-next::after {
	border-color: #fff;
	border-width: 3px;
	width: 36px;
	height: 36px;
	right: 50%;
	transform: translate(30%, -50%) rotate(-135deg);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

/* Main Image Container */
.immo-gallery-main {
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #f5f5f5;
	margin-bottom: 1rem;
}

/* Status Ribbon — Single Source of Truth lebt in immo.css.
   .status-ribbon hier nicht erneut definieren, sonst kollidieren die
   Definitionen je nach Load-Order. */

/* Aspect Ratios */
.immo-gallery-ratio-16-9 {
	aspect-ratio: 16 / 9;
}

.immo-gallery-ratio-4-3 {
	aspect-ratio: 4 / 3;
}

/* Main Image */
.immo-gallery-main-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* Main Image Navigation */
.immo-gallery-main-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 60px;
	border: none;
	background-color: rgba(0, 0, 0, 0.5);
	cursor: pointer;
	z-index: 10;
	outline: none;
	transition: none;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

.immo-gallery-main-nav:hover,
.immo-gallery-main-nav:active {
	background-color: rgba(0, 0, 0, 0.7);
}

.immo-gallery-main-prev {
	left: 0;
}

.immo-gallery-main-prev::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 17px;
	transform: translate(-50%, -50%) rotate(45deg);
	width: 12px;
	height: 12px;
	border-left: 3px solid #ffffff;
	border-bottom: 3px solid #ffffff;
}

.immo-gallery-main-next {
	right: 0;
}

.immo-gallery-main-next::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 17px;
	transform: translate(50%, -50%) rotate(-135deg);
	width: 12px;
	height: 12px;
	border-left: 3px solid #ffffff;
	border-bottom: 3px solid #ffffff;
}

/* Thumbnails Wrapper */
.immo-gallery-thumbs-wrapper {
	position: relative;
	width: 100%;
}

.immo-gallery-nav {
	display: none;
}

/* Thumbnails Container */
.immo-gallery-thumbs {
	width: 100%;
	overflow: hidden;
	position: relative;
}

/* Navigation Overlay Left */
.immo-gallery-thumbs::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 30px;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10;
	pointer-events: none;
	transition: none;
}

.immo-gallery-thumbs:hover::before {
	background-color: rgba(0, 0, 0, 0.7);
}

/* Chevron Left */
.immo-gallery-thumbs::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 17px;
	transform: translate(-50%, -50%) rotate(45deg);
	width: 12px;
	height: 12px;
	border-left: 3px solid #ffffff;
	border-bottom: 3px solid #ffffff;
	z-index: 11;
	pointer-events: none;
}

/* Navigation Overlay Right */
.immo-gallery-thumbs-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 30px;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10;
	pointer-events: none;
	transition: none;
}

.immo-gallery-thumbs-wrapper:hover::before {
	background-color: rgba(0, 0, 0, 0.7);
}

/* Chevron Right */
.immo-gallery-thumbs-wrapper::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 17px;
	transform: translate(50%, -50%) rotate(-135deg);
	width: 12px;
	height: 12px;
	border-left: 3px solid #ffffff;
	border-bottom: 3px solid #ffffff;
	z-index: 11;
	pointer-events: none;
}

/* Thumbnails Track */
.immo-gallery-thumbs-track {
	display: flex;
	gap: 0.5rem;
	transition: transform 0.3s ease;
}

.immo-gallery-thumb-container {
	position: relative;
	flex: 0 0 calc(20% - 0.4rem);
	overflow: hidden;
	background-color: #f5f5f5;
}

.immo-gallery-thumb {
	position: relative;
	width: 100%;
	height: 100%;
	border: none;
	padding: 0;
	cursor: pointer;
	display: block;
	background: none;
	outline: none;
}

.immo-gallery-thumb:focus,
.immo-gallery-thumb:active {
	outline: none;
	border: none;
	background: none;
}

.immo-gallery-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.immo-gallery-thumb-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.4);
	transition: opacity 0.2s;
	pointer-events: none;
}

.immo-gallery-thumb-active .immo-gallery-thumb-overlay {
	opacity: 0;
}

.immo-gallery-thumb:hover .immo-gallery-thumb-overlay {
	opacity: 0;
}

/* Gallery Lightbox */
.immo-gallery-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: none;
}

.immo-gallery-lightbox.immo-gallery-lightbox-open {
	display: block;
}

.immo-gallery-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
}

.immo-gallery-lightbox-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.immo-gallery-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 3rem;
	height: 3rem;
	border: none;
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
	z-index: 10;
	outline: none;
}

.immo-gallery-lightbox-close:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.immo-gallery-lightbox-close:focus,
.immo-gallery-lightbox-close:active {
	outline: none;
	border: none;
}

.immo-gallery-lightbox-close::before,
.immo-gallery-lightbox-close::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 2px;
	background-color: #ffffff;
}

.immo-gallery-lightbox-close::before {
	transform: rotate(45deg);
}

.immo-gallery-lightbox-close::after {
	transform: rotate(-45deg);
}

.immo-gallery-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	border: none;
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
	z-index: 10;
	outline: none;
}

.immo-gallery-lightbox-nav:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.immo-gallery-lightbox-nav:focus,
.immo-gallery-lightbox-nav:active {
	outline: none;
	border: none;
}

.immo-gallery-lightbox-prev {
	left: 2rem;
}

.immo-gallery-lightbox-next {
	right: 2rem;
}

.immo-gallery-lightbox-nav::after {
	content: '';
	position: absolute;
	width: 12px;
	height: 12px;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
}

.immo-gallery-lightbox-prev::after {
	transform: rotate(45deg);
	margin-left: 4px;
}

.immo-gallery-lightbox-next::after {
	transform: rotate(-135deg);
	margin-right: 4px;
}

.immo-gallery-lightbox-image-wrapper {
	max-width: 90%;
	max-height: 90%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.immo-gallery-lightbox-img {
	max-width: 100%;
	max-height: 80vh;
	width: auto;
	height: auto;
	display: block;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.immo-gallery-lightbox-caption {
	margin-top: 1rem;
	color: #ffffff;
	font-size: 1rem;
	text-align: center;
	max-width: 600px;
}

/* Gallery Action Buttons */
.immo-gallery-actions {
	display: flex;
	gap: 15px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.immo-gallery-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	padding: 12px 24px;
	background-color: var(--immo-detail-ci-color-1);
	color: var(--immo-detail-ci-color-2);
	border: none;
	border-radius: 0;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.immo-gallery-action-btn:hover,
.immo-gallery-action-btn.active {
	background-color: #ffffff;
	color: var(--immo-detail-ci-color-1);
	text-decoration: none;
}

.immo-gallery-action-btn:visited {
	color: var(--immo-detail-ci-color-2);
}

.immo-gallery-action-btn:hover:visited,
.immo-gallery-action-btn.active:visited {
	color: var(--immo-detail-ci-color-1);
}


/* ==========================================================================
   RESPONSIVE – Gallery
   ========================================================================== */

@media (max-width: 1200px) {
	.immo-gallery-dots {
		left: auto;
		right: 20px;
		transform: none;
	}

	.immo-anchor-nav-link {
		padding: 12px 24px;
		font-size: 12px;
	}
}

@media (max-width: 1024px) {
	.immo-gallery-hero .immo-gallery-main {
		height: 400px;
	}

	.immo-gallery-slider-mode .immo-gallery-main-nav {
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
	}

	.immo-gallery-slider-mode .immo-gallery-main-prev {
		left: 30px;
	}

	.immo-gallery-slider-mode .immo-gallery-main-next {
		right: 30px;
	}

	.immo-gallery-dots {
		display: none;
	}

	.immo-gallery-counter {
		display: block;
		left: auto;
		right: 50px;
		transform: none;
		bottom: 20px;
	}

	.immo-anchor-nav-module {
		left: 50px;
		transform: none;
		width: calc(100% - 100px);
		pointer-events: none;
	}

	.immo-anchor-nav-list {
		pointer-events: auto;
	}

	.immo-anchor-nav-link {
		padding: 12px 20px;
		font-size: 12px;
	}
}

@media (max-width: 768px) {
	.immo-gallery-thumbs-wrapper {
		display: none;
	}

	.immo-gallery-main {
		height: 300px;
		aspect-ratio: unset;
		margin-bottom: 0;
	}

	.immo-gallery-hero .immo-gallery-main {
		height: 300px;
	}

	.immo-gallery-main-nav {
		width: 40px;
		height: 40px;
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
	}

	.immo-gallery-main-prev {
		left: 20px;
	}

	.immo-gallery-main-next {
		right: 20px;
	}

	.immo-gallery-slider-mode .immo-gallery-main-nav {
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
		width: 40px;
		height: 40px;
	}

	.immo-gallery-slider-mode .immo-gallery-main-prev {
		left: 20px;
	}

	.immo-gallery-slider-mode .immo-gallery-main-next {
		right: 20px;
	}

	.immo-gallery-slider-mode .immo-gallery-main-prev::after,
	.immo-gallery-slider-mode .immo-gallery-main-next::after {
		width: 20px;
		height: 20px;
		border-width: 2px;
	}

	.immo-gallery-dots {
		display: none;
	}

	.immo-gallery-counter {
		display: block;
		left: auto;
		right: 20px;
		transform: none;
	}

	.immo-gallery-lightbox-content {
		padding: 1rem;
	}

	.immo-gallery-lightbox-prev {
		left: 0.5rem;
	}

	.immo-gallery-lightbox-next {
		right: 0.5rem;
	}

	.immo-gallery-lightbox-nav {
		width: 2.5rem;
		height: 2.5rem;
	}

	.immo-gallery-lightbox-close {
		top: 0.5rem;
		right: 0.5rem;
		width: 2.5rem;
		height: 2.5rem;
	}

	.immo-gallery-lightbox-img {
		max-height: 70vh;
	}

	.immo-gallery-actions {
		flex-direction: column;
		gap: 10px;
	}

	.immo-gallery-action-btn {
		width: 100%;
		justify-content: center;
		padding: 12px 20px;
	}

	.immo-anchor-nav-module {
		display: none;
	}
}

