/* ---------- Design-Tokens ---------- */
:root {
    --c-primary: #003399;
    --c-primary-dark: #00256b;
    --c-accent: #e30613;
    --c-text: #0a0f2c;
    --c-text-muted: #555;
    --c-text-subtle: #888;
    --c-bg: #ffffff;
    --c-bg-soft: #f7f8fa;
    --c-border: #e5e7eb;
    --c-warning-bg: #fff7e6;
    --c-warning-border: #f5c16c;

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font-body);

    --size-container: 1200px;
    --radius: 8px;
    --shadow-card: 0 1px 3px rgba(10, 15, 44, 0.06), 0 4px 12px rgba(10, 15, 44, 0.04);

    --bp-tablet: 640px;
    --bp-desktop: 1024px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); }
a:hover { color: var(--c-accent); }
a:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .6em; color: var(--c-text); }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.container { max-width: var(--size-container); margin: 0 auto; padding: 0 1.25rem; }
.site-main { padding: 2rem 0 4rem; }

/* ---------- Header ---------- */
.site-header {
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: 1rem 0;
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.site-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--c-text); }
.site-brand img { width: 48px; height: 48px; object-fit: contain; }
.site-brand-text { font-weight: 700; color: var(--c-primary); line-height: 1.1; font-size: 1rem; }
.site-brand-text small { display: block; font-weight: 400; color: var(--c-text-muted); font-size: .75rem; margin-top: 2px; }

/* ---------- Nav ---------- */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--c-text); font-weight: 500; }
.site-nav a:hover, .site-nav .current-menu-item a { color: var(--c-primary); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--c-bg-soft);
    border-top: 1px solid var(--c-border);
    padding: 2rem 0;
    margin-top: 4rem;
    color: var(--c-text-muted);
    font-size: .9rem;
}
.site-footer .container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
.site-footer a { color: var(--c-text); text-decoration: none; }
.site-footer a:hover { color: var(--c-primary); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin: .25rem 0; }

/* ---------- Karten ---------- */
.card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(10,15,44,.1); }
.card-image { aspect-ratio: 16/9; background: var(--c-bg-soft); overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-meta { font-size: .8rem; color: var(--c-text-subtle); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.card-title { font-size: 1.1rem; margin: 0 0 .5rem; }
.card-title a { color: var(--c-text); text-decoration: none; }
.card-title a:hover { color: var(--c-primary); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .6rem 1.2rem;
    background: var(--c-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background .15s ease;
}
.btn:hover { background: var(--c-primary-dark); color: #fff; }

/* ---------- Hinweisbox ---------- */
.notice-warning {
    background: var(--c-warning-bg);
    border: 1px solid var(--c-warning-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* ---------- Skip-Link (Accessibility) ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--c-primary);
    color: #fff;
    padding: .5rem 1rem;
    z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .site-footer .container { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 768px) {
    .site-header .container { flex-direction: column; align-items: flex-start; }
    .site-nav ul { gap: 1rem; }
    h1 { font-size: 1.75rem; }
}

/* ---------- Mobile Nav Toggle ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--c-border);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    font-size: 1.2rem;
    cursor: pointer;
}
@media (max-width: 768px) {
    .nav-toggle { display: inline-block; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; gap: .5rem; }
}

/* ---------- Homepage Hero (mit Hintergrundbild) ---------- */
.hero {
    position: relative;
    padding: 5rem 0 4rem;
    margin: 0 -1.25rem;  /* container-padding ausgleichen, Bild über volle Breite */
    background-image:
        linear-gradient(180deg, rgba(0, 37, 107, .82) 0%, rgba(0, 37, 107, .65) 60%, rgba(0, 37, 107, .82) 100%),
        url(../images/hero-bg.jpg);
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero .container-inner {
    max-width: var(--size-container);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.hero .label {
    color: #ffd300;   /* warmes Gelb hebt sich vom THW-Blau ab */
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .12em;
    font-weight: 700;
}
.hero h1 {
    color: #fff;
    font-size: 2.6rem;
    max-width: 18ch;
    margin: .5rem 0 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.hero p {
    font-size: 1.15rem;
    max-width: 60ch;
    color: rgba(255, 255, 255, .92);
    margin: 0;
}
@media (max-width: 640px) {
    .hero { padding: 3.5rem 0 3rem; }
    .hero h1 { font-size: 1.9rem; }
}

/* ---------- News-Sektion auf Startseite ---------- */
.section-news { margin-top: 3rem; }
.section-news-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.section-news-header h2 { margin: 0; }

/* ---------- Archiv-Kopf ---------- */
.archive-header { margin-bottom: 2rem; }
.archive-header p { color: var(--c-text-muted); }

/* ---------- Pagination ---------- */
.pagination {
    margin-top: 2.5rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination a, .pagination span { padding: .4rem .8rem; text-decoration: none; border-radius: var(--radius); }
.pagination a:hover { background: var(--c-bg-soft); }
.pagination .current { background: var(--c-primary); color: #fff; }

/* ---------- Single-Post ---------- */
.entry-single { max-width: 780px; margin: 0 auto; }
.entry-single header { margin-bottom: 1.5rem; }
.entry-single figure { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; }
.entry-footer { margin-top: 3rem; }

/* ---------- Vorstand-Grid (quadratische Portraits) ---------- */
.vorstand-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.vorstand-grid .card-image { aspect-ratio: 1/1; }
.vorstand-grid .card-title { margin-bottom: .25rem; }
.vorstand-grid .card-meta { margin-bottom: .75rem; }
.vorstand-grid .card-body p { font-size: .95rem; }

/* ---------- Generic Page Layout ---------- */
.page-narrow { max-width: 780px; }

/* ---------- Ortsvereine-Liste ---------- */
/* ---------- Ortsvereine-Grid ---------- */
.ov-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.ov-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius);
    transition: transform .15s ease, box-shadow .15s ease, border-left-color .15s ease;
}
.ov-card:hover {
    border-left-color: var(--c-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}
.ov-card a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
}
.ov-card-badge {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-bg-soft);
    color: var(--c-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    transition: background .15s ease, color .15s ease;
}
.ov-card:hover .ov-card-badge {
    background: var(--c-primary);
    color: #fff;
}
.ov-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.ov-card-name {
    font-weight: 600;
    color: var(--c-text);
    font-size: 1rem;
    line-height: 1.3;
}
.ov-card-domain {
    font-size: .85rem;
    color: var(--c-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ov-card-arrow {
    flex-shrink: 0;
    color: var(--c-text-subtle);
    font-size: 1.2rem;
    transition: transform .15s ease, color .15s ease;
}
.ov-card:hover .ov-card-arrow {
    color: var(--c-accent);
    transform: translate(3px, -3px);
}

/* ---------- Info-Hinweis (weicher als .notice-warning) ---------- */
.notice-info {
    background: rgba(0, 51, 153, .06);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
    margin-bottom: 1rem;
    color: var(--c-text);
    font-size: .95rem;
    line-height: 1.5;
}
.notice-info strong { color: var(--c-primary); }

/* ---------- Screen Reader only ---------- */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- 404 ---------- */
.page-404 {
    max-width: 560px;
    text-align: center;
    padding: 4rem 1rem;
}

/* ---------- Footer-Copyright ---------- */
.site-footer-copyright {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--c-border);
    font-size: .8rem;
}

/* ---------- Unterstützer-Slider ---------- */
.section-supporters {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}
.section-supporters-heading {
    text-align: center;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--c-text-muted);
    margin: 0 0 1.5rem;
    font-weight: 700;
}
.supporter-slider {
    overflow: hidden;
    position: relative;
    /* Weiche Fade-Ränder links/rechts */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.supporter-track {
    display: flex;
    gap: 3rem;
    list-style: none;
    padding: 0;
    margin: 0;
    width: max-content;
    animation: supporter-scroll 45s linear infinite;
}
.supporter-slider:hover .supporter-track { animation-play-state: paused; }

.supporter-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 80px;
    opacity: .75;
    transition: opacity .2s ease;
}
.supporter-item:hover { opacity: 1; }
.supporter-item img {
    max-height: 80px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
    filter: grayscale(.2);
    transition: filter .2s ease;
}
.supporter-item:hover img { filter: grayscale(0); }
.supporter-text-fallback {
    display: inline-block;
    padding: 0 1.5rem;
    font-size: 1rem;
    color: var(--c-text-muted);
    font-weight: 500;
}

@keyframes supporter-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }  /* exakt die Hälfte = erster Durchlauf */
}

@media (prefers-reduced-motion: reduce) {
    .supporter-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .supporter-track li[aria-hidden="true"] { display: none; }
}
