/*
 * Globales Stylesheet für das CMS von Sascha Große
 *
 * Dieses Stylesheet definiert das Erscheinungsbild der öffentlichen Website
 * und des Admin‑Bereichs. Es basiert auf dem bestehenden Design der
 * statischen Seite: helle Hintergründe, grüne Akzentfarben und große
 * Abstände. Alle Angaben sind in Variablen gekapselt, sodass sich
 * Farbänderungen zentral vornehmen lassen. Kommentare sind auf Deutsch,
 * um die Wartung zu erleichtern.
 */

/* Farbdefinitionen */
:root {
	--primary-color: #1f5c45; /* Piniengrün: Akzent für Überschriften, Menüs und Links */
	--secondary-color: #3aa984; /* Farn‑Grün: Buttons und Hover‑Zustände */
	--background-color: #ffffff; /* Grundfarbe für Seitenhintergründe */
	--text-color: #333333; /* Standardfarbe für Fließtext */
	--light-gray: #f5f5f5; /* Heller Kartenhintergrund */
	--border-radius: 6px; /* Einheitliche Rundung für Boxen und Buttons */
	--transition-speed: 0.3s; /* Sanfte Übergänge für Effekte */
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	color: var(--text-color);
	background-color: var(--background-color);
	line-height: 1.6;
}

/* Container-Regeln: zentriert und mit maximaler Breite */
.container {
	width: 90%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

.row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 -1rem;
}

.column {
	padding: 1rem;
	box-sizing: border-box;
}

.half {
	flex: 0 0 50%;
	max-width: 50%;
}

/* Viertel-Spalte für Admin-Dashboard */
.quarter {
	flex: 0 0 25%;
	max-width: 25%;
}

@media (max-width: 992px) {
	.quarter {
		flex: 0 0 50%;
		max-width: 50%;
	}
}
@media (max-width: 600px) {
	.quarter {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* ---------- Header & Navigation ---------- */

.site-header {
	background-color: #fff;
	border-bottom: 1px solid #e6e6e6;
	position: sticky;
	top: 0;
	z-index: 999;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
}

@media (max-width: 768px) {
	.site-header .container {
		flex-wrap: wrap;
		padding: 0.75rem 0;
	}
}

.logo {
	margin: 0;
	font-size: 1.6rem;
	line-height: 1;
}

.site-header .logo {
	margin-right: 2rem;
	flex-shrink: 0;
}

.site-header .navigation {
	margin-left: auto;
}

.logo a {
	text-decoration: none;
	color: var(--primary-color);
	font-weight: 700;
}

.navigation {
	position: relative;
}

.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
}

.nav-toggle .hamburger {
	width: 24px;
	height: 3px;
	background-color: var(--primary-color);
	position: relative;
	display: block;
	transition: background var(--transition-speed) ease;
}

.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
	content: "";
	position: absolute;
	width: 24px;
	height: 3px;
	background-color: var(--primary-color);
	transition: transform var(--transition-speed) ease;
}

.nav-toggle .hamburger::before {
	top: -8px;
}

.nav-toggle .hamburger::after {
	top: 8px;
}

.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1rem;
}

.nav-list li a {
	text-decoration: none;
	color: var(--primary-color);
	padding: 0.5rem 0.75rem;
	border-radius: var(--border-radius);
	transition: background-color var(--transition-speed) ease,
		color var(--transition-speed) ease;
	display: inline-block;
}

.nav-list li a:hover,
.nav-list li a.active {
	background-color: var(--primary-color);
	color: var(--secondary-color);
	border-bottom: 2px solid var(--secondary-color);
}

/* Mobile Navigation */
@media (max-width: 768px) {
	.nav-toggle {
		display: block;
	}
	.nav-list {
		position: absolute;
		top: 100%;
		right: 0;
		background-color: #fff;
		flex-direction: column;
		width: 200px;
		border: 1px solid #e6e6e6;
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
		max-height: 0;
		overflow: hidden;
		transition: max-height var(--transition-speed) ease;
		z-index: 998;
	}
	.nav-list.open {
		max-height: 400px;
	}
	.nav-list li {
		border-bottom: 1px solid #f0f0f0;
	}
	.nav-list li:last-child {
		border-bottom: none;
	}
}

/* ---------- Hero‑Sektionen ---------- */

.hero {
	position: relative;
	height: 70vh;
	min-height: 400px;
	/* Hintergrundbild über CSS-Variable steuern. Standardwert ist none. */
	background-image: var(--hero-image);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.hero .overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.45);
}

.hero-content {
	position: relative;
	text-align: center;
	max-width: 800px;
	padding: 1rem;
}

.hero-content h2 {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
}

.hero-content .subtitle {
	font-size: 1.2rem;
	margin-bottom: 1.5rem;
}

/* Hintergründe für spezifische Hero‑Bereiche */
/* Spezifische Hintergründe über CSS-Variablen */
/*
 * Die Hero‑Bereiche laden jeweils ihr eigenes Hintergrundbild.
 * Da die CSS‑Datei im Verzeichnis /css liegt und die Bilder unter
 * /assets/images abgelegt sind, müssen wir entsprechend nach oben
 * navigieren. Andernfalls würde der Browser im falschen Ordner
 * suchen und ein grauer Platzhalter erscheint (s. Bug bei
 * https://www.sascha-grosse.de/?chat3). Hier korrigieren wir die
 * Pfade auf ../assets/images/… .
 */
.hero-index {
	--hero-image: url("../assets/images/hero_dark.jpg");
}
.hero-music {
	--hero-image: url("../assets/images/music.jpg");
}
.hero-publications {
	--hero-image: url("../assets/images/publications_alt.jpg");
}
.hero-contact {
	--hero-image: url("../assets/images/contact.jpg");
}

/* ---------- CTA‑Bereich ---------- */

/*
 * CTA‑Bereich: Auch hier verwenden wir das Hintergrundbild aus
 * dem assets‑Ordner. Ansonsten bleibt die Gestaltung wie zuvor.
 */
.cta-section {
	background-image: url("../assets/images/cta_bg.jpg");
	background-size: cover;
	background-position: center;
	color: #fff;
	text-align: center;
	position: relative;
	padding: 4rem 0;
}

.cta-section::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.4);
}

.cta-container {
	position: relative;
	z-index: 1;
}

.cta-container h3 {
	margin-top: 0;
	font-size: 2rem;
	margin-bottom: 1rem;
}

.cta-container p {
	margin: 0 0 1.5rem;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-block;
	background-color: var(--secondary-color);
	color: #fff;
	padding: 0.75rem 1.25rem;
	border-radius: var(--border-radius);
	text-decoration: none;
	font-weight: 600;
	border: 2px solid var(--secondary-color);
	cursor: pointer;
	transition: background-color var(--transition-speed) ease,
		transform var(--transition-speed) ease,
		box-shadow var(--transition-speed) ease;
}

.btn:hover,
.btn:focus {
	background-color: #2e826a;
	border-color: #2e826a;
	transform: translateY(-4px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ---------- Textlinks ---------- */

.text-link {
	color: var(--secondary-color);
	text-decoration: none;
	font-weight: 600;
	transition: color var(--transition-speed) ease;
}

.text-link:hover,
.text-link:focus {
	color: var(--primary-color);
}

/* ---------- Sections ---------- */

.section {
	padding: 4rem 0;
}

.section.light-bg {
	background-color: var(--light-gray);
}

.section h3 {
	margin-top: 0;
	font-size: 2rem;
	margin-bottom: 1.5rem;
	color: var(--primary-color);
}

/* ---------- Blog Cards ---------- */

.blog-preview .blog-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}

.blog-card {
	background-color: var(--light-gray);
	border-radius: var(--border-radius);
	overflow: hidden;
	flex: 1 1 calc(33.333% - 2rem);
	display: flex;
	flex-direction: column;
	transition: transform var(--transition-speed) ease,
		box-shadow var(--transition-speed) ease;
}

.blog-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.blog-card img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.blog-content {
	padding: 1rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.blog-content h4 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: 1.25rem;
	color: var(--primary-color);
}

.blog-content h4 a,
.blog-content h4 a:visited {
	color: var(--primary-color);
	text-decoration: none;
	transition: color var(--transition-speed) ease;
}

.blog-content h4 a:hover {
	color: var(--secondary-color);
}

.blog-content p {
	flex-grow: 1;
	margin: 0 0 1rem;
}

@media (max-width: 992px) {
	.blog-card {
		flex: 1 1 calc(50% - 2rem);
	}
	.half {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

@media (max-width: 600px) {
	.blog-card {
		flex: 1 1 100%;
	}
	.hero-content h2 {
		font-size: 2rem;
	}
	.hero-content .subtitle {
		font-size: 1rem;
	}
}

/* ---------- Musikbereich ---------- */

.music-preview img {
	border-radius: var(--border-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ---------- Kontaktformular ---------- */

.contact-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.login-form input,
.page-form input,
.page-form textarea,
.post-form input,
.post-form textarea {
	width: 100%;
	padding: 0.5rem;
	margin-bottom: 1rem;
	border: 1px solid var(--light-gray);
	border-radius: var(--border-radius);
	font-size: 1rem;
	font-family: inherit;
	box-sizing: border-box;
}

.contact-form textarea,
.page-form textarea,
.post-form textarea {
	resize: vertical;
}

/*
 * Bildgrößen steuern
 *
 * In der dynamischen Version fehlten die Regeln, die die Größe von
 * eingebetteten Bildern begrenzen. Insbesondere in der
 * "Über mich"‑Vorschau skaliert das Avatar‑Bild ohne diese Regeln
 * auf die volle Höhe der Spalte und zerstört das Layout. Wir
 * übernehmen daher die Klassen aus der statischen Vorlage: Bilder
 * innerhalb einer Spalte der about‑preview‑Sektion sind 100 % breit,
 * behalten ihr Seitenverhältnis bei, haben eine leichte
 * Abrundung und einen Schatten. Zusätzlich definieren wir eine
 * generische .responsive‑Klasse, die bei Bedarf auf andere Bilder
 * angewendet werden kann. Schließlich sorgen wir mit der globalen
 * img‑Regel dafür, dass alle Bilder sich an den verfügbaren Platz
 * anpassen.
 */

.about-preview .column img {
	width: 100%;
	height: auto;
	border-radius: var(--border-radius);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
	display: block;
}

/* Allgemeine responsive Bildklasse */
.responsive {
	width: 100%;
	height: auto;
	display: block;
}

/* Bilder im Allgemeinen: maximale Breite begrenzen, Seitenverhältnis wahren. */
img {
	max-width: 100%;
	height: auto;
}

.admin-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
	margin-bottom: 2rem;
}
.admin-table th,
.admin-table td {
	padding: 0.5rem;
	border: 1px solid #ddd;
	text-align: left;
}
.admin-table th {
	background-color: var(--light-gray);
}

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

.site-footer {
	background-color: #f4f4f4;
	padding: 1.5rem 0;
	font-size: 0.875rem;
}

.site-footer p {
	margin: 0;
}

.site-footer .footer-nav {
	margin-top: 0.5rem;
}

.site-footer .footer-nav a {
	margin-right: 1rem;
	color: var(--primary-color);
	text-decoration: none;
}

.site-footer .footer-nav a:hover {
	text-decoration: underline;
}

/* ---------- Skip-Link ---------- */

.skip-link {
	position: absolute;
	left: 0;
	top: -40px;
	background-color: #ffffff;
	color: var(--primary-color);
	padding: 0.5rem 1rem;
	z-index: 1000;
	border-radius: var(--border-radius);
	text-decoration: none;
	transition: top var(--transition-speed) ease;
}

.skip-link:focus {
	top: 0;
}

/* ---------- Alerts ---------- */
.alert {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: var(--border-radius);
	font-size: 0.9rem;
}
.alert-success {
	background-color: #d1e7dd;
	color: #0f5132;
}
.alert-danger {
	background-color: #f8d7da;
	color: #842029;
}
.alert-info {
	background-color: #cff4fc;
	color: #055160;
}

/* ---------- Hilfsklassen ---------- */
/* Klassen für schmalere Container in Formularen */
.max-400 {
	max-width: 400px;
}
.max-600 {
	max-width: 600px;
}
.max-800 {
	max-width: 800px;
}
/* Vorschaubild im Backend (z.B. aktuelles Bild beim Beitrag) */
.preview-thumb {
	max-height: 100px;
}
/* Versteckte Elemente (z.B. Honeypot) */
.hidden {
	display: none !important;
}

/* ---------- Admin Cards ---------- */
.admin-card {
	background-color: var(--light-gray);
	border-radius: var(--border-radius);
	padding: 1.5rem;
	margin-bottom: 1rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	text-align: center;
}
.admin-card h3 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	color: var(--primary-color);
}
.admin-card p {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 700;
}

/* Cookie-Banner initial ausblenden; wird via JS angezeigt */
.cookie-banner {
	display: none;
	background-color: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 1rem 0;
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
}
.cookie-banner .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}
.cookie-banner p {
	margin: 0 1rem 0 0;
	flex: 1;
}

/* ---------- Blog Filter Formular ---------- */
.blog-filter label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}
.blog-filter input,
.blog-filter select {
	width: 100%;
	padding: 0.5rem;
	margin-bottom: 1rem;
	border: 1px solid var(--light-gray);
	border-radius: var(--border-radius);
	font-family: inherit;
	font-size: 1rem;
	box-sizing: border-box;
}
.blog-filter .btn {
	margin-top: 1rem;
}

/*---------------------------------------*/
/*---------------MUSIK-------------------*/
/*---------------------------------------*/
.music-page {
	max-width: 800px;
	margin: 2rem auto;
	padding: 1rem;
}

.song {
	background: #113426;
	color: #fff;
	padding: 1.5rem;
	margin-bottom: 2rem;
	border-radius: 12px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.song h2 {
	margin-top: 0;
}

.song-links {
	margin-top: 1rem;
}

.song-links a {
	display: inline-block;
	margin-right: 0.8rem;
	padding: 0.6rem 1rem;
	border-radius: 6px;
	text-decoration: none;
	font-weight: bold;
	transition: background 0.3s;
}

.song-links a.play-btn {
	background: #fff;
	color: #113426;
}

.song-links a:not(.play-btn) {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.song-links a:hover {
	background: #ffd700;
	color: #113426;
}
