/*
 * heute-biergarten.de
 * Schlanke, statische Fassung des früheren WordPress-Themes "Snaps"
 * von Graph Paper Press (GPL).
 */

/* ---------- Grundlagen ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
	font-size: 62.5%;
	overflow-y: scroll;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
body {
	margin: 0;
	background: #fff;
	color: #404040;
	font-family: sans-serif;
	font-size: 1.6rem;
	font-weight: 300;
	line-height: 1.7;
}
h1, h2, p, ul, figure { margin: 0; padding: 0; }
h1, h2 {
	clear: both;
	font-weight: inherit;
	text-transform: uppercase;
}
h1 { font-size: 2em; }
h2 {
	font-size: 1.8em;
	margin: 0.5em 0 1em;
}
p { margin-bottom: 1.5em; }
strong { font-weight: bold; }
em { font-style: italic; }
img {
	max-width: 100%;
	height: auto;
}
a {
	color: #444;
	transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
a:hover, a:focus, a:active { color: #000; }

.skip-link {
	position: absolute;
	left: -999em;
	top: 5px;
	z-index: 10;
	padding: 10px 16px;
	background: #fff;
}
.skip-link:focus { left: 5px; }

.alignleft {
	float: left;
	margin-right: 1.5em;
}
.alignright {
	float: right;
	margin-left: 1.5em;
}
.aligncenter {
	clear: both;
	display: block;
	margin: 0 auto;
}

/* ---------- Kopfbereich ---------- */

.site-header {
	display: flex;
	align-items: center;
	justify-content: center;
	height: clamp(250px, 42vw, 500px);
	/* unten Platz für das Menü, das in das Kopfbild hineinragt */
	padding: 0 max(4%, env(safe-area-inset-right)) 3.05em max(4%, env(safe-area-inset-left));
	background: #333 url(../bilder/hb-teaser-1200x500.jpg) no-repeat center / cover;
	text-align: center;
	text-transform: uppercase;
}
.site-title {
	margin: 0;
	padding-top: min(3vw, 40px);
	font-size: clamp(4.8rem, 10vw, 12.8rem);
	font-weight: bold;
	line-height: 1.2;
	text-shadow: 0.055em 0.055em 0 rgba(0, 0, 0, 0.5);
}
.site-title a {
	color: #fff;
	text-decoration: none;
	opacity: 0.8;
	transition: opacity 0.3s ease-in-out;
}
.site-title a:hover, .site-title a:focus { opacity: 1; }
.site-description {
	margin: 0.4em 0 0;
	line-height: 1.4;
	color: #ccc;
	font-size: clamp(1.3rem, 2.25vw, 2.88rem);
}

/* ---------- Menü ---------- */

.site-main {
	position: relative;
	max-width: 1075px;
	margin: -3.05em auto 0;
	padding: 0 max(3%, env(safe-area-inset-right)) 2% max(3%, env(safe-area-inset-left));
	background: rgba(255, 255, 255, 0.8);
}
.single .site-main, .page .site-main { padding-bottom: 4%; }

.menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	list-style: none;
}
.menu a {
	display: block;
	padding: 20px 20px 16px;
	font-size: 13px;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}
.menu a:hover, .menu a:focus-visible {
	background: #b22f2f;
	color: #fff;
}

/* ---------- Startseite: Kacheln mit Hover-Effekt ---------- */

.site-content { padding: 4% 0 3.5%; }

.tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: min(4vw, 40px);
}
.tile a {
	position: relative;
	display: block;
	background: #111;
	color: #fff;
	text-decoration: none;
}
.tile img {
	display: block;
	width: 100%;
}
.tile-title {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 10%;
	background: rgba(0, 0, 0, 0.9);
	font-size: 110%;
	text-align: center;
	opacity: 0;
	transition: opacity 0.25s ease-in-out;
}
.tile a:hover .tile-title, .tile a:focus-visible .tile-title { opacity: 0.9; }

/* Geräte ohne Maus: Titel dauerhaft als Bildunterzeile zeigen */
@media (hover: none) {
	.tile-title {
		inset: auto 0 0;
		padding: 3em 6% 0.8em;
		background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
		font-size: 1.3rem;
		line-height: 1.3;
		opacity: 1;
	}
	.tile a:hover .tile-title, .tile a:focus-visible .tile-title { opacity: 1; }
}

/* ---------- Beiträge und Seiten ---------- */

.single .site-content, .page .site-content { padding: 6% 3% 3%; }

.entry-title {
	margin-bottom: 1em;
	font-size: 30px;
	letter-spacing: 2px;
	line-height: 40px;
}
.single article {
	display: grid;
	grid-template-columns: 25% 72%;
	column-gap: 3%;
}
.single .entry-header, .single .entry-content { grid-column: 2; }
.entry-content { min-width: 0; }
.entry-content::after {
	content: "";
	display: block;
	clear: both;
}
.entry-meta {
	grid-column: 1;
	grid-row: 2;
	padding: 8px 0 5px;
	color: #999;
	font-size: 11px;
	text-transform: uppercase;
}

.wp-caption {
	width: 650px;
	max-width: 100%;
	margin-bottom: 1.5em;
	border: 1px solid #ccc;
}
.wp-caption img {
	display: block;
	max-width: 98%;
	margin: 1.2% auto 0;
}
.wp-caption-text {
	margin: 0.8075em 0;
	padding: 0 1%;
	font-size: 0.8em;
	font-style: italic;
	text-align: center;
}
.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 3%;
	margin: 4% 0 1.5em;
}
.gallery img {
	display: block;
	width: 100%;
}

.post-navigation {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	width: 72%;
	margin: 2em 0 2em auto;
	padding: 10px 0;
	border-top: 5px solid #666;
}
.post-navigation a {
	font-size: 13px;
	text-decoration: none;
	text-transform: uppercase;
}
.nav-next { text-align: right; }

/* ---------- Fußbereich ---------- */

#secondary {
	display: flex;
	max-width: 80%;
	margin: 6em auto 0;
	padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.widget-area {
	flex: 1;
	padding: 0 2.5%;
	font-size: 85%;
	text-align: center;
}
.widget-title { margin: 0; }
.widget-area ul { list-style: none; }
.textwidget p:not(:last-child) { text-align: left; }

.site-footer {
	padding: 3%;
	color: #888;
}
.site-footer a { color: #888; }
.site-footer a:hover { color: #666; }
.site-info {
	margin: 3.5em 0 0;
	font-size: 12px;
	text-align: center;
}

/* ---------- Lightbox ---------- */

.lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.92);
	color: #fff;
	overflow: hidden;
	touch-action: pan-y pinch-zoom;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.92); }
.lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}
.lightbox img {
	max-width: 100%;
	max-height: 100%;
	padding: 48px 8px;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.2s;
	cursor: zoom-out;
}
.lightbox img.is-loaded { opacity: 1; }
.lightbox button {
	position: absolute;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font: 32px/1 sans-serif;
	cursor: pointer;
	opacity: 0.8;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lightbox-close { top: 0; right: max(4px, env(safe-area-inset-right)); }
.lightbox-prev { left: max(4px, env(safe-area-inset-left)); top: calc(50% - 24px); }
.lightbox-next { right: max(4px, env(safe-area-inset-right)); top: calc(50% - 24px); }
.lightbox-count {
	position: absolute;
	top: 14px;
	left: 14px;
	margin: 0;
	font-size: 13px;
	opacity: 0.8;
}

/* ---------- Kleinere Bildschirme ---------- */

@media (max-width: 800px) {
	.tiles { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
	.site-header { padding-bottom: 0; }
	.site-main { margin-top: 0; }
	.site-title {
		padding-top: 0;
		font-size: clamp(3.6rem, 12vw, 4.8rem);
	}
	.menu a { padding: 16px 10px 13px; }
	.tiles { grid-template-columns: repeat(2, 1fr); }

	.single article { display: block; }
	.entry-header, .entry-meta { text-align: center; }
	.entry-title { margin-bottom: 0.5em; }
	.entry-meta { margin-bottom: 3em; }
	.post-navigation { width: 100%; }
	.alignleft, .alignright { max-width: 45%; }
	h2 .alignright { max-width: 30%; }

	#secondary {
		display: block;
		max-width: 90%;
	}
	.widget-area { margin-bottom: 2.5em; }
	.widget-area li a {
		display: inline-block;
		padding: 0.35em 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
