/* Forum reusable landing/topic components. */

.forum-topic-poster {
    position: relative;
    border-radius: 1rem;
    min-height: 380px;
    aspect-ratio: 2/3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.forum-topic-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.forum-topic-poster:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.forum-topic-poster-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.forum-topic-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
}

.forum-topic-poster-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-topic-poster-1 { background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #2b6cb0 100%); }
.forum-topic-poster-2 { background: linear-gradient(135deg, #22543d 0%, #276749 50%, #2f855a 100%); }
.forum-topic-poster-3 { background: linear-gradient(135deg, #744210 0%, #975a16 50%, #b7791f 100%); }
.forum-topic-poster-4 { background: linear-gradient(135deg, #702459 0%, #97266d 50%, #b83280 100%); }
.forum-topic-poster-5 { background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #4a5568 100%); }
.forum-topic-poster-6 { background: linear-gradient(135deg, #2a4365 0%, #3182ce 50%, #4299e1 100%); }

.forum-filter-tabs {
    margin-top: 0;
}

.topic-hero-centered {
    background: linear-gradient(to bottom, var(--bs-primary) 0%, #1a365d 100%);
}

.topic-hero-actions {
    max-width: 600px;
    margin: 0 auto;
}

.thread-list {
    border-top: 1px solid rgba(var(--bs-body-color-rgb), 0.04);
}

.thread-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.04);
    transition: background 0.15s ease;
}

.thread-row:hover {
    background: rgba(var(--bs-body-color-rgb), 0.02);
}

.thread-row-body {
    flex: 1;
    min-width: 0;
}

.thread-row-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.thread-row-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    white-space: nowrap;
}

.thread-row-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin: 0;
}

.thread-row-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    flex-wrap: wrap;
}

.thread-row-meta .dot {
    opacity: 0.4;
}

.thread-row-chevron {
    flex-shrink: 0;
    color: rgba(var(--bs-body-color-rgb), 0.15);
    font-size: 0.625rem;
}

@media (max-width: 575.98px) {
    .forum-topic-poster {
        min-height: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forum-topic-poster,
    .thread-row {
        transition: none;
    }

    .forum-topic-poster:hover {
        transform: none;
    }
}
