/*
Theme Name: Bon Accord
Description: Schlankes Block-Theme für die Freimaurerloge «Bon Accord» Nr. 41 im Orient von Bern – ohne Page-Builder.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: bonaccord
License: GPL-2.0-or-later
*/

/* ---------- Grundlayout ---------- */

body {
	background-color: var(--wp--preset--color--pergament);
	background-image:
		linear-gradient(rgba(251, 247, 241, 0.86), rgba(251, 247, 241, 0.94)),
		url("assets/img/hintergrund.webp");
	background-size: cover;
	background-attachment: fixed;
	background-position: center;
}

:where(a) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--bordeaux);
	outline-offset: 3px;
}

.ba-skip-link {
	position: absolute;
	left: -9999px;
}
.ba-skip-link:focus {
	left: 1rem;
	top: 1rem;
	z-index: 100;
	background: #fff;
	padding: 0.5rem 1rem;
}

/* ---------- Kopfzeile ---------- */

.ba-header {
	border-bottom: 1px solid var(--wp--preset--color--tinte);
}

.ba-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: start;
	gap: 1rem;
}

.ba-motto {
	font-family: var(--wp--preset--font-family--zitat);
	font-style: italic;
	font-size: 1.05rem;
	line-height: 1.35;
	text-align: right;
	justify-self: start;
	margin: 0;
}

.ba-brand {
	text-align: center;
	text-decoration: none;
	color: inherit;
	display: block;
}
.ba-brand img {
	width: 78px;
	height: auto;
	display: block;
	margin: 0 auto 0.4rem;
}
.ba-brand__name {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	font-size: clamp(1.35rem, 1rem + 1.2vw, 1.75rem);
	letter-spacing: 0.01em;
	display: block;
}
.ba-brand__orient {
	font-family: var(--wp--preset--font-family--titel);
	font-size: 0.8rem;
	font-weight: 700;
	display: block;
	margin-top: 0.3rem;
}

.ba-header__rechts {
	justify-self: end;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.8rem;
}

.ba-sprachen {
	display: flex;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.8rem;
	letter-spacing: 0.05em;
}
.ba-sprachen li + li::before {
	content: "·";
	margin-right: 0.15rem;
	opacity: 0.6;
}
.ba-sprachen a {
	text-decoration: none;
	opacity: 0.75;
}
.ba-sprachen a[aria-current="true"] {
	font-weight: 600;
	opacity: 1;
}

/* Mobil-Menü (nur kleine Bildschirme) */
.ba-menu-toggle {
	display: none;
}

/* ---------- Seitenaufbau: Navigation | Inhalt | Bild ---------- */

.ba-seite {
	display: grid;
	grid-template-columns: 11rem minmax(0, 1fr) 11rem;
	gap: clamp(1.5rem, 3vw, 3rem);
	align-items: start;
}

.ba-nav {
	position: sticky;
	top: 2rem;
	border-right: 1px solid var(--wp--preset--color--tinte);
	padding-right: 1.6rem;
	text-align: right;
}
.ba-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ba-nav li {
	margin: 0 0 0.55rem;
}
.ba-nav li.ba-nav__abstand {
	margin-top: 1.4rem;
}
.ba-nav a {
	font-family: var(--wp--preset--font-family--titel);
	font-size: 0.92rem;
	text-decoration: none;
	color: inherit;
}
.ba-nav a:hover,
.ba-nav a[aria-current="page"] {
	font-weight: 700;
}

.ba-bild img {
	width: 100%;
	height: auto;
	display: block;
	box-shadow: 0 10px 30px rgba(41, 45, 120, 0.12);
}

.ba-inhalt > * + * {
	margin-block-start: 1.2rem;
}

/* Seitentitel mit Linie, Zitat darunter */
.ba-inhalt h1.wp-block-post-title,
.ba-inhalt .ba-titel {
	border-bottom: 1px solid var(--wp--preset--color--tinte);
	padding-bottom: 0.6rem;
	margin-top: 0;
}

.wp-block-quote.is-style-ba-motto {
	border: 0;
	padding: 0;
	margin: 0 0 2.5rem;
	text-align: right;
	font-family: var(--wp--preset--font-family--zitat);
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.4;
}
.wp-block-quote.is-style-ba-motto cite {
	font-style: normal;
	font-size: 1.05rem;
	display: block;
	margin-top: 0.35rem;
}
.wp-block-quote.is-style-ba-motto cite::before {
	content: "— ";
}

/* Aufklappbare Abschnitte */
.wp-block-details {
	border-top: 1px solid rgba(41, 45, 120, 0.25);
	padding: 0.9rem 0;
}
.wp-block-details:last-of-type {
	border-bottom: 1px solid rgba(41, 45, 120, 0.25);
}
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	font-size: 1.05rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	font-weight: 400;
	font-size: 1.3rem;
	line-height: 1;
}
.wp-block-details[open] summary::after {
	content: "×";
}
.wp-block-details[open] > summary {
	margin-bottom: 0.8rem;
}

/* Tabellen (Kontakt, Links) */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table td,
.wp-block-table th {
	border: 0;
	border-bottom: 1px solid rgba(41, 45, 120, 0.15);
	padding: 0.6rem 0.4rem;
	vertical-align: top;
	text-align: left;
}
.wp-block-table td:first-child {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	width: 45%;
}

/* ---------- Fusszeile ---------- */

.ba-footer {
	border-top: 1px solid var(--wp--preset--color--tinte);
	font-size: 0.8rem;
}
.ba-footer p {
	margin: 0;
}
.ba-footer__inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
}
.ba-footer ul {
	list-style: none;
	display: flex;
	gap: 1.2rem;
	margin: 0;
	padding: 0;
}

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

.ba-start {
	min-height: 78vh;
	display: grid;
	place-items: center;
	text-align: center;
}
.ba-start img {
	width: min(240px, 50vw);
	height: auto;
}
.ba-start h1 {
	font-size: clamp(2rem, 1.2rem + 3.5vw, 3.6rem);
	margin: 1.2rem 0 0.3rem;
}
.ba-start .ba-start__orient {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	font-size: 1.15rem;
	margin: 0;
}
.ba-start__eingang {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.8rem 1.6rem;
	list-style: none;
	padding: 0;
	margin: 2.5rem 0 0;
	font-family: var(--wp--preset--font-family--titel);
}
.ba-start__sprachen {
	justify-content: center;
	margin-top: 1.4rem !important;
}
.ba-start__naechste {
	margin: 2.2rem auto 0;
	padding: 0.9rem 1.4rem;
	display: inline-block;
	border-top: 1px solid var(--wp--preset--color--tinte);
	border-bottom: 1px solid var(--wp--preset--color--tinte);
	font-size: 0.95rem;
}
.ba-start__naechste a {
	font-weight: 600;
}
.ba-start__eingang a {
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.ba-start__eingang a:hover {
	border-bottom-color: currentColor;
}

/* ---------- Responsiv ---------- */

@media (max-width: 1080px) {
	.ba-seite {
		grid-template-columns: 10rem minmax(0, 1fr);
	}
	.ba-bild {
		display: none;
	}
}

@media (max-width: 760px) {
	.ba-header__inner {
		grid-template-columns: auto 1fr auto;
		align-items: center;
	}
	.ba-motto {
		display: none;
	}
	.ba-brand {
		text-align: left;
		display: flex;
		align-items: center;
		gap: 0.7rem;
	}
	.ba-brand img {
		width: 46px;
		margin: 0;
	}
	.ba-brand__name {
		font-size: 1.05rem;
	}
	.ba-brand__orient {
		font-size: 0.7rem;
		margin-top: 0.1rem;
	}
	.ba-header__inner {
		grid-template-columns: 1fr auto;
	}
	.ba-header__rechts {
		gap: 0.5rem;
	}
	.ba-menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.4rem;
		background: none;
		border: 1px solid var(--wp--preset--color--tinte);
		color: inherit;
		font: inherit;
		font-size: 0.85rem;
		padding: 0.4rem 0.7rem;
		cursor: pointer;
	}
	.ba-seite {
		grid-template-columns: minmax(0, 1fr);
	}
	.ba-nav {
		position: static;
		border-right: 0;
		border-bottom: 1px solid var(--wp--preset--color--tinte);
		padding: 0 0 1rem;
		text-align: left;
		display: none;
	}
	.ba-nav.is-open {
		display: block;
	}
	.ba-nav li.ba-nav__abstand {
		margin-top: 0.55rem;
	}
	.ba-nav a {
		font-size: 1.05rem;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

@media print {
	body {
		background: #fff;
	}
	.ba-nav,
	.ba-sprachen,
	.ba-menu-toggle {
		display: none !important;
	}
}
