/* ============================================================
   GTI7 Community Portal – News CSS
   ============================================================ */

/* Kategorie-Filter */
.news-filter {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem;
}
.news-filter__btn {
    display: inline-flex; align-items: center; padding: .35rem .875rem;
    border-radius: 20px; border: 1px solid var(--c-border2);
    font-size: 13px; font-weight: 500; color: var(--c-text2);
    transition: all var(--transition); background: none; cursor: pointer;
    text-decoration: none;
}
.news-filter__btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.news-filter__btn--active {
    background: rgba(74,158,255,.1); border-color: var(--c-accent); color: var(--c-accent);
}

/* Kategorie-Badge */
.news-cat-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; padding: 3px 10px;
    border-radius: 20px; margin-bottom: .75rem;
}
.news-cat-badge--sm { font-size: 11px; padding: 2px 8px; margin-bottom: .5rem; }

/* Featured Post */
.news-featured {
    display: flex; gap: 1.5rem; background: var(--c-surface);
    border: 1px solid var(--c-border); border-radius: var(--radius-lg);
    overflow: hidden; margin-bottom: 1.5rem; transition: border-color var(--transition);
    color: var(--c-text);
}
.news-featured:hover { border-color: var(--c-border2); }
.news-featured__img {
    width: 420px; flex-shrink: 0; overflow: hidden;
    background: var(--c-bg2); display: flex; align-items: center; justify-content: center;
}
.news-featured__img img { width: 100%; height: 100%; object-fit: cover; }
.news-featured__img--placeholder { min-height: 240px; }
.news-featured__body { padding: 1.75rem 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.news-featured__title {
    font-family: var(--font-head); font-size: 24px; font-weight: 700;
    line-height: 1.25; margin-bottom: .75rem; color: var(--c-text);
}
.news-featured__excerpt { font-size: 15px; color: var(--c-text2); line-height: 1.6; margin-bottom: 1rem; }

/* News-Grid */
.news-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
}
.news-card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
    color: var(--c-text); display: flex; flex-direction: column;
}
.news-card:hover { border-color: var(--c-border2); transform: translateY(-2px); }
.news-card__img {
    height: 160px; overflow: hidden; background: var(--c-bg2);
    display: flex; align-items: center; justify-content: center;
}
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__img--placeholder { }
.news-card__body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.news-card__title {
    font-family: var(--font-head); font-size: 16px; font-weight: 600;
    line-height: 1.3; margin-bottom: .4rem; color: var(--c-text);
}
.news-card__excerpt { font-size: 13px; color: var(--c-text2); line-height: 1.5; flex: 1; margin-bottom: .75rem; }

/* Meta */
.news-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--c-text2); flex-wrap: wrap;
}
.news-meta--sm { font-size: 12px; margin-top: auto; }
.news-meta__avatar {
    width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent2));
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff;
}
.news-meta__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Detail-Layout */
.news-detail-layout {
    display: grid; grid-template-columns: 1fr 280px;
    gap: 1.5rem; align-items: start; margin-bottom: 2rem;
}
.news-article {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.news-article__hero { width: 100%; max-height: 400px; overflow: hidden; }
.news-article__hero img { width: 100%; object-fit: cover; display: block; }
.news-article__header { padding: 1.5rem 1.5rem .5rem; }
.news-article__title {
    font-family: var(--font-head); font-size: 28px; font-weight: 700;
    line-height: 1.2; color: var(--c-text); margin-bottom: .5rem;
}
.news-article__content {
    padding: 1.25rem 1.5rem 1.5rem; line-height: 1.8; font-size: 15px;
    color: var(--c-text);
}
.news-article__content h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin: 1.5rem 0 .5rem; }
.news-article__content h3 { font-family: var(--font-head); font-size: 17px; font-weight: 600; margin: 1.25rem 0 .4rem; }
.news-article__content p  { margin-bottom: 1rem; }
.news-article__content ul, .news-article__content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.news-article__content li { margin-bottom: .3rem; }
.news-article__content blockquote {
    border-left: 3px solid var(--c-accent); padding: .5rem 1rem;
    margin: 1rem 0; background: rgba(74,158,255,.06); border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--c-text2);
}
.news-article__content code {
    background: var(--c-bg2); border: 1px solid var(--c-border);
    border-radius: 4px; padding: 1px 6px; font-size: 13px; font-family: monospace;
}
.news-article__content img { max-width: 100%; border-radius: var(--radius); margin: .75rem 0; }

/* Sidebar */
.news-sidebar__card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); padding: 1.1rem;
}
.news-sidebar__title {
    font-family: var(--font-head); font-size: 16px; font-weight: 600;
    margin-bottom: .875rem; color: var(--c-text);
}
.news-related-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: .6rem 0; border-bottom: 1px solid var(--c-border);
    color: var(--c-text); transition: color var(--transition);
}
.news-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-related-item:hover { color: var(--c-accent); }
.news-related-item img, .news-related-item__placeholder {
    width: 56px; height: 42px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
    background: var(--c-bg2); display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--c-text3);
}
.news-related-item__title { font-size: 13px; font-weight: 500; line-height: 1.3; }
.news-related-item__date  { font-size: 11px; color: var(--c-text3); margin-top: 2px; }

/* Kommentare */
.news-comments { margin-top: 2rem; }
.news-comment {
    display: flex; gap: 12px; padding: .875rem;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
}
.news-comment__avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent2));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-size: 16px; font-weight: 700; color: #fff;
}
.news-comment__avatar img { width: 100%; height: 100%; object-fit: cover; }
.news-comment__body  { flex: 1; min-width: 0; }
.news-comment__header{ display: flex; align-items: center; gap: 8px; margin-bottom: .4rem; flex-wrap: wrap; }
.news-comment__name  { font-size: 14px; font-weight: 600; color: var(--c-text); }
.news-comment__rank  { font-size: 11px; font-weight: 600; }
.news-comment__time  { font-size: 12px; color: var(--c-text3); }
.news-comment__text  { font-size: 14px; line-height: 1.6; color: var(--c-text); }

/* Responsive */
@media (max-width: 900px) {
    .news-featured { flex-direction: column; }
    .news-featured__img { width: 100%; height: 200px; }
    .news-detail-layout { grid-template-columns: 1fr; }
    .news-sidebar { order: -1; }
}
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
}
