/* se-core: Galerie, Anfrageformular, Kontaktleiste.
   Farben kommen aus dem Child-Theme (--se-*), mit Rückfallwerten. */

/* ---------- Galerie: Bildleiste zum Durchklicken ---------- */
/* Kein Beschnitt: Desktop zeigt alle Bilder gleich hoch nebeneinander, die Breite folgt dem Format
   (meist 2 bis 4 Bilder sichtbar). Handy: ein ganzes Bild pro Ansicht auf fester Bühnenhöhe. */
.se-gallery {
	--se-row: clamp(15rem, 25vw, 21rem);
	--se-gap: 12px;
	position: relative;
	margin: 2rem 0;
}
.se-gallery--gross { --se-row: clamp(17rem, 28vw, 25rem); }
.se-gallery__track {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var(--se-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
.se-gallery__track::-webkit-scrollbar { display: none; }
.se-gallery__track:focus-visible { outline: 2px solid var(--se-accent, #8a6d4b); outline-offset: 4px; }
.se-gallery__slide {
	flex: 0 0 auto;
	margin: 0;
	scroll-snap-align: start;
}
.se-gallery__link { display: block; line-height: 0; cursor: zoom-in; }
.se-gallery__link:focus-visible { outline: 2px solid var(--se-accent, #8a6d4b); outline-offset: -2px; }
.se-gallery__img {
	display: block;
	width: auto;
	height: var(--se-row);
	max-width: none;
	background: var(--se-soft, #f6f3ef);
	transition: opacity .2s;
}
.se-gallery__link:hover .se-gallery__img { opacity: .9; }
@media (max-width: 768px) {
	.se-gallery { --se-gap: 0px; }
	.se-gallery__slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
	.se-gallery__img {
		width: 100%;
		height: min(70svh, 34rem);
		object-fit: contain;
	}
}
.se-gallery__slide figcaption,
.se-gallery__caption {
	margin: .6rem 0 0;
	font-size: .9rem;
	line-height: 1.4;
	color: var(--se-muted, #6b6b6b);
	text-align: center;
}
.se-gallery__nav {
	position: absolute;
	top: calc(var(--se-row) / 2 - 1.5rem);
	z-index: 1;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--se-text, #222);
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
	transition: opacity .2s;
}
.se-gallery__nav--prev { left: .75rem; }
.se-gallery__nav--next { right: .75rem; }
.se-gallery__nav:hover,
.se-gallery__nav:focus-visible { background: #fff; color: var(--se-text, #222); }
.se-gallery__nav:disabled { opacity: 0; pointer-events: none; }
.se-gallery__count {
	margin: .5rem 0 0;
	font-size: .85rem;
	color: var(--se-muted, #6b6b6b);
	text-align: right;
	font-variant-numeric: tabular-nums;
}
@media (max-width: 768px) {
	.se-gallery__nav { top: calc(min(70svh, 34rem) / 2 - 1.5rem); }
}
@media (hover: none) and (max-width: 768px) {
	.se-gallery__nav { display: none; }
}

/* ---------- Vergrößerung ---------- */
html.se-lightbox-open { overflow: hidden; }
.se-lightbox {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(17, 17, 17, .95);
	color: #fff;
	overscroll-behavior: contain;
}
.se-lightbox::backdrop { background: rgba(0, 0, 0, .5); }
.se-lightbox__figure {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: 0;
	padding: 3.5rem 5rem 3rem;
}
.se-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	min-height: 0;
	object-fit: contain;
}
.se-lightbox__caption { margin: .6rem 0 0; font-size: .9rem; color: #ddd; text-align: center; }
.se-lightbox__count {
	position: absolute;
	left: 0;
	right: 0;
	bottom: .75rem;
	margin: 0;
	font-size: .9rem;
	color: #ccc;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.se-lightbox__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	font: inherit;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}
.se-lightbox__btn:hover,
.se-lightbox__btn:focus-visible { background: rgba(255, 255, 255, .3); }
.se-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.se-lightbox__close { top: .75rem; right: .75rem; }
.se-lightbox__prev,
.se-lightbox__next { top: calc(50% - 1.5rem); }
.se-lightbox__prev { left: 1rem; }
.se-lightbox__next { right: 1rem; }
@media (max-width: 768px) {
	.se-lightbox__figure { padding: 3.75rem .5rem 3rem; }
	.se-lightbox__prev,
	.se-lightbox__next { top: auto; bottom: .25rem; }
}

/* ---------- Anfrageformular ---------- */
.se-form { max-width: 40rem; }
.se-form__row { margin: 0 0 1.1rem; }
.se-form label { display: block; margin-bottom: .3rem; font-weight: 400; }
.se-form input[type="text"],
.se-form input[type="email"],
.se-form input[type="tel"],
.se-form select,
.se-form textarea {
	width: 100%;
	padding: .7rem .8rem;
	border: 1px solid var(--se-line, #cfcfcf);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	box-sizing: border-box;
}
.se-form :focus-visible { outline: 2px solid var(--se-accent, #8a6d4b); outline-offset: 1px; }
.se-form__optional,
.se-form__note { color: var(--se-muted, #6b6b6b); font-size: .9rem; }
.se-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.se-form__errors {
	margin: 0 0 1.5rem;
	padding: 1rem 1.2rem;
	border-left: 4px solid #b32d2e;
	background: #fcf0f0;
}
.se-form__errors ul { margin: 0 0 0 1rem; }
.se-form__success {
	padding: 1.2rem 1.4rem;
	border-left: 4px solid var(--se-accent, #8a6d4b);
	background: var(--se-soft, #f6f3ef);
}
.se-button,
.se-contactbar__cta {
	display: inline-block;
	padding: .8rem 1.6rem;
	border: 0;
	border-radius: 4px;
	background: var(--se-accent, #8a6d4b);
	color: #fff;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
}
.se-button:hover,
.se-button:focus-visible,
.se-contactbar__cta:hover,
.se-contactbar__cta:focus-visible { background: var(--se-accent-dark, #6f5639); color: #fff; }

/* Pflicht-Häkchen Datenschutz */
.se-form__consent { display: flex; gap: .65rem; align-items: flex-start; }
.se-form__consent input { flex: none; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--se-accent, #8a6d4b); }
.se-form .se-form__consent label { display: block; margin: 0; font-size: .9rem; line-height: 1.5; }

/* ---------- Kontaktleiste: Desktop rechts mitlaufend, gefüllte Buttons ---------- */
.se-contactbar {
	position: fixed;
	z-index: 999;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}
.se-contactbar a {
	display: flex;
	align-items: center;
	height: 62px;
	padding: 0 20px;
	border-radius: 6px 0 0 6px;
	background: var(--se-accent, #8a6d4b);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 6px 18px -4px rgba(0, 0, 0, .35);
}
.se-contactbar a:hover,
.se-contactbar a:focus-visible { background: var(--se-accent-dark, #6f5639); color: #fff; }
.se-contactbar svg { flex: none; width: 22px; height: 22px; }
.se-contactbar__label {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	transition: max-width .3s ease, margin .3s ease;
}
.se-contactbar a:hover .se-contactbar__label,
.se-contactbar a:focus-visible .se-contactbar__label { max-width: 16rem; margin-left: .75rem; }
@media (prefers-reduced-motion: reduce) {
	.se-contactbar__label { transition: none; }
}

/* ---------- Kontaktleiste: Handy und Touch-Geräte (auch im Querformat) am unteren Rand ---------- */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
	/* html body: schlägt das spätere Inline-CSS von GeneratePress (body { padding: 0 }) */
	html body { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
	.se-contactbar {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		transform: none;
		flex-direction: row;
		gap: .75rem;
		align-items: center;
		padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
		background: #fff;
		box-shadow: 0 -1px 8px rgba(0, 0, 0, .12);
	}
	.se-contactbar__phone {
		flex: 1;
		display: flex;
		gap: .5rem;
		align-items: center;
		justify-content: center;
		padding: .7rem .5rem;
		border: 1px solid var(--se-line, #cfcfcf);
		border-radius: 4px;
		color: var(--se-text, #222);
		text-decoration: none;
	}
	.se-contactbar a.se-contactbar__phone,
	.se-contactbar a.se-contactbar__phone:hover { background: #fff; color: var(--se-text, #222); }
	.se-contactbar svg { width: 20px; height: 20px; }
	.se-contactbar__cta { flex: 1; justify-content: center; padding: .7rem .5rem; }
	.se-contactbar a { height: auto; padding: .7rem .5rem; box-shadow: none; border-radius: 4px; }
	.se-contactbar__label,
	.se-contactbar a:hover .se-contactbar__label,
	.se-contactbar a:focus-visible .se-contactbar__label { max-width: none; margin-left: 0; transition: none; }
	.se-contactbar__cta svg,
	.se-contactbar__more { display: none; }
	.se-contactbar a.se-contactbar__cta,
	.se-contactbar a.se-contactbar__cta:hover { background: var(--se-accent, #8a6d4b); color: #fff; }
}
@media print {
	.se-contactbar, .se-lightbox, .se-gallery__nav { display: none !important; }
}
