/*
Theme Name: Bestattungen Escher
Description: Einfaches, schlankes Theme für Bestattungen Escher. Header-Bild und Farbschema sind im Backend unter Design > Customizer konfigurierbar. Aufbau nach 00-Seitenaufbau-allgemein.
Author: Michael Schuster
Version: 0.5.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bestattungen-escher
*/

/* ---------------------------------------------------------------
   Farbschema: Die Werte hier sind nur Fallbacks.
   Die tatsächlichen Farben kommen aus dem Customizer
   (Design > Customizer > Farbschema) und überschreiben
   diese Variablen per Inline-CSS.
   --------------------------------------------------------------- */
:root {
	--be-primary: #35524a;   /* Header, Navigation, Footer */
	--be-accent:  #b08d57;   /* Links, Buttons, Hervorhebungen */
	--be-text:    #333333;   /* Fließtext */
	--be-bg:      #ffffff;   /* Seitenhintergrund */

	--be-content-width: 800px;   /* Vorgabe: 700–850px */
	--be-block-gap: 110px;       /* Vorgabe: 100–120px zwischen Blöcken (Desktop) */
}

/* --------------------------- Basis --------------------------- */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--be-bg);
	color: var(--be-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	line-height: 1.7; /* Vorgabe: 1.6–1.8 */
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--be-accent);
}

a:hover,
a:focus {
	text-decoration: none;
}

h1, h2, h3, h4 {
	color: var(--be-primary);
	font-family: Georgia, "Times New Roman", serif;
	line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* Echte HTML-Listen (SEO / Featured Snippets) */
.site-main ul,
.site-main ol {
	padding-left: 1.4em;
}

.site-main li {
	margin-bottom: 0.4em;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	word-wrap: normal;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: var(--be-primary);
	color: #fff;
}

/* --------------------------- Header --------------------------- */
.site-header {
	background: var(--be-primary);
	color: #fff;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 20px;
}

.site-branding a {
	color: #fff;
	text-decoration: none;
}

.brand-link {
	display: flex;
	align-items: center;
	gap: 18px;
}

.brand-logo {
	height: 70px;
	width: auto;
	display: block;
	flex-shrink: 0;
}

.site-title {
	margin: 0;
	font-size: 1.7rem;
	font-weight: bold;
	color: #fff;
	white-space: nowrap;
}

.site-description {
	margin: 0;
	font-size: 0.85rem;
	opacity: 0.85;
}

.custom-logo {
	max-height: 70px;
	width: auto;
	display: block;
}

/* Rechter Bereich im Header: Telefon-CTA und Burger-Button */
.header-actions {
	display: flex;
	align-items: center;
	gap: 24px;
}

.header-cta {
	display: flex;
	align-items: center;
	gap: 16px;
}

.header-cta-text {
	margin: 0;
	font-size: 0.95rem;
	white-space: nowrap;
}

.header-phone-btn {
	display: inline-block;
	background: var(--be-accent);
	color: #fff;
	text-decoration: none;
	font-size: 1.15rem;
	font-weight: bold;
	padding: 12px 26px;
	border-radius: 6px;
	white-space: nowrap;
}

.header-phone-btn:hover,
.header-phone-btn:focus {
	filter: brightness(1.1);
}

/* --------------------------- Navigation (unter dem Header-Bild) --------------------------- */
.main-nav-bar {
	background: var(--be-primary);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.main-nav-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Burger-Button (nur Mobilansicht, rechts oben im Header) */
.menu-toggle {
	display: none;
	background: transparent;
	border: none;
	padding: 10px;
	cursor: pointer;
}

.burger-bar {
	display: block;
	width: 26px;
	height: 3px;
	background: #fff;
	margin: 5px 0;
	border-radius: 2px;
}

/* Schließen-Button im Overlay (nur Mobilansicht) */
.menu-close {
	display: none;
	position: absolute;
	top: 14px;
	right: 16px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1.8rem;
	line-height: 1;
	padding: 10px;
	cursor: pointer;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.main-navigation a {
	display: block;
	padding: 14px 16px;
	color: #fff;
	text-decoration: none;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
	background: rgba(255, 255, 255, 0.12);
}

/* Unterpunkte 2. Ebene: klappen nach unten aus */
.main-navigation li {
	position: relative;
}

.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	min-width: 260px;
	flex-direction: column;
	background: var(--be-primary);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
	display: flex;
}

.main-navigation ul ul a {
	padding: 11px 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* 3. Ebene ebenfalls untereinander (eingerückt) */
.main-navigation ul ul ul {
	position: static;
	display: flex;
	box-shadow: none;
	background: rgba(0, 0, 0, 0.15);
}

.main-navigation ul ul ul a {
	padding-left: 32px;
}

/* --------------------------- Hero (Header-Bild) --------------------------- */
.hero {
	min-height: 320px;
	background-size: cover;
	background-position: center;
}

/* --------------------------- Inhalt --------------------------- */
.site-main {
	max-width: var(--be-content-width);
	margin: 0 auto;
	padding: 60px 20px;
}

/* Abstand zwischen inhaltlichen Blöcken (Desktop: 100–120px) */
.site-main .entry-content > h2,
.site-main .entry-content > .wp-block-group,
.site-main .entry-content > .wp-block-columns {
	margin-top: var(--be-block-gap);
}

.site-main .entry-content > h2:first-child {
	margin-top: 0;
}

.entry-title {
	margin-top: 0;
}

/* --------------------------- Footer --------------------------- */
.site-footer {
	background: var(--be-primary);
	color: #fff;
	margin-top: 80px;
}

.site-footer a {
	color: #fff;
}

.footer-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 50px 20px;
	font-size: 0.95rem;
}

.footer-columns h3 {
	color: #fff;
	font-size: 1.05rem;
	margin: 0 0 10px;
}

.footer-columns p {
	margin: 0 0 6px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 0.85rem;
}

.footer-bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 20px;
}

.footer-menu ul {
	list-style: none;
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
}

/* --------------------------- Mobil --------------------------- */
@media (max-width: 900px) {
	:root {
		--be-block-gap: 50px;
	}

	.menu-toggle {
		display: block;
	}

	/* Menü als Vollbild-Overlay */
	.main-navigation {
		display: none;
	}

	.main-navigation.is-open {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 999;
		background: var(--be-primary);
		overflow-y: auto;
		padding: 64px 20px 40px;
	}

	.main-navigation.is-open .menu-close {
		display: block;
	}

	.main-navigation ul {
		flex-direction: column;
		gap: 0;
	}

	.main-navigation a {
		font-size: 1.15rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	}

	/* Unterpunkte mobil eingerückt und immer sichtbar */
	.main-navigation ul ul {
		display: flex;
		position: static;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.15);
		min-width: 0;
	}

	.main-navigation ul ul a {
		padding-left: 30px;
	}

	.hero {
		min-height: 220px;
	}

	/* Nur der Button bleibt sichtbar (antippbar, ruft direkt an) – der Text
	   „Rund um die Uhr für Sie erreichbar" entfällt aus Platzgründen. */
	.header-cta-text {
		display: none;
	}

	.header-phone-btn {
		font-size: 0.95rem;
		padding: 9px 16px;
	}

	.header-actions {
		gap: 12px;
	}

	.footer-columns {
		grid-template-columns: 1fr;
	}
}

/* Auf sehr schmalen Bildschirmen Logo und Titel etwas verkleinern,
   damit Logo, Telefon-Button und Burger-Button nebeneinander passen. */
@media (max-width: 420px) {
	.brand-logo {
		height: 52px;
	}

	.site-title {
		font-size: 1.25rem;
	}
}
