/*
Theme Name: SSV Istha
Theme URI: https://ssv-istha.de
Author: Schützenverein Istha 63 e.V.
Description: Eigenes Theme für den Schützenverein Istha 63 e.V. – hell, grün, mit Termin-Anbindung an den Google-Kalender, Thekendienst-Plan, Sparten, Vorstand und Chronik.
Version: 1.11
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ssv-istha
*/

/* ---------- Schrift (lokal, keine Verbindung zu Google) ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("assets/fonts/manrope-latin-800-normal.woff2") format("woff2"); }

/* ---------- Farben & Grundwerte ---------- */
:root {
	--bg: #F4F8F5;
	--surface: #FFFFFF;
	--mint: #E4F1E8;
	--photo: #D2E6D9;
	--text: #14321F;
	--muted: #4A5F52;
	--green: #2E7D4F;
	--green-dark: #1F5C3A;
	--green-soft: #D3E6DA;
	--yellow: #F2CC2B;
	--yellow-soft: #FFF6D6;
	--yellow-ink: #6B5310;
	--line: #DCE8E0;
	--line-soft: #E6EFE9;
	--red: #B4361F;
	--radius: 20px;
	--radius-lg: 24px;
	--shadow: 0 8px 28px rgba(20, 50, 31, 0.08);
	--max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); }
a:hover { color: var(--green); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 800; }
p { margin: 0; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; left: 16px; top: 16px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--yellow); color: var(--text); padding: 12px 16px; border-radius: 10px; font-weight: 700;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 15px;
	text-decoration: none; border: 1px solid transparent; cursor: pointer; line-height: 1.2;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); color: #fff; }
.btn--yellow { background: var(--yellow); color: var(--text); }
.btn--yellow:hover { color: var(--text); filter: brightness(0.96); }
.btn--outline { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn--outline:hover { border-color: var(--green); color: var(--green); }
.link-arrow { font-weight: 700; color: var(--green); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand__name { font-weight: 800; font-size: 20px; }
.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a { background: var(--mint); }
.social-buttons { display: flex; gap: 6px; margin-left: 8px; }
.social-buttons .btn { padding: 11px 14px; }
.social-buttons svg, .social-buttons img { width: 20px; height: 20px; }
.social-buttons .btn--outline { color: var(--text); }
.nav-toggle {
	display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--mint);
	align-items: center; justify-content: center; cursor: pointer;
}
@media (max-width: 1100px) {
	.nav-toggle { display: inline-flex; }
	.header-right { display: none; width: 100%; flex-direction: column; align-items: stretch; }
	.header-right.is-open { display: flex; }
	.main-nav ul { flex-direction: column; }
	.social-buttons { margin-left: 0; padding: 8px 0 4px; }
}
@media (max-width: 520px) {
	.brand img { width: 44px; height: 44px; }
	.brand__name { font-size: 16px; }
}

/* ---------- Kopfbereich (Hero) ---------- */
.hero { background: var(--mint); }
.hero__inner { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__text { display: flex; flex-direction: column; gap: 12px; flex: 999 1 520px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); }
.hero .lead { color: var(--muted); font-size: 18px; max-width: 640px; }
.eyebrow {
	align-self: flex-start; background: var(--yellow); color: var(--text); font-weight: 700; font-size: 13px;
	letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 12px; border-radius: 999px;
}
.hero--overlap .hero__inner { padding-bottom: 120px; }
.hero__aside { background: var(--surface); border-radius: 18px; padding: 18px 24px; display: flex; flex-direction: column; gap: 4px; }
.hero__aside span { color: var(--muted); font-size: 14px; font-weight: 600; }
.hero__aside strong { font-size: 26px; color: var(--green); }
.hero__crest { flex: 0 0 200px; width: 200px; height: 200px; object-fit: contain; }
.jump-links { display: flex; gap: 8px; flex-wrap: wrap; }
.jump-links a { text-decoration: none; background: var(--surface); padding: 12px 16px; border-radius: 999px; font-weight: 700; }

/* ---------- Karten oben auf der Startseite ---------- */
.week-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: -72px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.card--note { background: var(--yellow-soft); box-shadow: none; }
.card__label { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.card--note .card__label { color: var(--yellow-ink); }
.card__title { font-size: 21px; line-height: 1.25; font-weight: 800; }
.card__meta { color: var(--muted); }
.card .card__link { margin-top: auto; }
.card__rows { display: flex; flex-direction: column; gap: 8px; }
.card__row { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- Abschnitte & Layout ---------- */
.section { padding-top: 56px; padding-bottom: 24px; }
.section--last { padding-bottom: 64px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-head h2, .section > h2 { font-size: 28px; }
.layout { display: flex; flex-wrap: wrap; gap: 32px; }
.layout__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.layout__aside { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Filter ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
	border: 1px solid var(--line); background: var(--surface); color: var(--text);
	padding: 10px 15px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
}
.chip.is-active, .chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

/* ---------- Terminliste ---------- */
.event-list { background: var(--surface); border-radius: var(--radius); display: flex; flex-direction: column; }
.event { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.event:last-child { border-bottom: 0; }
.event[hidden] { display: none; }
.date-badge {
	flex: 0 0 64px; width: 64px; height: 64px; border-radius: 14px; background: var(--mint);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.date-badge__day { font-size: 22px; font-weight: 800; line-height: 1; }
.date-badge__mon { font-size: 12px; font-weight: 700; color: var(--green); text-transform: uppercase; }
.date-badge--yellow { background: var(--yellow); }
.date-badge--yellow .date-badge__mon { color: var(--text); }
.event__body { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.event__title { font-size: 17px; font-weight: 700; }
.event__meta { color: var(--muted); font-size: 15px; }
.event__tag { background: var(--bg); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.event--blocker .event__title { color: var(--muted); }
.event--current { background: #FFFBEA; }
.event-list .event--current:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.event-empty { padding: 32px 24px; color: var(--muted); }
.month-nav { display: flex; gap: 8px; }
.month-nav a {
	width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
	display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Kästen ---------- */
.box { background: var(--surface); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.box--yellow { background: var(--yellow-soft); }
.box--mint { background: var(--mint); }
.box__title { font-size: 19px; font-weight: 800; }
.box__row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.box__row:last-of-type { border-bottom: 0; }
.notice-strong { color: var(--red); font-weight: 700; }

/* ---------- Kalender-Abo ---------- */
.abo__head { display: flex; gap: 14px; align-items: flex-start; }
.abo__icon { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; background: var(--mint); display: flex; align-items: center; justify-content: center; }
.abo__devices { display: flex; flex-direction: column; gap: 8px; }
.abo__device {
	text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 15px 17px; border-radius: 14px;
	border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.abo__device strong { font-size: 16px; }
.abo__device span { color: var(--muted); font-size: 14px; }
.abo__device[aria-pressed="true"] { border: 2px solid var(--green); background: var(--mint); padding: 14px 16px; }
.abo__panel { background: var(--bg); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.abo__panel[hidden] { display: none; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: step; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #34483B; }
.steps li::before {
	content: counter(step); flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--green);
	color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.copy-field { display: flex; flex-direction: column; gap: 6px; }
.copy-field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.copy-field input { font: inherit; font-size: 14px; padding: 11px 12px; border-radius: 10px; border: 1px solid #C9D9CF; background: var(--surface); color: var(--text); width: 100%; }

/* ---------- Sparten ---------- */
.reinschnuppern { background: var(--yellow-soft); border-radius: var(--radius-lg); padding: 28px 32px; display: flex; flex-direction: column; gap: 6px; }
.reinschnuppern strong { font-size: 24px; }
.reinschnuppern span { color: var(--muted); font-size: 17px; }
.sparte { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-wrap: wrap; scroll-margin-top: 24px; }
.sparte__media { flex: 1 1 380px; min-height: 280px; background: var(--photo); }
.sparte__media img { width: 100%; height: 100%; object-fit: cover; }
.sparte__body { flex: 999 1 520px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.sparte__body h2 { font-size: 32px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.fact { background: var(--bg); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.fact__label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.fact__sub { color: var(--muted); font-size: 15px; }
.sparte__text { color: var(--muted); line-height: 1.6; }
.contact-person { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.contact-person__info { flex: 1 1 200px; display: flex; flex-direction: column; }
.contact-person__info span { color: var(--muted); font-size: 15px; }
.contact-buttons { width: 300px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; }
.avatar {
	flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--mint);
	display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--green);
}
.avatar--sm { flex-basis: 52px; width: 52px; height: 52px; }

/* ---------- Verein ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.person-card { background: var(--surface); border-radius: 18px; padding: 20px; display: flex; align-items: center; gap: 14px; }
.person-card__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person-card__info strong { font-size: 16px; }
.person-card__info span { color: var(--muted); font-size: 14px; }
.person-card__info a { font-size: 13px; font-weight: 700; color: var(--green); text-decoration: none; overflow-wrap: anywhere; }
.person-card__info a.tel { font-size: 14px; padding-top: 4px; }
.group-photo { border-radius: var(--radius-lg); overflow: hidden; background: var(--photo); }
.group-photo img { width: 100%; max-height: 480px; object-fit: cover; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pill-list li { background: var(--surface); border: 1px solid var(--line); padding: 12px 18px; border-radius: 999px; font-weight: 700; }
.timeline { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; list-style: none; margin: 0; }
.timeline__item { display: flex; gap: 24px; }
.timeline__marker { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; }
.timeline__line { flex: 1; width: 2px; background: var(--line); min-height: 28px; }
.timeline__item:last-child .timeline__line { visibility: hidden; }
.timeline__body { padding: 4px 0 28px; display: flex; flex-direction: column; gap: 4px; }
.timeline__body strong { font-size: 18px; }
.timeline__body span { color: var(--muted); line-height: 1.55; }
.year-badge { background: var(--yellow); padding: 6px 10px; border-radius: 8px; font-weight: 800; font-size: 15px; }
.year-badge--heute {
	background: var(--green); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 19px;
	text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 0 0 4px var(--mint);
}
.year-badge--morgen {
	background: var(--surface); color: var(--green); border: 1.5px dashed var(--green); padding: 4px 8px;
	font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.cta-dark { background: var(--green-dark); color: #fff; border-radius: var(--radius-lg); padding: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.cta-dark > div { flex: 999 1 480px; display: flex; flex-direction: column; gap: 10px; }
.cta-dark h2 { font-size: 32px; }
.cta-dark p { color: var(--green-soft); font-size: 17px; line-height: 1.6; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.contact-grid .box { border-radius: var(--radius-lg); padding: 28px; }
.contact-grid a.contact-link { font-weight: 700; color: var(--green); text-decoration: none; }
.icon-buttons { display: flex; gap: 10px; padding-top: 6px; }
.icon-buttons a { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); display: flex; align-items: center; justify-content: center; }
.directions { display: flex; flex-wrap: wrap; gap: 24px; }
.directions__map { flex: 999 1 560px; min-height: 340px; }
.directions__side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Einbettung erst nach Klick ---------- */
.consent-embed {
	position: relative; min-height: 340px; height: 100%; border-radius: var(--radius-lg); overflow: hidden;
	background: repeating-linear-gradient(45deg, #DCEBE1 0 14px, #D2E6D9 14px 28px);
	display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.consent-embed__inner { max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.consent-embed__inner p { color: #34483B; font-size: 15px; }
.consent-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Berichte ---------- */
.post-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.post-card { text-decoration: none; background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card__img { height: 170px; background: var(--photo); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.post-card__body span { font-size: 13px; color: var(--muted); }
.post-card__body strong { font-size: 18px; }
.article-head { max-width: 820px; margin: 0 auto; padding: 40px 24px 24px; display: flex; flex-direction: column; gap: 20px; }
.article-head h1 { font-size: clamp(32px, 4.5vw, 46px); line-height: 1.1; }
.article-head .excerpt { font-size: 20px; line-height: 1.6; color: #34483B; }
.article-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 15px; }
.article-figure { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.article-figure img { width: 100%; border-radius: var(--radius-lg); max-height: 560px; object-fit: cover; }
.prose { max-width: 820px; margin: 0 auto; padding: 32px 24px; font-size: 18px; line-height: 1.75; color: #22382A; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 26px; line-height: 1.3; margin-top: 32px; }
.prose h3 { font-size: 21px; margin-top: 28px; }
.prose blockquote { margin: 24px 0; padding: 20px 24px; background: var(--mint); border-radius: 18px; font-size: 20px; font-weight: 600; color: var(--text); }
.prose blockquote p { margin: 0; }
.prose img { border-radius: 16px; }
.prose figure { margin: 24px 0; }
.prose figcaption { color: var(--muted); font-size: 15px; margin-top: 8px; }
.prose .wp-block-gallery { gap: 12px; }
.prose a { color: var(--green); }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-top: 32px; }
.pagination .page-numbers { padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.pagination .current { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 0; }
.footer-inner { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 15px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 36px; height: 36px; object-fit: contain; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Gutenberg-Grundlagen ---------- */
.alignwide { max-width: 1040px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-block-button__link { background: var(--green); color: #fff; border-radius: 10px; padding: 12px 18px; font-weight: 700; text-decoration: none; }

@media (max-width: 640px) {
	.event { gap: 14px; padding: 16px; }
	.sparte__body { padding: 24px; }
	.timeline { padding: 20px; }
	.timeline__marker { flex-basis: 76px; }
	.cta-dark { padding: 28px; }
	.reinschnuppern { padding: 24px; }
}
