.community-post-card {
    --type-color: #dce6f3;
    background: #fff;
    border: 1.5px solid color-mix(in srgb, var(--type-color) 55%, #dce6f3);
    border-top: 3px solid var(--type-color);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(18, 57, 95, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.community-post-card:hover {
    border-color: var(--type-color);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--type-color) 22%, rgba(18, 57, 95, 0.12));
    transform: translateY(-3px);
}

.community-post-card__media-link {
    display: block;
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

.community-post-card__image,
.community-post-card__placeholder {
    aspect-ratio: 16 / 9;
    display: block;
    width: 100%;
}

.community-post-card__image {
    object-fit: cover;
    transition: transform 0.35s ease;
}

.community-post-card:hover .community-post-card__image {
    transform: scale(1.04);
}

.community-post-card__placeholder {
    align-items: center;
    background: linear-gradient(135deg, #e8f0f8, #d8e8f4);
    color: #5f7f9d;
    display: flex;
    font-size: 2rem;
    justify-content: center;
}

.community-post-card__media-overlay {
    background: linear-gradient(180deg, transparent 35%, rgba(15, 47, 85, 0.55) 100%);
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.community-post-card__badges {
    bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    left: 0.75rem;
    position: absolute;
    right: 0.75rem;
    z-index: 1;
}

.community-post-card__badge {
    backdrop-filter: blur(6px);
    background: color-mix(in srgb, var(--type-color) 14%, rgba(255, 255, 255, 0.92));
    border: 1px solid color-mix(in srgb, var(--type-color) 45%, #ffffff);
    border-radius: 999px;
    color: color-mix(in srgb, var(--type-color) 72%, #12395f);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
}

.community-post-card__badge--section {
    background: color-mix(in srgb, var(--type-color) 92%, #000000);
    border-color: transparent;
    color: #fff;
}

.community-post-card__badge--promotion {
    background: color-mix(in srgb, var(--type-color) 78%, #1f66b4);
    border-color: transparent;
    color: #fff;
}

.community-post-card__badge--trust-score,
.community-post-card__badge--report-status {
    background: color-mix(in srgb, var(--type-color) 18%, rgba(255, 255, 255, 0.94));
    border-color: color-mix(in srgb, var(--type-color) 55%, #ffffff);
    color: color-mix(in srgb, var(--type-color) 68%, #0f2f55);
}

.community-post-card--highlighted {
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.55), 0 14px 28px rgba(15, 47, 85, 0.12);
}

.community-post-card__video-badge {
    align-items: center;
    background: color-mix(in srgb, var(--type-color) 82%, rgba(15, 47, 85, 0.9));
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.85rem;
    height: 2rem;
    justify-content: center;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    width: 2rem;
    z-index: 1;
}

.community-post-card__audio-badge {
    background: color-mix(in srgb, var(--type-color) 85%, rgba(13, 110, 122, 0.9));
    bottom: 0.75rem;
    top: auto;
}

.community-post-card__tag {
    align-items: center;
    background: color-mix(in srgb, var(--type-color) 12%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--type-color) 48%, #dce6f3);
    border-radius: 999px;
    color: color-mix(in srgb, var(--type-color) 70%, #12395f);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 600;
    gap: 0.3rem;
    padding: 0.22rem 0.6rem;
}

.community-post-card__tag--solid {
    background: color-mix(in srgb, var(--type-color) 90%, #000000);
    border-color: transparent;
    color: #fff;
}

.community-post-card__tag--emphasis {
    background: color-mix(in srgb, var(--type-color) 22%, #ffffff);
    border-color: color-mix(in srgb, var(--type-color) 65%, #dce6f3);
    color: color-mix(in srgb, var(--type-color) 78%, #0f2f55);
    font-weight: 700;
}

.community-post-card__tag--rating {
    background: color-mix(in srgb, var(--type-color) 16%, #fff8e7);
    border-color: color-mix(in srgb, var(--type-color) 40%, #f3d9a4);
    color: color-mix(in srgb, var(--type-color) 45%, #92400e);
}

.poetry-card-badge {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
}

.poetry-card-badge--rating {
    background: rgba(255, 193, 7, 0.18);
    color: #92400e;
}

.community-post-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.05rem 1.05rem;
}

.community-post-card__title {
    background: color-mix(in srgb, var(--type-color) 8%, #ffffff);
    border: 1.5px solid color-mix(in srgb, var(--type-color) 55%, #dce6f3);
    border-left: 3px solid var(--type-color);
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    padding: 0.65rem 0.8rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.community-post-card:hover .community-post-card__title {
    background: color-mix(in srgb, var(--type-color) 12%, #ffffff);
    border-color: var(--type-color);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--type-color) 16%, transparent);
}

.community-post-card__title a {
    color: #12395f;
    display: block;
    text-decoration: none;
}

.community-post-card__title a:hover {
    color: color-mix(in srgb, var(--type-color) 55%, #12395f);
}

.community-post-card__excerpt {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #4f6780;
    display: -webkit-box;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    overflow: hidden;
}

.community-post-card__location {
    align-items: center;
    color: #6c849c;
    display: flex;
    font-size: 0.8rem;
    gap: 0.35rem;
    margin: 0;
}

.community-post-card__footer {
    align-items: center;
    border-top: 1px solid #edf2f8;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
}

.community-post-card__author {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    min-width: 0;
}

.community-post-card__avatar,
.community-author-avatar.community-post-card__avatar {
    align-items: center;
    background: linear-gradient(135deg, #1f66b4, #2e7d32);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    height: 2.2rem;
    justify-content: center;
    overflow: hidden;
    width: 2.2rem;
}

.community-author-avatar--image {
    background: #e2e8f0;
    object-fit: cover;
}

.community-post-card__author-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.community-post-card__author-name {
    color: #24527a;
    font-size: 0.84rem;
    font-weight: 700;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-post-card__author-meta time {
    color: #8aa0b5;
    font-size: 0.76rem;
}

.community-post-card__stats {
    align-items: center;
    color: #6c849c;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.45rem;
    justify-content: flex-end;
}

.community-post-card__save {
    background: transparent;
    border: 0;
    color: #475569;
    cursor: pointer;
    padding: 0;
}

.community-post-card__save.is-saved {
    color: #12824e;
}

.community-post-card__badge--score {
    font-weight: 700;
}

.community-score-badge--trending,
.community-post-card__badge--score.community-score-badge--trending {
    background: color-mix(in srgb, var(--type-color) 18%, #fff4e5) !important;
    border-color: color-mix(in srgb, var(--type-color) 35%, #f3d9a4) !important;
    color: color-mix(in srgb, var(--type-color) 35%, #b45309) !important;
}

.community-score-badge--editors-choice,
.community-post-card__badge--score.community-score-badge--editors-choice {
    background: color-mix(in srgb, var(--type-color) 18%, #eef2ff) !important;
    border-color: color-mix(in srgb, var(--type-color) 35%, #c7d2fe) !important;
    color: color-mix(in srgb, var(--type-color) 35%, #4338ca) !important;
}

.community-score-badge--most-read,
.community-post-card__badge--score.community-score-badge--most-read {
    background: color-mix(in srgb, var(--type-color) 18%, #ecfeff) !important;
    border-color: color-mix(in srgb, var(--type-color) 35%, #a5f3fc) !important;
    color: color-mix(in srgb, var(--type-color) 35%, #0e7490) !important;
}

.community-score-badge--featured,
.community-post-card__badge--score.community-score-badge--featured {
    background: color-mix(in srgb, var(--type-color) 18%, #ecfdf3) !important;
    border-color: color-mix(in srgb, var(--type-color) 35%, #a7f3d0) !important;
    color: color-mix(in srgb, var(--type-color) 35%, #047857) !important;
}

.community-score-badge--community-pick,
.community-post-card__badge--score.community-score-badge--community-pick {
    background: color-mix(in srgb, var(--type-color) 18%, #fdf2f8) !important;
    border-color: color-mix(in srgb, var(--type-color) 35%, #fbcfe8) !important;
    color: color-mix(in srgb, var(--type-color) 35%, #be185d) !important;
}

.community-empty-state {
    align-items: center;
    background: #fff;
    border: 1px dashed #c9d9ea;
    border-radius: 16px;
    display: flex;
    gap: 1rem;
    padding: 2rem 1.25rem;
    text-align: left;
}

.community-empty-state__icon {
    align-items: center;
    background: #eef6ff;
    border-radius: 14px;
    color: #1f66b4;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    height: 3.25rem;
    justify-content: center;
    width: 3.25rem;
}

.community-empty-state__title {
    color: #12395f;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.community-empty-state__text {
    color: #6c849c;
    font-size: 0.92rem;
    line-height: 1.6;
}

.community-pagination-wrap {
    margin-top: 1.5rem;
    text-align: center;
}

.community-pagination-summary {
    color: #6c849c;
    font-size: 0.88rem;
    margin: 0;
}

.community-pagination-loading {
    color: #2e7d32;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0.35rem 0 0;
}

.community-scroll-sentinel {
    height: 1px;
    width: 100%;
}

@media (min-width: 1200px) {
    .community-post-card__title {
        font-size: 0.95rem;
        padding: 0.55rem 0.7rem;
    }

    .community-post-card__excerpt {
        -webkit-line-clamp: 2;
        font-size: 0.82rem;
    }

    .community-post-card__body {
        padding: 0.85rem 0.9rem 0.95rem;
    }

    .community-post-card__avatar,
    .community-author-avatar.community-post-card__avatar {
        height: 2rem;
        width: 2rem;
    }
}

@media (max-width: 767.98px) {
    .community-empty-state {
        flex-direction: column;
        text-align: center;
    }
}
