/* ============================================================
   SV Niederbühl e.V. – style.css
   Vereinsfarbe: #008000
   ============================================================ */

/* --- Lokale Schriftart ------------------------------------ */
@font-face {
    font-family: 'Vereinsfont';
    src: url('/fonts/vereinsfont-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vereinsfont';
    src: url('/fonts/vereinsfont-bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Variablen -------------------------------------------- */
:root {
    --gruen:         #008000;
    --gruen-dunkel:  #005f00;
    --gruen-hell:    #e8f5e8;
    --gruen-rand:    #c8e6c8;
    --weiss:         #ffffff;
    --text:          #1a1a1a;
    --text-mittel:   #444444;
    --bg:            #f7f7f5;
    --rand:          #d0d0d0;
    --schatten:      0 2px 8px rgba(0,0,0,0.10);
    --schatten2:     0 4px 20px rgba(0,0,0,0.14);
    --radius:        6px;
    --radius2:       10px;
    --schrift:       'Vereinsfont', 'Segoe UI', Arial, sans-serif;
    --breite:        1050px;
    --sp:            1.5rem;
    --sp2:           2.5rem;
}

/* --- Reset ------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--schrift);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--gruen); text-decoration: none; }
a:hover { color: var(--gruen-dunkel); text-decoration: underline; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--gruen);
    color: var(--weiss);
    box-shadow: 0 2px 6px rgba(0,0,0,0.28);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    max-width: var(--breite);
    margin: 0 auto;
    padding: 0 var(--sp);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 1rem;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--weiss);
    text-decoration: none;
    flex-shrink: 0;
}
.header-logo:hover { opacity: 0.9; text-decoration: none; }
.header-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,0.15);
    padding: 3px;
}
.logo-text .vereinsname {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
}
.logo-text .vereins-sub {
    display: block;
    font-size: 0.78rem;
    opacity: 0.82;
}

/* ============================================================
   NAVIGATION – gemeinsame Basis
   ============================================================ */
.nav-toggle {
    display: none; /* nur auf Mobile sichtbar */
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius);
    color: var(--weiss);
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}
.nav-toggle:hover { background: rgba(255,255,255,0.28); }

/* Die <nav> selbst */
.haupt-nav {
    display: flex;
    align-items: center;
}

/* Oberste <ul> in der Nav */
.haupt-nav > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.1rem;
}

/* Alle Links in der Nav */
.haupt-nav a {
    display: block;
    color: var(--weiss);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius);
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s;
}
.haupt-nav a:hover,
.haupt-nav a.aktiv {
    background: rgba(255,255,255,0.22);
    color: var(--weiss);
    text-decoration: none;
}

/* Trennstrich */
.nav-trenner {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.3);
    margin: 0 0.3rem;
    flex-shrink: 0;
}

/* ============================================================
   DROPDOWN – DESKTOP
   position:relative auf dem li, absolute auf dem ul
   ============================================================ */
.nav-gruppe {
    position: relative;
}
.nav-gruppe > a::after {
    content: ' ▾';
    font-size: 0.7rem;
}

/* --- DAS WICHTIGSTE: Submenü standardmäßig VERSTECKT ---
   div statt ul – kein Konflikt mit Browser-Listen-Rendering  */
div.nav-submenu {
    display: none;
}

/* Hover öffnet das Dropdown */
.nav-gruppe:hover > div.nav-submenu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--gruen-dunkel);
    min-width: 210px;
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    box-shadow: var(--schatten2);
    z-index: 500;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.3rem 0;
}

/* Links im Dropdown */
div.nav-submenu a {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}
div.nav-submenu a:last-child {
    border-bottom: none;
}
div.nav-submenu a:hover {
    background: rgba(255,255,255,0.18);
}

/* ============================================================
   NAVIGATION – MOBIL  (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {

    .nav-toggle { display: block; }

    .haupt-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--gruen-dunkel);
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
        z-index: 999;
    }
    .haupt-nav.nav-offen { display: block; }

    .haupt-nav > ul {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 0;
        padding: 0.4rem 0;
    }
    .haupt-nav > ul > li { width: 100%; }
    .nav-trenner { display: none; }

    .haupt-nav a {
        font-size: 1rem;
        padding: 0.65rem 1.2rem;
        border-radius: 0;
    }

    /* Submenü auf Mobile: kein hover, per JS-Klasse steuern */
    .nav-gruppe:hover > div.nav-submenu {
        display: none;
    }
    .nav-gruppe.submenu-offen > div.nav-submenu {
        display: block;
        position: static;
        background: rgba(0,0,0,0.20);
        border-radius: 0;
        box-shadow: none;
        border: none;
        min-width: unset;
        padding: 0;
    }
    .nav-gruppe.submenu-offen > div.nav-submenu a {
        padding-left: 2rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .site-header { position: relative; }
}

/* ============================================================
   HAUPT-INHALT
   ============================================================ */
.site-main {
    flex: 1;
    max-width: var(--breite);
    width: 100%;
    margin: var(--sp2) auto;
    padding: 0 var(--sp);
}

/* Typografie */
.seiten-titel {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--gruen-dunkel);
    border-bottom: 3px solid var(--gruen);
    padding-bottom: 0.5rem;
    margin-bottom: var(--sp);
}
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
h1 { font-size: 1.7rem; font-weight: 700; color: var(--gruen-dunkel); margin-bottom: 1rem; }
h2 { font-size: 1.35rem; font-weight: 700; color: var(--gruen-dunkel); margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1.1rem;  font-weight: 700; color: var(--text); margin: 1.2rem 0 0.5rem; }
h4 { font-size: 1rem;    font-weight: 700; color: var(--text); margin: 1rem 0 0.4rem; }
ul, ol { padding-left: 1.4rem; }
ul li, ol li { margin-bottom: 0.3rem; }

/* ============================================================
   KARTEN / INFOBOXEN
   ============================================================ */
.karte {
    background: var(--weiss);
    border: 1px solid var(--rand);
    border-radius: var(--radius2);
    padding: var(--sp);
    box-shadow: var(--schatten);
    margin-bottom: var(--sp);
}
.karte-gruen {
    background: var(--gruen-hell);
    border-color: var(--gruen-rand);
}
.hinweis {
    background: var(--gruen-hell);
    border-left: 4px solid var(--gruen);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
}

/* ============================================================
   VORSTAND
   ============================================================ */
.abschnitt-titel {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--weiss);
    background: var(--gruen);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    margin: 1.8rem 0 0.6rem;
}
.vorstand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.vorstand-karte {
    background: var(--weiss);
    border: 1px solid var(--rand);
    border-top: 3px solid var(--gruen);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--schatten);
}
.vorstand-karte .rolle {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gruen);
    margin-bottom: 0.35rem;
}
.vorstand-karte .name {
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.vorstand-karte .details {
    font-size: 0.85rem;
    color: var(--text-mittel);
    line-height: 1.55;
}
.vorstand-karte .details a { word-break: break-all; }

.geschaeft-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}
.geschaeft-box .karte { margin-bottom: 0; }

/* ============================================================
   GALERIE
   ============================================================ */
.bild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.2rem 0;
}
.bild-grid img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    object-fit: cover;
}

/* ============================================================
   TRAININGSZEITEN
   ============================================================ */
.trainings-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--weiss);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--schatten);
}
.trainings-tabelle th {
    background: var(--gruen);
    color: var(--weiss);
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 700;
}
.trainings-tabelle td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--gruen-rand);
    font-size: 0.9rem;
    vertical-align: top;
}
.trainings-tabelle tr:last-child td { border-bottom: none; }
.trainings-tabelle tr:nth-child(even) td { background: var(--gruen-hell); }

/* ============================================================
   KONTAKTLISTE
   ============================================================ */
.kontakt-liste {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.kontakt-liste li {
    background: var(--weiss);
    border: 1px solid var(--rand);
    border-left: 3px solid var(--gruen);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0;
}
.kontakt-liste .kname     { font-weight: 700; }
.kontakt-liste .kfunktion { color: var(--gruen-dunkel); font-size: 0.82rem; }
.kontakt-liste .kdetail   { color: var(--text-mittel); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    background: var(--gruen);
    color: var(--weiss);
    font-weight: 700;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s;
    margin: 0.3rem 0.3rem 0.3rem 0;
}
.btn:hover { background: var(--gruen-dunkel); color: var(--weiss); text-decoration: none; }
.btn-ghost {
    background: transparent;
    color: var(--gruen);
    border: 2px solid var(--gruen);
}
.btn-ghost:hover { background: var(--gruen); color: var(--weiss); }

/* ============================================================
   KACHELN (Mitglied / Startseite)
   ============================================================ */
.mitglied-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}
.mitglied-kachel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: var(--weiss);
    border: 1px solid var(--rand);
    border-radius: var(--radius2);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--schatten);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s, transform 0.15s;
}
.mitglied-kachel:hover {
    box-shadow: var(--schatten2);
    transform: translateY(-2px);
    color: var(--gruen-dunkel);
    text-decoration: none;
}
.mitglied-kachel .kachel-icon { font-size: 2.2rem; line-height: 1; }
.mitglied-kachel .kachel-text { font-weight: 700; font-size: 0.95rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--gruen-dunkel);
    color: rgba(255,255,255,0.85);
    margin-top: auto;
    padding: 2rem var(--sp);
}
.footer-inner {
    max-width: var(--breite);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}
.footer-inner h4 {
    color: var(--weiss);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.25);
}
.footer-inner p,
.footer-inner address {
    font-size: 0.85rem;
    font-style: normal;
    line-height: 1.6;
    color: rgba(255,255,255,0.78);
}
.footer-inner a { color: rgba(255,255,255,0.85); }
.footer-inner a:hover { color: var(--weiss); text-decoration: underline; }
.footer-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}
.footer-inner ul li { margin-bottom: 0.3rem; }
.footer-bottom {
    max-width: var(--breite);
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    text-align: center;
}

/* ============================================================
   LANGER TEXT
   ============================================================ */
.langer-text { max-width: 780px; }
.langer-text h2 { margin-top: 2rem; font-size: 1.15rem; }
.langer-text h3 { margin-top: 1.5rem; font-size: 1.05rem; }
.langer-text p  { text-align: justify; }

/* ============================================================
   RESPONSIVE – TABLET
   ============================================================ */
@media (max-width: 820px) {
    .footer-inner  { grid-template-columns: 1fr 1fr; }
    .geschaeft-box { grid-template-columns: 1fr; }
    .vorstand-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* ============================================================
   RESPONSIVE – MOBIL (Layout, nicht Nav – Nav oben separat)
   ============================================================ */
@media (max-width: 640px) {
    :root { --sp: 1rem; --sp2: 1.5rem; }
    .seiten-titel { font-size: 1.35rem; }
    h1 { font-size: 1.35rem; }
    h2 { font-size: 1.15rem; }
    .footer-inner  { grid-template-columns: 1fr; gap: 1.5rem; }
    .bild-grid     { grid-template-columns: 1fr; }
    .kontakt-liste { grid-template-columns: 1fr; }
    .mitglied-grid { grid-template-columns: 1fr 1fr; }
    .vorstand-grid { grid-template-columns: 1fr; }
    .trainings-tabelle th,
    .trainings-tabelle td { font-size: 0.82rem; padding: 0.5rem 0.6rem; }
}
