/* Community forum styles */

/* Stats strip */
.community-stats { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.community-stats-inner {
    display: flex; flex-wrap: wrap; gap: 22px; padding: 16px 20px; align-items: center;
    justify-content: space-between;
}
.cstat { font-size: .82rem; color: var(--color-muted); display: flex; flex-direction: column; }
.cstat-num { font-size: 1.15rem; font-weight: 800; color: var(--color-text); }

/* 3-column layout */
.community-layout {
    display: grid; grid-template-columns: 240px 1fr 300px; gap: 24px; padding-top: 24px; padding-bottom: 40px;
    align-items: start;
}
@media (max-width: 1024px) {
    .community-layout { grid-template-columns: 220px 1fr; }
    .community-widgets { display: none; }
}
@media (max-width: 760px) {
    .community-layout { grid-template-columns: 1fr; }
    .community-sidebar { order: 2; }
}

/* Sidebar categories */
.community-sidebar { position: sticky; top: 140px; }
.cat-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--color-text); font-weight: 500; margin-bottom: 2px;
}
.cat-item:hover { background: #eef4f2; text-decoration: none; }
.cat-item.active { background: var(--color-primary); color: #fff; }
.cat-item.active .cat-count { background: rgba(255,255,255,.25); color: #fff; }
.cat-icon { width: 20px; text-align: center; }
.cat-name { flex: 1; }
.cat-count { font-size: .78rem; background: #e5eeeb; color: var(--color-muted); padding: 1px 8px; border-radius: 999px; }

/* Feed toolbar */
.feed-toolbar { display: flex; gap: 12px; margin-bottom: 16px; }
.feed-search { flex: 1; }
.feed-search input, .feed-sort select {
    width: 100%; padding: .6em .9em; border: 1px solid var(--color-border);
    border-radius: 999px; font: inherit; background: #fff;
}
.feed-sort select { border-radius: var(--radius-sm); }
.feed-context { margin: 0 0 14px; }

/* Post list */
.post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.post-row {
    display: flex; gap: 14px; padding: 16px; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: var(--radius); align-items: flex-start;
}
.post-row + .post-row { margin-top: 8px; }
.post-main { flex: 1; min-width: 0; }
.post-byline { font-size: .85rem; color: var(--color-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.post-byline strong { color: var(--color-text); }
.post-cat-tag { font-size: .72rem; background: #eef4f2; color: var(--color-primary); padding: 1px 8px; border-radius: 999px; margin-left: auto; }
.post-title { display: block; font-weight: 700; font-size: 1.05rem; color: var(--color-text); margin: 4px 0 2px; }
.post-title:hover { color: var(--color-primary); text-decoration: none; }
.post-excerpt { margin: 0 0 8px; color: var(--color-muted); font-size: .9rem; }
.post-meta { display: flex; gap: 16px; font-size: .85rem; color: var(--color-muted); align-items: center; }
.post-meta a { color: var(--color-muted); }
.post-reply { margin-left: auto; font-weight: 600; color: var(--color-primary) !important; }
.post-thumb { width: 92px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); flex: 0 0 auto; }

/* Avatars */
.avatar {
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: .8rem; flex: 0 0 auto; overflow: hidden;
}
.avatar-more { background: #cbd5d1 !important; color: var(--color-text); }
.avatar-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Right widgets */
.community-widgets { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 16px; }
.widget { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; }
.widget h3 { font-size: 1rem; margin: 0 0 10px; }
.widget-head { display: flex; align-items: center; justify-content: space-between; }
.widget-head h3 { margin: 0; }
.online-badge { background: #dcfce7; color: #166534; font-weight: 700; font-size: .8rem; padding: 2px 10px; border-radius: 999px; }
.widget-spotlight { position: relative; overflow: hidden; color: #fff; border: 0; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; }
.widget-spotlight:before { content: ""; position: absolute; inset: 0; background: url('/assets/images/hero.jpg') center/cover no-repeat; }
.widget-spotlight:after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(7,63,53,.82), rgba(11,139,79,.35)); }
.widget-spotlight > * { position: relative; z-index: 1; }
.widget-spotlight h3 { color: #fff; }
.spotlight-script { margin: 0; align-self: flex-end; text-align: right; font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive; font-size: 22px; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.trending-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.trending-list li:last-child { border-bottom: 0; }
.trend-rank { width: 24px; height: 24px; background: #eef4f2; color: var(--color-primary); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex: 0 0 auto; }
.trending-list a { flex: 1; font-size: .88rem; color: var(--color-text); display: flex; flex-direction: column; line-height: 1.25; }
.trending-list a small { color: var(--color-muted); font-size: .74rem; font-weight: 400; }
.trend-chev { color: var(--color-muted); font-size: 1.1rem; }
.widget-impact .btn { margin-top: 8px; }

/* Thread (single post) */
.thread-post { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; }
.thread-head { display: flex; align-items: center; gap: 12px; }
.thread-head .thread-delete { margin-left: auto; }
.thread-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-sm); margin: 12px 0; }
.thread-body p { margin: 0 0 12px; }
.thread-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; }

/* Replies */
.reply-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.reply { display: flex; gap: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 14px; }
.reply-main { flex: 1; min-width: 0; }
.reply-byline { font-size: .85rem; }
.reply-body p { margin: 6px 0; }
.reply-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

/* Like button */
.likebtn, .likebtn-form { display: inline-flex; }
.likebtn {
    border: 1px solid var(--color-border); background: #fff; color: var(--color-muted);
    border-radius: 999px; padding: .35em .8em; font: inherit; font-size: .85rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
}
.likebtn:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }
.likebtn.liked { background: #fce7f0; border-color: var(--color-accent); color: var(--color-accent); }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
