/*
Theme Name: Germania 08 Alte Herren
Theme URI: https://example.org/
Author: Jörg Schallmayer
Description: Vereins-Theme der Alten Herren des 1. FC Germania 08 Ober-Roden (blau/schwarz). Statische Startseite mit automatisch rotierendem Slider der neuesten Berichte (Spiele, Ausflüge). Name, Farben, Logo und Slider-Einstellungen im Customizer.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: alteherren
*/

:root {
	--ah-primary: #0d0d0d;
	--ah-accent: #0057b8;
	--ah-on-accent: #fff;
	--ah-text: #1d1d1f;
	--ah-muted: #666;
	--ah-bg: #f3f5f9;
	--ah-card: #fff;
	--ah-radius: 10px;
	--ah-max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ah-text);
	background: var(--ah-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ah-accent); }
a:hover { color: var(--ah-text); }
.ah-container { max-width: var(--ah-max); margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute; left: -9999px; }
.screen-reader-text:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 999; }

/* ---------- Header ---------- */
.ah-header { background: var(--ah-primary); color: #fff; border-bottom: 4px solid var(--ah-accent); }
.ah-header .ah-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.ah-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.ah-brand img, .ah-brand .custom-logo { max-height: 56px; width: auto; }
.ah-brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; line-height: 1.1; }
.ah-brand-tag { display: block; font-size: .8rem; font-weight: 400; opacity: .85; }
.ah-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ah-nav a { display: block; color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.ah-nav a:hover, .ah-nav .current-menu-item > a { background: var(--ah-accent); color: var(--ah-on-accent); }
.ah-nav-toggle { display: none; background: none; border: 2px solid #fff; color: #fff; border-radius: 6px; padding: 6px 10px; font-size: 1rem; cursor: pointer; }

@media (max-width: 760px) {
	.ah-nav-toggle { display: block; }
	.ah-nav { flex-basis: 100%; display: none; padding-bottom: 12px; }
	.ah-nav.is-open { display: block; }
	.ah-nav ul { flex-direction: column; }
}

/* Vereinsabzeichen, solange kein Logo hochgeladen ist */
.ah-crest {
	width: 52px; height: 52px; border-radius: 50%; flex: none;
	display: grid; place-items: center;
	background: var(--ah-accent); color: #fff; border: 3px solid #fff;
	box-shadow: 0 0 0 3px var(--ah-accent);
	font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em;
}
.ah-card { border-top: 4px solid var(--ah-accent); }
.ah-card-meta { color: var(--ah-accent); font-weight: 600; }

/* ---------- Slider ---------- */
.ah-slider { position: relative; background: #111; overflow: hidden; }
.ah-slides { position: relative; height: clamp(320px, 55vw, 560px); }
.ah-slide {
	position: absolute; inset: 0;
	opacity: 0; visibility: hidden;
	transition: opacity .8s ease, visibility .8s;
}
.ah-slide.is-active { opacity: 1; visibility: visible; }
.ah-slide img { width: 100%; height: 100%; object-fit: cover; }
.ah-slide-fallback { width: 100%; height: 100%; background: linear-gradient(135deg, var(--ah-accent), #000 75%); }
.ah-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.1) 55%, transparent 100%); }
.ah-slide-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; color: #fff; padding: 32px 0 48px; }
.ah-slide-meta { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.ah-badge { display: inline-block; background: var(--ah-accent); color: var(--ah-on-accent); font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-right: 8px; }
.ah-slide-title { font-size: clamp(1.5rem, 3.5vw, 2.6rem); line-height: 1.15; margin: 10px 0; max-width: 820px; }
.ah-slide-title a { color: #fff; text-decoration: none; }
.ah-slide-excerpt { max-width: 680px; margin: 0 0 16px; opacity: .9; }
.ah-btn { display: inline-block; background: var(--ah-accent); color: var(--ah-on-accent); font-weight: 700; text-decoration: none; padding: 10px 20px; border-radius: 6px; }
.ah-btn:hover { background: var(--ah-primary); color: #fff; }
.ah-slider .ah-btn:hover { background: #fff; color: var(--ah-primary); }
.ah-slider-arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	width: 44px; height: 44px; border-radius: 50%; border: 0;
	background: rgba(0,0,0,.45); color: #fff; font-size: 1.4rem; cursor: pointer;
}
.ah-slider-arrow:hover { background: var(--ah-accent); color: var(--ah-on-accent); }
.ah-prev { left: 12px; } .ah-next { right: 12px; }
.ah-dots { position: absolute; bottom: 16px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.ah-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.ah-dots button.is-active { background: var(--ah-accent); border-color: #fff; }
@media (max-width: 600px) { .ah-slider-arrow { display: none; } .ah-slide-excerpt { display: none; } }
@media (prefers-reduced-motion: reduce) { .ah-slide { transition: none; } }

/* ---------- Content ---------- */
.ah-main { padding: 48px 0; }
.ah-section-title { font-size: 1.6rem; margin: 0 0 24px; padding-bottom: 8px; border-bottom: 3px solid var(--ah-accent); display: inline-block; }
.ah-page-content { background: var(--ah-card); border-radius: var(--ah-radius); padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ah-page-content > *:first-child { margin-top: 0; }
.ah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.ah-card { background: var(--ah-card); border-radius: var(--ah-radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.ah-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.ah-card-body { padding: 18px; flex: 1; }
.ah-card-body h2, .ah-card-body h3 { font-size: 1.15rem; margin: 6px 0 8px; line-height: 1.3; }
.ah-card-body h2 a, .ah-card-body h3 a { color: var(--ah-text); text-decoration: none; }
.ah-card-meta { font-size: .8rem; color: var(--ah-muted); }
.ah-article { background: var(--ah-card); border-radius: var(--ah-radius); padding: 32px; max-width: 820px; margin: 0 auto; }
.ah-article h1 { line-height: 1.2; margin-top: 8px; }
.ah-article .wp-post-image { border-radius: var(--ah-radius); margin-bottom: 24px; }
.ah-pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.ah-pagination .page-numbers { padding: 6px 12px; background: var(--ah-card); border-radius: 6px; text-decoration: none; }
.ah-pagination .current { background: var(--ah-primary); color: #fff; }
.alignwide { max-width: none; } .aligncenter { margin-left: auto; margin-right: auto; }
.wp-block-image figcaption, .wp-caption-text { font-size: .85rem; color: var(--ah-muted); }
@media (max-width: 600px) { .ah-page-content, .ah-article { padding: 20px; } }

/* ---------- Footer ---------- */
.ah-footer { border-top: 4px solid var(--ah-accent); background: var(--ah-primary); color: #ccc; padding: 32px 0; font-size: .9rem; }
.ah-footer a { color: #fff; }
.ah-footer .ah-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.ah-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }

/* ---------- Formulare & Kommentare ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; font: inherit; padding: 10px 12px;
	border: 1px solid #c8cdd6; border-radius: 6px; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--ah-accent); outline-offset: 1px; border-color: var(--ah-accent); }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
input[type="submit"], button[type="submit"] {
	font: inherit; font-weight: 700; cursor: pointer; border: 0;
	background: var(--ah-accent); color: var(--ah-on-accent); padding: 10px 20px; border-radius: 6px;
}
input[type="submit"]:hover, button[type="submit"]:hover { background: var(--ah-primary); }
.ah-post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid #e3e6ec; }
.ah-post-nav a { text-decoration: none; font-weight: 600; }
.ah-post-nav .next { margin-left: auto; text-align: right; }

/* ---------- Feinschliff ---------- */
.ah-card .ah-card-meta { color: var(--ah-accent); font-weight: 700; }
@media (max-width: 760px) {
	.ah-header .ah-container { min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
	.ah-brand-name { font-size: 1.05rem; }
	.ah-crest { width: 42px; height: 42px; font-size: .95rem; }
}
.ah-footer .ah-social a, .ah-footer .menu a { text-decoration: none; }
.ah-footer .ah-social a:hover, .ah-footer .menu a:hover { color: #6ea8ff; }
.ah-footer .ah-social { flex-wrap: wrap; }
@media (max-width: 760px) { .ah-footer .ah-container { flex-direction: column; } }
mark { background: #fff3a3; padding: 0 3px; }
