/* =====================================================
   Rederzhausen — One-Pager
   Anlehnung an GBV Rederzhausen (Nunito + Merriweather,
   Grüntöne, Cremehintergrund). Rustikal, ohne runde
   Ecken, ohne Verläufe, ohne UTF-Icons.
   ===================================================== */

/* ---------- Webfonts (lokal, latin) ---------- */

/* Merriweather — Serif, für Überschriften */
@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/merriweather-v33-latin/merriweather-v33-latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/merriweather-v33-latin/merriweather-v33-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/merriweather-v33-latin/merriweather-v33-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/merriweather-v33-latin/merriweather-v33-latin-900.woff2') format('woff2');
}

/* Nunito — Sans-Serif, für Fließtext */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/nunito-v32-latin/nunito-v32-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Nunito';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/nunito-v32-latin/nunito-v32-latin-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/nunito-v32-latin/nunito-v32-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Nunito';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/nunito-v32-latin/nunito-v32-latin-600italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/nunito-v32-latin/nunito-v32-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Nunito';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/nunito-v32-latin/nunito-v32-latin-700italic.woff2') format('woff2');
}

:root {
    --color-primary: #3a6a2e;
    --color-primary-dark: #2c5222;
    --color-primary-darker: #1f3b18;
    --color-accent: #7ba448;
    --color-wood: #6b4a2b;
    --color-wood-dark: #4a3320;

    --color-bg: #f5f1e6;
    --color-bg-alt: #ebe4d2;
    --color-surface: #fffdf6;
    --color-paper: #faf6ec;

    --color-text: #2b2a26;
    --color-text-light: #5e5a52;
    --color-border: #c9c0a8;
    --color-border-strong: #8a8068;

    --color-bavaria-blue: #0a4a8f;

    --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
    --font-heading: 'Merriweather', 'Times New Roman', Georgia, serif;

    --container-width: 1140px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

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

a {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--color-primary-darker);
}

ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.25;
    color: var(--color-primary-darker);
    font-weight: 900;
    letter-spacing: 0.01em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.08em; }

p { margin-bottom: 0.9rem; }

/* ---------- Layout helpers ---------- */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.container.narrow {
    max-width: 760px;
}

.text-center { text-align: center; }

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    font-weight: 400;
}

/* ---------- Bayerische Akzentleiste oben ---------- */

.bavaria-stripe {
    display: flex;
    width: 100%;
    height: 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border-strong);
}

.bavaria-stripe span {
    flex: 1;
    height: 100%;
    background: var(--color-bavaria-blue);
    clip-path: polygon(0 0, 50% 50%, 0 100%, 50% 100%, 100% 50%, 50% 0);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background: var(--color-primary-darker)
        url('img/kapelle-st-thomas-und-saegewerk-an-der-paar.jpg')
        center / cover no-repeat;
    color: #fff;
    border-bottom: 4px double var(--color-primary-darker);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 38, 16, 0.78);
}

.hero-inner {
    position: relative;
    padding: 3.5rem 1.5rem 0;
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.hero-wappen {
    flex-shrink: 0;
    background: #fffdf6;
    border: 3px solid #fffdf6;
    box-shadow: 0 0 0 2px var(--color-primary-darker);
    padding: 0.6rem;
}

.hero-wappen img {
    width: 110px;
    height: auto;
    display: block;
}

.hero-text h1 {
    color: #fff;
    font-size: 3.4rem;
    line-height: 1.1;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.hero-sub {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0;
}

/* ---------- Hero-Navigation ---------- */

.hero-nav {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin-top: 0;
}

.hero-nav a {
    color: #fff;
    text-decoration: none;
    padding: 1rem 1.4rem 1rem 0;
    margin-right: 1.2rem;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
}

.hero-nav a:hover,
.hero-nav a:focus {
    color: #fff;
    border-bottom-color: #fff;
}

/* ---------- Vereine ---------- */

.verein-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.verein-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-top: 6px solid var(--color-primary-dark);
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.08);
}

.verein-card-head {
    padding: 1.4rem 1.4rem 0.8rem;
    border-bottom: 1px solid var(--color-border);
}

.verein-meta {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-wood);
    margin-bottom: 0.5rem;
}

.verein-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.verein-card-body {
    padding: 1.2rem 1.4rem 1rem;
    flex: 1;
}

.verein-card-body p {
    margin-bottom: 0;
    color: var(--color-text);
}

.verein-card-foot {
    padding: 0 1.4rem 1.4rem;
}

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

.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    border: 2px solid var(--color-primary-darker);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-darker);
    color: #fff;
}

/* ---------- Über den Ort ---------- */

.ueber-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: start;
}

.ueber-text h2 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-primary-dark);
    padding-bottom: 0.4rem;
    display: inline-block;
}

.ueber-text h3 {
    margin-top: 1.8rem;
    margin-bottom: 0.7rem;
}

.ueber-list {
    border-left: 3px solid var(--color-primary);
    padding-left: 1.2rem;
}

.ueber-list li {
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--color-border-strong);
}

.ueber-list li:last-child {
    border-bottom: none;
}

.ueber-list strong {
    color: var(--color-primary-darker);
    font-family: var(--font-heading);
    font-weight: 700;
}

.ueber-figure {
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    padding: 0.6rem;
    box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.08);
}

.ueber-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.ueber-figure figcaption {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-align: center;
    padding: 0.6rem 0.4rem 0.2rem;
}

/* ---------- Fakten ---------- */

.section-facts {
    background: var(--color-primary-darker);
    color: #fff;
    border-bottom: none;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    text-align: center;
}

.fact {
    padding: 1.2rem 0.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.fact:first-child {
    border-left: none;
}

.fact dt {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.fact dd {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.fact-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-style: italic;
}

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

.site-footer {
    background: var(--color-wood-dark);
    color: #f0e8d6;
    padding-top: 3rem;
    margin-top: 0;
    border-top: 6px double var(--color-wood);
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.site-footer h4 {
    color: #fff;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.4rem;
}

.site-footer p,
.site-footer li {
    color: #e6dec8;
    font-size: 0.95rem;
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-col ul li {
    padding: 0.25rem 0;
}

.footer-bottom {
    background: #2c1f12;
    padding: 1rem 0;
    text-align: center;
}

.footer-bottom p {
    color: #cabba0;
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    h1 { font-size: 2.4rem; }
    .hero-text h1 { font-size: 2.6rem; }

    .verein-grid {
        grid-template-columns: 1fr;
    }

    .ueber-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fact:nth-child(3) {
        border-left: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .section { padding: 2.8rem 0; }

    .hero-inner { padding-top: 2.5rem; }

    .hero-grid {
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
        padding-bottom: 2rem;
    }

    .hero-text h1 { font-size: 2.2rem; }
    .hero-eyebrow { font-size: 0.7rem; }

    .hero-nav {
        justify-content: center;
    }

    .hero-nav a {
        margin-right: 0;
        padding: 0.8rem 0.8rem;
    }

    .facts-grid {
        grid-template-columns: 1fr;
    }

    .fact {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    .fact:first-child {
        border-top: none;
    }

    .ueber-text h2 {
        font-size: 1.7rem;
    }
}

/* ---------- Footer-Bottom (Impressum/Datenschutz) ---------- */

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.footer-legal {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-legal .sep {
    color: rgba(255, 255, 255, 0.35);
}

.link-button {
    background: none;
    border: none;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    padding: 0;
}

.link-button:hover,
.link-button:focus-visible {
    color: #fff;
    text-decoration: none;
    outline: none;
}

.footer-bottom .link-button {
    color: #cabba0;
}

.footer-bottom .link-button:hover {
    color: #fff;
}

/* ---------- Modal (Impressum / Datenschutz) ---------- */

body.modal-open {
    overflow: hidden;
}

dialog.modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(740px, 92vw);
    max-width: 92vw;
    max-height: 88vh;
    padding: 0;
    border: 2px solid var(--color-primary-darker);
    background: var(--color-paper);
    color: var(--color-text);
    box-shadow: 8px 8px 0 0 rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

dialog.modal[open] {
    display: flex;
    flex-direction: column;
}

dialog.modal::backdrop {
    background: rgba(20, 30, 16, 0.72);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: var(--color-primary-darker);
    color: #fff;
    border-bottom: 4px double #fff;
    flex-shrink: 0;
}

.modal-head h2 {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover,
.modal-close:focus-visible {
    background: #fff;
    color: var(--color-primary-darker);
    outline: none;
}

.modal-body {
    padding: 1.5rem 1.6rem;
    overflow-y: auto;
    flex: 1 1 auto;
    line-height: 1.6;
}

.modal-body h3 {
    font-size: 1.05rem;
    color: var(--color-primary-darker);
    margin-top: 1.4rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.25rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.modal-body a {
    color: var(--color-primary-dark);
    word-break: break-word;
}

.modal-list {
    list-style: square;
    padding-left: 1.4rem;
    margin: 0 0 1rem;
}

.modal-list li {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.modal-stand {
    margin-top: 1.4rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.modal-foot {
    padding: 1rem 1.4rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    dialog.modal {
        width: 96vw;
        max-height: 92vh;
    }

    .modal-head {
        padding: 0.8rem 1rem;
    }

    .modal-head h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1.2rem 1rem;
    }
}
