/* ==========================================================================
   vereinslager.ch – Design im Stil des Flyers "Ihr Anlass. Unser Raum."
   Schrift: Montserrat (lokal, siehe fonts.css)
   ========================================================================== */

:root {
	--blau: #5078b8;        /* Hellblau: Logo "SCHEN", Titel Zeile 1, Hinweise */
	--navy: #204880;        /* Dunkelblau: Titel, Zwischentitel, Links */
	--orange: #f0a010;      /* Akzent: "Raum.", Quadrate im Footer */
	--grau: #8c9099;        /* Logo "KON" */
	--text: #2b2f36;
	--text-hell: #6b7280;
	--linie: #e3e6ea;
	--flaeche: #f5f7fa;
	--weiss: #fff;

	--schrift: "Montserrat", "Segoe UI", Arial, sans-serif;
	--breite: 1080px;
	--rand: clamp(1rem, 4vw, 2.5rem);
	--radius: 4px;
}

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

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--schrift);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--text);
	background: var(--weiss);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { color: var(--navy); font-weight: 600; text-underline-offset: 0.18em; }
a:hover { color: var(--blau); }

h1, h2, h3, h4, h5, h6 {
	font-weight: 900;
	line-height: 1.15;
	color: var(--navy);
	margin: 0 0 0.6em;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--blau); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p, ul, ol, table { margin: 0 0 1.1em; }

hr {
	border: 0;
	border-top: 1px solid var(--linie);
	margin: 2.5rem 0;
}

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.container {
	width: 100%;
	max-width: calc(var(--breite) + 2 * var(--rand));
	margin: 0 auto;
	padding: 0 var(--rand);
}

.sr-only {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
	position: absolute; left: 1rem; top: -3rem;
	background: var(--navy); color: var(--weiss);
	padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { top: 1rem; color: var(--weiss); }

/* ---------- Header / Logo / Navigation ---------- */

.site-header {
	background: var(--weiss);
	border-bottom: 1px solid var(--linie);
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 5rem;
}

.logo {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	text-decoration: none;
	white-space: nowrap;
}
.logo__name {
	font-weight: 900;
	font-size: clamp(1.3rem, 3vw, 1.85rem);
	letter-spacing: -0.02em;
	line-height: 1;
}
.logo__sub {
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-hell);
	line-height: 1;
}
.logo__a { color: var(--blau); }
.logo__b { color: var(--grau); }
.logo:hover .logo__a { color: var(--navy); }

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
}

.site-nav a {
	display: block;
	padding: 0.4rem 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-hell);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--orange); }

.nav-toggle { display: none; }

@media (max-width: 1100px) {
	.nav-toggle {
		display: block;
		position: relative;
		width: 2.75rem; height: 2.75rem;
		border: 1px solid var(--linie);
		border-radius: var(--radius);
		background: var(--weiss);
		cursor: pointer;
	}
	.nav-toggle__bar,
	.nav-toggle__bar::before,
	.nav-toggle__bar::after {
		content: "";
		position: absolute;
		left: 50%;
		width: 1.25rem; height: 2px;
		margin-left: -0.625rem;
		background: var(--navy);
		transition: transform 0.2s, opacity 0.2s;
	}
	.nav-toggle__bar { top: 50%; margin-top: -1px; }
	.nav-toggle__bar::before, .nav-toggle__bar::after { left: 0; margin-left: 0; }
	.nav-toggle__bar::before { top: -6px; }
	.nav-toggle__bar::after { top: 6px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

	.site-nav {
		display: none;
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: var(--weiss);
		border-bottom: 1px solid var(--linie);
		box-shadow: 0 12px 24px rgba(32, 72, 128, 0.08);
	}
	.site-nav.is-open { display: block; }
	.site-nav ul {
		flex-direction: column;
		gap: 0;
		padding: 0.5rem var(--rand) 1rem;
	}
	.site-nav a {
		font-size: 0.85rem;
		padding: 0.85rem 0;
		border-bottom: 1px solid var(--linie);
	}
	.site-nav li:last-child a { border-bottom: 0; }
	.site-nav a[aria-current="page"] { border-bottom-color: var(--linie); box-shadow: inset 3px 0 0 var(--orange); padding-left: 0.75rem; }
}

/* ---------- Bausteine ---------- */

.site-main { flex: 1; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }

.eyebrow {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--blau);
	margin: 0 0 1.25rem;
}

.text-blau { color: var(--blau); }
.text-navy { color: var(--navy); }
.text-orange { color: var(--orange); }

.button {
	display: inline-block;
	padding: 0.8rem 1.4rem;
	border: 2px solid var(--navy);
	border-radius: var(--radius);
	background: var(--navy);
	color: var(--weiss);
	font: 600 0.9rem/1.2 var(--schrift);
	text-decoration: none;
	cursor: pointer;
}
.button:hover { background: var(--blau); border-color: var(--blau); color: var(--weiss); }
.button--hell { background: transparent; color: var(--navy); }
.button--hell:hover { background: var(--navy); border-color: var(--navy); color: var(--weiss); }

.back-link {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--blau);
	margin-bottom: 1.5rem;
}
.back-link::before { content: "← "; }

/* ---------- Startseite ---------- */

/* Hauptmarke "VEREINSLAGER.CH" – steht klar im Vordergrund */
.hero__marke {
	font-size: clamp(2rem, 8vw, 5.75rem);
	line-height: 1;
	letter-spacing: -0.03em;
	margin: 0 0 0.9rem;
	white-space: nowrap;
}
.hero__marke-ch { color: var(--grau); }
.hero__claim-ort { color: var(--grau); white-space: nowrap; }

/* Slogan aus dem Flyer, deutlich kleiner als die Marke */
.hero__claim {
	font-size: clamp(1.35rem, 3.6vw, 2.4rem);
	font-weight: 900;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 1.25rem;
}

.hero__title {
	font-size: clamp(2.75rem, 9vw, 5.25rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 1.5rem;
}
.hero__title span { display: block; }

.hero__lead {
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	font-weight: 600;
	color: var(--text);
	margin: 0 0 2.25rem;
}

.hero__bild { margin: 0 0 3rem; }
.hero__bild img {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 1;
	object-fit: cover;
}
.hero__bild figcaption {
	font-size: 0.75rem;
	color: var(--text-hell);
	margin-top: 0.6rem;
}

.spalten {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1.5rem 3.5rem;
}
.spalten h3 { margin-bottom: 0.75rem; }

.abschnitt { margin-top: clamp(3rem, 7vw, 5rem); }
.abschnitt__titel { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin-bottom: 2.5rem; }
.abschnitt__titel span { display: block; }

.angebot {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 1.25rem 2.5rem;
	align-items: start;
	padding: 2rem 0;
	border-top: 1px solid var(--linie);
}
.angebot:first-of-type { border-top: 0; padding-top: 0; }
.angebot img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.angebot h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.angebot__hinweis {
	display: block;
	margin-top: 1.25rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--blau);
}
.angebot__link { font-size: 0.9rem; }
.angebot__link::after { content: " →"; }

@media (max-width: 640px) {
	.angebot { grid-template-columns: 1fr; }
}

.callout {
	border-top: 1px solid var(--linie);
	padding-top: 2rem;
	font-weight: 600;
	color: var(--navy);
}

.kontakt {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.5rem 3.5rem;
	margin-top: 1.5rem;
}
.kontakt h3 { font-size: 1.15rem; margin-bottom: 0.9rem; }
.kontakt p { margin: 0 0 0.4rem; }

.kleingedrucktes {
	font-size: 0.75rem;
	color: var(--text-hell);
	margin-top: 2rem;
}

.uebersicht {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 0;
}
@media (max-width: 800px) { .uebersicht { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .uebersicht { grid-template-columns: 1fr; } }

.uebersicht a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.1rem 1.25rem;
	background: var(--flaeche);
	border-left: 4px solid var(--orange);
	color: var(--navy);
	font-weight: 700;
	text-decoration: none;
}
.uebersicht a::after { content: "→"; color: var(--blau); }
.uebersicht a:hover { background: var(--navy); color: var(--weiss); }
.uebersicht a:hover::after { color: var(--orange); }

/* ---------- Inhaltsseiten (HTML aus dem Editor) ---------- */

.inhalt { max-width: 860px; margin: 0 auto; }
.inhalt--breit { max-width: none; }

.inhalt h1 { margin-bottom: 0.8em; }
.inhalt h4 { margin-top: 1.5em; }
/* alte Inline-Farbe Schwarz aus dem Editor bei Links ignorieren -> einheitliche Linkfarbe */
.inhalt a[style*="color: #000000"], .inhalt a [style*="color: #000000"] { color: var(--navy) !important; }
.inhalt a[style*="color: #000000"]:hover { color: var(--blau) !important; }
.inhalt img { display: inline-block; }
.inhalt a img { display: block; }
.inhalt iframe { max-width: 100%; border: 0; }
.inhalt td, .inhalt th { padding: 0.5rem; }
.inhalt table { border-collapse: collapse; max-width: 100%; height: auto !important; }

/* lange Dateinamen/Links umbrechen statt überlaufen */
.inhalt { overflow-wrap: anywhere; }

@media (max-width: 736px) {
	/* Layout-Tabellen aus dem Editor auf dem Handy untereinander */
	.inhalt table, .inhalt tbody, .inhalt tr, .inhalt td, .inhalt th {
		display: block;
		width: 100% !important;
		height: auto !important;
	}
	.inhalt td, .inhalt th { padding: 0.5rem 0; border: 0 !important; }
	.inhalt [style*="width"] { max-width: 100%; }
}

/* Bild-Kacheln der Unterseiten (Infrastruktur, Unterkünfte, Kochen) */
.kacheln-bereich { margin: 1rem 0 2rem; text-align: left; }
.kacheln-titel {
	font-size: 1.35rem;
	margin: 2.5rem 0 1rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--linie);
}
.kacheln-bereich > .kacheln-titel:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.kacheln {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kachel {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--navy);
	color: var(--weiss);
	text-decoration: none;
	border-radius: var(--radius);
}
.inhalt .kachel img, .kachel img, .kachel__leer {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.kachel__leer { background: linear-gradient(135deg, var(--blau), var(--navy)); }
.kachel::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20, 40, 75, 0.85) 0%, rgba(20, 40, 75, 0.35) 38%, rgba(20, 40, 75, 0) 65%);
	transition: background 0.3s;
}
.kachel__titel {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: 1;
	padding: 1rem 1.1rem;
	font-weight: 900;
	font-size: 1.1rem;
	line-height: 1.2;
	color: var(--weiss);
	border-bottom: 4px solid transparent;
	transition: border-color 0.3s;
}
.kachel__titel::after { content: " →"; color: var(--orange); }
.kachel__extern {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.1rem 0.4rem;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	vertical-align: middle;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
}
.kachel:hover, .kachel:focus-visible { color: var(--weiss); }
.kachel:hover img, .kachel:focus-visible img { transform: scale(1.05); }
.kachel:hover::after, .kachel:focus-visible::after { background: linear-gradient(to top, rgba(20, 40, 75, 0.9) 0%, rgba(20, 40, 75, 0.45) 50%, rgba(20, 40, 75, 0.1) 100%); }
.kachel:hover .kachel__titel, .kachel:focus-visible .kachel__titel { border-bottom-color: var(--orange); }

@media (max-width: 480px) {
	.kacheln { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
	.kachel__titel { font-size: 0.9rem; padding: 0.7rem 0.75rem; }
}

/* Platzhalter für externe Inhalte (Google Maps) */
.consent-embed {
	background: var(--flaeche);
	border: 1px solid var(--linie);
	border-radius: var(--radius);
	padding: 1.5rem;
	max-width: 600px;
	text-align: center;
}
.consent-embed p { font-size: 0.85rem; color: var(--text-hell); margin-bottom: 1rem; }
.consent-embed-frame { border: 0; width: 100%; max-width: 600px; height: 350px; }

/* ---------- Formulare / Admin ---------- */

label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--navy); margin: 1rem 0 0.35rem; }

input[type="text"], input[type="password"], input[type="email"], select, textarea {
	width: 100%;
	padding: 0.7rem 0.8rem;
	font: 400 1rem/1.4 var(--schrift);
	color: var(--text);
	background: var(--weiss);
	border: 1px solid #cfd5dd;
	border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--blau); outline: 2px solid rgba(80, 120, 184, 0.25); outline-offset: 0; }

input[type="submit"], button[type="submit"] {
	padding: 0.8rem 1.4rem;
	border: 2px solid var(--navy);
	border-radius: var(--radius);
	background: var(--navy);
	color: var(--weiss);
	font: 600 0.9rem/1.2 var(--schrift);
	cursor: pointer;
}
input[type="submit"]:hover, button[type="submit"]:hover { background: var(--blau); border-color: var(--blau); }

.login-form { max-width: 24rem; }
.login-form input[type="submit"] { margin-top: 1.5rem; }

.statustext, .meldung {
	font-weight: 600;
	margin: 1rem 0;
	color: var(--navy);
}
.statustext:empty { display: none; }
.meldung { padding: 0.8rem 1rem; background: var(--flaeche); border-left: 4px solid var(--orange); }

.admin-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--linie);
}
.admin-bar form { margin: 0; }
.admin-bar select { width: auto; min-width: 16rem; max-width: 100%; }
.admin-bar .spacer { flex: 1; }
.admin-bar a { font-size: 0.9rem; }
.admin-bar input[type="submit"] { padding: 0.55rem 1rem; }
.editor-form input[type="submit"] { margin-top: 1rem; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--linie); }

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	font-size: 0.75rem;
	color: var(--text-hell);
}

.site-footer a { color: var(--text-hell); font-weight: 400; text-decoration: none; }
.site-footer a:hover { color: var(--navy); }

.site-footer__brand { display: inline-flex; align-items: center; gap: 0.75rem; }

.squares { display: inline-flex; gap: 3px; }
.squares i { width: 7px; height: 7px; background: var(--orange); }

.site-footer__links { display: flex; gap: 1.5rem; }

.editor-hinweis {
	font-size: 0.85rem;
	color: var(--text-hell);
	padding: 0.7rem 1rem;
	background: var(--flaeche);
	border-left: 4px solid var(--blau);
}
.editor-hinweis code { font-weight: 700; color: var(--navy); }

/* Galerie (mehrere Bilder in einem Absatz, z.B. Impressionen) */
.galerie {
	/* Flex statt Grid, damit unvollständige Zeilen (z.B. 2 von 3 Bildern) zentriert sind */
	--spalten: 3;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	list-style: none;
	margin: 1.5rem 0 2rem;
	padding: 0;
}
.galerie > li { flex: 0 0 calc((100% - (var(--spalten) - 1) * 0.75rem) / var(--spalten)); min-width: 0; }
.galerie__link {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--flaeche);
	cursor: zoom-in;
}
.inhalt .galerie img, .galerie img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.galerie__link:hover img, .galerie__link:focus-visible img { transform: scale(1.04); }

@media (max-width: 900px) { .galerie { --spalten: 2; } }
@media (max-width: 600px) {
	.galerie { --spalten: 1; }
	.galerie__link { aspect-ratio: auto; }
	.inhalt .galerie img, .galerie img { height: auto; }
}

/* Grossansicht (Lightbox) */
.lightbox {
	width: 100vw; height: 100vh;
	max-width: none; max-height: none;
	margin: 0; padding: 0;
	border: 0;
	background: rgba(15, 25, 45, 0.94);
	color: var(--weiss);
}
.lightbox::backdrop { background: rgba(15, 25, 45, 0.94); }
.lightbox__bild {
	position: absolute;
	inset: 3.5rem 4rem;
	width: calc(100% - 8rem);
	height: calc(100% - 7rem);
	object-fit: contain;
}
.lightbox button {
	position: absolute;
	width: 3rem; height: 3rem;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: var(--weiss);
	font: 400 1.6rem/1 var(--schrift);
	cursor: pointer;
}
.lightbox button:hover { background: var(--orange); }
.lightbox__zu { top: 0.75rem; right: 0.75rem; }
.lightbox__zurueck { left: 0.75rem; top: 50%; margin-top: -1.5rem; }
.lightbox__weiter { right: 0.75rem; top: 50%; margin-top: -1.5rem; }
.lightbox__zaehler {
	position: absolute;
	left: 0; right: 0; bottom: 1rem;
	text-align: center;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	opacity: 0.8;
}
@media (max-width: 600px) {
	.lightbox__bild { inset: 3.5rem 0.5rem; width: calc(100% - 1rem); }
	.lightbox__zurueck, .lightbox__weiter { top: auto; bottom: 0.5rem; margin-top: 0; }
}

/* Hinweis in der Vorschau-Version (config.php: 'vorschau' => true) */
.vorschau-banner {
	background: var(--orange);
	color: var(--navy);
	text-align: center;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.4rem 1rem;
}
