/* Блог: список, рубрика, статья. Всё под .bl - файл грузится и в кабинете (раздел «Блог»),
   поэтому глобальных селекторов здесь нет.
   Цвета берём из переменных сайта (--navy/--acid/--paper/--indigo и тема-зависимые
   --background/--foreground/--border), чтобы страницы жили и в светлой, и в тёмной теме. */

/* Активный пункт «Блог» в шапке: правило вне .bl намеренно - шапка рисуется шаблоном,
   а файл грузится только на страницах блога, поэтому на других страницах его нет. */
.header__link--blogon {
    color: var(--foreground);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 0 var(--acid);
}

.bl {
    background: var(--page-bg);
    color: var(--foreground);
    font-family: var(--font-family);
    padding-top: calc(var(--header-h) + 2.5rem);
    padding-bottom: 4rem;
}

.bl-wrap {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.bl-wrap--art {
    max-width: 48rem;
}

/* ---- заголовок раздела ---- */

.bl-kicker {
    margin: 0 0 .75rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--indigo);
}

.bl-kicker a {
    color: inherit;
    text-decoration: none;
}

.bl-kicker a:hover {
    text-decoration: underline;
}

.bl-h1 {
    margin: 0 0 1rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.06;
    letter-spacing: -.01em;
}

.bl-h1 .bl-accent {
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 800;
    color: var(--indigo);
}

.bl-h1__page {
    font-family: var(--font-family);
    font-style: normal;
    font-size: .4em;
    font-weight: 600;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.bl-lead {
    margin: 0 0 2rem;
    max-width: 42rem;
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

/* ---- фильтр рубрик ---- */

.bl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 0 0 2.5rem;
}

.bl-chip {
    display: inline-block;
    padding: .55rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--background);
    color: var(--foreground);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.bl-chip:hover {
    border-color: var(--indigo);
    color: var(--indigo);
}

.bl-chip.is-on {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

/* ---- закреплённая статья ---- */

.bl-feat {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
    margin: 0 0 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--background);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
}

.bl-feat:hover {
    box-shadow: 0 18px 40px rgba(10, 10, 31, .10);
    transform: translateY(-2px);
}

.bl-feat__media,
.bl-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--navy);
}

.bl-feat__media {
    aspect-ratio: 62 / 35;
}

.bl-feat__media img,
.bl-card__media img,
.bl-hero img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
}

.bl-feat__body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 2rem;
}

.bl-feat__title {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.4vw, 1.95rem);
    line-height: 1.2;
}

.bl-feat__lead {
    color: var(--muted-foreground);
    font-size: 1rem;
    line-height: 1.55;
}

.bl-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: var(--acid);
    color: var(--navy);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.4;
}

.bl-badge--sm {
    font-size: .74rem;
    padding: .25rem .65rem;
}

.bl-rub {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--indigo);
}

.bl-meta {
    margin: auto 0 0;
    color: var(--muted-foreground);
    font-size: .88rem;
}

.bl-dot {
    margin: 0 .4rem;
    opacity: .6;
}

/* ---- сетка карточек ---- */

.bl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.5rem;
}

.bl-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--background);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.bl-card:hover {
    box-shadow: 0 14px 32px rgba(10, 10, 31, .10);
    transform: translateY(-2px);
}

.bl-card__media {
    aspect-ratio: 3 / 2;
}

.bl-card__body {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1.25rem 1.25rem 1.4rem;
    flex: 1 1 auto;
}

.bl-card__title {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.3;
}

.bl-card__title a {
    color: inherit;
    text-decoration: none;
}

.bl-card__title a:hover {
    color: var(--indigo);
}

.bl-card__lead {
    margin: 0;
    color: var(--muted-foreground);
    font-size: .93rem;
    line-height: 1.5;
}

/* Заглушка вместо обложки: тот же графический язык, что в макете. */

.bl-ph {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(155deg, #0b0b2a 0%, #171a4e 100%);
}

.bl-ph::before {
    content: "";
    position: absolute;
    right: -12%;
    top: -28%;
    width: 62%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3550c8 0%, #23307e 70%, transparent 71%);
    opacity: .85;
}

.bl-ph::after {
    content: "";
    position: absolute;
    left: 10%;
    bottom: 14%;
    width: 30%;
    aspect-ratio: 1;
    border: 1.5px solid var(--acid);
    border-radius: 50%;
    opacity: .8;
}

.bl-ph--2::before {
    right: 4%;
    top: -40%;
    width: 78%;
}

.bl-ph--3::before {
    right: -20%;
    top: 8%;
    width: 55%;
}

/* ---- пагинация ---- */

.bl-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 2.5rem 0 0;
}

.bl-pager__num,
.bl-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    padding: 0 .9rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    background: var(--background);
    color: var(--foreground);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
}

.bl-pager__num:hover,
.bl-pager__btn:hover {
    border-color: var(--indigo);
    color: var(--indigo);
}

.bl-pager__num.is-on {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.bl-empty {
    margin: 2rem 0 0;
    color: var(--muted-foreground);
}

/* ---- крошки ---- */

.bl-crumbs {
    margin: 0 0 1.5rem;
    font-size: .85rem;
    color: var(--muted-foreground);
}

.bl-crumbs a {
    color: var(--muted-foreground);
    text-decoration: none;
}

.bl-crumbs a:hover {
    color: var(--indigo);
}

.bl-crumbs span {
    margin: 0 .45rem;
    opacity: .6;
}

.bl-crumbs em {
    font-style: normal;
    color: var(--indigo);
}

/* ---- статья ---- */

.bl-art__h1 {
    margin: 0 0 1.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.14;
    letter-spacing: -.01em;
}

.bl-author {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
    margin: 0 0 2rem;
    font-size: .9rem;
    color: var(--muted-foreground);
}

.bl-author__name {
    margin-right: .25rem;
}

.bl-author__name b {
    color: var(--foreground);
    font-weight: 700;
}

.bl-ava {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    margin-right: .6rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #1b2a7a, var(--indigo));
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.bl-upd {
    font-style: italic;
}

.bl-hero {
    margin: 0 0 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 40 / 21;
    background: var(--navy);
}

.bl-draft {
    margin: 0 0 1.5rem;
    padding: .85rem 1.1rem;
    border: 1px solid var(--acid);
    border-left-width: 4px;
    border-radius: .6rem;
    background: rgba(200, 255, 77, .12);
    font-size: .92rem;
}

/* Тело статьи: типографика текста, который набирает редактор (H2/H3, списки, цитаты, таблицы). */

.bl-body {
    font-size: 1.06rem;
    line-height: 1.75;
    color: var(--foreground);
}

.bl-body__lead {
    font-size: 1.12rem;
    color: var(--muted-foreground);
}

.bl-body p {
    margin: 0 0 1.25rem;
}

.bl-body h2 {
    margin: 2.5rem 0 1rem;
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 800;
    line-height: 1.25;
}

.bl-body h3 {
    margin: 2rem 0 .75rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.bl-body ul,
.bl-body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.4rem;
}

.bl-body ul {
    list-style: none;
    padding-left: 0;
}

.bl-body ul li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: .6rem;
}

.bl-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .8em;
    width: .85rem;
    height: 2px;
    background: var(--acid);
}

.bl-body ol li {
    margin-bottom: .6rem;
}

.bl-body a {
    color: var(--indigo);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.bl-body blockquote {
    margin: 1.75rem 0;
    padding: 1.1rem 1.35rem;
    border-left: 3px solid var(--acid);
    border-radius: .5rem;
    background: var(--muted);
    color: var(--foreground);
    font-size: 1rem;
}

.bl-body blockquote p:last-child {
    margin-bottom: 0;
}

.bl-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.75rem 0;
    border-radius: var(--radius);
}

.bl-body figure {
    margin: 1.75rem 0;
}

.bl-body figcaption {
    margin-top: .5rem;
    font-size: .87rem;
    color: var(--muted-foreground);
}

/* Широкая таблица не должна распирать страницу: скроллим её саму. */

.bl-body table {
    display: block;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
    font-size: .95rem;
}

.bl-body th,
.bl-body td {
    padding: .6rem .8rem;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.bl-body th {
    background: var(--muted);
    font-weight: 700;
}

.bl-body pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--muted);
    font-size: .9rem;
}

/* ---- призыв в конце статьи ---- */

.bl-cta {
    margin: 3rem 0 1.75rem;
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(155deg, var(--navy) 0%, #171a4e 100%);
    color: #f7f7f2;
}

.bl-cta__title {
    margin: 0 0 .75rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.35rem;
    line-height: 1.25;
}

.bl-cta__text {
    margin: 0 0 1.5rem;
    font-size: .98rem;
    line-height: 1.6;
    color: rgba(247, 247, 242, .82);
}

.bl-cta__btn {
    display: inline-block;
    padding: .8rem 1.5rem;
    border-radius: .7rem;
    background: var(--acid);
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.bl-cta__btn:hover {
    filter: brightness(1.05);
}

/* ---- поделиться ---- */

.bl-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: .88rem;
    color: var(--muted-foreground);
}

.bl-share a,
.bl-share__copy {
    color: var(--indigo);
    text-decoration: none;
    font-weight: 600;
}

.bl-share__copy {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.bl-share a:hover,
.bl-share__copy:hover {
    text-decoration: underline;
}

/* ---- читайте также ---- */

.bl-also {
    margin: 4rem 0 0;
    padding: 3rem 0 1rem;
    background: var(--section-gray);
    border-top: 1px solid var(--border);
}

.bl-also__title {
    margin: 0 0 1.5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

/* ---- мобильные ---- */

@media (max-width: 860px) {
    .bl-feat {
        grid-template-columns: 1fr;
    }

    .bl-feat__body {
        padding: 1.5rem;
    }

    .bl-feat__media {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 560px) {
    .bl {
        padding-top: calc(var(--header-h) + 1.5rem);
    }

    .bl-wrap {
        padding: 0 1.15rem;
    }

    .bl-grid {
        grid-template-columns: 1fr;
    }

    .bl-cta {
        padding: 1.5rem;
    }
}
