/* ===== Фон страниц статей ===== */
body.article-page main {
    background-image: none;
}

body.article-page .page-banner {
    isolation: isolate;
    overflow: visible;
    height: auto;
    min-height: 0;
}

body.article-page .page-banner.overlay::after {
    content: none;
    display: none;
}

body.article-page .page-banner .media.media-bg {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
}

body.article-page .page-banner .media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center top;
}

body.article-page .page-banner-content {
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
    height: auto;
}

body.article-page .page-banner-content .container {
    position: relative;
    height: 100%;
}

body.article-page .page-banner .breadcrumb {
    --color-foreground: rgba(255, 255, 255, 0.7);
    --color-foreground-heading: rgba(255, 255, 255, 0.75);
    --color-primary-hover: rgba(0, 183, 241, 1);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    transform: translateY(50%);
    margin-block-start: 0;
    background: rgba(0, 64, 84, 1);
    border: 1px solid #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 0;
    animation:
        article-page-breadcrumb-fade 0.75s ease 0.1s forwards,
        article-page-breadcrumb-rise 1.5s ease 0.1s forwards;
}

@keyframes article-page-breadcrumb-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes article-page-breadcrumb-rise {
    from {
        transform: translateY(calc(50% + 100px));
    }
    to {
        transform: translateY(50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.article-page .page-banner .breadcrumb {
        opacity: 1;
        animation: none;
    }
}

body.a11y-mode.article-page .page-banner .breadcrumb {
    opacity: 1;
    animation: none;
}

body.article-page .page-banner .breadcrumb a:not(.active) {
    color: var(--color-foreground-heading);
    opacity: 1;
}

body.article-page .page-banner .breadcrumb a:not(.active):hover {
    color: rgba(255, 255, 255, 1);
}

body.article-page .page-banner .breadcrumb svg,
body.article-page .page-banner .breadcrumb li svg {
    color: var(--color-foreground);
    opacity: 1;
}

body.article-page .page-banner .breadcrumb > li:last-child > a,
body.article-page .page-banner .breadcrumb > li:last-child > a.active {
    color: var(--color-primary-hover);
    opacity: 1;
}

body.article-page .page-banner h1 {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.25rem;
    z-index: 1;
    margin: 0;
    opacity: 0;
    animation:
        article-page-banner-heading-fade 1.5s ease forwards,
        article-page-banner-heading-rise 1.5s ease forwards;
    text-shadow:
        0 0 6px #1a0f0a,
        0 0 14px #1a0f0a,
        0 0 28px rgba(26, 15, 10, 0.9);
}

@keyframes article-page-banner-heading-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes article-page-banner-heading-rise {
    from {
        bottom: 0;
    }
    to {
        bottom: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.article-page .page-banner h1 {
        opacity: 1;
        animation: none;
    }
}

body.a11y-mode.article-page .page-banner h1 {
    opacity: 1;
    animation: none;
}

body.article-page > footer {
    margin-top: 0;
}

body.article-page .blog-list-page,
body.article-page .blog-details-page {
    padding-bottom: 50px;
}

/* ===== Карточки списка статей ===== */
body.article-page .blog-list .blog-card.article-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    overflow: visible;
    border: none;
}

body.article-page .blog-list .blog-card.article-card .image {
    background: rgba(230, 248, 254, 0.35);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    aspect-ratio: 992 / 774;
}

body.article-page .blog-list .blog-card.article-card .image a {
    display: block;
    width: 100%;
    height: 100%;
}

body.article-page .blog-list .blog-card.article-card .image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 16px 16px 0 0;
    margin-left: 0;
    transform: none;
    transition: transform 0.3s ease-in-out;
}

body.article-page .blog-list .blog-card.article-card.hover-on-image:hover .image img {
    margin-left: 0;
    transform: scale(1.04);
}

body.article-page .blog-list .blog-card.article-card.hover-on-image:hover {
    transform: translateY(-10px);
    box-shadow:
        0 22px 44px rgba(17, 34, 17, 0.2),
        0 10px 20px rgba(17, 34, 17, 0.12),
        -14px 14px 32px rgba(17, 34, 17, 0.1),
        14px 14px 32px rgba(17, 34, 17, 0.1),
        0 -6px 16px rgba(17, 34, 17, 0.06);
}

/* ===== Карточки списка альбомов (572×734) ===== */
body.article-page .blog-list .blog-card.album-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    overflow: visible;
    border: none;
}

body.article-page .blog-list .blog-card.album-card .image {
    background: rgba(230, 248, 254, 0.35);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    aspect-ratio: 572 / 734;
}

body.article-page .blog-list .blog-card.album-card .image a {
    display: block;
    width: 100%;
    height: 100%;
}

body.article-page .blog-list .blog-card.album-card .image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 16px 16px 0 0;
    margin-left: 0;
    transform: none;
    transition: transform 0.3s ease-in-out;
}

body.article-page .blog-list .blog-card.album-card.hover-on-image:hover .image img {
    margin-left: 0;
    transform: scale(1.04);
}

body.article-page .blog-list .blog-card.album-card.hover-on-image:hover {
    transform: translateY(-10px);
    box-shadow:
        0 22px 44px rgba(17, 34, 17, 0.2),
        0 10px 20px rgba(17, 34, 17, 0.12),
        -14px 14px 32px rgba(17, 34, 17, 0.1),
        14px 14px 32px rgba(17, 34, 17, 0.1),
        0 -6px 16px rgba(17, 34, 17, 0.06);
}

body.article-page .blog-list .blog-card.album-card .content {
    background: #fff;
    border-radius: 0 0 16px 16px;
}

body.article-page .blog-list .blog-card .content {
    background: #fff;
    border-radius: 0 0 16px 16px;
}

body.article-page .blog-card-info .content .blog-title {
    margin-block-start: 0;
}

body.article-page .recent-posts .blog-card-info + .blog-card-info {
    margin-block-start: 20px;
}

body.article-page .recent-posts .blog-card-info .content {
    padding: 0;
}

/* ===== Форма комментария ===== */
body.article-page .blog-reply-form .reply-form {
    background: #00b7f1;
    border: 1px solid rgba(0, 120, 165, 0.45);
    box-shadow: 0 0 18px rgba(100, 100, 100, 0.45);
}

body.article-page .blog-reply-form .reply-form label {
    color: #fff;
}

body.article-page .blog-reply-form textarea {
    background: #fff;
}

body.article-page .blog-reply-form .reply-form .button--primary {
    --color-primary-button-background: #004054;
    --color-primary-button-border: #004054;
    --color-primary-button-text: #fff;
    --color-primary-button-hover-background: #005a72;
    --color-primary-button-hover-border: #005a72;
    --color-primary-button-hover-text: #fff;
}

body.article-page .blog-reply-form .reply-form .button--primary:hover,
body.article-page .blog-reply-form .reply-form .button--primary:focus {
    color: var(--color-primary-button-hover-text);
    background-color: var(--color-primary-button-hover-background);
    border-color: var(--color-primary-button-hover-border);
}

/* ===== Блоки сайдбара с белым фоном ===== */
body.article-page .sidebar-widget-recent,
body.article-page .sidebar-widget-categories {
    background: rgba(255, 255, 255, 0.85);
}

/* ===== Страница документа (/info/<cod>) ===== */
body.article-page .blog-details-info {
    background: #fff;
    padding: 40px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

body.article-page .blog-details-info .blog-title {
    margin-block-start: 0;
}

@media (max-width: 767px) {
    body.article-page .page-banner {
        height: auto;
    }

    body.article-page .blog-details-info {
        padding: 24px 16px;
    }
}

/* ===== Стили контента статей (префикс kf_) ===== */

/* Постер в начале статьи — на всю ширину блока, без обрезки */
.blog-details .image {
    width: 100%;
    height: auto;
    max-height: none;
}

.blog-details .image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.blog-details .blog-text {
    font-family: 'Georgia', 'Times New Roman', 'Palatino Linotype', serif;
    color: #2c2b28;
    line-height: 1.75;
    font-size: 18px;
}

.kf_container {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 36px 80px;
    background: #fffcf8;
    box-shadow: 0 0 50px rgba(0,0,0,0.07);
}

/* ===== Красная строка ===== */
.kf_article p {
    text-indent: 2em;
    margin: 0 0 1em 0;
}

/* ===== Заголовки ===== */
.kf_h1 {
    font-size: 2.5em;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #3d2e1c;
    margin: 0 0 0.15em 0;
    text-align: left;
    border-bottom: 3px solid #c4a77d;
    padding-bottom: 22px;
}
.kf_subtitle {
    font-size: 1.15em;
    color: #6b5a47;
    margin-bottom: 2.2em;
    font-style: italic;
    border-left: 3px solid #d6b88a;
    padding-left: 20px;
}
.kf_h2 {
    font-size: 1.7em;
    font-weight: 700;
    color: #4a3824;
    margin: 2.2em 0 0.7em 0;
    padding-left: 14px;
    border-left: 5px solid #b8925c;
}
.kf_h3 {
    font-size: 1.35em;
    font-weight: 600;
    color: #5c442a;
    margin: 1.8em 0 0.6em 0;
}
.kf_h4 {
    font-size: 1.12em;
    font-weight: 600;
    color: #6b5234;
    margin: 1.5em 0 0.4em 0;
}
.kf_h5 {
    font-size: 1em;
    font-weight: 600;
    color: #7a5c3a;
    margin: 1.2em 0 0.3em 0;
}

/* ===== Цитаты (выделенные блоки с кавычками) ===== */
.kf_quote {
    position: relative;
    background: #f6efe6;
    border: 2px solid #d6b88a;
    border-radius: 16px;
    padding: 28px 32px 24px 64px;
    margin: 1.8em 0;
    font-style: italic;
    color: #3d2e1c;
    font-size: 1.05em;
    line-height: 1.65;
}
.kf_quote::before {
    content: '\201C';
    position: absolute;
    left: 18px;
    top: 6px;
    font-size: 4.5em;
    line-height: 1;
    color: #b8925c;
    font-family: 'Georgia', serif;
    font-weight: 700;
    opacity: 0.4;
}
.kf_quote_author {
    display: block;
    margin-top: 14px;
    text-align: right;
    font-style: normal;
    font-size: 0.9em;
    color: #7a6a57;
}
.kf_quote_author::before {
    content: '\2014\00A0';
}

/* ===== Информационные и тематические боксы ===== */
.kf_infobox {
    background: #edf3e8;
    border: 2px solid #8aaa7a;
    border-radius: 14px;
    padding: 22px 28px;
    margin: 1.8em 0;
}
.kf_infobox h4 {
    margin-top: 0;
    color: #3d6b2e;
}
.kf_infobox p {
    margin: 0 0 0.6em 0;
    text-indent: 0;
}
.kf_infobox p:last-child { margin-bottom: 0; }

.kf_highlight {
    background: #fdf6e8;
    border: 2px solid #d4a76a;
    border-radius: 14px;
    padding: 22px 28px;
    margin: 1.8em 0;
}
.kf_highlight h4 {
    margin-top: 0;
    color: #8a6a3a;
}
.kf_highlight p {
    margin: 0 0 0.6em 0;
    text-indent: 0;
}
.kf_highlight p:last-child { margin-bottom: 0; }

.kf_warning {
    background: #f5e8e8;
    border: 2px solid #c97a7a;
    border-radius: 14px;
    padding: 22px 28px;
    margin: 1.8em 0;
}
.kf_warning h4 {
    margin-top: 0;
    color: #8a3a3a;
}
.kf_warning p {
    margin: 0 0 0.6em 0;
    text-indent: 0;
}
.kf_warning p:last-child { margin-bottom: 0; }

.kf_minibox {
    background: #f0ece6;
    border: 1px solid #cbb79e;
    border-radius: 10px;
    padding: 14px 20px;
    margin: 1.4em 0;
    font-size: 0.95em;
}
.kf_minibox p {
    margin: 0;
    text-indent: 0;
}

/* ===== Изображения (заглушки) ===== */
.kf_img {
    display: block;
    width: 100%;
    min-height: 220px;
    background: #e8e0d6;
    border: 2px dashed #b8925c;
    border-radius: 14px;
    margin: 1.8em 0;
    padding: 24px;
    text-align: center;
    color: #7a6a57;
    font-size: 0.95em;
    font-style: italic;
}
.kf_img_label {
    display: block;
    font-weight: 600;
    color: #5c442a;
    font-style: normal;
    margin-bottom: 8px;
    font-size: 1.05em;
}

/* ===== Списки ===== */
.kf_article ul, .kf_article ol {
    margin: 0.6em 0 1em 0;
    padding-left: 2.2em;
}
.kf_article li {
    margin-bottom: 0.4em;
}

/* ===== Ссылки ===== */
.kf_article a {
    color: #7a5c3a;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.kf_article a:hover {
    color: #a67c4a;
}

/* ===== Таблицы ===== */
.kf_table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 0.95em;
}
.kf_table th {
    background: #d6c4ae;
    color: #3d2e1c;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.kf_table td {
    padding: 8px 14px;
    border-bottom: 1px solid #e0d5c8;
}
.kf_table tr:nth-child(even) {
    background: #f8f4ef;
}

/* ===== Ключевые слова ===== */
.kf_keyword {
    font-weight: 600;
    color: #7a5c3a;
}

/* ===== Сноски и источники ===== */
.kf_sources {
    margin-top: 3em;
    padding-top: 1.8em;
    border-top: 2px solid #d6b88a;
}
.kf_sources h3 {
    margin-top: 0;
}
.kf_sources ol {
    font-size: 0.9em;
    color: #4a3f35;
}
.kf_sources li {
    margin-bottom: 0.5em;
}

/* ===== Разделитель ===== */
.kf_divider {
    text-align: center;
    margin: 2.5em 0;
    color: #b8925c;
    font-size: 1.4em;
    letter-spacing: 0.5em;
}

/* ===== Адаптивность ===== */
@media (max-width: 700px) {
    .kf_container { padding: 28px 18px 60px; }
    .kf_h1 { font-size: 1.9em; }
    .kf_h2 { font-size: 1.4em; padding-left: 10px; }
    .kf_h3 { font-size: 1.2em; }
    .kf_quote { padding: 18px 18px 18px 48px; }
    .kf_quote::before { left: 10px; font-size: 3.2em; }
    .kf_infobox, .kf_highlight, .kf_warning { padding: 16px 18px; }
}