/* ==========================================================================
   Seniorenheim Meng GmbH – statische Version
   Gestaltung nach dem bisherigen Contao-Theme („OneO“ + Projekt-Anpassungen).
   Reines CSS, keine externen Schriften oder Ressourcen (DSGVO).
   ========================================================================== */

:root {
	/*--green: #88ca86;                       /* Original-Grün */
	--green: #00704a;                       /* Original-Grün */
	/*--green-bar: rgba(136, 202, 134, 0.7);  /* Kopfleiste, halbtransparent */
	--green-bar: rgba(0, 112, 74, 0.7);  /* Kopfleiste, halbtransparent */
	--green-dark: #00704a;                  /* Buttons (Kontrast zu Weiß 6,2 : 1) */
	--text: #686a6b;
	--white: #ffffff;
	--focus: #005fcc;

	--font-body: "Times New Roman", Times, serif;
	--font-head: Arial, Helvetica, sans-serif;

	--bar-h: 177px;   /* Höhe der Kopfleiste */
	--hero-h: 800px;  /* Höhe Titelbild */
}

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

/* Grundschrift wie im Original: 28 / 26 / 24 px */
html {
	font-size: 28px;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}
@media (max-width: 900px) { html { font-size: 26px; } }
@media (max-width: 599px) { html { font-size: 24px; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.3;
	color: var(--text);
	background: var(--white);
}

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

a { color: inherit; }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: normal;
	letter-spacing: 0.1em;
	line-height: 1.3;
}

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

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -200px;
	left: 1rem;
	z-index: 1000;
	padding: 0.5em 1em;
	font: 0.7rem var(--font-head);
	background: var(--white);
	color: #000;
	border: 2px solid var(--focus);
}
.skip-link:focus { top: 1rem; }

/* ==========================================================================
   Kopfleiste – fest, halbtransparent grün über dem Titelbild
   ========================================================================== */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: var(--bar-h);
	background: var(--green-bar);
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

.header-inner {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	padding-right: 4%;
}

/* Telefonnummer oben rechts */
.header-phone {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	margin-top: 15px;
	font-size: 1rem;
	line-height: 1.3;
	color: var(--white);
	text-decoration: none;
}
.header-phone:hover span { text-decoration: underline; }
.header-phone svg { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* Logo – hängt auf großen Bildschirmen über die Leiste hinaus */
.logo {
	position: absolute;
	top: 10%;
	bottom: -90%;
	left: 2.6667rem;
	z-index: 2;
	transition: top 0.3s, bottom 0.3s;
}
.logo img {
	width: auto;
	height: 100%;
}
.site-header.is-scrolled .logo { bottom: 10%; }

/* Hauptnavigation rechts */
.main-nav { margin-top: auto; margin-bottom: 32px; }
.main-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0 1em;
}
.main-nav a {
	display: block;
	padding: 4px 8px 2px;
	font-family: var(--font-body);
	font-size: 0.8rem;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--text);
	border-radius: 5px;
}

.main-nav a:not([aria-current], :hover) {
	color: white;
}
.main-nav a:hover,
.main-nav a[aria-current] { background: var(--white); }

.nav-toggle {
	display: none;
	position: absolute;
	top: 25px;
	left: 6.6667%;
	width: 48px;
	height: 48px;
	padding: 12px;
	background: none;
	border: 0;
	cursor: pointer;
	color: white;
}
.nav-toggle span[aria-hidden],
.nav-toggle span[aria-hidden]::before,
.nav-toggle span[aria-hidden]::after {
	display: block;
	height: 3px;
	border-radius: 2px;
	background: currentColor;
	content: "";
}
.nav-toggle span[aria-hidden] { position: relative; }
.nav-toggle span[aria-hidden]::before { position: absolute; top: -8px; left: 0; right: 0; }
.nav-toggle span[aria-hidden]::after  { position: absolute; top: 8px;  left: 0; right: 0; }

@media (max-width: 1510px) {
	.logo { bottom: -45%; }
}
@media (max-width: 1380px) {
	.logo { top: 15px; bottom: auto; height: 3.5rem; }
	.site-header.is-scrolled .logo { bottom: auto; }
}
@media (max-width: 1200px) {
	.main-nav a { font-size: 0.65rem; }
	.main-nav ul { gap: 0 0.4em; }
}
@media (max-width: 920px) {
	.header-inner { align-items: center; padding-right: 0; }
	.header-phone { align-self: flex-end; margin-right: 4%; }
	.main-nav a { font-size: 0.65rem; }
	.logo { left: 4%; }
}

/* Smartphone: Menü-Schaltfläche, Logo mittig, Leiste scrollt mit */
@media (max-width: 719px) {
	.site-header {
		position: relative;
		height: auto;
		background: var(--green);
	}
	.header-inner { display: block; padding: 0 0 0.6rem; text-align: center; }
	.header-phone { position: absolute; top: 16px; right: 4%; margin: 0; font-size: 0.8rem; }
	.logo,
	.site-header.is-scrolled .logo {
		position: static;
		display: block;
		width: max-content;
		height: auto;
		margin: 0 auto;
		padding-top: 2.6rem;
		clear: both;
	}
	.logo img { height: 5rem; }

	.nav-toggle { display: block; top: 6px; left: 3%; }
	.main-nav { display: none; margin: 0.4rem 0 0; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.main-nav a {
		padding: 0.7em 1em;
		font-size: 0.8rem;
		border-radius: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.6);
	}
}

/* ==========================================================================
   Titelbild
   ========================================================================== */

.hero {
	height: var(--hero-h);
	background:
		url("../img/titelbild_meng.jpg") 50% 50% / cover no-repeat,
		var(--green);
}
/* Bildausschnitt: Personen bleiben sichtbar, linker Rand (unter dem großen Logo) wird beschnitten */
@media (min-width: 1511px) { .hero { background-position: 0 50%, 0 0; } }
@media (max-width: 1510px) and (min-width: 720px) { .hero { background-position: 85% 50%, 0 0; } }
@media (max-width: 1024px) { :root { --hero-h: 700px; } }
@media (max-width: 599px)  { :root { --hero-h: 400px; } }

/* Unterseiten: weißer Bereich unter der Kopfleiste (wie im Original) */
.page-banner { height: 300px; }
@media (max-width: 1024px) { .page-banner { height: 200px; } }
@media (max-width: 719px)  { .page-banner { height: 1.5rem; } }

/* ==========================================================================
   Inhaltsbereiche
   ========================================================================== */

[id] { scroll-margin-top: calc(var(--bar-h) + 10px); }
@media (max-width: 719px) { [id] { scroll-margin-top: 10px; } }

.section-inner {
	width: 91.6667%;
	max-width: 1406px;
	margin: 0 auto;
}

.main-content h2 {
	margin: 2.5rem 0 0;
	font-size: 1.3rem;
}
/* Abschnitte schließen Außenabstände ein (sonst weiße Lücken zwischen grünen Flächen) */
.main-content > section,
.main-content > div { display: flow-root; }
.main-content p { margin: 1.1rem 0; }

.text-block { text-align: center; }

.section-title { text-align: center; }

.bg-green { background-color: var(--green); }
.bg-green,
.bg-green h2,
.bg-green h3,
.bg-green p,
.bg-green a { color: var(--white); }

.section--last { padding-bottom: 0.5rem; }

/* Galerie ohne Abstände */
.gallery-band { padding-top: 40px; }
.gallery {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (max-width: 599px) { .gallery { grid-template-columns: 1fr; } }

/* Imagefilm */
.video-section { padding: 72px 0 1px; }
.video-wrap { max-width: 600px; margin: 0 auto; }
.video-section .section-title { margin: 1.25rem 0 0.9rem; }

/* Team */
.team-section { padding: 40px 0 4.5rem; }
.team {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
}
.team-item {
	width: 31.1111%;
	text-align: center;
}
.team-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.main-content .team-item h3 {
	margin: 0.75em 0 0;
	font-size: 1.0667rem;
	text-transform: uppercase;
}
.main-content .team-item p {
	margin: 0.5em 0 0;
	font-family: var(--font-head);
	font-size: 0.9333rem;
	line-height: 1.45;
	letter-spacing: 0.1em;
}
@media (max-width: 899px) {
	.team { justify-content: space-evenly; }
	.team-item { width: 47.7%; margin-bottom: 1.5rem; }
}
@media (max-width: 599px) {
	.team-item { width: 100%; }
}

/* Kontakt */
.contact-cols {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-evenly;
	align-items: center;
	text-align: center;
}
.contact-cols address {
	width: 31.1111%;
	min-width: 13em;
	font-style: normal;
}
.main-content .contact-cols p { margin: 0.9rem 0; }

.map-section { padding: 65px 0 0; }
#kontakt .section-inner { width: 100%; max-width: none; }

/* ==========================================================================
   Einwilligungs-Platzhalter für externe Inhalte (YouTube, Google Maps)
   ========================================================================== */

.embed {
	position: relative;
	width: 100%;
	background: #2f3a33;
	color: var(--white);
}
.embed--video { aspect-ratio: 16 / 9; }
.embed--map   { height: 500px; background: #e5e3df; color: #222; }

.embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.embed-consent {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	padding: 0.8em 1.2em;
	text-align: center;
	overflow: auto;
	font-family: var(--font-head);
	font-size: 0.5rem;
	line-height: 1.4;
}
.embed--video .embed-consent {
	background:
		linear-gradient(rgba(20, 30, 24, 0.6), rgba(20, 30, 24, 0.6)),
		url("../img/video-vorschau.jpg") 50% 50% / cover no-repeat;
}
.embed--map .embed-consent { font-size: 0.55rem; }

.main-content .embed-consent h3 {
	margin: 0;
	font-size: 1.3em;
	text-transform: uppercase;
	color: inherit;
}
.main-content .embed-consent p {
	margin: 0;
	max-width: 40em;
	color: inherit;
}
.embed .embed-consent a { color: inherit; }

.embed-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.2em;
	padding: 0.65em 1.3em;
	font: bold 1.2em/1.2 var(--font-head);
	letter-spacing: 0.06em;
	color: var(--white);
	background: var(--green-dark);
	border: 2px solid var(--white);
	border-radius: 4px;
	cursor: pointer;
}
.embed-button:hover { background: #005a3b; }
.embed-button svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.embed--map .embed-button { border-color: var(--green-dark); }

.embed-remember {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	cursor: pointer;
}
.embed-remember input { width: 1.2em; height: 1.2em; margin: 0; accent-color: var(--green-dark); }

.embed-address {
	font-style: normal;
	font-weight: bold;
	font-size: 1.15em;
}

@media (max-width: 599px) {
	.embed--video { aspect-ratio: auto; min-height: 360px; }
	.embed-consent { font-size: 0.55rem; }
}

/* ==========================================================================
   Fußbereich
   ========================================================================== */

.site-footer {
	padding: 1.6rem 1em 50px;
	text-align: center;
	font-size: 0.8rem;
	color: #000;
}
.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}
.site-footer li a,
.site-footer li .link-button { display: inline-block; padding: 0 20px; text-decoration: none; }
.site-footer li a:hover,
.site-footer li .link-button:hover { text-decoration: underline; }
.link-button {
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}
.footer-top {
	display: inline-block;
	margin-top: 1em;
	font-size: 65%;
	color: var(--text);
}

/* ==========================================================================
   Dialog: Datenschutz-Einstellungen
   ========================================================================== */

.consent-dialog {
	width: min(26rem, calc(100% - 2rem));
	padding: 1.6em;
	border: 0;
	border-top: 6px solid var(--green);
	border-radius: 6px;
	color: #333;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.consent-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.consent-dialog h2 { font-size: 1.1rem; text-transform: uppercase; }
.consent-dialog p { font-size: 0.8rem; }
.consent-dialog fieldset { border: 0; margin: 0 0 1em; padding: 0; }
.consent-option {
	display: flex;
	gap: 0.7em;
	align-items: flex-start;
	padding: 0.7em 0;
	border-top: 1px solid var(--border);
	font-size: 0.8rem;
	cursor: pointer;
}
.consent-option input { width: 1.3em; height: 1.3em; margin-top: 0.15em; accent-color: var(--green-dark); flex: none; }
.consent-option strong { display: block; font-family: var(--font-head); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.6em; justify-content: flex-end; }
.dialog-actions button {
	padding: 0.6em 1.1em;
	font: bold 0.75rem/1.2 var(--font-head);
	letter-spacing: 0.05em;
	border-radius: 4px;
	cursor: pointer;
	border: 2px solid var(--green-dark);
}
.btn-primary { background: var(--green-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--green-dark); }

/* ==========================================================================
   Unterseiten (Impressum, Datenschutz)
   ========================================================================== */


.legal {
	max-width: 46em;
	margin: 0 auto;
	padding: 2.4em 4% 3em;
}
.legal h1 { font-size: 1.7em; margin: 0 0 0.8em; }
.legal h2 { font-size: 1.15em; margin: 1.8em 0 0.5em; }
.legal h3 { font-size: 1em; margin: 1.4em 0 0.4em; }
.legal p, .legal li { font-size: 0.85rem; }
.legal ul { padding-left: 1.2em; }
.legal address { font-style: normal; }

/* Markierung offener Punkte (vor Veröffentlichung entfernen) */
.todo {
	background: #fff3b0;
	color: #5a4500;
	padding: 0 0.25em;
	border-radius: 2px;
	font-family: var(--font-head);
	font-size: 0.85em;
}
.todo-box {
	margin: 0 0 2em;
	padding: 1em 1.2em;
	background: #fff8d6;
	border-left: 5px solid #e0b100;
	color: #4a3b00;
	font-size: 0.8rem;
}

@media print {
	.site-header { position: static; box-shadow: none; }
	.nav-toggle, .main-nav, .embed, .skip-link, .footer-top, .link-button { display: none !important; }
	.bg-green, .bg-green * { background: none !important; color: #000 !important; }
}

/* Imagefilm: Überschrift im Quelltext vor dem Video (für Screenreader),
   optisch wie im Original darunter */
.video-inner { display: flex; flex-direction: column; }
.video-inner .video-wrap { order: 1; width: 100%; }
.video-inner .section-title { order: 2; }

/* Rechtstexte */
.legal h1 { margin-top: 0; }
.legal h2 { font-size: 1rem; }
