/* ============================================================
   Design-System: Gartenfreunde Nordend e.V.
   ============================================================ */

:root {
    --clr-primary:       #2d6a4f;
    --clr-primary-dark:  #1b4332;
    --clr-primary-mid:   #40916c;
    --clr-primary-light: #52b788;
    --clr-accent:        #d4a017;
    --clr-accent-dark:   #b8880f;
    --clr-bg:            #f4f7f0;
    --clr-surface:       #ffffff;
    --clr-surface-alt:   #eef3ea;
    --clr-text:          #1c2b22;
    --clr-muted:         #4e6858;
    --clr-border:        #c5ddb9;
    --clr-shadow:        rgba(27, 67, 50, 0.10);
    --clr-error:         #b91c1c;
    --clr-success:       #166534;

    --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  2rem;
    --text-4xl:  2.5rem;

    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;

    --radius-sm: 0.25rem;
    --radius:    0.5rem;
    --radius-lg: 0.875rem;

    --max-w:      1140px;
    --header-h:   4.25rem;
    --transition: 180ms ease;
}

/* ============================================================
   Reset & Basis
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--clr-text);
    background: var(--clr-bg);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--clr-primary); }
a:hover { color: var(--clr-primary-dark); }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--clr-primary-dark); }
h1 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h2 { font-size: clamp(var(--text-xl),  3vw, var(--text-3xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: var(--sp-6); }
li { margin-bottom: var(--sp-2); }

:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Skip-Link
   ============================================================ */
.skip-link {
    position: absolute;
    top: -999px;
    left: var(--sp-4);
    background: var(--clr-primary);
    color: #fff;
    padding: var(--sp-2) var(--sp-6);
    border-radius: 0 0 var(--radius) var(--radius);
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Container
   ============================================================ */
.container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--sp-4);
}
@media (min-width: 640px)  { .container { padding-inline: var(--sp-6); } }
@media (min-width: 1024px) { .container { padding-inline: var(--sp-8); } }

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--clr-surface);
    border-bottom: 2px solid var(--clr-border);
    box-shadow: 0 2px 10px var(--clr-shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    height: var(--header-h);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo img {
    width: auto;
    height: 3rem;
    max-width: 8.5rem;
    border-radius: var(--radius-sm);
    object-fit: contain;
}
.site-logo__text { display: flex; flex-direction: column; }
.site-logo__name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--clr-primary);
    line-height: 1.2;
}
.site-logo__sub {
    font-size: var(--text-xs);
    color: var(--clr-muted);
}

.nav-toggle {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--clr-text);
    transition: var(--transition);
    transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--clr-surface);
    border-bottom: 2px solid var(--clr-border);
    box-shadow: 0 6px 16px var(--clr-shadow);
    z-index: 199;
}
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; padding: var(--sp-3) 0; margin: 0; }
.main-nav li { margin: 0; }
.main-nav a {
    display: block;
    padding: var(--sp-3) var(--sp-6);
    color: var(--clr-text);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-base);
    transition: background var(--transition), color var(--transition);
}
.main-nav a:hover { background: var(--clr-surface-alt); color: var(--clr-primary); }
.main-nav a[aria-current="page"] {
    background: var(--clr-surface-alt);
    color: var(--clr-primary);
    border-left: 3px solid var(--clr-primary);
    font-weight: 600;
}

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .main-nav {
        display: flex !important;
        position: static;
        border: none;
        box-shadow: none;
        background: transparent;
        margin-left: auto;
    }
    .main-nav ul { display: flex; gap: var(--sp-1); padding: 0; }
    .main-nav a {
        padding: var(--sp-2) var(--sp-3);
        border-radius: var(--radius);
        font-size: var(--text-sm);
        white-space: nowrap;
    }
    .main-nav a[aria-current="page"] {
        border-left: none;
        background: var(--clr-primary);
        color: #fff;
    }
    .main-nav a[aria-current="page"]:hover { background: var(--clr-primary-dark); }
}

/* ============================================================
   Page-Hero
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary-mid) 100%);
    color: #fff;
    padding: var(--sp-10) 0;
}
.page-hero h1 { color: #fff; margin-bottom: var(--sp-3); }
.page-hero .lead {
    font-size: var(--text-lg);
    color: rgba(255,255,255,.82);
    max-width: 640px;
    margin: 0;
}

.page-hero--home {
    background-image: url('/assets/images/kaffeeklatsch.webp');
    background-size: cover;
    background-position: center 55%;
    min-height: 300px;
    position: relative;
}
@media (min-width: 768px) {
    .page-hero--home { min-height: 420px; }
}
.page-hero--home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.88) 0%, rgba(64, 145, 108, 0.76) 100%);
}
.page-hero--home .container { position: relative; z-index: 1; }

.page-hero--veranstaltungen {
    background-image: url('/assets/images/veranstaltungen-hero.webp');
    background-size: cover;
    background-position: center 40%;
    min-height: 240px;
    position: relative;
}
@media (min-width: 768px) {
    .page-hero--veranstaltungen { min-height: 320px; }
}
.page-hero--veranstaltungen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.82) 0%, rgba(64, 145, 108, 0.70) 100%);
}
.page-hero--veranstaltungen .container { position: relative; z-index: 1; }

/* Einheitlicher Basis-Modifier für alle weiteren Foto-Heroes */
.page-hero--photo {
    background-size: cover;
    background-position: center 40%;
    min-height: 220px;
    position: relative;
}
@media (min-width: 768px) {
    .page-hero--photo { min-height: 300px; }
}
.page-hero--photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.86) 0%, rgba(64, 145, 108, 0.74) 100%);
}
.page-hero--photo .container { position: relative; z-index: 1; }
.page-hero__credit {
    position: absolute;
    bottom: 0.35rem;
    right: 0.75rem;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.6);
    z-index: 1;
    line-height: 1;
}
.page-hero__credit a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.page-hero__credit a:hover { color: #fff; text-decoration: underline; }

.page-hero--aktuelles        { background-image: url('/assets/images/aktuelles-hero.webp'); }
.page-hero--gartentipp       { background-image: url('/assets/images/gartentipp-hero.webp'); }
.page-hero--arbeitseinsaetze { background-image: url('/assets/images/arbeitseinsaetze-hero.webp'); }
.page-hero--vorstand         { background-image: url('/assets/images/vorstand-hero.webp'); }
.page-hero--dokumente        { background-image: url('/assets/images/dokumente-hero.webp'); }
.page-hero--impressum        { background-image: url('/assets/images/dokumente-hero.webp'); }
.page-hero--datenschutz      { background-image: url('/assets/images/dokumente-hero.webp'); }

.vereinslogo-banner {
    display: block;
    max-width: 480px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--clr-shadow);
    margin: 0 auto var(--sp-6);
}
@media (min-width: 860px) {
    .about-intro {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-10);
        align-items: start;
    }
    .vereinslogo-banner { margin: 0; }
}

/* ============================================================
   Sektionen
   ============================================================ */
.section { padding: var(--sp-12) 0; }
.section--white { background: var(--clr-surface); }
.section--alt   { background: var(--clr-surface-alt); }

.section-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--sp-8);
    padding-bottom: var(--sp-3);
    border-bottom: 3px solid var(--clr-primary-light);
    display: inline-block;
}

/* ============================================================
   Cards
   ============================================================ */
.card-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 600px)  { .card-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 600px)  { .card-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    box-shadow: 0 2px 8px var(--clr-shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: 0 6px 20px var(--clr-shadow); transform: translateY(-2px); }
.card__date  {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--clr-muted);
    margin-bottom: var(--sp-2);
}
.card__title { font-size: var(--text-lg); color: var(--clr-primary-dark); margin-bottom: var(--sp-3); }
.card__text  { color: var(--clr-muted); font-size: var(--text-sm); line-height: 1.6; }

/* ============================================================
   Aktuelles-Beiträge
   ============================================================ */
.post-list { display: flex; flex-direction: column; gap: var(--sp-6); }
.post {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6) var(--sp-8);
    box-shadow: 0 2px 8px var(--clr-shadow);
}
.post__meta {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--clr-primary-light);
    margin-bottom: var(--sp-2);
}
.post__image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: calc(-1 * var(--sp-6)) calc(-1 * var(--sp-6)) var(--sp-5);
    width: calc(100% + var(--sp-12));
}
.post__image-credit {
    font-size: 0.72rem;
    color: var(--clr-muted);
    text-align: right;
    margin-top: calc(-1 * var(--sp-4));
    margin-bottom: var(--sp-4);
    padding-right: var(--sp-1);
}
.post__title { font-size: var(--text-xl); margin-bottom: var(--sp-4); }
.post__body  { color: var(--clr-muted); line-height: 1.7; }

/* ============================================================
   Veranstaltungen
   ============================================================ */
.event-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.event-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-5);
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5) var(--sp-6);
    box-shadow: 0 2px 6px var(--clr-shadow);
}
.event-date {
    flex-shrink: 0;
    background: var(--clr-primary);
    color: #fff;
    border-radius: var(--radius);
    padding: var(--sp-2) var(--sp-3);
    text-align: center;
    min-width: 3.5rem;
}
.event-date__day   { font-size: var(--text-2xl); font-weight: 800; line-height: 1; }
.event-date__month { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; }
.event-info__name  { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--sp-1); }
.event-info__desc  { font-size: var(--text-sm); color: var(--clr-muted); }

/* ============================================================
   Arbeitseinsätze-Tabelle
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: 0 2px 8px var(--clr-shadow); }
table { width: 100%; border-collapse: collapse; background: var(--clr-surface); }
thead { background: var(--clr-primary); color: #fff; }
th, td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--clr-border); font-size: var(--text-sm); }
th { font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; }
tbody tr:hover { background: var(--clr-surface-alt); }
tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   Vorstand
   ============================================================ */
.person-grid {
    display: grid;
    gap: var(--sp-5);
}
@media (min-width: 560px)  { .person-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .person-grid { grid-template-columns: repeat(3, 1fr); } }

.person-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5) var(--sp-6);
    box-shadow: 0 2px 8px var(--clr-shadow);
}
.person-card__role {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--clr-primary-light);
    margin-bottom: var(--sp-1);
}
.person-card__name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--clr-primary-dark);
    margin-bottom: var(--sp-3);
}
.person-card__info { list-style: none; padding: 0; font-size: var(--text-sm); color: var(--clr-muted); }
.person-card__info li { margin-bottom: var(--sp-1); }
.person-card__info a { color: var(--clr-primary); }
.person-card__parz { font-style: italic; color: var(--clr-muted); }

/* ============================================================
   Dokumente
   ============================================================ */
.doc-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-6);
    box-shadow: 0 1px 4px var(--clr-shadow);
}
.doc-item__info { flex: 1; }
.doc-item__name { font-weight: 600; color: var(--clr-text); }
.doc-item__size { font-size: var(--text-sm); color: var(--clr-muted); }
@media (max-width: 480px) { .doc-item { flex-direction: column; align-items: flex-start; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn--primary  { background: var(--clr-primary); color: #fff; }
.btn--primary:hover { background: var(--clr-primary-dark); color: #fff; }
.btn--outline  { background: transparent; color: var(--clr-primary); border-color: var(--clr-primary); }
.btn--outline:hover { background: var(--clr-primary); color: #fff; }
.btn--sm       { padding: var(--sp-2) var(--sp-4); font-size: var(--text-sm); }
.btn--danger   { background: var(--clr-error); color: #fff; border-color: transparent; }
.btn--danger:hover { background: #991b1b; color: #fff; }

/* ============================================================
   Info-Box & Alerts
   ============================================================ */
.infobox {
    background: #fefce8;
    border-left: 4px solid var(--clr-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--sp-4) var(--sp-6);
    margin-bottom: var(--sp-6);
    font-size: var(--text-sm);
}
.infobox strong { color: var(--clr-accent-dark); }

.alert {
    padding: var(--sp-4) var(--sp-6);
    border-radius: var(--radius);
    margin-bottom: var(--sp-6);
    font-size: var(--text-sm);
    font-weight: 500;
}
.alert--success { background: #dcfce7; color: var(--clr-success); border: 1px solid #bbf7d0; }
.alert--error   { background: #fee2e2; color: var(--clr-error);   border: 1px solid #fecaca; }
.alert--info    { background: #dbeafe; color: #1d4ed8;            border: 1px solid #bfdbfe; }

/* ============================================================
   Kontakt-Hinweis
   ============================================================ */
.contact-box {
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    margin-bottom: var(--sp-8);
}
.contact-box p { margin-bottom: var(--sp-2); font-size: var(--text-sm); }

/* ============================================================
   Prose (Freitext-Seiten: Impressum, Datenschutz)
   ============================================================ */
.prose { max-width: 760px; }
.prose h2 { margin: var(--sp-8) 0 var(--sp-4); font-size: var(--text-xl); }
.prose h3 { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--text-lg); }
.prose p  { margin-bottom: var(--sp-4); }
.prose a  { font-weight: 500; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: var(--clr-primary-dark);
    color: rgba(255,255,255,.78);
    padding: var(--sp-10) 0 var(--sp-6);
    margin-top: auto;
}
.footer-grid {
    display: grid;
    gap: var(--sp-8);
    margin-bottom: var(--sp-8);
}
@media (min-width: 480px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-name { font-size: var(--text-base); font-weight: 700; color: #fff; margin-bottom: var(--sp-2); }
.site-footer p   { color: rgba(255,255,255,.7); margin-bottom: var(--sp-2); font-size: var(--text-sm); }
.site-footer a   { color: var(--clr-primary-light); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: var(--sp-2); }
.footer-copy {
    border-top: 1px solid rgba(255,255,255,.15);
    padding-top: var(--sp-5);
    font-size: var(--text-xs);
    color: rgba(255,255,255,.4);
    text-align: center;
    margin: 0;
}

/* ============================================================
   404
   ============================================================ */
.not-found { text-align: center; padding: var(--sp-16) var(--sp-4); }
.not-found h1 { font-size: var(--text-4xl); margin-bottom: var(--sp-4); }
.not-found p  { color: var(--clr-muted); margin-bottom: var(--sp-8); }
