:root {
    --bg-body: #f0f2f5; 
    --bg-card: #ffffff;
    --text-main: #050505; 
    --text-muted: #65676b;
    --accent: #d32f2f; /* Bleibt ROT für die Buttons */
    --accent-hover: #b71c1c; 
    --border-color: #ddd;
}

/* --- style.css --- */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* HIER DAS BILD ENTFERNEN */
    background-color: #f0f2f5; /* Ein sauberer hellgrauer Hintergrund für alle Seiten */
    color: #1c1e21; /* Textfarbe etwas dunkler für besseren Kontrast */
    
    margin: 0; 
    padding-top: 100px; 
}

/* ... (anderer Code) ... */

/* NEUE KLASSE: Nur für die Home-Seite */
body.home-bg {
    background-image: url('Hintergrund.png');
    
    /* Positioniert das Bild oben mittig, etwas unter der Navbar (ca. 80px Abstand von oben) */
    background-position: center 13px; 
    
    /* Bild wiederholt sich nicht */
    background-repeat: no-repeat;
    
    /* Das Bild bleibt stehen beim Scrollen (Parallax-Effekt) */
    background-attachment: fixed; 
    
    /* Größe anpassen: 
       "contain" würde es ganz anzeigen, 
       aber wir nehmen z.B. 90% Breite oder max 600px, damit es nicht riesig ist. 
       Probier mal 80% auto oder eine feste Breite wie 600px auto. */
    background-size: center 600px; 
}

/* Anpassung für Handys, damit das Logo dort nicht zu winzig ist */
@media (max-width: 768px) {
    body.home-bg {
        background-size: 100% auto; /* Auf Handy volle Breite */
        background-position: center 60px;
    }
}

a { text-decoration: none; }

/* --- NAVBAR (Hier sind die Anpassungen auf GOLD & Lesbarkeit) --- */
.navbar { 
    background-color: #151b24; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border-bottom: 2px solid #d4af37; /* GEÄNDERT: Goldene Linie statt Rot */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Das Logo Bild */
.nav-logo-img {
    height: 65px; 
    width: auto;
    cursor: default;
    transition: transform 0.3s ease;
    filter: drop-shadow(0px 3px 6px rgba(255, 255, 255, 0.3)); 
}

/* Navbar Links */
.nav-link {
    color: #e0e0e0; /* GEÄNDERT: Helle Schrift für bessere Lesbarkeit auf Dunkel */
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar .nav-link.active {
    color: #d4af37; /* GEÄNDERT: Gold für aktiven Link */
    font-weight: 600; 
    background-color: rgba(212, 175, 55, 0.1); /* GEÄNDERT: Leichter Gold-Hintergrund */
    border-radius: 5px; 
    padding: 10px 15px; 
}

.nav-link:hover, .nav-link.active {
    color: #d4af37; /* GEÄNDERT: Gold beim Drüberfahren */
}

.nav-link svg {
    stroke-width: 2.5px;
    transition: stroke 0.3s ease;
}

/* Breadcrumb Navigation */
.custom-breadcrumb {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}
.custom-breadcrumb a {
    text-decoration: none;
    color: #dc3545; 
    font-weight: 500;
    cursor: pointer;
}
.custom-breadcrumb a:hover { text-decoration: underline; }
.custom-breadcrumb span { margin: 0 5px; color: #adb5bd; }
.custom-breadcrumb .active { color: #212529; font-weight: bold; }

/* --- FORUM TABELLE STYLE --- */
.forum-header-row {
    background-color: #f8f9fa;
    border-top: 2px solid #dc3545; 
    border-bottom: 1px solid #dee2e6;
    padding: 10px 15px;
    font-weight: bold;
    color: #495057;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.forum-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
    background: white;
}
.forum-row:hover { background-color: #fcfcfc; }

.forum-icon {
    font-size: 2rem;
    margin-right: 20px;
    color: #6c757d;
    width: 50px;
    text-align: center;
}

.forum-main { flex-grow: 1; }
.forum-stats { width: 100px; text-align: center; font-size: 0.9rem; color: #495057; }
.forum-arrow { width: 30px; text-align: right; color: #adb5bd; }

/* --- 2. LAYOUT & GRID --- */
.container { max-width: 1000px; margin: 0 auto; padding: 0 15px; }

/* LAYOUT OPTIMIERUNG */
.content-grid {
    display: grid;
    grid-template-columns: 260px 1fr; 
    gap: 24px;
    align-items: start;
    max-width: 1200px; 
    margin: 0 auto;    
}

.feed {
    width: 100%;
    min-width: 0; 
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr; 
    }
    .sidebar {
        display: none; 
    }
}

/* Emoji Leiste */
.emoji-toolbar {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #eee; 
}

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem; 
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    opacity: 0.8; 
}

.emoji-btn:hover {
    background-color: #f0f2f5;
    transform: scale(1.3); 
    opacity: 1;
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Touren Page Layout */
.tours-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.map-card {
    width: 100%;
    height: 500px; 
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}
.tours-list { width: 100%; }

/* --- KARTEN STYLING --- */
.card { background: var(--bg-card); border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); margin-bottom: 15px; padding: 15px; border: none; }
.card-header { font-size: 20px; font-weight: bold; margin-bottom: 15px; padding: 0; background: none; border-bottom: none; }

/* Bike Card */
.bike-card { border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; }
.bike-img { width: 100%; height: 150px; object-fit: cover; }
.bike-info { padding: 10px; }

/* Mini Tour Card */
.mini-tour-card {
    background: white;
    margin-bottom: 15px;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mini-tour-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.tour-meta { font-size: 0.85em; color: var(--text-muted); display: flex; gap: 10px; margin-top: 6px; }

@media (min-width: 768px) {
    .mini-tour-card { flex-direction: row; align-items: center; justify-content: space-between; }
    .tour-meta { margin-top: 0; margin-left: auto; margin-right: 20px; }
    .mini-tour-card p { display: none; }
}

/* Sidebar Filter */
.sidebar-filter-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    height: fit-content;
}
.filter-title { font-size: 0.85rem; text-transform: uppercase; color: #888; font-weight: 700; margin-bottom: 10px; }
.filter-divider { margin: 15px 0; color: #eee; }

/* --- PROFIL HEADER --- */
.profile-header { 
    background: white; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
    border-radius: 8px; 
    position: relative; 
    overflow: hidden; 
}
.cover-photo { height: 250px; background: url('https://images.unsplash.com/photo-1558981403-c5f9899a28bc?auto=format&fit=crop&w=1200&q=80') center/cover; }
.profile-nav { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; padding: 0 30px; margin-top: -50px; position: relative; z-index: 2; }
.profile-pic { width: 140px; height: 140px; border-radius: 50%; border: 4px solid white; background: url('https://images.unsplash.com/photo-1551024709-8f23befc6f87?auto=format&fit=crop&w=300&q=80') center/cover; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.user-details { padding-top: 60px; flex-grow: 1; margin-left: 20px; margin-bottom: 10px; }
.user-name { font-size: 28px; font-weight: 800; margin: 0; color: #333; }
.user-tag { color: var(--text-muted); font-size: 0.95rem; }
.action-buttons { display: flex; gap: 10px; margin-bottom: 10px; }

@media (max-width: 768px) {
    .profile-nav { flex-direction: column; align-items: center; text-align: center; margin-top: -70px; }
    .user-details { margin-left: 0; padding-top: 10px; }
    .action-buttons { width: 100%; justify-content: center; padding-bottom: 15px; }
}

/* Posts Styles */
.post-header { display: flex; align-items: center; margin-bottom: 10px; }
.post-avatar, .new-post-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; background-color: #ddd; background-size: cover; }
.new-post-input { width: 100%; border-radius: 20px; border: 1px solid #ddd; padding: 10px; background: #f0f2f5; }
.post-actions { border-top: 1px solid #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-around; color: var(--text-muted); font-weight: 600; cursor: pointer; }

/* Freunde Grid */
.info-item { display: flex; align-items: center; margin-bottom: 12px; font-size: 15px; color: #555; }
.friends-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.friend-item img { width: 100%; border-radius: 6px; aspect-ratio: 1/1; object-fit: cover; }
.friend-name { font-size: 11px; font-weight: 600; margin-top: 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; }

/* Buttons */
.btn { padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; font-size: 14px; transition: background 0.2s; text-decoration: none; display: inline-block;}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); color: white; }
.btn-secondary { background: #e4e6eb; color: rgb(0, 0, 0); }
.btn-secondary:hover { background: #d8dadf; color: black; }

/* Forum - Bootstrap Anpassungen */
.accordion-button:not(.collapsed) {
    background-color: rgba(211, 47, 47, 0.08);
    color: var(--accent);
}
.accordion-button:focus { box-shadow: none; }
.accordion-item { border-radius: 8px; }
.list-group-item { border: none; font-weight: 500; }
.list-group-item:hover { background-color: rgba(211, 47, 47, 0.05); }

/* --- SPLIT VIEW FÜR TOUREN (Desktop) --- */
@media (min-width: 992px) {
    .tours-layout {
        flex-direction: row !important; 
        align-items: flex-start;
    }

    .tours-list {
        width: 50%;
        padding-right: 15px;
    }

    .map-wrapper {
        width: 50%;
        position: sticky;
        top: 110px; 
        height: calc(100vh - 130px); 
    }

    #map {
        height: 100% !important;
    }
}

/* --- NEUES TOUR LAYOUT --- */
#tours-tree-container {
    scrollbar-width: thin; 
    scrollbar-color: #ccc #f0f0f0;
}

#tours-tree-container::-webkit-scrollbar {
    width: 8px;
}
#tours-tree-container::-webkit-scrollbar-track {
    background: #f0f0f0;
}
#tours-tree-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

/* Accordion Styling */
.accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 15px;
}
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0d6efd;
}
.accordion-body {
    padding: 10px;
    background-color: #fcfcfc;
}

/* Aktive Tour hervorheben */
.tour-card-active {
    border-left: 4px solid #0d6efd !important;
    background-color: #f0f8ff !important;
}

/* --- LIKES & KOMMENTARE --- */
.post-actions {
    border-top: 1px solid #f0f2f5;
    margin-top: 10px;
    padding-top: 5px;
    display: flex;
    gap: 5px;
}

/* Der Button selbst */
.action-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 5px;
    color: #65676b;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover { background-color: #f2f2f2; }

/* Rotes Herz wenn geliked */
.action-btn.liked { color: #e41e3f; }
.action-btn.liked svg { fill: #e41e3f; stroke: #e41e3f; }

/* Kommentarbereich */
.comment-section {
    background-color: #f7f8fa;
    padding: 10px;
    margin-top: 5px;
    border-radius: 8px;
    display: none; 
}
.comment-section.show { display: block; }

/* Liste der Kommentare */
.comment-item { display: flex; gap: 10px; margin-bottom: 8px; }
.comment-bubble {
    background: #fff;
    padding: 8px 12px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.9rem;
}
.comment-author { font-weight: bold; font-size: 0.85rem; display: block; color: #050505; }

/* Eingabefeld */
.comment-input-wrapper { display: flex; gap: 8px; margin-top: 10px; }
.comment-input-wrapper input {
    border-radius: 20px;
    border: 1px solid #ddd;
    padding-left: 15px;
    font-size: 0.9rem;
}
/* Einzelner Kommentar */
.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-bubble {
    background: #fff;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.comment-author {
    font-weight: bold;
    font-size: 0.85rem;
    color: #050505;
    margin-right: 5px;
}

/* Eingabefeld für Kommentare */
.comment-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.comment-input-wrapper input {
    border-radius: 20px;
    border: 1px solid #ddd;
    padding-left: 15px;
    font-size: 0.9rem;
}