@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #2E6F40;
    --primary-dark: #1A4D2B;
    --primary-light: #EBF4EE;
    --primary-accent: #3E8E54;
    --accent: #D9822B;
    --accent-hover: #B86B1E;
    --accent-light: #FDF4EB;
    --bg-page: #FAF7F2;
    --bg-card: #FFFFFF;
    --bg-header: #1A4D2B; /* Matches footer background */
    --text-main: #2D3748;
    --text-muted: #5C6B64;
    --border-color: rgba(46, 111, 64, 0.12);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(46, 111, 64, 0.07);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.1);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --max-w: 1140px;
    --family-body: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --family-heading: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--family-heading), serif;
    color: var(--primary-dark);
    margin: 0 0 0.75rem 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    font-weight: 600;
}

p, li, address {
    margin: 0 0 1rem 0;
    color: var(--text-main);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: var(--accent);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Sticky Navbar - Matching Footer Color */
#site-header, header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-header); /* #1A4D2B - Same as footer */
    border-bottom: 3px solid var(--accent);
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    max-width: var(--max-w);
    margin: 0 auto;
    gap: 1rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

#logo {
    flex-shrink: 0;
}

#logo img {
    height: 54px;
    width: auto;
    display: block;
    border-radius: var(--radius-sm);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.25s ease;
}

.brand-wrapper:hover #logo img {
    transform: scale(1.04);
}

#ueberschrift {
    display: flex;
    flex-direction: column;
}

#ueberschrift h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #FFFFFF; /* High contrast readable white font */
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

#ueberschrift p {
    margin: 0;
    color: #E2F0D9; /* Soft readable light green/cream font */
    font-size: 0.875rem;
    font-weight: 500;
}

/* Navigation */
#main-nav {
    display: flex;
    align-items: center;
}

#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#main-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
    min-height: 42px;
    white-space: nowrap;
}

#main-nav a:hover {
    background-color: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(217, 130, 43, 0.35);
}

#main-nav a.active {
    background-color: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(217, 130, 43, 0.4);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
}

.hamburger-line {
    width: 22px;
    height: 2.5px;
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    margin: 2.5px 0;
}

/* Mobile Nav Drawer state */
.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Main Area */
main, #content {
    flex: 1 0 auto;
    padding: 2rem 0 3rem 0;
}

/* Card / Section Container */
section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

section:hover {
    box-shadow: var(--shadow-lg);
}

/* Footer */
#site-footer, footer {
    background: var(--primary-dark);
    color: #FFFFFF;
    padding: 2.25rem 1.25rem;
    border-top: 4px solid var(--accent);
    margin-top: auto;
    font-size: 0.925rem;
}

#site-footer .container,
footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #E2F0D9;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

#site-footer p,
footer p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

#site-footer #copyright p:last-child,
footer #copyright p:last-child {
    font-weight: 600;
    color: #FFFFFF;
}

/* Utility Classes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    gap: 0.5rem;
    min-height: 46px;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(46, 111, 64, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #FFFFFF;
    transform: rotate(-2deg);
    box-shadow: 0 6px 18px rgba(46, 111, 64, 0.35);
}

.btn-accent {
    background-color: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(217, 130, 43, 0.25);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: #FFFFFF;
    transform: rotate(-2deg);
    box-shadow: 0 6px 18px rgba(217, 130, 43, 0.35);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 920px) {
    .menu-toggle {
        display: flex;
    }

    #main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-dark);
        border-bottom: 3px solid var(--accent);
        box-shadow: var(--shadow-lg);
        padding: 1rem 1.25rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        z-index: 1000;
        animation: slideDown 0.25s ease-out forwards;
    }

    #main-nav.open {
        display: flex;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        width: 100%;
    }

    #main-nav a {
        justify-content: center;
        padding: 0.85rem 1.25rem;
        font-size: 1.05rem;
        border-radius: var(--radius-sm);
        background-color: rgba(255, 255, 255, 0.12);
        color: #FFFFFF;
        width: 100%;
    }

    #main-nav a:hover,
    #main-nav a.active {
        background-color: var(--accent);
        color: #FFFFFF;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0.75rem 1rem;
    }

    #logo img {
        height: 46px;
    }

    #ueberschrift h1 {
        font-size: 1.05rem;
    }

    #ueberschrift p {
        font-size: 0.8rem;
    }

    main, #content {
        padding: 1.25rem 0 2rem 0;
    }

    section {
        padding: 1.35rem 1.1rem;
        border-radius: var(--radius-sm);
        margin-bottom: 1.25rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}