/* Стили блога: перенесены из page/blog.php, подключаются в <head> через $tg_page_styles */
    .tj-blog-details {
        padding-bottom: 90px;
    }
    .blog-card-body,
    .blog-card-body a,
    .blog-card-excerpt,
    .blog-pagination-link,
    .blog-pagination-current,
    .blog-empty-state,
    .blog-not-found,
    .blog-article-date,
    .blog-article-thumb-label,
    .blog-article-content,
    .blog-article-content a,
    .blog-article-footer,
    .blog-article-back,
    .blog-article-source {
        font-family: 'Tahoma Regular';
        color: #111111;
        font-size: 17px;
        line-height: 1.8;
    }
    .blog-details-wrapper {
        display: grid;
        gap: 24px;
    }
    .blog-card {
        margin: 0;
        background: #ffffff;
        border: 1px solid #d7e1ec;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 18px 40px rgba(25, 49, 75, 0.08);
    }
    .blog-card-media {
        position: relative;
        display: block;
        background: #eef3f8;
        aspect-ratio: 16 / 9;
        overflow: hidden;
    }
    .blog-card-media img,
    .blog-card-media video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .blog-card-date {
        position: absolute;
        left: 18px;
        bottom: 18px;
        display: inline-flex;
        align-items: center;
        padding: 7px 12px;
        border-radius: 999px;
        background: rgba(25, 49, 75, 0.9);
        color: #ffffff;
        font-size: 13px;
        line-height: 1;
        letter-spacing: 0.02em;
        font-family: 'Tahoma Regular';
    }
    .blog-card-date-inline {
        position: static;
        margin-bottom: 14px;
        background: #eef3f8;
        color: #19314B;
        font-family: 'Tahoma Regular';
    }
    .blog-card-body {
        padding: 24px;
    }
    .blog-card-title {
        margin: 0 0 14px;
        font-size: 30px;
        line-height: 1.28;
    }
    .blog-card-title a {
        color: #19314B;
        display: block;
        font-size: 30px;
        line-height: 1.28;
        transition: none;
        transform: none;
        font-family: var(--tj-ff-heading);
    }
    .blog-card-title a:hover {
        color: #19314B;
        font-size: 30px;
        line-height: 1.28;
        transition: none;
        transform: none;
        font-family: var(--tj-ff-heading);
    }
    .blog-card-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0;
        color: #111111;
        font-size: 17px;
        line-height: 1.8;
        text-decoration: none;
    }
    .blog-card-excerpt:hover {
        color: #111111;
    }
    .blog-card-actions {
        display: flex;
        align-items: center;
        margin-top: 22px;
    }
    .blog-card-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 156px;
        padding: 12px 22px;
        border: none;
        border-radius: 999px;
        background: #19314B;
        color: #ffffff !important;
        font-size: 15px;
        font-family: 'Tahoma Regular';
        text-decoration: none;
        transition: background 0.2s ease, transform 0.2s ease;
    }
    .blog-card-button:hover {
        background: #10253b;
        color: #ffffff !important;
        transform: translateY(-1px);
    }
    /* Пагинация в одну строку: стрелки, первая страница, текущая с соседями, последняя. */
    .blog-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        margin-top: 34px;
    }
    .blog-pagination-link,
    .blog-pagination-current,
    .blog-pagination-disabled {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 46px;
        height: 46px;
        padding: 0 14px;
        border-radius: 999px;
        border: 1px solid #d7e1ec;
        background: #ffffff;
        color: #19314B;
        font-family: 'Tahoma Regular';
        font-size: 17px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        text-decoration: none;
        transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }
    .blog-pagination-link:hover,
    .blog-pagination-link:focus-visible {
        border-color: #b99a80;
        background: #f9f2ec;
        color: #19314B;
    }
    /* Текущая страница — акцентным цветом: заливка цветом фона делала её незаметной. */
    .blog-pagination-current {
        border-color: #b99a80;
        background: #b99a80;
        color: #19314B;
        font-weight: 700;
    }
    .blog-pagination-disabled {
        border-color: rgba(255, 255, 255, 0.25);
        background: transparent;
        color: rgba(255, 255, 255, 0.45);
    }
    .blog-empty-state,
    .blog-not-found {
        padding: 32px 28px;
        border-radius: 24px;
        background: #ffffff;
        border: 1px solid #d7e1ec;
        box-shadow: 0 18px 40px rgba(25, 49, 75, 0.08);
        color: #111111;
        text-align: center;
        font-size: 18px;
        line-height: 1.7;
    }
    .blog-article-page {
        display: grid;
        gap: 28px;
    }
    .blog-article-panel {
        background: #ffffff;
        border: 1px solid #d7e1ec;
        border-radius: 28px;
        box-shadow: 0 18px 40px rgba(25, 49, 75, 0.08);
        overflow: hidden;
    }
    .blog-article-header {
        padding: 30px 32px 0;
    }
    .blog-article-date {
        display: inline-flex;
        margin-bottom: 14px;
        padding: 7px 12px;
        border-radius: 999px;
        background: #eef3f8;
        color: #19314B;
        font-size: 13px;
        line-height: 1;
        font-family: 'Tahoma Regular';
    }
    .blog-article-title {
        margin: 0;
        color: #19314B;
        font-size: 34px;
        line-height: 1.2;
    }
    .blog-article-gallery {
        display: grid;
        gap: 16px;
        padding: 28px 32px 0;
    }
    .blog-article-stage {
        position: relative;
        background: #eef3f8;
        border-radius: 24px;
        overflow: hidden;
    }
    .blog-article-stage-viewport {
        position: relative;
        min-height: 340px;
        height: min(560px, 70vh);
    }
    .blog-article-stage-item {
        position: absolute;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 18px;
    }
    .blog-article-stage-item.is-current {
        display: flex;
    }
    .blog-article-stage-item img,
    .blog-article-stage-item video,
    .blog-article-stage-item iframe {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        background: #eef3f8;
        border: 0;
        border-radius: 18px;
    }
    .blog-article-nav {
        position: absolute;
        top: 50%;
        z-index: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border: none;
        border-radius: 999px;
        background: rgba(25, 49, 75, 0.82);
        color: #ffffff;
        box-shadow: 0 14px 34px rgba(25, 49, 75, 0.18);
        transform: translateY(-50%);
        transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    }
    .blog-article-nav:hover {
        background: #10253b;
        transform: translateY(-50%) scale(1.04);
    }
    .blog-article-nav svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }
    .blog-article-stage[data-has-nav="0"] .blog-article-nav {
        opacity: 0;
        pointer-events: none;
    }
    .blog-article-nav-prev {
        left: 18px;
    }
    .blog-article-nav-next {
        right: 18px;
    }
    .blog-article-thumbs {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 0 4px 6px;
        scroll-behavior: smooth;
    }
    .blog-article-thumbs:empty {
        display: none;
    }
    .blog-article-thumb {
        flex: 0 0 96px;
        width: 96px;
        height: 96px;
        border: 2px solid transparent;
        border-radius: 18px;
        overflow: hidden;
        background: #eef3f8;
        color: #19314B;
        opacity: 0.72;
        transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    }
    .blog-article-thumb.active {
        border-color: #19314B;
        opacity: 1;
        box-shadow: 0 10px 24px rgba(25, 49, 75, 0.16);
    }
    .blog-article-thumb:hover {
        transform: translateY(-2px);
        opacity: 1;
    }
    .blog-article-thumb img,
    .blog-article-thumb video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .blog-article-thumb-label {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        padding: 10px;
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        font-family: 'Tahoma Regular';
    }
    .blog-article-content {
        padding: 0 32px 32px;
        color: #111111;
        font-size: 17px;
        line-height: 1.8;
    }
    .blog-article-content p {
        margin-bottom: 1em;
    }
    .blog-article-content a {
        color: #111111;
        text-decoration: underline;
    }
    .blog-article-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        padding: 0 32px 32px;
        flex-wrap: wrap;
    }
    .blog-article-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        border-radius: 999px;
        border: 1px solid #d7e1ec;
        color: #111111;
        text-decoration: none;
        transition: background 0.2s ease, border-color 0.2s ease;
    }
    .blog-article-back:hover {
        background: #eef3f8;
        border-color: #19314B;
        color: #111111;
    }
    .blog-article-source {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        border-radius: 999px;
        background: #19314B;
        color: #ffffff;
        font-family: 'Tahoma Regular';
        text-decoration: none;
    }
    .blog-article-source:hover {
        color: #ffffff;
        background: #10253b;
    }
    .blog-related-section {
        display: grid;
        gap: 20px;
    }
    .blog-related-heading {
        margin: 0;
        color: #ffffff;
        font-size: 30px;
        line-height: 1.2;
    }
    .blog-related-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
    .blog-related-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        background: #ffffff;
        border: 1px solid #d7e1ec;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 18px 40px rgba(25, 49, 75, 0.08);
    }
    .blog-related-media {
        display: block;
        aspect-ratio: 16 / 10;
        background: #eef3f8;
        overflow: hidden;
    }
    .blog-related-media img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    .blog-related-card:hover .blog-related-media img {
        transform: scale(1.03);
    }
    .blog-related-body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 12px;
        padding: 22px;
    }
    .blog-related-date {
        color: #738295;
        font-size: 13px;
        line-height: 1.4;
        font-family: 'Tahoma Regular';
    }
    .blog-related-title {
        margin: 0;
        font-size: 24px;
        line-height: 1.3;
    }
    .blog-related-title a {
        color: #19314B;
        text-decoration: none;
        font-family: var(--tj-ff-heading);
    }
    .blog-related-title a:hover {
        color: #19314B;
    }
    @media (max-width: 767px) {
        .tj-blog-details {
            padding-bottom: 70px;
        }
        .blog-card-body,
        .blog-article-header,
        .blog-article-gallery,
        .blog-article-content,
        .blog-article-footer {
            padding-left: 20px;
            padding-right: 20px;
        }
        .blog-card-title {
            font-size: 30px;
        }
        .blog-card-excerpt,
        .blog-article-content {
            font-size: 16px;
        }
        .blog-article-title {
            font-size: 26px;
        }
        .blog-related-heading {
            font-size: 26px;
        }
        .blog-related-grid {
            grid-template-columns: 1fr;
        }
        .blog-related-body {
            padding: 20px;
        }
        .blog-related-title {
            font-size: 22px;
        }
        .blog-article-stage-viewport {
            height: min(420px, 58vh);
            min-height: 240px;
        }
        .blog-article-nav {
            width: 42px;
            height: 42px;
        }
        .blog-article-nav-prev {
            left: 12px;
        }
        .blog-article-nav-next {
            right: 12px;
        }
        .blog-article-thumb {
            flex-basis: 82px;
            width: 82px;
            height: 82px;
        }
        .blog-article-footer {
            align-items: stretch;
        }
        .blog-article-back,
        .blog-article-source {
            width: 100%;
        }
    }
    @media (min-width: 768px) and (max-width: 1199px) {
        .blog-related-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

/* Заголовок H1 списка статей (/blog/, /blog/page/N/) */
.blog-listing-title {
    margin: 0 0 24px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .blog-listing-title {
        font-size: 26px;
    }
}

/* Пагинация блога: разрыв «…» и компактный вид на телефонах (строка не переносится) */
.blog-pagination-gap {
    color: rgba(255, 255, 255, 0.7);
    font-size: 17px;
    padding: 0 2px;
}
@media (max-width: 575px) {
    .blog-pagination {
        gap: 4px;
    }
    .blog-pagination-link,
    .blog-pagination-current,
    .blog-pagination-disabled {
        min-width: 34px;
        height: 34px;
        padding: 0 7px;
        font-size: 14px;
    }
    .blog-pagination-arrow-text {
        display: none;
    }
    .blog-pagination-gap {
        font-size: 14px;
        padding: 0;
    }
}
