/*
Theme Name: JCGM
Theme URI: https://jc-gm.de
Author: Jugendclub Gersdorf-Möhrsdorf e.V.
Description: Schlichtes One-Pager-Theme für den Jugendclub Gersdorf-Möhrsdorf e.V. mit Veranstaltungen und Fotogalerien.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: jcgm
*/

/* ---------- Farben & Grundwerte (aus dem Logo) ---------- */
:root {
	--blau: #2e64b4;
	--blau-dunkel: #1d4380;
	--gold: #e9a800;
	--gold-hell: #fdf3d6;
	--gruen: #22b414;
	--schwarz: #111;
	--grau: #5b6270;
	--linie: #e3e6ec;
	--hell: #f6f7f9;
	--weiss: #fff;
	--radius: 14px;
	--breite: 1120px;
	--schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
	margin: 0;
	font-family: var(--schrift);
	font-size: 17px;
	line-height: 1.65;
	color: var(--schwarz);
	background: var(--weiss);
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--blau); }
a:hover { color: var(--blau-dunkel); }

h1, h2, h3, h4 {
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 .5em;
}

.container {
	width: 100%;
	max-width: var(--breite);
	margin: 0 auto;
	padding: 0 16px;
}

@media (min-width: 700px) {
	.container { padding: 0 32px; }
}

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

.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000;
	width: auto; height: auto; clip: auto;
	background: var(--weiss); padding: 8px 14px; border-radius: 8px;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	padding: .75em 1.4em;
	border-radius: 999px;
	background: var(--gold);
	color: var(--schwarz);
	font-weight: 700;
	text-decoration: none;
	border: 2px solid var(--gold);
	transition: background .15s, color .15s;
}
.btn:hover { background: transparent; color: inherit; }
.btn--blau { background: var(--blau); border-color: var(--blau); color: var(--weiss); }
.btn--blau:hover { color: var(--blau); }
.btn--klein { padding: .45em 1em; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--linie);
}

@media (min-width: 783px) {
	.admin-bar .site-header { top: 32px; }
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--schwarz);
	font-weight: 800;
	line-height: 1.1;
}
.site-brand img { width: 48px; height: 48px; }
.site-brand small { display: block; font-weight: 600; color: var(--grau); font-size: .75rem; }

.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	border: 0;
	border-radius: 10px;
	background: var(--hell);
	cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
	display: block;
	width: 20px; height: 2px;
	background: var(--schwarz);
	position: relative;
	transition: transform .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

.main-nav {
	display: none;
	position: absolute;
	top: 100%; left: 0; right: 0;
	background: var(--weiss);
	border-bottom: 1px solid var(--linie);
	padding: 8px 16px 20px;
}
.nav-open .main-nav { display: block; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
	display: block;
	padding: 10px 4px;
	color: var(--schwarz);
	font-weight: 600;
	text-decoration: none;
}
.main-nav a:hover { color: var(--blau); }

.social-links { display: flex; gap: 8px; margin-top: 8px; }
.social-links a {
	display: inline-flex;
	width: 40px; height: 40px;
	align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--hell);
	color: var(--schwarz);
}
.social-links a:hover { background: var(--blau); color: var(--weiss); }
.social-links svg { width: 20px; height: 20px; fill: currentColor; }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.main-nav {
		display: flex !important;
		align-items: center;
		gap: 24px;
		position: static;
		padding: 0;
		border: 0;
		background: none;
	}
	.main-nav ul { display: flex; gap: 4px; }
	.main-nav a { padding: 8px 10px; }
	.social-links { margin: 0; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: min(82vh, 720px);
	display: flex;
	align-items: flex-end;
	color: var(--weiss);
	background: var(--blau-dunkel);
	overflow: hidden;
}
.hero__bild {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center 40%;
}
.hero::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(17,17,17,0) 30%, rgba(17,17,17,.75) 100%);
}
.hero__inhalt {
	position: relative;
	z-index: 1;
	padding-top: 64px;
	padding-bottom: 56px;
}
.hero__kicker {
	display: inline-block;
	background: var(--gold);
	color: var(--schwarz);
	font-weight: 800;
	font-size: .85rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 14px;
}
.hero h1 {
	font-size: clamp(2rem, 6vw, 3.75rem);
	max-width: 14ch;
	margin-bottom: .35em;
}
.hero p { font-size: 1.15rem; max-width: 40ch; margin: 0 0 24px; opacity: .95; }
.hero .btn:hover { color: var(--weiss); }

/* ---------- Abschnitte ---------- */
.section { padding: 72px 0; }
.section--hell { background: var(--hell); }
.section--blau { background: var(--blau); color: var(--weiss); }
.section--blau a { color: var(--weiss); }

.section__kopf { margin-bottom: 36px; max-width: 680px; }
.section__kopf h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section__kopf h2::after {
	content: "";
	display: block;
	width: 56px; height: 5px;
	margin-top: 14px;
	border-radius: 3px;
	background: var(--gold);
}
.section__kopf p { color: var(--grau); margin: 0; }
.section--blau .section__kopf p { color: rgba(255,255,255,.85); }

.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }

/* ---------- Veranstaltungen ---------- */
.events { display: grid; gap: 20px; }
@media (min-width: 700px) { .events { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .events { grid-template-columns: repeat(3, 1fr); } }

.event {
	display: flex;
	flex-direction: column;
	background: var(--weiss);
	border: 1px solid var(--linie);
	border-radius: var(--radius);
	overflow: hidden;
}
.event__bild { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.event__body { display: flex; gap: 16px; padding: 20px; flex: 1; }
.event__datum {
	flex: 0 0 auto;
	width: 64px;
	text-align: center;
	background: var(--gold);
	border-radius: 10px;
	padding: 8px 0;
	align-self: flex-start;
	line-height: 1.1;
}
.event__datum strong { display: block; font-size: 1.6rem; font-weight: 800; }
.event__datum span { font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.event h3 { font-size: 1.2rem; margin-bottom: .3em; }
.event__meta { margin: 0 0 .6em; padding: 0; list-style: none; color: var(--grau); font-size: .95rem; }
.event__text { font-size: .95rem; margin-bottom: 12px; }
.event__text p { margin: 0 0 .5em; }

.leer {
	padding: 32px;
	border: 2px dashed var(--linie);
	border-radius: var(--radius);
	text-align: center;
	color: var(--grau);
	background: var(--weiss);
}

/* ---------- Über uns ---------- */
.about { display: grid; gap: 40px; }
@media (min-width: 900px) { .about { grid-template-columns: 1.3fr 1fr; align-items: start; } }

.highlights {
	list-style: none;
	margin: 0; padding: 24px;
	background: var(--gold-hell);
	border-radius: var(--radius);
}
.highlights h3 { font-size: 1.1rem; }
.highlights ul { list-style: none; margin: 0; padding: 0; }
.highlights li {
	padding: 8px 0 8px 30px;
	position: relative;
	font-weight: 600;
	border-bottom: 1px solid rgba(0,0,0,.06);
}
.highlights li:last-child { border-bottom: 0; }
.highlights li::before {
	content: "";
	position: absolute; left: 0; top: 14px;
	width: 14px; height: 14px;
	border-radius: 50%;
	background: var(--blau);
}

.board { margin-top: 56px; }
.board h3 { font-size: 1.5rem; }
.board__grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* Vorstand aus dem Editor: Spalten-Block wird zu Karten */
.board .wp-block-columns { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 1em; }
.board .wp-block-column {
	text-align: center;
	padding: 24px 16px;
	border: 1px solid var(--linie);
	border-radius: var(--radius);
}
.board .wp-block-column p { margin: 0; }
.board .wp-block-column strong { font-size: 1.05rem; }
.board .wp-block-image { margin: 0 auto 12px; }
.board .wp-block-image img {
	width: 140px; height: 140px;
	margin: 0 auto;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid var(--gold);
}

.person { text-align: center; }
.person img, .person__platzhalter {
	width: 140px; height: 140px;
	margin: 0 auto 12px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid var(--gold);
}
.person__platzhalter {
	display: flex; align-items: center; justify-content: center;
	background: var(--blau); color: var(--weiss);
	font-size: 2.4rem; font-weight: 800;
}
.person strong { display: block; }
.person span { color: var(--grau); font-size: .95rem; }

/* ---------- Galerien ---------- */
.galleries { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery-card {
	position: relative;
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	color: var(--weiss);
	text-decoration: none;
	aspect-ratio: 4 / 3;
	background: var(--blau);
}
.gallery-card img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .4s;
}
.gallery-card:hover img { transform: scale(1.04); }
.gallery-card::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.75));
}
.gallery-card__text { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.gallery-card__text strong { display: block; font-size: 1.15rem; line-height: 1.2; }
.gallery-card__text span { font-size: .9rem; opacity: .9; }
.gallery-card:hover { color: var(--weiss); }

/* ---------- Mitglied werden ---------- */
.member { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .member { grid-template-columns: 1.4fr 1fr; } }
.member__box {
	background: var(--weiss);
	color: var(--schwarz);
	border-radius: var(--radius);
	padding: 28px;
}
.member__box a { color: var(--blau); }
.member__box .btn { color: var(--schwarz); }
.member__box .btn--blau { color: var(--weiss); }
.member__box .btn--blau:hover { color: var(--blau); border-color: var(--blau); }
.member .btn { margin: 0 8px 8px 0; }
.member .btn:hover { color: var(--weiss); border-color: var(--weiss); }
.section--blau .btn--blau { border-color: var(--weiss); }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 24px; }
@media (min-width: 800px) { .contact { grid-template-columns: repeat(3, 1fr); } }
.contact__item {
	padding: 24px;
	border-radius: var(--radius);
	background: var(--hell);
}
.contact__item h3 { font-size: 1.05rem; color: var(--grau); text-transform: uppercase; letter-spacing: .06em; }
.contact__item p { margin: 0; font-weight: 600; word-break: break-word; }
.contact__item .social-links { margin: 0; }
.contact__item .social-links a { background: var(--weiss); }
.contact__item .social-links a:hover { background: var(--blau); }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--schwarz);
	color: rgba(255,255,255,.75);
	padding: 40px 0;
	font-size: .95rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.site-footer img { width: 56px; height: 56px; border-radius: 50%; background: var(--weiss); }
.site-footer a { color: var(--weiss); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }

/* ---------- Unterseiten ---------- */
.page-kopf { background: var(--blau); color: var(--weiss); padding: 48px 0 40px; }
.page-kopf h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0; }
.page-kopf p { margin: 6px 0 0; opacity: .9; }
.page-kopf a { color: var(--weiss); }
.zurueck { display: inline-block; margin-bottom: 12px; font-weight: 600; text-decoration: none; }

.page-inhalt { padding: 48px 0 72px; }
.page-inhalt .prose { max-width: 760px; }

/* WordPress-Galerieblock & klassische Galerie als Raster */
.galerie-inhalt .wp-block-gallery,
.galerie-inhalt .gallery {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px !important;
	margin: 0;
}
@media (min-width: 700px) {
	.galerie-inhalt .wp-block-gallery,
	.galerie-inhalt .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.galerie-inhalt .wp-block-gallery figure,
.galerie-inhalt .gallery .gallery-item {
	width: auto !important;
	margin: 0 !important;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 8px;
	background: var(--hell);
}
.galerie-inhalt .wp-block-gallery img,
.galerie-inhalt .gallery img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	cursor: zoom-in;
	transition: opacity .2s;
}
.galerie-inhalt .wp-block-gallery img:hover,
.galerie-inhalt .gallery img:hover { opacity: .85; }
.galerie-inhalt .gallery br { display: none; }
.galerie-inhalt figcaption { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
	position: fixed; inset: 0;
	z-index: 100000;
	display: none;
	align-items: center; justify-content: center;
	background: rgba(10, 12, 18, .94);
	touch-action: pan-y;
}
.lightbox.ist-offen { display: flex; }
.lightbox img {
	max-width: 94vw;
	max-height: 86vh;
	object-fit: contain;
	border-radius: 6px;
	user-select: none;
}
.lightbox button {
	position: absolute;
	width: 48px; height: 48px;
	border: 0; border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: var(--weiss);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.lightbox button:hover { background: var(--gold); color: var(--schwarz); }
.lightbox__zu { top: 16px; right: 16px; }
.lightbox__zurueck { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__weiter { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__zaehler {
	position: absolute; bottom: 16px; left: 0; right: 0;
	text-align: center; color: rgba(255,255,255,.8); font-size: .9rem;
}
body.lightbox-aktiv { overflow: hidden; }
