/**
 * @file: template/css/group-posts.css
 * @description: Стили для блога коллективов: лента, карточки, детальная страница,
 *               блоки на странице коллектива (статистика, награды, фото, видео).
 * @created: 2026-09-06
 */

/* ===== ЛЕНТА БЛОГА ===== */
.gp-blog {
    padding: 20px;
}

/* ===== ВКЛАДКИ ФИЛЬТРАЦИИ ===== */
.gp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.gp-tab {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f1f3f5;
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.gp-tab:hover {
    background: #dee2e6;
    color: #212529;
}

.gp-tab--active {
    background: #1976d2;
    color: #fff;
}

.gp-tab--active:hover {
    background: #1565c0;
    color: #fff;
}

/* ===== СЕТКА КАРТОЧЕК ===== */
.gp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.gp-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #868e96;
    padding: 40px 0;
    font-size: 1.1rem;
}

/* ===== КАРТОЧКА ПОСТА ===== */
.gp-card {
    display: block;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.15s;
}

.gp-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.gp-card__thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f1f3f5;
}

.gp-card__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
    background: #f8f9fa;
}

.gp-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

.gp-card__body {
    padding: 12px 14px;
}

.gp-card__group {
    font-size: 0.82rem;
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 4px;
}

.gp-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gp-card__date {
    font-size: 0.82rem;
    color: #868e96;
}

.gp-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.gp-card__stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #868e96;
}

.gp-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.gp-card__stat--likes {
    color: #e91e63;
}

/* ===== ИКОНКИ ===== */
.gp-icon-eye,
.gp-icon-heart {
    flex-shrink: 0;
}

/* ===== ЛАЙК И ПРОСМОТРЫ НА ДЕТАЛЬНОЙ ===== */
.gp-post-view__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.gp-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    background: #fff;
    color: #868e96;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gp-like-btn:hover {
    border-color: #e91e63;
    color: #e91e63;
}

.gp-like-btn--active {
    border-color: #e91e63;
    color: #e91e63;
    background: #fce4ec;
}

.gp-like-btn--active .gp-icon-heart {
    animation: gp-heartbeat 0.3s ease-in-out;
}

@keyframes gp-heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.gp-views-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #868e96;
    font-size: 0.95rem;
}

/* ===== ПАГИНАЦИЯ ===== */
.gp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0 40px;
}

.gp-page-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    background: #1976d2;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.gp-page-btn:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}

.gp-page-info {
    color: #868e96;
    font-size: 0.9rem;
}

/* ===== ДЕТАЛЬНАЯ СТРАНИЦА ===== */
.gp-post-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.gp-post-view__header {
    margin-bottom: 24px;
}

.gp-post-view__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.gp-post-view__header h1 {
    margin: 8px 0;
    font-size: 1.8rem;
    line-height: 1.3;
}

.gp-post-view__meta {
    display: flex;
    gap: 16px;
    color: #868e96;
    font-size: 0.9rem;
}

.gp-post-view__text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 24px;
}

.gp-post-view__video {
    margin-bottom: 24px;
}

.gp-post-view__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.gp-gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.gp-gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.2s;
}

.gp-gallery-item:hover img {
    transform: scale(1.05);
}

.gp-post-view__back {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.gp-post-view__back a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.gp-post-view__back a:hover {
    text-decoration: underline;
}

/* ===== БЛОК «НАШ БЛОГ» НА СТРАНИЦЕ КОЛЛЕКТИВА ===== */
.gp-collective-blog {
    margin: 32px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.gp-collective-blog__title {
    font-size: 1.5rem;
    margin: 0 0 20px;
    color: #2c3e50;
}

.gp-collective-blog__all {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: #1976d2;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.gp-collective-blog__all:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}

/* ===== СТАТИСТИКА ===== */
.gp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.gp-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    min-width: 90px;
}

.gp-stats__num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1976d2;
    line-height: 1.2;
}

.gp-stats__label {
    font-size: 0.82rem;
    color: #868e96;
    margin-top: 2px;
}

/* ===== СЕКЦИИ ===== */
.gp-section {
    margin-bottom: 24px;
}

.gp-section__title {
    font-size: 1.2rem;
    margin: 0 0 12px;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

/* ===== НАГРАДЫ ===== */
.gp-awards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.gp-award {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.gp-award__icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.gp-award__body {
    flex: 1;
    min-width: 0;
}

.gp-award__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 2px;
}

.gp-award__date {
    font-size: 0.82rem;
    color: #868e96;
    margin-bottom: 4px;
}

.gp-award__text {
    font-size: 0.88rem;
    color: #495057;
    line-height: 1.4;
}

/* ===== МИНИ-ГАЛЕРЕЯ ===== */
.gp-mini-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.gp-mini-gallery__item {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    aspect-ratio: 1;
}

.gp-mini-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-mini-gallery__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== МИНИ-ВИДЕО ===== */
.gp-mini-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gp-mini-video {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9ecef;
    background: #fff;
    transition: box-shadow 0.2s;
}

.gp-mini-video:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.gp-mini-video__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.gp-mini-video__placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #f1f3f5;
    color: #adb5bd;
}

.gp-mini-video__title {
    display: block;
    padding: 8px 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== МИНИ-НОВОСТИ ===== */
.gp-mini-news {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gp-mini-news__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.gp-mini-news__item:last-child {
    border-bottom: none;
}

.gp-mini-news__item a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.gp-mini-news__item a:hover {
    text-decoration: underline;
}

.gp-mini-news__date {
    font-size: 0.82rem;
    color: #868e96;
    white-space: nowrap;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .gp-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .gp-collective-blog {
        padding: 16px;
    }

    .gp-stats {
        gap: 10px;
    }

    .gp-stats__item {
        padding: 10px 14px;
        min-width: 70px;
    }

    .gp-stats__num {
        font-size: 1.4rem;
    }

    .gp-awards {
        grid-template-columns: 1fr;
    }

    .gp-mini-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .gp-mini-videos {
        grid-template-columns: repeat(2, 1fr);
    }

    .gp-post-view__header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .gp-grid {
        grid-template-columns: 1fr;
    }

    .gp-mini-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gp-tabs {
        gap: 6px;
    }

    .gp-tab {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
}
