/* === Blog list page === */
.blog-page {
    padding: 48px 0 80px;
    background: var(--color-bg, #f7f5f2);
    min-height: 60vh;
}
.blog-page__header {
    text-align: center;
    margin-bottom: 32px;
}
.blog-page__title {
    font-family: Georgia, serif;
    font-size: 48px;
    color: var(--color-accent, #073129);
    margin: 0 0 8px;
    font-weight: 400;
}
.blog-page__subtitle {
    color: var(--color-text-muted, #8a847d);
    font-size: 16px;
    margin: 0 0 16px;
}
.blog-page__divider {
    display: inline-block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cbae8c, transparent);
}

/* === Categories chip row === */
.blog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 40px;
}
.blog-cats__chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    color: var(--color-accent, #073129);
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    border: 1px solid var(--color-border, #ddd8d0);
    transition: all .15s;
}
.blog-cats__chip:hover { background: rgba(7,49,41,.05); }
.blog-cats__chip.is-active {
    background: var(--color-accent, #073129);
    color: #fff;
    border-color: var(--color-accent, #073129);
}

/* === Hero статья на /blog/ === */
.blog-hero {
    margin: 0 0 48px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 30px rgba(7,49,41,.08);
    transition: box-shadow .25s, transform .25s;
}
.blog-hero:hover { box-shadow: 0 12px 40px rgba(7,49,41,.14); }
.blog-hero__link {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    text-decoration: none;
    color: inherit;
}
.blog-hero__cover {
    background-size: cover;
    background-position: center;
    min-height: 380px;
    max-height: 480px;
}
.blog-hero__body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-hero__title {
    font-family: Georgia, serif;
    font-size: 32px;
    color: var(--color-accent, #073129);
    margin: 12px 0 12px;
    font-weight: 400;
    line-height: 1.25;
}
.blog-hero__lead {
    font-size: 16px;
    color: var(--color-text, #1a1a1a);
    line-height: 1.6;
    margin: 0 0 16px;
}
.blog-hero__meta {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-muted, #8a847d);
    margin-bottom: 16px;
}
.blog-hero__cta {
    display: inline-block;
    color: var(--color-accent, #073129);
    font-weight: 600;
    text-decoration: none;
}

/* === Grid карточек === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(7,49,41,.05);
    transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
    position: relative;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(7,49,41,.13);
}
.blog-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.blog-card__cover {
    aspect-ratio: 16 / 11;
    background-size: cover;
    background-position: center;
    background-color: #ece6dc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.blog-card__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.15) 100%);
    pointer-events: none;
}
.blog-card__cover-placeholder {
    width: 56px; height: 56px;
    color: var(--color-accent, #073129);
    opacity: 0.35;
}
.blog-card__body {
    padding: 22px 24px 24px;
}
.blog-card__category {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent, #073129);
    font-weight: 600;
    margin-bottom: 10px;
    padding: 4px 10px;
    background: rgba(7,49,41,.06);
    border-radius: 100px;
}
.blog-card__title {
    font-family: Georgia, serif;
    font-size: 21px;
    color: var(--color-accent, #073129);
    margin: 0 0 10px;
    font-weight: 400;
    line-height: 1.3;
    transition: color .15s;
}
.blog-card:hover .blog-card__title {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(7,49,41,.3);
}
.blog-card__excerpt {
    font-size: 14px;
    color: var(--color-text-muted, #8a847d);
    margin: 0 0 12px;
    line-height: 1.55;
}
.blog-card__meta {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted, #8a847d);
}

.blog-page__more {
    text-align: center;
    margin-top: 40px;
}
.blog-page__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted, #8a847d);
    font-size: 17px;
}

/* === Article page === */
.article-page {
    padding: 32px 0 80px;
    background: var(--color-bg, #f7f5f2);
}
.article-breadcrumb {
    font-size: 13px;
    color: var(--color-text-muted, #8a847d);
    margin-bottom: 32px;
}
.article-breadcrumb a {
    color: var(--color-text-muted, #8a847d);
    text-decoration: none;
}
.article-breadcrumb a:hover { color: var(--color-accent, #073129); }
.article-breadcrumb span { margin: 0 6px; }

.article-header {
    max-width: 720px;
    margin: 0 auto 32px;
    text-align: center;
}
.article-header__category {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent, #073129);
    font-weight: 600;
    margin-bottom: 16px;
}
.article-header__title {
    font-family: Georgia, serif;
    font-size: 52px;
    color: var(--color-accent, #073129);
    margin: 0 0 16px;
    font-weight: 400;
    line-height: 1.15;
}
.article-header__meta {
    font-size: 14px;
    color: var(--color-text-muted, #8a847d);
    display: flex;
    gap: 8px;
    justify-content: center;
}

.article-hero {
    max-width: 820px;
    margin: 0 auto 48px;
}
.article-hero img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(7,49,41,.10);
    display: block;
}
@media (max-width: 768px) {
    .article-hero img { height: 240px; }
}

.article-body {
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text, #1a1a1a);
}
.article-body p { margin: 0 0 18px; }
.article-body p:first-of-type {
    font-size: 19px;
    font-style: italic;
    color: var(--color-text, #1a1a1a);
    line-height: 1.6;
}
.article-body h2 {
    font-family: Georgia, serif;
    font-size: 28px;
    color: var(--color-accent, #073129);
    margin: 36px 0 16px;
    font-weight: 400;
    line-height: 1.3;
}
.article-body h3 {
    font-family: Georgia, serif;
    font-size: 22px;
    color: var(--color-accent, #073129);
    margin: 28px 0 12px;
    font-weight: 400;
}
.article-body img,
.article-body .wp-block-image img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
    margin: 24px 0 8px;
}
.article-body figcaption,
.article-body .wp-caption-text {
    font-size: 14px;
    font-style: italic;
    color: var(--color-text-muted, #8a847d);
    text-align: center;
    margin: 0 0 24px;
}

/* Gutenberg blockquote = врезка/выноска */
.article-body blockquote,
.article-body .wp-block-quote {
    background: #ece6dc;
    border-left: 3px solid var(--color-accent, #073129);
    padding: 20px 24px;
    margin: 28px 0;
    font-style: normal;
    quotes: none;
}
.article-body blockquote p,
.article-body .wp-block-quote p {
    margin: 0;
    font-size: 17px;
    color: var(--color-text, #1a1a1a);
    line-height: 1.6;
    font-style: normal;
}

/* Списки */
.article-body ol {
    list-style: none;
    counter-reset: list-counter;
    padding-left: 0;
    margin: 24px 0;
}
.article-body ol > li {
    counter-increment: list-counter;
    position: relative;
    padding-left: 44px;
    margin-bottom: 12px;
}
.article-body ol > li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    background: var(--color-accent, #073129);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}
.article-body ul {
    padding-left: 20px;
    margin: 18px 0;
}
.article-body ul li {
    margin-bottom: 8px;
}

/* YouTube embeds */
.article-body .wp-block-embed iframe,
.article-body iframe[src*="youtube"] {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 12px;
    border: 0;
    margin: 24px 0;
}

/* === CTA в конце статьи === */
.article-cta {
    max-width: 720px;
    margin: 56px auto 0;
    background: linear-gradient(135deg, #ece6dc, #f7f5f2);
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
}
.article-cta__title {
    font-family: Georgia, serif;
    font-size: 24px;
    color: var(--color-accent, #073129);
    margin: 0 0 12px;
    font-weight: 400;
}
.article-cta__text {
    font-size: 15px;
    color: var(--color-text, #1a1a1a);
    margin: 0 0 20px;
    line-height: 1.5;
}
.article-cta__btn {
    display: inline-block;
}

/* Tags */
.article-tags {
    max-width: 720px;
    margin: 32px auto 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.article-tags__chip {
    font-size: 13px;
    color: var(--color-text-muted, #8a847d);
}

/* Related */
.article-related {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--color-border, #ddd8d0);
}
.article-related__title {
    font-family: Georgia, serif;
    font-size: 28px;
    color: var(--color-accent, #073129);
    text-align: center;
    margin: 0 0 32px;
    font-weight: 400;
}

/* Anti-overflow глобально для блога */
.blog-page, .article-page { overflow-x: hidden; }
.blog-hero, .blog-card, .article-body,
.blog-hero__body, .blog-card__body,
.blog-hero__title, .blog-hero__lead,
.blog-card__title, .blog-card__excerpt,
.article-header__title {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: none;
    min-width: 0;
}

/* === Tablet (≤1024px) === */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .blog-hero__link { grid-template-columns: 1fr; }
    .blog-hero__cover {
        min-height: 200px; max-height: 260px;
        aspect-ratio: 16/9;
    }
    .blog-hero__body { padding: 24px; }
    .blog-hero__title { font-size: 26px; }
    .blog-hero__lead { font-size: 15px; }
}

/* === Mobile (≤640px) === */
@media (max-width: 640px) {
    .blog-page { padding: 24px 0 60px; }
    .blog-page__title { font-size: 32px; }
    .blog-page__subtitle { font-size: 14px; }

    /* Категории-чипы — горизонтальный scroll */
    .blog-cats {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 16px 12px;
        margin: 0 -16px 24px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .blog-cats::-webkit-scrollbar { display: none; }
    .blog-cats__chip { flex-shrink: 0; font-size: 13px; padding: 8px 14px; }

    /* Hero на /blog/ */
    .blog-hero {
        border-radius: 14px;
        margin: 0 0 32px;
    }
    .blog-hero__cover {
        min-height: 180px; max-height: 220px;
    }
    .blog-hero__body { padding: 18px 18px 22px; }
    .blog-hero__title {
        font-size: 22px;
        line-height: 1.25;
        margin: 10px 0 10px;
    }
    .blog-hero__lead {
        font-size: 14px;
        line-height: 1.5;
        margin: 0 0 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .blog-hero__meta { font-size: 13px; margin-bottom: 12px; }
    .blog-hero__cta { font-size: 14px; }

    /* Grid карточек — одна колонка */
    .blog-grid { grid-template-columns: 1fr; gap: 16px; }
    .blog-card { border-radius: 14px; }
    .blog-card__body { padding: 16px 18px 18px; }
    .blog-card__category { font-size: 10px; padding: 3px 8px; }
    .blog-card__title { font-size: 19px; }
    .blog-card__excerpt {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Single article */
    .article-page { padding: 20px 0 60px; }
    .article-header__title { font-size: 28px; line-height: 1.18; }
    .article-header__meta { font-size: 13px; }
    .article-breadcrumb { font-size: 12px; margin-bottom: 20px; }

    .article-body { font-size: 16px; line-height: 1.7; }
    .article-body p:first-of-type { font-size: 17px; }
    .article-body h2 { font-size: 22px; margin: 28px 0 12px; }
    .article-body h3 { font-size: 19px; margin: 22px 0 10px; }
    .article-body ol > li { padding-left: 38px; }
    .article-body ol > li::before { width: 24px; height: 24px; line-height: 24px; font-size: 13px; }
    .article-body blockquote,
    .article-body .wp-block-quote { padding: 14px 16px; margin: 20px 0; }
    .article-body blockquote p,
    .article-body .wp-block-quote p { font-size: 15px; }

    .article-cta { padding: 22px 18px; margin-top: 36px; border-radius: 14px; }
    .article-cta__title { font-size: 19px; }
    .article-cta__text { font-size: 14px; }

    .article-related { margin-top: 48px; padding-top: 36px; }
    .article-related__title { font-size: 22px; margin: 0 0 24px; }
}

/* === Empty state — большой и красивый === */
.blog-page__empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--color-text-muted, #8a847d);
}
.blog-page__empty-icon {
    width: 72px; height: 72px;
    color: var(--color-accent, #073129);
    opacity: 0.5;
    margin: 0 auto 18px;
    display: block;
}
.blog-page__empty-title {
    font-family: Georgia, serif;
    font-size: 28px;
    color: var(--color-accent, #073129);
    margin: 0 0 12px;
    font-weight: 400;
}
.blog-page__empty-text {
    font-size: 15px;
    max-width: 420px;
    margin: 0 auto 24px;
    line-height: 1.6;
}
@media (max-width: 640px) {
    .blog-page__empty { padding: 48px 20px; }
    .blog-page__empty-icon { width: 56px; height: 56px; }
    .blog-page__empty-title { font-size: 22px; }
}
