/*
Theme Name: Offenstall Schwellenbach
Description: Block-Theme für den Offenstall Schwellenbach – Pferdepension, Hinterwälder-Zucht, Wanderreitstation und Camping.
Author: Offenstall Schwellenbach GbR
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: offenstall
*/

/* ---------- Kopfbereich ---------- */
.os-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.os-header .os-logo img { height: 130px; width: auto; max-width: 100%; display: block; }
@media (max-width: 600px) { .os-header .os-logo img { height: 88px; } }
.os-header .wp-block-navigation { font-weight: 600; font-size: 1rem; }
.os-header .wp-block-navigation a { text-decoration: none; }
.os-header .wp-block-navigation a:hover,
.os-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--moss); }

/* ---------- Seitenkopf auf Unterseiten ---------- */
.os-pagehead h1 { text-wrap: balance; }

/* ---------- Slider (Galerie-Stil "Slider") ---------- */
.wp-block-gallery.is-style-os-slider {
	position: relative;
	display: block !important;
	height: clamp(260px, 34vw, 480px);
	overflow: hidden;
	background: var(--wp--preset--color--forest);
	margin-block: 0 !important;
}
.wp-block-gallery.is-style-os-slider > figure.wp-block-image {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100%;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 1.2s ease;
}
.wp-block-gallery.is-style-os-slider > figure.wp-block-image:first-of-type,
.wp-block-gallery.is-style-os-slider > figure.wp-block-image.is-active { opacity: 1; }
.wp-block-gallery.is-style-os-slider.os-ready > figure.wp-block-image:not(.is-active) { opacity: 0; }
.wp-block-gallery.is-style-os-slider img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}
.wp-block-gallery.is-style-os-slider figcaption { display: none; }
.os-dots {
	position: absolute; left: 0; right: 0; bottom: 4px;
	display: flex; justify-content: center; flex-wrap: wrap; z-index: 2;
}
.os-dots button {
	width: 32px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.os-dots button span {
	display: block; width: 10px; height: 10px; border-radius: 50%;
	border: 2px solid #fff; box-shadow: 0 0 3px rgba(0,0,0,.5);
}
.os-dots button[aria-current="true"] span { background: #fff; }
.os-dots button:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
@media (prefers-reduced-motion: reduce) {
	.wp-block-gallery.is-style-os-slider > figure.wp-block-image { transition: none; }
}

/* ---------- Bausteine ---------- */
.os-eyebrow {
	font-size: 0.8125rem !important;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--moss);
}
.os-badge {
	display: inline-block;
	background: var(--wp--preset--color--hay);
	color: var(--wp--preset--color--bark);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 4px 10px;
}
.os-card { display: flex; flex-direction: column; height: 100%; }
.os-card > .wp-block-image { margin: 0; }
.os-card > .wp-block-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.os-card .os-more { margin-top: auto; }
.os-rule-top { border-top: 3px solid var(--wp--preset--color--sun); padding-top: 20px; }
.os-photo-rule img { border-bottom: 3px solid var(--wp--preset--color--sun); }
.os-feature-img img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* Hofleben-Galerie: quadratische Kacheln */
.wp-block-gallery.is-style-os-tiles { gap: 8px; }
.wp-block-gallery.is-style-os-tiles figure.wp-block-image img { aspect-ratio: 1 / 1; object-fit: cover; }

/* Links */
a { text-underline-offset: 0.15em; }
:where(a):focus-visible, :where(button):focus-visible { outline: 2px solid var(--wp--preset--color--sun); outline-offset: 2px; }

/* Bilder in Inhaltsseiten */
.entry-content .wp-block-image img { height: auto; }

/* Überschriften: deutsche Silbentrennung statt Wortbruch */
h1, h2, h3, .wp-block-heading, .wp-block-post-title { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; word-break: normal; }
.os-card img, .os-feature-img img { width: 100%; height: auto; display: block; }
/* Startseite: Abstände zwischen den Bereichen entfernen */
.home .wp-block-post-content > .alignfull { margin-block: 0; }
.os-card.has-background { padding: 0 !important; }
.os-card > .wp-block-image, .os-card > figure { margin: 0 !important; }
