.container {
    max-width: 1200px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #a5d6a7;
}

.grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    align-items: stretch;
}

.col-left {
    background: #e1f8e9;
    padding: 30px 20px 20px 20px;
    border-right: 1px solid #c8e6c9;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.logo-wrap {
    text-align: center;
}
.logo-wrap img {
    width: 82px;
    height: 80px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #a5d6a7;
    border-radius: 0;
    padding: 2px;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s;
}
.logo-wrap img:hover {
    transform: scale(1.02);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.menu-item {
    display: block;
    padding: 6px 10px;
    background: transparent;
    color: #33691e;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border-left: none;
    letter-spacing: 0.2px;
    cursor: pointer;
    border-radius: 0;
}
.menu-item:hover {
    background: #c8e6c9;
    color: #1b5e20;
}
.menu-item:active {
    background: #a5d6a7;
}

.col-right {
    background: #ffffff;
    padding: 30px 30px 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-x: hidden;
}

.article-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1b5e20;
    letter-spacing: -0.3px;
    border-bottom: 1px solid #c8e6c9;
    padding-bottom: 12px;
    margin-bottom: 6px;
}

.article-body {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    line-height: 1.6;
    font-size: 1.25em;
    color: #2e4a2e;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: hidden;
    -webkit-hyphens: auto;
}
.article-body p {
    margin: 0 0 16px 0;
}
.article-body p:last-child {
    margin-bottom: 0;
}
.article-body h3 {
    font-size: 19px;
    font-weight: 600;
    color: #2e7d32;
    margin: 28px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #c8e6c9;
}
.article-body h3:first-of-type {
    margin-top: 0;
}
.article-body ul {
    margin: 0 0 18px 20px;
    padding-left: 6px;
    list-style-type: none;
}
.article-body ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    line-height: 1.55;
}
.article-body ul li::before {
    content: "●";
    color: #1b5e20;
    font-size: 14px;
    position: absolute;
    left: 0;
    top: 1px;
}
.article-body ul li:last-child {
    margin-bottom: 0;
}
.article-body br {
    display: block;
    content: "";
    margin: 6px 0;
}
.article-body a {
    color: #1b5e20;
    text-decoration: none;
    border-bottom: 1px solid #1b5e20;
    transition: border-color 0.2s, color 0.2s;
}
.article-body a:hover {
    color: #0d3d0d;
    border-bottom-color: #1b5e20;
}
.article-body img,
.article-body .alignnone,
.article-body .aligncenter,
.article-body .alignleft,
.article-body .alignright,
.article-body img[width],
.article-body img[height],
.article-body table,
.article-body iframe,
.article-body video,
.article-body pre,
.article-body figure,
.article-body .wp-caption {
    max-width: 100% !important;
    height: auto !important;
}
.article-body iframe,
.article-body video {
    width: 100%;
    aspect-ratio: 16 / 9;   /* стандартное соотношение для большинства видео */
}
.article-body img {
    display: block;
    margin: 0 auto;
    padding-bottom: 8px;
}
.article-body iframe,
.article-body video {
    max-width: 100%;
    height: auto;
}
.article-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}
.article-body pre,
.article-body code {
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 100%;
}
.article-body [style*="width"] {
    max-width: 100% !important;
}
/* Маленькие изображения (эмодзи, иконки) делаем инлайн, чтобы они оставались в тексте */
.article-body img[style*="vertical-align:"] {
    display: inline !important;
    margin: 0 2px !important;
    padding: 0 !important;
    float: none !important;
    max-width: none !important;
    vertical-align: middle !important;
}
/* ── Стили для кода ── */
.article-body code {
    font-family: 'Courier New', monospace;
    background: #eef5ee;
    padding: 2px 6px;
    font-size: 0.8em;
    border-radius: 2px;
    word-break: break-word;
    line-height: 1;
}
.article-body pre {
    background: #e8f0e8;
    border: 3px solid #2e7d32;   /* толстая контрастная рамка */
    padding: 12px 16px;
    overflow-x: auto;
    margin: 12px 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    line-height: 1;
}
.article-body pre code {
    background: transparent;
    padding: 0;
    border: none;
    font-size: inherit;
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1;
}

.article-list .list-item {
    margin-bottom: 24px;
    border-bottom: 1px solid #c8e6c9;
    padding-bottom: 16px;
}
.article-list .list-item h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px 0;
}
.article-list .list-item h2 a {
    color: #1b5e20;
    text-decoration: none;
}
.article-list .list-item h2 a:hover {
    text-decoration: underline;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.85em;
    color: #558b2f;
    margin-bottom: 6px;
    padding-bottom: 4px;
}
.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.item-tags .tag {
    background: #c8e6c9;
    color: #1b5e20;
    padding: 2px 8px;
    border-radius: 0;
    font-size: 12px;
    border: 1px solid #a5d6a7;
}
.item-description {
    margin: 0;
    color: #2e4a2e;
    font-size: 14px;
    line-height: 1.5;
}
.item-date {
    color: #000000;
    vertical-align: middle;
    margin-top: 2px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #c8e6c9;
}
.pagination a {
    color: #1b5e20;
    text-decoration: none;
    border: 1px solid #a5d6a7;
    padding: 4px 12px;
    background: #e8f5e9;
    transition: background 0.2s;
}
.pagination a:hover {
    background: #c8e6c9;
}
.pagination .current-page {
    font-weight: 600;
    color: #1b5e20;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 5px 0;
    border-top: 3px solid #b8d6b9;
    border-bottom: 3px solid #b8d6b9;
    background: #f2fff2;
    font-size: 0.9em;
    color: #346b0f;
}
.publish-date {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.tag {
    background: #c8e6c9;
    color: #1b5e20;
    padding: 2px 10px;
    border-radius: 0;
    # font-size: 0.9em;
    letter-spacing: 0.3px;
    border: 1px solid #a5d6a7;
    transition: background 0.2s;
}
.tag:hover {
    background: #a5d6a7;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 4px 0;
    margin-top: 8px;
    gap: 20px;
    font-size: 0.8em;
}
.post-navigation a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s;
    max-width: 45%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.post-navigation a:hover {
    color: #0d3d0d;
    text-decoration: underline;
}
.post-navigation .prev {
    text-align: left;
}
.post-navigation .next {
    text-align: right;
}

.alignright {
    float: right;
}
.alignleft {
    float: left;
}
.imgdesc {
    width: 100%;
    text-align: center;
}
.site-descr {
    font-size: 0.85em;
    border-bottom: 2px solid #c8e6c9;
    color: #1b5e20;
    text-align: center;
    padding-bottom: 10px;
}

.footer {
    background: #c8e6c9;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #a5d6a7;
    font-size: 0.95em;
    color: #2e4a2e;
    margin-top: 0;
}
.footer .copy {
    font-weight: 500;
    color: #1b5e20;
}
.footer .meta {
    margin-top: 8px;
    font-size: 0.85em;
    color: #2a5c39;
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: block;
}
.footer .meta span {
    display: inline-block;
    margin: 0 10px;
}

@media (min-width: 768px) {
    .article-body {
        # text-align: justify;
        # text-justify: inter-word;
        word-break: normal;
        -webkit-hyphens: manual;
        hyphens: manual;
    }
}

@media (max-width: 760px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .col-left {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px 24px;
        padding: 20px 20px;
        border-right: none;
        border-bottom: 1px solid #c8e6c9;
    }
    .logo-wrap {
        flex: 0 0 auto;
    }
    .menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .menu-item {
        padding: 6px 12px;
        font-size: 14px;
        border-left: none;
        border-bottom: none;
        background: transparent;
    }
    .menu-item:hover {
        background: #c8e6c9;
    }
    .col-right {
        padding: 20px 20px;
    }
    .article-body {
        font-size: 1.1em;
        word-break: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    .article-header h1 {
        font-size: 23px;
    }
    .footer .meta span {
        display: block;
        margin: 3px 0;
    }
    .post-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-top: 12px;
    }
    .tags {
        margin-left: 0;
        justify-content: flex-end;
    }
    .item-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .post-navigation a {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

@media (max-width: 480px) {
    .col-left {
        flex-direction: column;
        align-items: stretch;
    }
    .menu {
        flex-direction: column;
    }
    .menu-item {
        padding: 6px 10px;
    }
}