/* ====================================================
   QARAMEDIA — CATEGORY (список рубрики)
   site/category.css
   ==================================================== */

.cat-page { padding-top: 16px; margin-bottom: 56px; }

/* Заголовок рубрики */
.cat-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--ink);
}
.cat-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 34px;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
    padding-left: 16px;
    position: relative;
}
.cat-title::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 5px; border-radius: 3px;
    background: var(--red);
}
.cat-count {
    font-family: var(--font-head);
    font-size: 14px;
    color: var(--muted);
}

/* Быстрые ссылки на рубрики (страница /posts) */
.cat-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}
.cat-quicklink {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 9px 20px;
    transition: border-color .15s ease, color .15s ease;
}
.cat-quicklink:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Сетка карточек 3×N */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 26px;
}
.cat-card { display: flex; flex-direction: column; }
.cat-card-media {
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--warm-2);
    margin-bottom: 13px;
}
.cat-card-media img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .5s ease;
}
.cat-card:hover .cat-card-media img { transform: scale(1.05); }
.cat-card-body { display: flex; flex-direction: column; flex: 1; }
.badge {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
    margin-bottom: 7px;
}
.cat-card-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.32;
    color: var(--ink);
    margin: 0 0 12px;
    transition: color .15s ease;
}
.cat-card:hover .cat-card-title { color: var(--red); }
.cat-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.cat-card-date {
    font-family: var(--font-head);
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.cat-card-tags { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cat-card-tag {
    font-family: var(--font-head);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--red);
}

/* Пагинация (стиль админки) */
.cat-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 44px;
}
.cat-pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 500;
    transition: all .15s ease;
}
.cat-pg-btn:hover { border-color: var(--red); color: var(--red); }
.cat-pg-btn.is-disabled {
    opacity: .35;
    pointer-events: none;
}
.cat-pg-select {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease;
}
.cat-pg-select:hover { border-color: var(--red); }
.cat-pg-select:focus { outline: none; border-color: var(--red); }

/* Пусто */
.cat-empty {
    padding: 60px 0;
    text-align: center;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 16px;
}

/* Адаптив */
@media (max-width: 980px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 22px; }
    .cat-title { font-size: 28px; }
}
@media (max-width: 560px) {
    .cat-grid { grid-template-columns: 1fr; }
    .cat-title { font-size: 24px; }
    .cat-head { flex-direction: column; gap: 6px; }
    .cat-card-media { aspect-ratio: 16/9; }
    .cat-quicklinks { gap: 8px; margin-bottom: 24px; }
    .cat-quicklink { font-size: 13px; padding: 8px 16px; }
}
/* category.css */