/* --- Globale Variablen & Hero --- */
:root {
    --primary-color: var(--green-primary, #00B074);
    --primary-color-rgb: 0, 176, 116; 
}

.page-hero {
    padding: 4rem 2rem;
    background-color: var(--background-section-alt); 
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-hero h1 { margin-top: 0; margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3rem); }
.page-hero .subtitle { font-size: 1.15rem; color: var(--text-light); max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* --- Haupt-Layout --- */
.news-layout-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: flex-start;
}

/* --- Sidebar --- */
.news-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-block { margin-bottom: 2.5rem; }
.sidebar-block h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-search { position: relative; }
.sidebar-search .fa-search { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); color: var(--text-light); font-size: 0.9rem; pointer-events: none; }
#news-search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--background-light);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
#news-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
    background-color: var(--white);
}

.news-filters ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.filter-btn {
    width: 100%; display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; font-size: 0.95rem; font-weight: 500;
    border-radius: 8px; border: none; background-color: transparent;
    cursor: pointer; text-align: left; color: var(--text-dark);
    transition: all 0.2s ease-in-out;
}
.filter-btn:hover { background-color: var(--background-section-alt); color: var(--primary-color); }
.filter-btn.is-active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}
.filter-btn i { width: 20px; text-align: center; color: var(--text-light); transition: color 0.2s ease-in-out; }
.filter-btn.is-active i, .filter-btn:hover i { color: inherit; }


/* --- News Feed & Akkordeon --- */
.news-feed { display: flex; flex-direction: column; gap: 1rem; }
.news-post {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}
.news-post:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.news-post.is-featured { border-color: var(--primary-color); }

.post-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
}
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; grid-column: 1 / -1; }
.post-tag { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.post-date { font-size: 0.85rem; color: var(--text-light); }
.post-title { font-size: 1.5rem; margin: 0.5rem 0 0 0; grid-column: 1; color: var(--text-dark); }
.expand-chevron { grid-column: 2; align-self: center; background: none; border: none; color: var(--text-light); font-size: 1rem; cursor: pointer; transition: transform 0.3s ease; }
.news-post.is-expanded .expand-chevron { transform: rotate(180deg); }

/* Tag-Farben */
.tag-feature { background-color: #e0f2ff; color: #3c82f6; }
.tag-improvement { background-color: #f3e8ff; color: #8b5cf6; }
.tag-security { background-color: #dcfce7; color: #16a34a; }
.tag-community { background-color: #fff7e6; color: #f97316; }
.tag-general { background-color: #f3f4f6; color: #4b5563; }
.post-tag.tag-devlog {
  background-color: #eef2ff; 
  color: #4338ca; 
}

/* Aufklappbarer Body */
.post-body {
    display: grid;
    grid-template-rows: 0fr; 
    transition: grid-template-rows 0.4s ease-in-out;
}
.post-body > * { overflow: hidden; }
.news-post.is-expanded .post-body { grid-template-rows: 1fr; }
.post-content { padding: 0 1.5rem 1.5rem; }
.post-content p { line-height: 1.7; color: var(--text-dark); margin-bottom: 0; }

/* Call-to-Action Button Beitrag */
.cta-button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s ease;
}
.cta-button:hover {
    background-color: var(--primary-color-dark); 
    transform: translateY(-2px);
}

/* Footer Beitrag */
.post-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; background-color: var(--background-light);
    border-top: 1px solid var(--border-color);
}
.post-author { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.author-name { font-weight: 600; color: var(--text-dark); }
.post-actions { display: flex; gap: 0.5rem; }
.action-btn {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    background-color: transparent; color: var(--text-light); border: 1px solid transparent;
    border-radius: 50%; text-decoration: none; font-size: 0.9rem; transition: all 0.2s ease;
}
.action-btn:hover { background-color: var(--background-section-alt); color: var(--text-dark); }
.delete-btn:hover { background-color: #ffebee; color: #c62828; }

/* --- Leere Ansicht & FAB --- */
.empty-view { display: none; padding: 3rem 1.5rem; text-align: center; background-color: var(--background-light); border: 2px dashed var(--border-color); border-radius: 16px; width: 100%; }
.empty-view.is-visible { display: block; }
.empty-view i { font-size: 3rem; color: var(--text-light); margin-bottom: 1rem; }
.empty-view h3 { margin: 0 0 0.5rem 0; }
.empty-view p { margin: 0; color: var(--text-light); }
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px; 
    
    width: 60px;
    height: 60px;
    border-radius: 50%;
    
    background-color: var(--primary-color);
    color: var(--white);
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 24px;
    text-decoration: none;
    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    
    transition: all 0.2s ease-in-out;
}

.fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background-color: var(--primary-color-dark);
}

.tag-maintenance { background-color: #fff7e6; color: #f97316; }

.news-post.is-maintenance {
    border-left: 5px solid #f97316; 
}

.maintenance-info-box {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-normal);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.maintenance-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
}
.maintenance-detail i {
    color: var(--text-light);
    width: 20px;
    text-align: center;
}

.post-excerpt {
    color: #666;
    font-size: 0.95rem;
    margin-top: 10px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.news-post.is-expanded .post-excerpt {
    display: none;
}

.news-post .post-title {
    color: #00B074;
    transition: color 0.2s ease-in-out;
}

.news-post .post-header:hover .post-title {
    color: #008c5d; 
}

/* --- Responsive Anpassungen --- */
@media (max-width: 992px) {
    .news-layout-container { grid-template-columns: 1fr; }
    .news-sidebar { position: static; margin-bottom: 2rem; }
}