/* 
 * Forum-Styles für Bottle-Trade
 * Version: 2.0
 */

/* Globale Forum-Schriftart-Override */
.forum-container,
.forum-body,
.forum-header,
.forum-category-button,
.forum-category-button__name,
.forum-category-button__desc,
.forum-thread-title,
.forum-category-navbar-button,
.forum-new-thread-btn,
.forum-category-card-title,
.forum-category-card-title a,
.forum-stats-title,
.forum-sidebar,
.forum-sidebar-title,
.forum-nav-link,
.forum-nav-sublink {
    font-family: 'Open Sans', sans-serif !important;
}

/* Ausnahme für Font Awesome Icons: Immer richtige Schriftart */
.forum-container i,
.forum-body i,
.forum-header i,
.forum-category-button i,
.forum-category-button__name i,
.forum-category-button__desc i,
.forum-thread-title i,
.forum-category-navbar-button i,
.forum-new-thread-btn i,
.forum-category-card-title i,
.forum-category-card-title a i,
.forum-stats-title i,
.forum-sidebar i,
.forum-sidebar-title i,
.forum-nav-link i,
.forum-nav-sublink i {
    font-family: "Font Awesome 6 Free" !important;
    font-style: normal;
    font-weight: 900;
}

/* Basis-Layout für das Forum */
.forum-container {
    background-color: #ffffff;
    border-radius: var(--bt-border-radius);
    box-shadow: var(--bt-shadow-sm);
    padding: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.forum-header {
    background-color: #e6e6e6;
    padding: 1.5rem;
    border-bottom: 1px solid #d9d9d9;
}

.forum-header h1, .forum-header h2 {
    margin: 0;
    color: var(--bt-dark);
}

.forum-subheader {
    font-size: var(--bt-font-size-sm);
    color: #666;
    margin-top: 0.5rem;
}

.forum-body {
    padding: 1.5rem;
    background-color: #f5f5f5;
}

/* Hauptkategorie-Kacheln */
.forum-category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.forum-category-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #8B0000, #5C0000); /* Weinrot wie beim Schwarzen Brett */
    color: white;
    border-radius: var(--bt-border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--bt-shadow);
    border: none;
    position: relative;
    overflow: hidden;
}

.forum-category-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B0000, #5C0000);
}

.forum-category-button:hover {
    background: linear-gradient(135deg, #9b0000, #7C0000);
    transform: translateY(-5px);
    box-shadow: var(--bt-shadow-md);
    color: white;
}

.forum-category-button__name {
    font-family: var(--bt-font-primary);
    font-size: var(--bt-font-size-lg);
    font-weight: bold;
    margin-bottom: 0.8rem;
}

.forum-category-button__desc {
    margin-top: 0.8rem;
    font-size: var(--bt-font-size-sm);
    opacity: 0.9;
    max-width: 90%;
}

.forum-category-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Navigation-Buttons auf der Kategorie-Seite */
.forum-category-navbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.forum-category-navbar-button {
    padding: 0.7rem 1.2rem;
    background-color: #ffffff;
    color: #333;
    border-radius: var(--bt-border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--bt-font-secondary);
    font-size: var(--bt-font-size-sm);
    font-weight: 600;
    box-shadow: var(--bt-shadow-sm);
}

.forum-category-navbar-button:hover {
    background-color: #e0e0e0;
    color: #333;
    text-decoration: none;
}

.forum-category-navbar-button.active {
    background-color: #8B0000;
    color: white;
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.3);
}

.kategorie-header {
    margin-bottom: 2.5rem;
}

/* Verbesserte Thread-Liste */
.forum-thread-list {
    border-radius: var(--bt-border-radius);
    overflow: hidden;
    background-color: white;
    margin-bottom: 2rem;
    box-shadow: var(--bt-shadow-sm);
}

.forum-thread-list-header {
    background-color: #e6e6e6;
    padding: 1rem;
    border-bottom: 1px solid #d9d9d9;
    font-weight: 600;
    color: #333;
}

.forum-thread-item {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.forum-thread-item:last-child {
    border-bottom: none;
}

.forum-thread-item:hover {
    background-color: #f9f9f9;
}

.forum-thread-icon {
    padding: 1rem;
    font-size: 1.5rem;
    color: #8B0000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.forum-thread-content {
    flex: 1;
    padding: 1rem;
}

.forum-thread-title {
    color: var(--bt-dark);
    font-weight: 600;
    font-size: var(--bt-font-size-md);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.forum-thread-title:hover {
    color: #8B0000;
}

.forum-thread-meta {
    display: flex;
    gap: 1rem;
    font-size: var(--bt-font-size-xs);
    color: #666;
}

.forum-thread-author,
.forum-thread-date,
.forum-thread-replies {
    display: flex;
    align-items: center;
}

.forum-thread-author i,
.forum-thread-date i,
.forum-thread-replies i {
    margin-right: 0.3rem;
}

.forum-thread-status {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

/* Button zum Erstellen neuer Threads */
.forum-new-thread-btn {
    background-color: #8B0000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--bt-border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.forum-new-thread-btn:hover {
    background-color: #5C0000;
    transform: translateY(-2px);
    box-shadow: var(--bt-shadow-md);
    color: white;
}

.forum-new-thread-btn i {
    margin-right: 0.5rem;
}

/* Kategorie-Karten */
.forum-categories {
    margin-top: 2rem;
}

/* Kategorielayout */
.forum-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.forum-categories-info {
    color: #666;
    font-size: 0.9rem;
}

.forum-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.forum-category-card {
    background-color: white;
    border-radius: var(--bt-border-radius);
    box-shadow: var(--bt-shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forum-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bt-shadow-md);
}

.forum-category-card-header {
    background: linear-gradient(135deg, #8B0000, #5C0000);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-category-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.forum-category-card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.forum-category-card-title a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.forum-category-card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.forum-category-card-desc {
    color: #666;
    font-size: var(--bt-font-size-sm);
    margin-bottom: 1rem;
    flex: 1;
}

.forum-category-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.forum-stat {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 0.85rem;
}

.forum-stat i {
    margin-right: 0.3rem;
    color: #8B0000;
}

.forum-new-badge {
    background-color: #8B0000;
    color: white;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.forum-new-badge i {
    font-size: inherit;
}

/* Forum-Statistiken */
.forum-stats-section {
    margin-top: 2rem;
}

.forum-stats-card {
    background-color: white;
    border-radius: var(--bt-border-radius);
    box-shadow: var(--bt-shadow-sm);
    overflow: hidden;
}

.forum-stats-title {
    background: linear-gradient(135deg, #8B0000, #5C0000);
    color: white;
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-stats-content {
    padding: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.forum-stats-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.forum-stats-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.forum-stats-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Schwarzes Brett Styling */
.schwarzes-brett-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    margin-top: 2rem;
}

.sb-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    height: fit-content;
}

.sb-card-header {
    background: linear-gradient(135deg, #8B0000, #5C0000);
    padding: 15px 20px;
    font-weight: 600;
}

.sb-card-header h3, 
.sb-card-header h4 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.sb-card-body {
    padding: 20px;
}

/* Listen-Styling */
.sb-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sb-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.sb-list li:last-child {
    border-bottom: none;
}

.sb-list li:before {
    content: "•";
    color: #8B0000;
    font-weight: bold;
    margin-right: 10px;
}

.feature-item {
    display: flex;
    margin-bottom: 25px;
    align-items: flex-start;
}

.feature-icon {
    flex: 0 0 50px;
    height: 50px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #8B0000;
    font-size: 1.4rem;
}

.feature-content {
    flex: 1;
}

.feature-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #333;
}

.feature-content p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.forum-info-text {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #444;
}

.forum-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1a8d3f;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(26, 141, 63, 0.25);
    gap: 10px;
}

.forum-button:hover {
    background-color: #146e31;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(26, 141, 63, 0.3);
    color: white;
}

/* Aktuelle Themen Vorschau */
.latest-threads-preview {
    margin-top: 20px;
}

.latest-threads-preview h4 {
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 1.1rem;
}

.threads-preview-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.thread-preview-item {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
}

.thread-preview-item:last-child {
    border-bottom: none;
}

.thread-preview-item:hover {
    background-color: #f9f9f9;
}

.thread-preview-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #8B0000;
}

.thread-preview-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #777;
}

.thread-preview-empty {
    padding: 20px;
    text-align: center;
    color: #777;
}

/* Responsive Layout */
@media (max-width: 992px) {
    .schwarzes-brett-layout {
        grid-template-columns: 1fr 1fr;
    }
    
    .schwarzes-brett-right {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .schwarzes-brett-layout {
        grid-template-columns: 1fr;
    }
    
    .schwarzes-brett-right,
    .schwarzes-brett-left,
    .schwarzes-brett-center {
        grid-column: span 1;
    }
    
    .forum-thread-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forum-thread-icon {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 0;
    }
    
    .forum-thread-status {
        width: 100%;
        justify-content: flex-start;
        padding-top: 0;
    }
    
    .forum-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .forum-categories-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forum-categories-info {
        margin-top: 0.5rem;
    }
    
    .forum-stats-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.forum-category-latest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--bt-font-size-xs);
    background-color: #f9f9f9;
    padding: 0.75rem 1rem;
    border-radius: var(--bt-border-radius);
    margin-top: 0.5rem;
}

.forum-category-latest-thread {
    font-weight: 500;
}

.forum-category-latest-time {
    color: #888;
}

/* Forum-spezifisches Layout-Fix: Nur für Forum-Seiten! */
.forum-page .main-content {
    width: auto !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.forum-page .forum-layout > div, .forum-page .row.g-4 > div {
    min-width: 0 !important;
}
