/* Community Hub */
body:has(.community-board) {
    background: #f8fafc !important;
}

.community-board {
    padding: 0.5rem 0 3rem;
}

.community-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.35rem, 4vw, 2.4rem);
    margin: 0.75rem 0 1.25rem;
    border: 1px solid var(--propease-border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.community-kicker {
    margin: 0 0 0.55rem;
    color: var(--propease-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.community-hero h1 {
    margin: 0;
    color: var(--propease-text);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 850;
    line-height: 1.04;
    letter-spacing: 0;
}

.community-subtitle {
    max-width: 43rem;
    margin: 0.75rem 0 0;
    color: var(--propease-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.community-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
    gap: 0.75rem;
    flex: 0 0 auto;
}

.community-summary div {
    min-width: 0;
    padding: 0.95rem 1rem;
    border: 1px solid var(--propease-soft-border);
    border-radius: 18px;
    background: #f8fafc;
}

.community-summary strong,
.community-summary span {
    display: block;
}

.community-summary strong {
    color: var(--propease-text);
    font-size: 1.35rem;
    line-height: 1;
}

.community-summary span {
    margin-top: 0.35rem;
    color: var(--propease-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.community-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--propease-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.community-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.09);
}

.community-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8fafc;
    border-bottom: 1px solid var(--propease-soft-border);
}

.community-card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.community-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(37, 99, 235, 0.46);
    font-size: 2rem;
}

.community-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
}

.community-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.community-date {
    min-width: 4rem;
    min-height: 4rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--propease-soft-border);
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
    line-height: 1;
}

.community-date span {
    color: var(--propease-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.community-date strong {
    margin-top: 0.25rem;
    color: var(--propease-text);
    font-size: 1.32rem;
    font-weight: 850;
}

.community-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.community-badge {
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.community-card h2 {
    display: -webkit-box;
    min-height: 3.1rem;
    margin: 0 0 0.55rem;
    overflow: hidden;
    color: var(--propease-text);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.community-description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--propease-muted);
    font-size: 0.93rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.community-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--propease-muted);
    font-size: 0.82rem;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--propease-primary);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.community-link:hover,
.community-link:focus-visible {
    color: var(--propease-primary-hover);
    text-decoration: none;
}

.community-empty {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: clamp(2.5rem, 7vw, 4.5rem) 1.25rem;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    background: #ffffff;
    text-align: center;
}

.community-empty-icon {
    width: 4.25rem;
    height: 4.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--propease-primary);
    font-size: 1.8rem;
}

.community-empty h2 {
    margin: 0.35rem 0 0;
    color: var(--propease-text);
    font-size: 1.35rem;
    font-weight: 800;
}

.community-empty p {
    max-width: 30rem;
    margin: 0;
    color: var(--propease-muted);
    line-height: 1.6;
}

[data-bs-theme="dark"] .community-hero,
[data-bs-theme="dark"] .community-card,
[data-bs-theme="dark"] .community-empty {
    background: #111827;
    border-color: #334155;
}

[data-bs-theme="dark"] body:has(.community-board) {
    background: #0f172a !important;
}

[data-bs-theme="dark"] .community-summary div,
[data-bs-theme="dark"] .community-card-media,
[data-bs-theme="dark"] .community-date {
    background: #0f172a;
    border-color: #334155;
}

@media (max-width: 991.98px) {
    .community-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .community-summary {
        width: 100%;
    }

    .community-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .community-board {
        padding-top: 0;
    }

    .community-hero {
        margin-top: 0.25rem;
        padding: 1.2rem;
        border-radius: 20px;
    }

    .community-hero h1 {
        font-size: 2rem;
    }

    .community-summary,
    .community-grid {
        grid-template-columns: 1fr;
    }

    .community-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
