/* ============================================================
   static/css/community.css
   Сообщество: проекты, рейтинги, конкурсы.
   База — design-system.css, здесь только уникальные компоненты.
   ============================================================ */

.community-page {
    padding-bottom: 2rem;
}

.community-kicker {
    display: inline-block;
    color: #b45309;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ---------- КАРТОЧКИ ПРОЕКТОВ ---------- */
.community-page .project-card {
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.community-page .project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 193, 7, 0.65);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.community-page .project-image-container {
    height: 200px;
}

.community-page .project-card .card-img-top,
.community-page .project-card .project-image {
    height: 200px;
    object-fit: cover;
}

.community-page .project-card .project-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #212529 0%, #2b3035 100%);
    color: #ffc107;
}

.community-page .project-card .card-title {
    min-height: 2.5rem;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.community-page .project-card .card-title a:hover {
    color: #b45309 !important;
    text-decoration: none !important;
}

.community-page .project-description {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.45;
}

.community-page .project-meta {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f3f5;
}

.project-card__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.4rem;
    color: #6c757d;
    font-size: 0.7rem;
}

.project-card__stats i {
    color: #b45309;
}

.project-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    color: #a16207;
    font-weight: 800;
}

.project-rating small {
    color: #adb5bd;
    font-weight: 500;
}

.community-page .project-card .card-footer {
    padding: 0.55rem 0.75rem;
    border-top: 1px solid #f1f3f5;
}

/* ---------- КОНКУРСНЫЙ БАННЕР ---------- */
.community-contest-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1.1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #f5d77a;
    border-radius: 14px;
    background: linear-gradient(120deg, #fffbeb 0%, #fff 72%);
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.10);
}

.community-contest-banner__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #212529;
    color: #ffc107;
    font-size: 1.25rem;
}

.community-contest-banner__body {
    flex: 1 1 auto;
    min-width: 0;
}

.community-contest-banner__body h2 {
    margin: 0.1rem 0 0.15rem;
    font-size: 1rem;
    font-weight: 800;
}

.community-contest-banner__body p {
    margin: 0;
    color: #6c757d;
    font-size: 0.76rem;
}

.community-contest-banner .btn {
    flex: 0 0 auto;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ---------- РЕЙТИНГ НА СТРАНИЦЕ ПРОЕКТА ---------- */
.community-rating-contest {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.community-rating-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.community-rating-value {
    display: block;
    color: #212529;
    font-size: 1.1rem;
}

.community-rating-value i {
    color: #f59e0b;
}

.community-rating-value small {
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 500;
}

.community-stars {
    display: flex;
    gap: 0.08rem;
}

.community-star {
    padding: 0;
    border: 0;
    background: transparent;
    color: #dee2e6;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.community-star:hover,
.community-star.is-filled {
    color: #f59e0b;
    transform: translateY(-1px);
}

.community-contest-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #f5d77a;
    border-radius: 11px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.78rem;
}

.community-contest-strip > i {
    color: #d97706;
    font-size: 1rem;
}

.community-contest-strip > div {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    flex: 1 1 180px;
    min-width: 0;
}

.community-contest-strip strong {
    color: #78350f;
    font-size: 0.8rem;
}

.community-contest-strip span {
    color: #92400e;
    font-size: 0.7rem;
}

.community-contest-strip form {
    margin: 0;
}

.community-contest-strip .small {
    margin-left: auto;
    color: #92400e !important;
    text-decoration: none;
}

/* ---------- СТРАНИЦЫ КОНКУРСОВ ---------- */
.community-contest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.community-contest-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem;
    border: 1px solid #e9ecef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.community-contest-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.community-contest-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.78rem;
    line-height: 1.45;
}

.community-contest-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    color: #6c757d;
    font-size: 0.7rem;
}

.community-contest-card__meta i {
    color: #b45309;
}

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

.community-contest-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
    font-size: 0.65rem;
    font-weight: 800;
}

.community-contest-status.is-running {
    background: #dcfce7;
    color: #166534;
}

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

.community-entry {
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 11px;
    background: #fff;
}

.community-entry__image {
    display: block;
    height: 150px;
    background: #f1f3f5;
}

.community-entry__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-entry__body {
    padding: 0.55rem 0.65rem;
}

.community-entry__body h3 {
    margin: 0 0 0.2rem;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.3;
}

.community-entry__body a {
    color: #212529;
    text-decoration: none;
}

.community-entry__body a:hover {
    color: #b45309;
}

.community-entry__body small {
    display: block;
    color: #6c757d;
    font-size: 0.68rem;
}

.community-winner {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid #f5d77a;
    border-radius: 12px;
    background: #fffbeb;
}

.community-winner > i {
    color: #d97706;
    font-size: 1.6rem;
}

.community-winner strong {
    display: block;
    color: #78350f;
    font-size: 0.9rem;
}

.community-winner span {
    color: #92400e;
    font-size: 0.75rem;
}

@media (max-width: 991.98px) {
    .community-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .community-contest-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .community-contest-banner .btn {
        width: 100%;
    }

    .community-rating-panel {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .community-contest-strip .small {
        margin-left: 0;
    }
}

/* Общие карточки и секции страниц сообщества — в стиле портала */
.community-page .card {
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.community-page .card-footer {
    border-top-color: #f1f3f5;
}

.community-page .project-story {
    color: #343a40;
    font-size: 0.92rem;
    line-height: 1.7;
}

.community-page .project-tags .badge {
    border-radius: 999px;
}

.community-page .photo-thumbnail img {
    border-radius: 10px;
}
