:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --primary: #1e293b;
    --primary-light: #334155;
    --accent: #d97706;
    --accent-hover: #b45309;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-color: #dee2e6;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ШАПКА И НАВИГАЦИЯ */
header { background-color: var(--primary); color: #ffffff; padding: 20px 0; position: sticky; top: 0; z-index: 100; border-bottom: 3px solid var(--accent); }
.header-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo a { color: #ffffff; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
nav ul { display: flex; list-style: none; gap: 24px; }
nav a { color: #e2e8f0; font-weight: 500; font-size: 0.95rem; }
nav a:hover, nav a.active { color: var(--accent); }

/* ДВУХКОЛОНОЧНАЯ СЕТКА */
.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin: 40px auto 60px auto; }
.main-grid.article_htm { display: inherit; grid-template-columns: none; gap: unset; }
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .header-wrapper { flex-direction: column; gap: 15px; text-align: center; }
}

/* ПРОМО-БАННЕР (HERO) */
.hero { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); color: #ffffff; padding: 60px 0; }
.hero-content { max-width: 800px; }
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero p { color: #cbd5e1; font-size: 1.1rem; margin-bottom: 24px; }
.warning-badge { background-color: rgba(217, 119, 6, 0.15); border-left: 4px solid var(--accent); padding: 12px 16px; font-size: 0.85rem; color: #fcd34d; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ЗАГОЛОВКИ СЕКЦИЙ */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 2px solid var(--border); color: var(--primary); position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 60px; height: 2px; background-color: var(--accent); }

/* КАРТОЧКИ И КОНТЕЙНЕРЫ */
.card-box { background-color: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; margin-bottom: 24px; box-shadow: var(--shadow); }
.interactive-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.interactive-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05); }

/* МЕТАДАННЫЕ И ССЫЛКИ */
.meta-info { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.category-tag { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.article-code { font-family: monospace; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }


.item-title { font-size: 1.4rem; margin-bottom: 12px; font-weight: 700; }
.item-title a { color: var(--text-main); }
.item-title a:hover { color: var(--accent); }
.excerpt { color: #334155; font-size: 0.95rem; margin-bottom: 16px; }
.action-link { font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.back-link { display: inline-flex; align-items: center; font-size: 0.9rem; font-weight: 600; margin-bottom: 24px; }

/* ТЕКСТ СТАТЬИ И ЛОНГРИДЫ */
.article-text { font-family: Georgia, Cambria, "Times New Roman", Times, serif; font-size: 1.15rem; color: #1e293b; line-height: 1.75; }
.article-text p { margin-bottom: 24px; text-align: justify; }
.article-text h2 { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 40px 0 20px 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ЦИТАТЫ И СПЕЦ-БЛОКИ */
blockquote { background-color: #f1f5f9; border-left: 4px solid var(--primary-light); padding: 20px; margin: 30px 0; font-style: italic; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.1rem; }
blockquote cite { display: block; font-style: normal; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); margin-top: 10px; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.alert-note { background-color: rgba(217, 119, 6, 0.05); border: 1px solid rgba(217, 119, 6, 0.2); border-left: 4px solid var(--accent); padding: 24px; margin: 35px 0; border-radius: var(--radius-sm); }
.alert-note h4 { color: var(--accent-hover); font-size: 1.1rem; margin-bottom: 8px; font-weight: 700; }

/* ВОПРОС-ОТВЕТ (FAQ) */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; gap: 10px; }
.faq-question .q-badge { background: var(--primary); color: #fff; font-size: 0.8rem; padding: 2px 6px; border-radius: 4px; height: max-content; }
.faq-answer { color: #334155; font-size: 1rem; padding-left: 35px; }

/* САЙДБАР (БОКОВАЯ ПАНЕЛЬ) */
.sidebar-box { background-color: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.sidebar-box h4 { font-size: 1.1rem; margin-bottom: 16px; color: var(--primary); font-weight: 700; border-left: 3px solid var(--accent); padding-left: 10px; }
.sidebar-list { list-style: none; }
.sidebar-list li { padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 0.95rem; }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text-main); }
.sidebar-list a:hover { color: var(--accent); }

/* АВТОР */
.author-box { text-align: center; }
.author-avatar { width: 100%; height: auto; background-color: var(--border); border-radius: 50%; margin: 0 auto 12px auto; display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--primary-light); font-size: 1.4rem; }
.author-avatar img { width: 100%; }
.author-avatar2 { float: right; margin: 0 0 0 1em; }
/* ПОДВАЛ */
footer { background-color: var(--primary); color: #94a3b8; padding: 40px 0; font-size: 0.9rem; border-top: 5px solid #0f172a; margin-top: 60px; }
.footer-wrapper { display: flex1; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }


.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.badge-tag {
    background-color: #f0f2f5;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}
.item-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    font-size: 13px;
}