html { overflow-x: hidden; }
body { font-family: system-ui, -apple-system, sans-serif; background: #f4f7f6; color: #2d3748; margin: 0; line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-header { background: white; padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: relative; }
.header-wrap { display: flex; justify-content: space-between; align-items: center; position: relative; gap: 12px; }
.logo { text-decoration: none; font-size: 24px; font-weight: bold; color: #2d3748; flex-shrink: 0; }
.logo-accent { color: #2b6cb0; }
.nav-menu { display: flex; gap: 20px; align-items: center; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: #2d3748; }
.nav-link { text-decoration: none; color: #4a5568; font-weight: 600; }
.nav-link.active, .nav-link:hover { color: #2b6cb0; }
.btn-lk { background: #e2e8f0; padding: 8px 16px; border-radius: 8px; }
.breadcrumbs { margin: 20px 0; font-size: 0.9rem; color: #718096; }
.breadcrumbs a { color: #2b6cb0; text-decoration: none; }
.breadcrumbs .sep { margin: 0 10px; }
.post { background: white; padding: 40px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.post-title { font-size: 2.5rem; color: #1a202c; margin-top: 0; }
.post-meta { color: #718096; margin-bottom: 20px; font-size: 0.95rem; }
.post-meta span { margin-right: 15px; }
.post-body h2 { color: #2d3748; margin-top: 30px; }
.post-body p { margin-bottom: 15px; }

/* Оглавление статьи (TOC) */
.article-toc { background: #f8fafc; border-left: 4px solid #2b6cb0; padding: 20px 25px; margin: 25px 0 30px; border-radius: 8px; }
.article-toc h3 { margin: 0 0 15px 0; color: #2d3748; font-size: 1.2rem; }
.article-toc ul { list-style: none; padding: 0; margin: 0; }
.article-toc li { margin-bottom: 10px; }
.article-toc a { color: #2b6cb0; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.article-toc a:hover { color: #1a365d; text-decoration: underline; }

.related-posts { margin-top: 40px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.related-card.is-hidden { display: none !important; }
.category-search { margin: 20px 0 0; }
.category-search-label { display: block; font-size: 0.9rem; font-weight: 600; color: #4a5568; margin-bottom: 8px; }
.category-search-input { width: 100%; max-width: 560px; box-sizing: border-box; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; color: #2d3748; }
.category-search-input:focus { outline: none; border-color: #2b6cb0; }
.category-search-empty { display: none; text-align: center; padding: 40px 20px; color: #718096; }
.category-search-empty.visible { display: block; }
.site-footer { background: white; padding: 40px 0; border-top: 1px solid #e2e8f0; text-align: center; color: #718096; margin-top: 60px; }
.footer-links a { color: #4a5568; text-decoration: none; margin: 0 10px; }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .menu-toggle ~ .nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        padding: 8px 20px 16px;
        border-top: 1px solid #e2e8f0;
        z-index: 50;
    }
    .menu-toggle ~ .nav-menu.active { display: flex !important; }
    .menu-toggle ~ .nav-menu .nav-link { display: block; padding: 12px 0; }
    .related-grid { grid-template-columns: 1fr; }
    .home-category-grid { grid-template-columns: 1fr !important; }
    .post { padding: 20px; }
    .post-title { font-size: 1.75rem; overflow-wrap: anywhere; }
    .footer-links a { display: inline-block; margin: 6px 10px; }
}
