/* ========================================
   Category Posts Display - Grid No Borders
   Сетка БЕЗ рамок
   16px, чёрный цвет
   ======================================== */

.cpd-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Элемент поста */
.cpd-post-item {
    background: #fff;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: none;
}

.cpd-post-item:hover {
    box-shadow: none;
    transform: none;
}

/* Изображение поста */
.cpd-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.cpd-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cpd-post-image a:hover img {
    transform: scale(1.05);
}

.cpd-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Содержимое поста */
.cpd-post-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Заголовок поста - 16px ЧЁРНЫЙ */
.cpd-post-title {
    margin: 0;
    padding: 15px 0 0 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.cpd-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cpd-post-title a:hover {
    color: #0073aa;
}

/* Метаинформация (дата и время) */
.cpd-post-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #999;
    margin: 8px 0 0 0;
    padding: 0;
    border-bottom: none;
}

.cpd-post-date::before {
    content: '';
}

.cpd-post-time::before {
    content: '';
}

/* Текст поста (примерно 5 строк) */
.cpd-post-excerpt {
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    text-align: left;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Сообщение об отсутствии постов */
.cpd-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .cpd-posts-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px 0;
    }

    .cpd-post-content {
        padding: 0;
    }

    .cpd-post-title {
        font-size: 15px;
    }

    .cpd-post-excerpt {
        font-size: 12px;
    }
}

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

    .cpd-post-image {
        height: 160px;
    }

    .cpd-post-title {
        font-size: 14px;
    }

    .cpd-post-excerpt {
        font-size: 11px;
    }
}