/* -------------------------
   КРУГЛЫЕ ПРЕВЬЮ В КАТЕГОРИЯХ
   Работает только для override,
   где используются классы:
   - article-preview-table
   - article-preview-cell
   - article-preview-link
   - article-preview-thumb-wrap
   - article-preview-thumb
   ------------------------- */

/* Сброс возможных конфликтов от старых общих правил */
.article-preview-table img,
.article-preview-cell img,
.article-preview-link img,
.article-preview-thumb-wrap img,
img.article-preview-thumb {
    max-width: none !important;
    width: auto;
    height: auto;
    border-radius: 0;
}

/* Ячейка таблицы */
.article-preview-table .article-preview-cell {
    vertical-align: middle;
    padding: 12px 16px;
}

/* Ссылка-строка */
.article-preview-table .article-preview-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

/* Контейнер мини-превью */
.article-preview-table .article-preview-thumb-wrap {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    flex: 0 0 64px !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    display: block !important;
}

/* Сама картинка */
.article-preview-table img.article-preview-thumb {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
    display: block !important;
}

/* Заголовок */
.article-preview-table .article-preview-title {
    line-height: 1.4;
}

/* Мобильная версия превью */
@media (max-width: 768px) {
    .article-preview-table .article-preview-thumb-wrap {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        flex: 0 0 52px !important;
    }

    .article-preview-table img.article-preview-thumb {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
    }

    .article-preview-table .article-preview-link {
        gap: 10px;
    }
}

/* -------------------------
   ПАГИНАЦИЯ КАТЕГОРИЙ
   Без уезда вправо и без
   горизонтальной прокрутки
   ------------------------- */

.com-content-category__navigation {
    display: block;
    width: 100%;
    overflow: hidden;
}

.com-content-category__counter {
    float: none !important;
    display: block;
    text-align: center;
    padding-right: 0 !important;
    margin: 0 0 10px 0;
}

.com-content-category__pagination,
.pagination__wrapper {
    width: 100%;
    overflow: hidden;
}

.com-content-category__pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0 auto;
    padding: 0;
    min-width: 0 !important;
    width: 100%;
}

.com-content-category__pagination .page-item {
    margin: 2px 0;
}

.com-content-category__pagination .page-link {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .com-content-category__navigation {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    .com-content-category__counter {
        float: none !important;
        text-align: center;
        margin-bottom: 10px;
    }

    .com-content-category__pagination,
    .pagination__wrapper {
        width: 100%;
        overflow: hidden;
    }

    .com-content-category__pagination .pagination {
        width: 100%;
        min-width: 0 !important;
        justify-content: center;
        flex-wrap: wrap;
    }

    .float-end {
        float: none !important;
    }
}




/* Другие материалы раздела */
.article-related-same-category {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dfe3e7;
}

.article-related-title {
    margin: 0 0 18px;
    font-size: 1.35rem;
    line-height: 1.3;
}

.article-related-list {
    display: grid;
    gap: 12px;
}

.article-related-item {
    margin: 0;
}

.article-related-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition: 0.2s ease;
}

.article-related-link:hover {
    background: #faf7f5;
    border-color: #e7c8bd;
}

.article-related-thumb-wrap {
    width: 56px;
    height: 56px;
    min-width: 56px;
    max-width: 56px;
    flex: 0 0 56px;
    overflow: hidden;
    border-radius: 50%;
    display: block;
}

.article-related-thumb {
    width: 56px;
    height: 56px;
    min-width: 56px;
    max-width: 56px;
    min-height: 56px;
    max-height: 56px;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    display: block;
}

.article-related-text {
    line-height: 1.45;
}

@media (max-width: 768px) {
    .article-related-thumb-wrap,
    .article-related-thumb {
        width: 48px;
        height: 48px;
        min-width: 48px;
        max-width: 48px;
        min-height: 48px;
        max-height: 48px;
        flex-basis: 48px;
    }

    .article-related-link {
        gap: 10px;
        padding: 10px;
    }
}