/* Psychodium Design System — Blog v1.6.0
 * Familiar blog layout that inherits Psychodium/Astra/Elementor design tokens.
 */
.pd-blog-v12-active #content,
.pd-blog-v12-active .site-content {
    background: var(--ast-global-color-4, #1f1f1f);
}

.pd-blog-v12-active .site-content > .ast-container {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0;
}

.pd-blog-v12-active #primary,
.pd-blog-v12-active .content-area,
.pd-blog-v12-active .site-main,
.pd-blog-v12-active .entry-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.pd-blog-v12 {
    --pd-v12-bg: var(--ast-global-color-4, #1f1f1f);
    --pd-v12-surface: var(--ast-global-color-8, #222222);
    --pd-v12-surface-2: var(--ast-global-color-3, #2a2d32);
    --pd-v12-text: var(--ast-global-color-0, #e6e6e6);
    --pd-v12-muted: #9b9b9b;
    --pd-v12-button: var(--ast-global-color-0, #e6e6e6);
    --pd-v12-line: rgba(230, 230, 230, .13);
    --pd-v12-line-strong: rgba(230, 230, 230, .26);
    --pd-v12-radius: 6px;
    --pd-v12-shell: 1200px;
    width: 100%;
    background: var(--pd-v12-bg);
    color: var(--pd-v12-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.65;
}

.pd-blog-v12,
.pd-blog-v12 * { box-sizing: border-box; }

.pd-blog-v12 a { color: inherit; text-decoration: none; }
.pd-blog-v12 img { max-width: 100%; }
.pd-blog-v12 h1,
.pd-blog-v12 h2,
.pd-blog-v12 h3,
.pd-blog-v12 p { color: inherit; font-family: inherit; }

.pd-blog-v12 .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.pd-v12-shell {
    width: min(calc(100% - 48px), var(--pd-v12-shell));
    margin-inline: auto;
}

.pd-v12-eyebrow,
.pd-v12-meta,
.pd-v12-chip,
.pd-v12-search,
.pd-v12-button,
.pd-v12-link,
.pd-v12-card__link,
.pd-v12-pagination,
.pd-v12-section-head__aside {
    font-family: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pd-v12-eyebrow {
    display: block;
    margin: 0 0 10px;
    color: var(--pd-v12-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pd-v12-hero {
    border-bottom: 1px solid var(--pd-v12-line);
    background: var(--pd-v12-bg);
}

.pd-v12-hero__inner {
    padding-block: clamp(54px, 6vw, 82px) clamp(42px, 5vw, 66px);
}

.pd-v12-hero__copy { max-width: 780px; }

.pd-v12-hero h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 62px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.pd-v12-hero p {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--pd-v12-muted);
    font-size: clamp(16px, 1.7vw, 18px);
    line-height: 1.65;
}

.pd-v12-toolbar {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--pd-v12-line);
    background: var(--pd-v12-bg);
}

.pd-v12-toolbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding-block: 12px;
}

/* Лента тем.
 *
 * До 1024px панель фильтров складывается в колонку и лента занимает всю
 * ширину строки — там горизонтальная прокрутка уместна, и правый край
 * ленты растворяется, показывая, что темы продолжаются.
 *
 * На широком экране лента и поиск стоят в одну строку, и прокрутка там
 * читалась как сломанная вёрстка: последний чип обрезался ровно о край
 * поля поиска, без единого признака продолжения списка. Хуже того,
 * добраться до спрятанных тем мышью было нельзя — колесо прокручивает
 * страницу, а не ленту. Поэтому на широком экране чипы переносятся по
 * строкам, см. правило под медиа-запросом ниже.
 */
.pd-v12-topics {
    display: flex;
    flex: 1 1 auto;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
}

.pd-v12-topics::-webkit-scrollbar { display: none; }

.pd-v12-topics > .pd-v12-chip { scroll-snap-align: start; }

@media (min-width: 1025px) {
    /* Ширины хватает на строку целиком, поэтому ленту не прокручиваем,
     * а переносим. Тем в ленте не больше одиннадцати (десять рубрик плюс
     * «Все»), то есть перенос даёт максимум две строки. */
    .pd-v12-topics {
        flex-wrap: wrap;
        align-content: center;
        row-gap: 8px;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    /* Волосяная линия отделяет ленту тем от поиска. Когда чипы переносятся
     * на две строки, без неё две зоны панели сливаются в одно пятно.
     * Линия чуть выше поля — она держит высоту панели, а не поля.
     *
     * Ширина поля сохранена прежней: 352 − 22 отступа = 330px, как было,
     * и это работает, потому что у .pd-blog-v12 * задан border-box. */
    .pd-v12-search {
        position: relative;
        flex-basis: 352px;
        padding-left: 22px;
    }

    .pd-v12-search::before {
        content: "";
        position: absolute;
        top: -12px;
        bottom: -12px;
        left: 0;
        width: 1px;
        background: var(--pd-v12-line);
    }
}

.pd-v12-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--pd-v12-line);
    border-radius: 4px;
    color: var(--pd-v12-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.pd-v12-chip:hover,
.pd-v12-chip:focus-visible {
    border-color: var(--pd-v12-line-strong);
    color: var(--pd-v12-text);
}

.pd-v12-chip.is-active {
    border-color: var(--pd-v12-text);
    background: var(--pd-v12-text);
    color: #000;
}

.pd-v12-search {
    display: flex;
    flex: 0 0 330px;
    min-width: 280px;
}

.pd-v12-search input[type="search"] {
    min-width: 0;
    height: 42px;
    flex: 1 1 auto;
    padding: 0 13px;
    border: 1px solid var(--pd-v12-line-strong);
    border-right: 0;
    border-radius: 4px 0 0 4px;
    background: var(--pd-v12-surface);
    box-shadow: none;
    color: var(--pd-v12-text);
    font: inherit;
    font-size: 12px;
}

.pd-v12-search input[type="search"]::placeholder { color: #9b9b9b; }

.pd-v12-search button,
.pd-v12-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid var(--pd-v12-button);
    border-radius: 4px;
    background: var(--pd-v12-button);
    box-shadow: none;
    color: #000;
    cursor: pointer;
    font-family: "Source Code Pro", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease;
}

.pd-blog-v12 a.pd-v12-button { color: #000; }

.pd-v12-search button { border-radius: 0 4px 4px 0; }

.pd-v12-search button:hover,
.pd-v12-search button:focus-visible,
.pd-v12-button:hover,
.pd-v12-button:focus-visible {
    border-color: #fff;
    background: #fff;
    color: #000;
}

.pd-blog-v12 a.pd-v12-button:hover,
.pd-blog-v12 a.pd-v12-button:focus-visible { color: #000; }

.pd-v12-content { padding-block: clamp(48px, 6vw, 78px) 86px; }

.pd-v12-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.pd-v12-section-head h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.pd-v12-section-head__aside {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--pd-v12-muted);
    font-size: 10px;
    text-transform: uppercase;
}

.pd-v12-link,
.pd-v12-card__link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-bottom: 1px solid currentColor;
    color: var(--pd-v12-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}

.pd-v12-link:hover,
.pd-v12-card__link:hover { color: #fff; }

.pd-v12-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid var(--pd-v12-line);
    border-radius: var(--pd-v12-radius);
    background: var(--pd-v12-surface);
}

.pd-v12-featured__media,
.pd-v12-card__media {
    display: block;
    overflow: hidden;
    background: #151515;
}

.pd-v12-featured__media { min-height: 410px; }

.pd-v12-cover,
.pd-v12-featured__media img,
.pd-v12-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.pd-v12-featured:hover .pd-v12-cover,
.pd-v12-card:hover .pd-v12-cover { transform: scale(1.015); }

.pd-v12-media-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 240px;
    background: linear-gradient(135deg, #151515, var(--pd-v12-surface-2));
}

.pd-v12-media-fallback span {
    color: rgba(230, 230, 230, .3);
    font-family: "Source Code Pro", ui-monospace, monospace;
    font-size: clamp(18px, 3vw, 32px);
    letter-spacing: .11em;
}

.pd-v12-featured__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4vw, 46px);
}

.pd-v12-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    color: var(--pd-v12-muted);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.pd-v12-featured h3 {
    margin: 16px 0 0;
    font-size: clamp(27px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.pd-v12-featured__body > p {
    margin: 16px 0 24px;
    color: var(--pd-v12-muted);
    font-size: 15px;
    line-height: 1.65;
}

.pd-v12-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 22px 18px;
}

.pd-v12-card {
    display: flex;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--pd-v12-line);
    border-radius: var(--pd-v12-radius);
    background: var(--pd-v12-surface);
}

.pd-v12-card__media { aspect-ratio: 16 / 10; }

.pd-v12-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 20px;
}

.pd-v12-card h3 {
    margin: 12px 0 0;
    font-size: clamp(19px, 1.65vw, 23px);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.018em;
}

.pd-v12-card__body > p {
    margin: 13px 0 18px;
    color: var(--pd-v12-muted);
    font-size: 14px;
    line-height: 1.6;
}

.pd-v12-card__link { margin-top: auto; }

.pd-v12-pagination {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
    align-items: center;
    gap: 18px;
    margin-top: 46px;
    padding-top: 24px;
    border-top: 1px solid var(--pd-v12-line);
    font-size: 11px;
}

.pd-v12-pagination__arrow:last-child { justify-self: end; }
.pd-v12-pagination__arrow.is-disabled { color: #666; pointer-events: none; }

.pd-v12-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pd-v12-pagination__pages a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--pd-v12-line);
    border-radius: 4px;
    color: var(--pd-v12-muted);
}

.pd-v12-pagination__pages a:hover,
.pd-v12-pagination__pages a:focus-visible {
    border-color: var(--pd-v12-line-strong);
    color: var(--pd-v12-text);
}

.pd-v12-pagination__pages a.is-active {
    border-color: var(--pd-v12-text);
    background: var(--pd-v12-text);
    color: #000;
}

.pd-v12-pagination__dots { padding-inline: 3px; color: var(--pd-v12-muted); }

.pd-v12-empty {
    padding: clamp(34px, 5vw, 58px);
    border: 1px solid var(--pd-v12-line);
    border-radius: var(--pd-v12-radius);
    background: var(--pd-v12-surface);
}

.pd-v12-empty h2 { margin: 0; font-size: 32px; font-weight: 600; }
.pd-v12-empty p { margin: 12px 0 22px; color: var(--pd-v12-muted); }

.pd-v12-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 30px;
    margin-top: 70px;
    padding: clamp(30px, 4vw, 48px);
    border: 1px solid var(--pd-v12-line);
    border-radius: var(--pd-v12-radius);
    background: var(--pd-v12-surface-2);
}

.pd-v12-cta h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.12;
}

.pd-v12-cta p { max-width: 650px; margin: 13px 0 0; color: var(--pd-v12-muted); }
.pd-v12-cta__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 18px; }

.pd-blog-v12 :focus-visible {
    outline: 2px dotted var(--pd-v12-text);
    outline-offset: 3px;
}

@media (max-width: 1024px) {
    .pd-v12-toolbar__inner { align-items: stretch; flex-direction: column; padding-block: 14px; }
    .pd-v12-search { width: 100%; min-width: 0; flex-basis: auto; }
    .pd-v12-featured { grid-template-columns: 1fr; }
    .pd-v12-featured__media { min-height: 0; aspect-ratio: 16 / 9; }
    .pd-v12-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pd-v12-cta { grid-template-columns: 1fr; }
    .pd-v12-cta__actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
    .pd-v12-shell { width: min(calc(100% - 28px), var(--pd-v12-shell)); }
    .pd-v12-hero__inner { padding-block: 46px 38px; }
    .pd-v12-hero h1 { font-size: 40px; }
    .pd-v12-content { padding-block: 42px 64px; }
    .pd-v12-section-head { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
    .pd-v12-section-head__aside { width: 100%; justify-content: space-between; }
    .pd-v12-featured__body { padding: 24px; }
    .pd-v12-grid { grid-template-columns: 1fr; }
    .pd-v12-pagination { grid-template-columns: 1fr 1fr; }
    .pd-v12-pagination__pages { grid-column: 1 / -1; grid-row: 1; flex-wrap: wrap; }
    .pd-v12-pagination__arrow { grid-row: 2; }
    .pd-v12-cta { padding: 26px 22px; }
    .pd-v12-cta__actions { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-blog-v12 *,
    .pd-blog-v12 *::before,
    .pd-blog-v12 *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 420px) {
    .pd-v12-shell { width: calc(100% - 24px); }
    .pd-v12-hero__inner { padding-block: 36px 30px; }
    .pd-v12-hero h1 { font-size: 34px; line-height: 1.08; }
    .pd-v12-hero p { margin-top: 14px; font-size: 15px; line-height: 1.55; }
    .pd-v12-toolbar__inner { gap: 14px; }
    .pd-v12-search button { padding-inline: 12px; }
    .pd-v12-content { padding-block: 34px 52px; }
    .pd-v12-card__body { padding: 18px; }
    .pd-v12-pagination { gap: 10px; margin-top: 38px; }
    .pd-v12-pagination__pages { gap: 5px; }
    .pd-v12-pagination__pages a { width: 36px; height: 36px; }
    .pd-v12-cta { margin-top: 52px; padding: 22px 18px; }
    .pd-v12-cta h2 { font-size: 28px; }
}
