
:root {
    /* Цветовая палитра */
    --primary-color: #428CDC;
    --primary-dark: #2a6bb5;
    --primary-light: #6aaef2;
    --secondary-color: #2A2D30;
    --accent-orange: #ff6600;
    --accent-orange-hover: #e65c00;
    --text-main: #333333;
    --text-light: #777777;
    --text-white: #ffffff;
    --bg-body: #f4f6f9;
    --bg-white: #ffffff;
    --bg-light: #eef2f5;
    --border-color: #e1e4e8;
    
    /* Размеры и отступы */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 2rem;

    /* Тени */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.06);

    /* Типографика */
    --font-main: 'Roboto', 'Segoe UI', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Сброс и базовые стили */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img, svg {
    max-width: 100%;
    display: block;
}

/* Утилитарные классы из HTML (адаптация) */
.flx { display: flex; }
.jcsb { justify-content: space-between; }
.aic { align-items: center; }
.fxg { flex-grow: 1; }
.wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gap-md);
}

/* Header */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--gap-sm) 0;
}

.head-top {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--gap-sm);
    margin-bottom: var(--gap-sm);
}

.download {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
    gap: 0.5rem;
    border: 1px solid var(--border-color);
}

.download .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bg-white);
    border-radius: 50%;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.download .btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Кнопки в шапке */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    gap: 0.5rem;
}

.radius20 { border-radius: var(--radius-lg); }
.h30 { height: 36px; }

.fon-blu {
    background-color: rgba(66, 140, 220, 0.1);
    color: var(--primary-color);
}

.fon-blu:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.fon-blu:hover svg path {
    fill: var(--text-white);
}

.fon-orang {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-hover));
    color: var(--text-white);
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
}

.fon-orang:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.4);
}

.fon-blu2 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
}

.fon-blu2:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 10px rgba(66, 140, 220, 0.4);
}

/* Дропдауны и время */
.drop {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 0.5rem;
}

.time {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

/* Логотип */
.logo svg {
    height: 40px;
    width: auto;
}

.logo path {
    fill: var(--secondary-color); /* Сделаем лого темным для светлого фона */
}
.logo circle {
    fill: var(--accent-orange);
}

/* Главное меню */
.main-menu ul {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.main-menu a {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-medium);
}

.main-menu a:hover {
    color: var(--primary-color);
}

.main-menu a:hover::after {
    width: 100%;
}

/* Основной контент (Grid Layout) */
.content-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--gap-lg);
    margin-top: var(--gap-lg);
    align-items: start;
}

/* Сайдбар */
.menu-category {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.menu-category ul {
    display: flex;
    flex-direction: column;
}

.menu-category > ul > li > a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    font-weight: 500;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.menu-category > ul > li > a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 1.5rem; /* Эффект сдвига */
}

.menu-category svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.menu-category a:hover svg {
    transform: scale(1.1);
}

/* Подменю в сайдбаре */
.menu-category ul ul {
    background-color: #f9fbfd;
}

.menu-category ul ul li a {
    padding: 0.7rem 1.2rem 0.7rem 3rem; /* Отступ для вложенности */
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.menu-category ul ul li a:hover {
    color: var(--text-main);
    background-color: rgba(0,0,0,0.02);
}

/* Основная статья */
.content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

h1.center {
    text-align: center;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    color: var(--text-main);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

h1.center::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.refka {
    text-align: center;
    margin-bottom: 2rem;
}

.refka a {
    display: inline-block;
    background: var(--accent-orange);
    color: var(--text-white);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.refka a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.5);
    background: var(--accent-orange-hover);
}

/* Контент статьи */
.entry-content {
    font-size: 1.05rem;
    color: var(--text-main);
}

.entry-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.entry-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

/* Навигация внутри статьи */
nav ol {
    background: var(--bg-light);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    counter-reset: item;
}

nav ol li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

nav ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    font-weight: bold;
    color: var(--primary-color);
}

nav ol li a {
    color: var(--primary-dark);
    font-weight: 500;
    border-bottom: 1px dashed transparent;
}

nav ol li a:hover {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

/* Списки в тексте */
.entry-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.entry-content ul li::before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Таблицы */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    min-width: 600px;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tr:hover {
    background-color: #f1f4f8;
}

table td:first-child {
    font-weight: 600;
    color: var(--secondary-color);
    width: 30%;
    border-right: 1px solid var(--border-color);
}

/* Формы (если есть, стилизация на будущее) */
input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 140, 220, 0.2);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hide_992 {
        display: none !important;
    }
    
    .content-row {
        grid-template-columns: 1fr;
    }

    .col-left {
        display: none; /* Скрываем боковое меню на планшетах, либо можно сделать выпадающим */
    }

    .head-top {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 1.5rem;
    }

    .refka a {
        width: 100%;
        padding: 0.8rem;
    }

    table td {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    table td:first-child {
        width: 40%;
    }
    
    h1.center {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .head-bottom {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .logo svg {
        height: 30px;
    }

    .table-responsive {
        margin: 0 -1.5rem 2rem -1.5rem;
        border-radius: 0;
        width: calc(100% + 3rem);
    }
}
