/* ============================================
   OGV Vereinswebseite – Hauptstylesheet
   Natur-inspiriertes, warmes Design
   ============================================ */

/* Lokale Fonts – datenschutzkonform (kein Google-Server-Kontakt) */
@import url('../fonts/fonts.css');

:root {
    --gruen-dunkel:  #2d5016;
    --gruen-mittel:  #4a7c2f;
    --gruen-hell:    #7ab648;
    --gruen-zart:    #e8f5d8;
    --braun:         #7a5230;
    --braun-hell:    #c8a97a;
    --apricot:       #f5e6c8;
    --creme:         #faf7f0;
    --text-dunkel:   #2c2c2c;
    --text-mittel:   #555;
    --text-hell:     #888;
    --weiss:         #ffffff;
    --schatten:      rgba(45, 80, 22, 0.12);
    --border-radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--creme);
    color: var(--text-dunkel);
    line-height: 1.7;
}

/* ---- TYPOGRAPHIE ---- */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--gruen-dunkel);
    line-height: 1.3;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

a { color: var(--gruen-mittel); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gruen-hell); }

/* ---- HEADER ---- */
/* ══ HEADER & NAV ═══════════════════════════════════════════ */
header {
    background: linear-gradient(135deg, var(--gruen-dunkel) 0%, var(--gruen-mittel) 100%);
    color: var(--weiss);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 0.75rem;
    box-sizing: border-box;
    width: 100%;
}

/* Logo */
.logo { display:flex;align-items:center;gap:0.6rem;text-decoration:none;flex-shrink:0; }
.logo-icon { font-size:1.8rem;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.logo-text { color:var(--weiss);font-size:1rem;font-weight:700;line-height:1.25; }
.logo-sub { display:block;font-size:0.6rem;font-weight:400;opacity:0.65;letter-spacing:0.07em;text-transform:uppercase; }

/* Desktop Nav */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    margin-left: 0.25rem;
}
.nav-desktop > a {
    color: rgba(255,255,255,0.78);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.38rem 0.6rem;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    position: relative;
    transition: color 0.15s, background 0.15s;
}
.nav-desktop > a:hover {
    color: var(--weiss);
    background: rgba(255,255,255,0.1);
}
.nav-desktop > a.active {
    color: var(--weiss);
    background: none;
}
.nav-desktop > a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.6rem;
    right: 0.6rem;
    height: 2px;
    background: #a8d97a;
    border-radius: 2px;
}

/* Mehr-Dropdown */
.nav-mehr { position: relative; }
.nav-mehr-btn {
    color: rgba(255,255,255,0.78);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.38rem 0.6rem;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}
.nav-mehr-btn:hover, .nav-mehr-btn.active { color: var(--weiss); background: rgba(255,255,255,0.1); }
.nav-mehr-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.6rem;
    right: 2rem;
    height: 2px;
    background: #a8d97a;
    border-radius: 2px;
}
.nav-mehr-arrow { font-size: 9px; opacity: 0.65; transition: transform 0.2s; }
.nav-mehr.open .nav-mehr-arrow { transform: rotate(180deg); }
.nav-mehr-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--gruen-dunkel);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 6px;
    min-width: 170px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    z-index: 999;
}
.nav-mehr.open .nav-mehr-dropdown { display: block; }
.nav-mehr-dropdown a {
    display: block;
    color: rgba(255,255,255,0.82);
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nav-mehr-dropdown a:hover,
.nav-mehr-dropdown a.active { background: rgba(255,255,255,0.12); color: var(--weiss); }

/* Rechte Seite */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Suche-Icon-Button */
.nav-icon-btn {
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.25); color: var(--weiss); }

/* Suchoverlay */
#search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}
#search-overlay.open { display: flex; }
.search-overlay-box {
    background: var(--weiss);
    border-radius: 14px;
    width: min(560px, 90vw);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}
.search-overlay-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.search-overlay-icon { font-size: 1.1rem; opacity: 0.45; flex-shrink: 0; }
.search-overlay-inner input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dunkel);
    background: none;
    font-family: inherit;
}
.search-overlay-close {
    font-size: 0.72rem;
    background: #f0f0f0;
    border: none;
    color: #888;
    border-radius: 4px;
    padding: 3px 7px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
}
.search-overlay-hints {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px 14px;
}
.search-overlay-hints a {
    background: var(--gruen-zart);
    color: var(--gruen-dunkel);
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
}
.search-overlay-hints a:hover { background: var(--gruen-hell); color: var(--weiss); }
#search-suggest { overflow: hidden; }
#search-suggest:not(:empty) { border-top: 1px solid #f0f0f0; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 8px 10px;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--weiss);
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobiles Menü */
#mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gruen-dunkel);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.2rem;
    overflow-y: auto;
    z-index: 999;
    border-top: 2px solid rgba(255,255,255,0.15);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
}
#mobile-nav.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
#mobile-nav > a {
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    font-size: 1rem;
    display: block;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
}
#mobile-nav > a:hover, #mobile-nav > a.active { background: rgba(255,255,255,0.15); color: var(--weiss); }

/* Mobile Suche */
.nav-mobile-search {
    display: none;
    padding: 0.5rem 0 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 0.25rem;
    width: 100%;
    box-sizing: border-box;
}
.nav-mobile-search form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 0.1rem 0.5rem;
    width: 100%;
    box-sizing: border-box;
}
.nav-mobile-search input[type="text"] {
    flex: 1;
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1rem !important;
    padding: 0.75rem 0.5rem !important;
    outline: none;
    border-radius: 0 !important;
    width: 100% !important;
}
.nav-mobile-search input::placeholder { color: rgba(255,255,255,0.55) !important; }

/* Mobile User-Bereich */
.nav-mobile-user {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}
.nav-mobile-user-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.02em;
}
.nav-mobile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(168,217,122,0.2);
    border: 1.5px solid rgba(168,217,122,0.45);
    color: #a8d97a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.nav-mobile-user a {
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none;
    display: block;
    margin: 0 0.25rem;
    transition: background 0.15s, color 0.15s;
}
.nav-mobile-user a:hover { background: rgba(255,255,255,0.1); color: white !important; }
.nav-mobile-user a[href*="admin"] {
    color: #a8d97a !important;
}
.nav-mobile-logout {
    color: rgba(255,110,110,0.9) !important;
    background: rgba(220,50,50,0.12) !important;
    margin-top: 0.35rem !important;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.75rem !important;
}
.nav-mobile-logout:hover {
    background: rgba(220,50,50,0.22) !important;
    color: #ff8888 !important;
}

/* Login-Button */
.nav-btn {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: var(--weiss);
    border-radius: 50px;
    padding: 0.3rem 0.9rem;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { background: rgba(255,255,255,0.25); }

/* ── Mobile Nav (≤900px) ──────────────────────────────────── */
@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .hamburger { display: flex; }
    .nav-mobile-search { display: block; }
    #search-toggle { display: none; }
    .nav-right .nav-btn { display: none; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0 0.75rem; gap: 0.5rem; }
    .logo-text { font-size: 0.9rem; }
    .logo-icon { font-size: 1.4rem; }
    main { padding: 0 0.75rem; }
}

@media (max-width: 360px) {
    .logo-sub { display: none; }
    .logo-text { font-size: 0.85rem; }
    .logo-icon { font-size: 1.25rem; }
    .logo { gap: 0.35rem; }
    .header-inner { padding: 0 0.5rem; gap: 0.4rem; }
    .hamburger { min-width: 38px; min-height: 38px; padding: 6px 8px; }
}

/* ---- HERO ---- */
.hero {
    background: var(--hero-bg, linear-gradient(160deg, var(--gruen-dunkel) 0%, var(--gruen-mittel) 50%, var(--gruen-hell) 100%));
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* kein parallax – verhindert Ruckeln */
    will-change: auto;
    color: var(--weiss);
    padding: 7rem 1.5rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateZ(0); /* GPU-Layer erzwingen */
}

/* Overlay bei Bild: weicher grüner Schleier wie im Mockup */
.hero.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(30, 60, 20, 0.35) 0%,
        rgba(20, 50, 15, 0.55) 100%
    );
    z-index: 0;
}
.hero.has-image > * { position: relative; z-index: 1; }

/* Emoji-Deko nur ohne Bild */
.hero:not(.has-image)::before {
    content: '🌿🍎🌳🌸🍃';
    position: absolute;
    font-size: 8rem;
    opacity: 0.06;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    letter-spacing: 1rem;
    pointer-events: none;
}

.hero h1 {
    color: var(--weiss);
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 16px rgba(0,0,0,0.4);
    line-height: 1.25;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.hero-buttons { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }

/* Buttons genau wie im Mockup */
.btn-primary {
    background: var(--weiss);
    color: var(--gruen-dunkel) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border: none;
}
.btn-primary:hover {
    background: var(--gruen-zart);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    color: var(--gruen-dunkel) !important;
}

.btn-secondary {
    background: rgba(45, 80, 22, 0.55);
    color: var(--weiss) !important;
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
}
.btn-secondary:hover {
    background: rgba(74,124,47,0.7);
    border-color: rgba(255,255,255,0.8);
    color: var(--weiss) !important;
    transform: translateY(-2px);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
}

.btn-primary {
    background: var(--weiss);
    color: var(--gruen-dunkel);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.btn-primary:hover {
    background: var(--gruen-zart);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: var(--gruen-dunkel);
}

.btn-secondary {
    background: transparent;
    color: var(--weiss);
    border: 2px solid rgba(255,255,255,0.7);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--weiss);
    color: var(--weiss);
}

.btn-gruen {
    background: var(--gruen-mittel);
    color: var(--weiss);
    box-shadow: 0 3px 12px rgba(74,124,47,0.35);
}
.btn-gruen:hover {
    background: var(--gruen-dunkel);
    transform: translateY(-1px);
    color: var(--weiss);
}

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; }

/* ---- MAIN CONTENT ---- */
main {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Einheitliche Inhaltsbreite für alle Seiten */
.page-content {
    max-width: 1100px;
    margin: 0 auto;
}

/* ---- KARTEN ---- */
.card {
    background: var(--weiss);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px var(--schatten);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px var(--schatten); }

.card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body .btn { margin-top: auto; align-self: flex-start; }

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--gruen-dunkel);
    margin-bottom: 0.5rem;
}

.card-meta {
    font-size: 0.82rem;
    color: var(--text-hell);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---- GRID LAYOUTS ---- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1.5rem; }

/* ---- SECTION HEADER ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--gruen-zart);
    padding-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 { font-size: 1.8rem; margin: 0; }
.section-header a:not(.btn) { font-size: 0.9rem; color: var(--gruen-mittel); }
.section-header .btn { font-size: 0.85rem; }

/* Admin-Aktionsleiste – erscheint unter dem Section-Header für Eingeloggte */
.admin-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    background: var(--gruen-zart);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    color: var(--gruen-dunkel);
}
.admin-bar a, .admin-bar button {
    background: var(--weiss);
    color: var(--gruen-dunkel);
    border: 1.5px solid var(--gruen-hell);
    border-radius: 6px;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
}
.admin-bar a:hover, .admin-bar button:hover {
    background: var(--gruen-mittel);
    color: var(--weiss);
    border-color: var(--gruen-mittel);
}

/* ---- FORMULAR ---- */
.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-dunkel);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #dde8cc;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    background: var(--creme);
    color: var(--text-dunkel);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gruen-hell);
    box-shadow: 0 0 0 3px rgba(122, 182, 72, 0.2);
    background: var(--weiss);
}

textarea.form-control { resize: vertical; min-height: 130px; }

/* ---- ALERTS ---- */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-size: 0.93rem;
    border-left: 4px solid;
}
.alert-success { background: #edfcd8; border-color: var(--gruen-hell); color: var(--gruen-dunkel); }
.alert-error   { background: #fde8e8; border-color: #c0392b; color: #922b21; }
.alert-info    { background: var(--apricot); border-color: var(--braun-hell); color: var(--braun); }

/* ---- BADGE ---- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-gruen { background: var(--gruen-zart); color: var(--gruen-dunkel); }
.badge-braun { background: var(--apricot); color: var(--braun); }

/* ---- EVENT KARTE ---- */
.event-datum {
    background: var(--gruen-dunkel);
    color: var(--weiss);
    text-align: center;
    padding: 0.75rem;
    min-width: 64px;
    width: 64px;
    border-radius: 8px;
    flex-shrink: 0;
}
.event-datum .tag { font-size: 1.6rem; font-weight: 700; font-family: 'Playfair Display', serif; display: block; }
.event-datum .mon { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }

.event-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    background: var(--weiss);
    box-shadow: 0 2px 10px var(--schatten);
    transition: transform 0.2s;
}
.event-item:hover { transform: translateX(4px); }

/* ---- GALERIE ---- */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.galerie-bild {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    width: 100%;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: zoom-in;
}
.galerie-bild:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ---- LOGIN/REGISTER SEITE ---- */
.auth-container {
    max-width: 440px;
    margin: 3rem auto;
}
.auth-card {
    background: var(--weiss);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 4px 24px var(--schatten);
}
.auth-card h2 { text-align: center; margin-bottom: 0.25rem; }
.auth-card .subtitle { text-align: center; color: var(--text-hell); font-size: 0.9rem; margin-bottom: 2rem; }

/* ---- FOOTER ---- */
/* ══ FOOTER ══════════════════════════════════════════════════ */
footer {
    background: #1e3a0e;
    color: rgba(255,255,255,0.82);
    margin-top: 5rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding: 3rem 1.5rem 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #a8d97a;
    margin-bottom: 0.9rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.58);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    width: fit-content;
}
.footer-col a:hover {
    color: var(--weiss);
    border-bottom-color: rgba(168,217,122,0.4);
}
.footer-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--weiss);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.35rem;
    font-family: 'Playfair Display', serif;
}
.footer-tagline {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.9rem;
}
.footer-desc {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.75;
    margin-bottom: 1rem;
}
.footer-email {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-email a {
    color: #a8d97a;
    font-size: 0.84rem;
    text-decoration: none;
    border-bottom: none !important;
}
.footer-email a:hover { color: #c8f09a; border-bottom: none !important; }
.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem;
}
.footer-bottom-inner {
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.35);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.footer-bottom a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    margin-left: 1.25rem;
    font-size: 0.76rem;
    transition: color 0.15s;
}
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }
.footer-dot { margin: 0 0.4rem; opacity: 0.4; }

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 1.25rem; }
    .footer-col--brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
    .footer-bottom a { margin-left: 0; margin-right: 1rem; }
}
/* Mobiles Suchfeld nur auf Mobil sichtbar */
.nav-mobile-search { display: none; }
.nav-mobile-user { display: none; }

/* ---- RESPONSIVE ---- */
/* ============================================
   RESPONSIVE – Mobile First
   ============================================ */

/* Tablet: Nav beginnt zu stauchen */
@media (max-width: 1100px) {
    #main-nav a { padding: 0.35rem 0.4rem; font-size: 0.78rem; }
    #main-nav form input { width: 80px !important; }
}

/* Hamburger ab 900px sichtbar – zu viele Nav-Einträge für schmale Desktops */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .nav-mobile-search { display: block; }

    /* Nav-Overlay: öffnet sich unter dem Header */
    #main-nav {
        display: none;
        position: fixed;           /* fixed statt absolute: scrollt nicht mit */
        top: 68px;                 /* Höhe des Headers */
        left: 0;
        right: 0;
        bottom: 0;                 /* füllt den ganzen Rest des Bildschirms */
        background: var(--gruen-dunkel);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.2rem;
        overflow-y: auto;          /* scrollbar bei sehr kleinen Geräten */
        z-index: 1000;
        border-top: 2px solid rgba(255,255,255,0.15);
        /* Slide-in Animation */
        transform: translateY(-8px);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
        pointer-events: none;
    }

    #main-nav.open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    #main-nav a {
        padding: 0.9rem 1.1rem;
        border-radius: 10px;
        font-size: 1rem;
        display: block;
        width: 100%;
        color: rgba(255,255,255,0.92);
        border-bottom: none;
    }

    #main-nav a:hover, #main-nav a.active {
        background: rgba(255,255,255,0.15);
        color: var(--weiss);
    }

    /* Suche als erstes Element im mobilen Menü */
    .nav-mobile-search {
        padding: 0.5rem 0 0.75rem;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        margin-bottom: 0.25rem;
        width: 100%;
        box-sizing: border-box;
    }
    .nav-mobile-search form {
        display: flex; align-items: center;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.25);
        border-radius: 12px;
        padding: 0.1rem 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    .nav-mobile-search input[type="text"] {
        flex: 1;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 1rem !important;
        padding: 0.75rem 0.5rem !important;
        outline: none;
        border-radius: 0 !important;
        width: 100% !important;
    }
    .nav-mobile-search input::placeholder { color: rgba(255,255,255,0.55) !important; }

    /* Desktop-Suchleiste auf Mobil ausblenden */
    #search-bar { display: none !important; }
    #search-toggle { display: none !important; }

    /* Login-Button */
    .nav-btn {
        text-align: center;
        margin-top: 0.5rem;
        padding: 0.9rem 1.1rem !important;
        font-size: 1rem !important;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    /* Desktop user-menu ausblenden auf Mobil */
    .user-menu { display: none !important; }

    /* Mobiler Benutzer-Bereich */
    .nav-mobile-user {
        display: flex;
        flex-direction: column;
        border-top: 1px solid rgba(255,255,255,0.15);
        margin-top: 0.4rem;
        padding-top: 0.4rem;
    }
    .nav-mobile-user a {
        padding: 0.75rem 1.1rem;
        border-radius: 10px;
        font-size: 1rem;
        color: rgba(255,255,255,0.85) !important;
        text-decoration: none;
        display: block;
    }
    .nav-mobile-user a:hover { background: rgba(255,255,255,0.12); }

    /* Suchfeld nimmt volle Breite ein */
    #main-nav form {
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.15);
    }
    #main-nav form input {
        width: 100% !important;
        background: rgba(255,255,255,0.12) !important;
        color: white !important;
        border-radius: 10px !important;
        padding: 0.8rem 1.1rem !important;
        font-size: 1rem !important;
        border: 1px solid rgba(255,255,255,0.25) !important;
        transition: none !important; /* kein width-Transition auf mobil */
    }
    #main-nav form input::placeholder { color: rgba(255,255,255,0.55) !important; }

    /* Header braucht position:relative für top-Berechnung nicht mehr (wir nutzen fixed) */
    .header-inner { position: static; }

    /* Layout-Anpassungen */
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero { padding: 4rem 1rem 3.5rem; min-height: 360px; }
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.97rem; }
    .hero-buttons { flex-direction: column; align-items: center; }

    main { margin: 1.5rem auto; }

    /* Admin */
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; position: static; display: flex; flex-wrap: wrap; padding: 0.5rem; gap: 0.25rem; }
    .admin-sidebar a { padding: 0.45rem 0.75rem; font-size: 0.82rem; border-radius: 6px; }

    /* Tabellen scrollen */
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 0.5rem 0.6rem; }

    /* Event-Items */
    .event-item { flex-direction: column; gap: 0.5rem; }
    .event-datum { width: 100%; min-width: unset; border-radius: 8px 8px 0 0; }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .logo-text { font-size: 0.95rem; }
    .logo-icon { font-size: 1.5rem; }
    .header-inner { padding: 0 0.75rem; }
    main { padding: 0 0.75rem; }
}

@media (max-width: 360px) {
    .logo-sub { display: none; }
    .logo-text { font-size: 0.85rem; }
    .logo-icon { font-size: 1.25rem; }
    .logo { gap: 0.35rem; }
    .header-inner { padding: 0 0.5rem; gap: 0.4rem; }
    .hamburger { min-width: 38px; min-height: 38px; padding: 6px 8px; }
}

/* ---- UTILS ---- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-hell); font-size: 0.9rem; }
.divider { border: none; border-top: 1px solid #eee; margin: 2rem 0; }

/* ---- ADMIN ---- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th { background: var(--gruen-zart); color: var(--gruen-dunkel); padding: 0.75rem 1rem; text-align: left; font-weight: 700; }
.admin-table td { padding: 0.65rem 1rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.admin-table tr:hover td { background: #fafff5; }

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--weiss);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px var(--schatten);
    padding: 1.5rem 0;
    align-self: flex-start;
    position: sticky;
    top: 80px;
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.5rem;
    color: var(--text-mittel);
    font-size: 0.92rem;
    transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: var(--gruen-zart);
    color: var(--gruen-dunkel);
    font-weight: 700;
}
.admin-layout { display: flex; gap: 2rem; align-items: flex-start; }
.admin-content { flex: 1; min-width: 0; }

/* ---- ADMIN SUBPAGE LAYOUT (Galerie, Baumkataster, Newsletter) ---- */
.admin-subpage-wrap {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.admin-sidebar-fixed {
    width: 200px;
    flex-shrink: 0;
    background: var(--weiss);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px var(--schatten);
    padding: 1rem 0.5rem;
    position: sticky;
    top: 80px;
}
.admin-sidebar-fixed a {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--text-mittel);
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 6px;
    transition: all 0.15s;
}
.admin-sidebar-fixed a:hover,
.admin-sidebar-fixed a.active {
    background: var(--gruen-zart);
    color: var(--gruen-dunkel);
    font-weight: 700;
}
.admin-subpage-content {
    flex: 1;
    min-width: 0;
}
@media (max-width: 800px) {
    .admin-subpage-wrap { flex-direction: column; }
    .admin-sidebar-fixed { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 0.5rem; }
    .admin-sidebar-fixed a { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
    .admin-sidebar-fixed div { display: none; }
}

/* ── Share-Buttons ────────────────────────────────────────── */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--gruen-zart);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--gruen-hell);
}
.share-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gruen-dunkel);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.25rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: transform 0.15s, opacity 0.15s;
}
.share-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.share-wa   { background: #25D366; color: white; }
.share-fb   { background: #1877F2; color: white; }
.share-mail { background: #f0f0f0; color: #333; }
.share-copy { background: #f0f0f0; color: #333; }

/* ── Share inline (News-Titel) ────────────────────────────── */
.share-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 4px;
}
.share-inline-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
    color: white;
    flex-shrink: 0;
}
.share-inline-btn:hover { transform: translateY(-2px); opacity: 0.85; }
.share-inline-btn.share-wa { background: #25D366; }
.share-inline-btn.share-fb { background: #1877F2; }
.share-inline-btn:not(.share-wa):not(.share-fb) { color: var(--text-hell); }
.share-inline-btn:not(.share-wa):not(.share-fb):hover { color: var(--gruen-dunkel); }