/*
Theme Name: Haus Tillmann
Description: Block-Theme fuer Haus Tillmann (Hilden). Uebernimmt Farben, Schrift und Aufbau der bisherigen PHP-Seite, responsiv.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: haus-tillmann
License: GPL-2.0-or-later
*/

/* ---------- Seitenrahmen ---------- */
body {
	margin: 0;
}

.ht-page {
	max-width: 980px;
	margin: 0 auto;
	background: var(--wp--preset--color--cream);
	box-shadow: 0 0 5px #888;
	min-height: 100vh;
}

.ht-page > * {
	margin-block-start: 0 !important;
}

/* ---------- Kopfzeile oben (Adresse) ---------- */
.ht-topbar {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--beige);
	text-align: center;
	padding: 6px 10px;
	margin: 0;
}

.ht-topbar p {
	margin: 0;
}

.ht-topbar a {
	color: var(--wp--preset--color--beige);
}

.ht-topbar a:hover,
.ht-topbar a:focus {
	color: #fff;
}

/* ---------- Kopfbild mit Logo (Unterseiten) ---------- */
.ht-header {
	background-color: var(--wp--preset--color--cream);
	background-image: var(--ht-header-bg);
	background-repeat: repeat-x;
	background-size: auto 100%;
	background-position: center top;
	height: 178px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
}

.ht-header .wp-block-image,
.ht-header figure {
	margin: 0;
}

.ht-header img,
.ht-logo img {
	display: block;
	width: 240px;
	max-width: 60vw;
	height: auto;
}

/* ---------- Laufender Bildstreifen (Startseite) ---------- */
.ht-marquee {
	position: relative;
	overflow: hidden;
	height: 175px;
	margin: 0;
	background: var(--wp--preset--color--cream);
}

.ht-marquee .wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	width: max-content;
	margin: 0;
	animation: ht-marquee 90s linear infinite;
}

.ht-marquee:hover .wp-block-gallery,
.ht-marquee:focus-within .wp-block-gallery {
	animation-play-state: paused;
}

.ht-marquee .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex: 0 0 auto;
	width: auto !important;
	margin: 0 !important;
}

.ht-marquee .wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: 175px;
	width: auto;
	max-width: none;
	object-fit: cover;
}

.ht-marquee .ht-logo {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	margin: 0;
	pointer-events: none;
}

@keyframes ht-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.ht-marquee {
		overflow-x: auto;
	}
	.ht-marquee .wp-block-gallery.has-nested-images {
		animation: none;
	}
}

.ht-welcome {
	text-align: center;
	margin: 0;
	padding: 18px 10px 8px;
}

/* ---------- Navigation ---------- */
.ht-nav {
	background: var(--wp--preset--color--navy);
	border-top: 1px solid var(--wp--preset--color--beige);
	border-bottom: 1px solid var(--wp--preset--color--beige);
	padding: 4px 25px;
	margin: 0;
}

.ht-nav .wp-block-navigation {
	color: var(--wp--preset--color--beige);
	gap: 4px 30px;
}

.ht-nav .wp-block-navigation a,
.ht-nav .wp-block-navigation a:visited {
	color: var(--wp--preset--color--beige);
	text-decoration: none;
}

.ht-nav .wp-block-navigation a:hover,
.ht-nav .wp-block-navigation a:focus,
.ht-nav .wp-block-navigation .current-menu-item > a {
	color: #fff;
}

.ht-nav .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--navy) !important;
	border: 1px solid var(--wp--preset--color--beige) !important;
}

.ht-nav .wp-block-navigation__responsive-container-open,
.ht-nav .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--beige);
}

.ht-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--navy) !important;
	color: var(--wp--preset--color--beige) !important;
	padding: 24px;
}

.ht-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: 18px;
}

/* ---------- Inhalt ---------- */
.ht-main {
	padding: 20px 10px 30px;
	text-align: center;
	margin: 0;
}

.ht-main .wp-block-columns {
	gap: 20px;
	margin: 0;
}

.ht-main .ht-title {
	margin-top: 0;
}

.ht-main ul,
.ht-main ol {
	text-align: left;
	display: inline-block;
	max-width: 100%;
}

.ht-main .wp-block-image img,
.ht-content .wp-block-image img {
	box-shadow: 0 8px 6px -6px #888;
}

.ht-main .wp-block-image,
.ht-main .wp-block-gallery {
	margin-top: 10px;
	margin-bottom: 10px;
}

.ht-main .wp-block-separator {
	border: 0;
	border-top: 1px solid #999;
	opacity: 1;
	width: 100%;
	max-width: 100% !important;
}

.ht-main .is-style-ht-narrow-image img {
	max-width: 600px;
	width: 100%;
}

.has-info-color { color: var(--wp--preset--color--info); }

/* PDF-Karten */
.ht-pdf {
	margin: 10px 0 20px;
}

.ht-pdf__embed {
	display: block;
	width: 100%;
	height: 850px;
	border: 1px solid #ccc;
	background: #fff;
}

.ht-pdf__link {
	margin-top: 6px;
}

/* ---------- Seitenleiste ---------- */
.ht-sidebar {
	font-size: 12px;
	text-align: center;
}

.ht-sidebar h3,
.ht-sidebar h2 {
	font-size: 14px;
	margin: 16px 0 10px;
}

.ht-sidebar p {
	margin: 0 0 10px;
}

/* ---------- Fussbereich ---------- */
.ht-footer {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--beige);
	padding: 20px 20px 30px;
	text-align: center;
	margin: 0;
}

.ht-footer a {
	color: var(--wp--preset--color--beige);
}

.ht-footer a:hover,
.ht-footer a:focus {
	color: #fff;
}

.ht-footer .wp-block-columns {
	margin: 0;
}

.ht-footer p {
	margin: 0 0 1em;
}

.ht-footer h3 {
	font-size: 14px;
	margin: 0 0 1em;
}

.ht-footer .wp-block-social-links {
	justify-content: center;
}

/* ---------- Handy / Tablet ---------- */
@media (max-width: 781px) {
	.ht-page {
		box-shadow: none;
	}

	.ht-topbar {
		font-size: 12px;
	}

	.ht-header {
		height: 130px;
	}

	.ht-header img {
		width: 170px;
	}

	.ht-marquee,
	.ht-marquee .wp-block-gallery.has-nested-images figure.wp-block-image img {
		height: 130px;
	}

	.ht-marquee .ht-logo img {
		width: 170px;
	}

	.ht-nav {
		padding: 6px 12px;
	}

	.ht-main {
		padding: 16px 12px 24px;
	}

	.ht-pdf__embed {
		height: 520px;
	}

	.ht-sidebar {
		border-top: 1px solid #ccc;
		padding-top: 10px;
	}
}
