:root {
    --yuna-category-bg: #ffffff;
    --yuna-category-text: #18233a;
    --yuna-category-muted: #8b95a7;
    --yuna-category-primary: #2f80ed;
    --yuna-category-accent: #43b4f1;
    --yuna-category-soft: #eef9fd;
    --yuna-category-border: #edf2f7;
    --yuna-category-shadow: 0 22px 55px rgba(35, 80, 130, 0.08);
}

.yuna-category-archive,
body.category .yuna-category-archive {
    background: var(--yuna-category-bg);
    color: var(--yuna-category-text);
    font-family: inherit;
}

.yuna-category-archive *,
.yuna-category-archive *::before,
.yuna-category-archive *::after {
    box-sizing: border-box;
}

.yuna-category-container {
    width: min(1190px, calc(100% - 36px));
    margin-right: auto;
    margin-left: auto;
}

/* Страховка: если на сайте остался старый CTA из первого шаблона, скрываем его. */
.yuna-category-archive .yuna-category-cta {
    display: none !important;
}

.yuna-category-hero {
    padding: 42px 0 22px;
    background: #ffffff;
}

.yuna-category-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 18px;
    color: var(--yuna-category-muted);
    font-size: 14px;
    line-height: 1.5;
}

.yuna-category-breadcrumbs a {
    color: var(--yuna-category-primary);
    text-decoration: none;
}

.yuna-category-breadcrumbs a:hover {
    text-decoration: underline;
}

.yuna-category-hero__content {
    max-width: 820px;
}

.yuna-category-eyebrow {
    margin: 0 0 10px;
    color: var(--yuna-category-accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.yuna-category-hero h1 {
    margin: 0;
    color: var(--yuna-category-text);
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 800;
}

.yuna-category-lead,
.yuna-category-description {
    max-width: 720px;
    margin-top: 14px;
    color: var(--yuna-category-muted);
    font-size: 18px;
    line-height: 1.6;
}

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

/* Карточки: вертикальная структура как на /blog/ */
.yuna-category-content {
    padding: 36px 0 74px;
    background: #ffffff;
}

.yuna-category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 34px;
    row-gap: 48px;
    align-items: start;
}

.yuna-category-card,
.yuna-category-grid .yuna-category-card,
.yuna-category-grid article.yuna-category-card {
    display: block !important;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.yuna-category-card__image {
    display: block !important;
    position: relative;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2.15 / 1;
    margin: 0 !important;
    overflow: hidden;
    background: var(--yuna-category-soft);
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 12px 35px rgba(28, 89, 140, 0.08);
}

.yuna-category-card__image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center center;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.yuna-category-card:hover .yuna-category-card__image img {
    transform: scale(1.025);
    filter: saturate(1.04);
}

.yuna-category-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f8fd 0%, #ffffff 100%);
}

.yuna-category-card__placeholder span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--yuna-category-primary);
    font-size: 20px;
    font-weight: 800;
    box-shadow: var(--yuna-category-shadow);
}

.yuna-category-card__body {
    display: block !important;
    padding: 0 20px !important;
}

.yuna-category-card__badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin: 8px 0 16px !important;
    padding: 6px 18px;
    border-radius: 999px;
    background: var(--yuna-category-accent);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(67, 180, 241, 0.22);
}

.yuna-category-card__badge:hover {
    background: var(--yuna-category-primary);
    color: #ffffff !important;
}

.yuna-category-card__title {
    max-width: 92%;
    margin: 0 0 12px !important;
    color: var(--yuna-category-text);
    font-size: clamp(20px, 1.65vw, 22px)!important;
    line-height: 1.18 !important;
    font-weight: 700 !important;
}

.yuna-category-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.yuna-category-card__title a:hover {
    color: var(--yuna-category-primary) !important;
}

.yuna-category-card__excerpt {
    max-width: 94%;
    margin: 0 0 18px !important;
    color: var(--yuna-category-muted);
    font-size: 16px;
    line-height: 1.55;
}

.yuna-category-card__more {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    color: var(--yuna-category-primary) !important;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
}

.yuna-category-card__more::after {
    content: "→";
    transition: transform 0.2s ease;
}

.yuna-category-card__more:hover::after {
    transform: translateX(4px);
}

.yuna-category-pagination {
    margin-top: 56px;
}

.yuna-category-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.yuna-category-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--yuna-category-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--yuna-category-text);
    font-weight: 700;
    text-decoration: none;
}

.yuna-category-pagination .page-numbers.current,
.yuna-category-pagination .page-numbers:hover {
    border-color: var(--yuna-category-primary);
    background: var(--yuna-category-primary);
    color: #ffffff;
}

.yuna-category-empty {
    max-width: 760px;
    margin: 0 auto;
    padding: 42px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--yuna-category-border);
    border-radius: 22px;
    box-shadow: var(--yuna-category-shadow);
}

.yuna-category-empty h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.25;
}

.yuna-category-empty p {
    margin: 0 0 24px;
    color: var(--yuna-category-muted);
    font-size: 17px;
    line-height: 1.7;
}

.yuna-category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--yuna-category-primary);
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none !important;
}

.yuna-category-button:hover {
    background: #1f5fca;
    color: #ffffff !important;
}

@media (max-width: 1024px) {
    .yuna-category-grid {
        column-gap: 28px;
        row-gap: 42px;
    }

    .yuna-category-card__body {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }

    .yuna-category-card__title,
    .yuna-category-card__excerpt {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .yuna-category-container {
        width: min(100% - 24px, 1190px);
    }

    .yuna-category-hero {
        padding: 32px 0 16px;
    }

    .yuna-category-content {
        padding: 28px 0 54px;
    }

    .yuna-category-grid {
        grid-template-columns: 1fr !important;
        row-gap: 38px;
    }

    .yuna-category-card__image {
        aspect-ratio: 1.75 / 1;
        border-radius: 12px;
    }

    .yuna-category-card__body {
        padding-right: 8px !important;
        padding-left: 8px !important;
    }

    .yuna-category-card__badge {
        margin-bottom: 14px !important;
        font-size: 14px;
    }

    .yuna-category-empty {
        padding: 28px 22px;
        border-radius: 18px;
    }

    .yuna-category-button {
        width: 100%;
    }
}
