/* Универсальная страница рубрики */

.category-section {
    padding: 45px 0 60px;
}

.category-header {
    max-width: 850px;
    margin: 0 auto 30px;
    text-align: center;
}

.category-title {
    margin: 0 0 15px;
    color: #542744;
    font-size: 32px;
    line-height: 1.3;
}

.category-description {
    color: #766b73;
    font-size: 16px;
    line-height: 1.7;
}

.category-description p {
    margin: 0 0 10px;
}

/* Метки фильтрации рубрики */

.category-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 30px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 15px;
    border: 1px solid transparent;
    border-radius: 30px;
    color: #51434d;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(50, 30, 45, .1);
}

.category-tag.is-active {
    border-color: #76536c;
    box-shadow: 0 0 0 2px rgba(118, 83, 108, .15);
    font-weight: 700;
}

.category-tag--pink {
    background: #f9e2e8;
}

.category-tag--lavender {
    background: #eee5f7;
}

.category-tag--peach {
    background: #fbe9d9;
}

.category-tag--mint {
    background: #e1f1e8;
}

.category-tag--blue {
    background: #e2edf8;
}

.category-tag--yellow {
    background: #f8f0d7;
}

/* Панель сортировки */

.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.category-filter-info {
    color: #766b73;
    font-size: 14px;
}

.category-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    font-size: 14px;
    color: #65545f;
}

.category-sort select {
    min-height: 38px;
    padding: 6px 30px 6px 12px;
    border: 1px solid #e5dbe1;
    border-radius: 6px;
    background: #fff;
    color: #542744;
    font: inherit;
    cursor: pointer;
}

/* Список публикаций */

.category-posts {
    border-top: 1px solid #eee5e9;
}

.category-post {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee5e9;
}

.category-post-details {
    padding: 0;
}

/* Заголовок публикации */

.category-post-title {
    position: relative;
    display: block;
    padding: 29px 35px 9px 5px;
    color: #542744;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
}

.category-post-title::-webkit-details-marker {
    display: none;
}

.category-post-title::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: #bd8d4b;
    font-size: 24px;
    font-weight: 400;
}

.category-post-details[open] .category-post-title::after {
    content: "−";
}

.category-post-title:hover {
    color: #bd8d4b;
}

.category-post-title__text {
    display: block;
}

.category-post-comments {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 7px;
	padding: 2px 7px;
	border-radius: 12px;
	background: #d9534f;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.4;
	white-space: nowrap;
	box-shadow: 0 2px 5px rgba(190, 45, 45, .2);
	vertical-align: middle;
}
/* Пользовательские плашки над заголовком */

.category-post-title__tags {
    position: absolute;
    top: 5px;
    right: 35px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.category-post-title__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(70, 45, 58, .08);
}

/* Личный опыт */

.category-post-title__tag--pink {
    background: #d982a5;
    border-color: #c66d91;
    color: #fff;
}

/* Вопрос участникам */

.category-post-title__tag--lavender {
    background: #8873b7;
    border-color: #7560a5;
    color: #fff;
}

/* Содержимое публикации */

.category-post-content {
    padding: 0 35px 20px 5px;
}

.category-post-excerpt {
    color: #766b73;
    font-size: 14px;
    line-height: 1.7;
}

.category-post-excerpt p {
    margin: 0 0 10px;
}

.category-post-link {
    display: inline-block;
    margin-top: 8px;
    color: #76536c;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.category-post-link:hover {
    color: #bd8d4b;
}

/* Пагинация */

.category-pagination {
    margin-top: 35px;
}

.category-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-pagination li {
    margin: 0;
}

.category-pagination a,
.category-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid #e5dbe1;
    border-radius: 6px;
    color: #542744;
    font-size: 14px;
    text-decoration: none;
}

.category-pagination .current {
    border-color: #76536c;
    background: #76536c;
    color: #fff;
}

.category-pagination a:hover {
    border-color: #bd8d4b;
}

.category-empty {
    padding: 35px 15px;
    color: #766b73;
    text-align: center;
}

/* Телефоны */

@media (max-width: 600px) {

    .category-section {
        padding: 30px 0 40px;
    }

    .category-title {
        font-size: 25px;
    }

    .category-description {
        font-size: 14px;
    }

    .category-tags {
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 22px;
    }

    .category-tag {
        min-height: 32px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .category-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .category-sort {
        margin-left: 0;
    }

    .category-post-title {
        padding: 25px 30px 7px 3px;
        font-size: 15px;
    }

    .category-post-title__tags {
        top: 3px;
        right: 30px;
        gap: 4px;
    }

    .category-post-title__tag {
        padding: 3px 8px;
        font-size: 9px;
    }

    .category-post-content {
        padding: 0 5px 17px;
    }

    .category-post-excerpt {
        font-size: 13px;
    }
}