
:root {
    /* Цветовая палитра */
    --primary-color: #0d47a1;
    --primary-light: #1565c0;
    --primary-dark: #002171;
    --accent-color: #ff6f00;
    --accent-hover: #ff8f00;
    --text-main: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

ul, ol {
    list-style: none;
}

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

/* Утилитарные классы из HTML */
.wrap {
    width: 100%;
    max-width: 80rem; /* 1280px */
    margin: 0 auto;
    padding: 0 1rem;
}

.flx {
    display: flex;
}

.jcsb {
    justify-content: space-between;
}

.aic {
    align-items: center;
}

.fxg {
    flex-grow: 1;
}

/* Layout Grid */
.content-row {
    display: grid;
    grid-template-columns: 17.5rem 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: start;
}

/* HEADER */
header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

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

.download {
    background-color: #e3f2fd;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.5rem;
}

.btn-icon svg {
    fill: var(--primary-color);
    transition: var(--transition);
}

.btn-icon:hover svg {
    transform: translateY(-2px);
}

/* Кнопки в шапке */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 2rem;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    transition: var(--transition);
    white-space: nowrap;
}

.fon-blu {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: var(--text-white);
    box-shadow: 0 4px 6px rgba(13, 71, 161, 0.2);
}

.fon-blu:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(13, 71, 161, 0.3);
}

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

.fon-blu2 {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

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

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

.fon-orang:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 111, 0, 0.3);
}

/* Логотип */
.logo svg {
    height: 2.5rem;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo path {
    fill: var(--primary-color);
}
.logo circle {
    fill: var(--accent-color);
}

/* Главное меню */
.main-menu ul {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
}

.main-menu a {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    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(--accent-color);
    transition: var(--transition);
}

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

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

/* SIDEBAR */
.col-left {
    background-color: var(--bg-sidebar);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    overflow: hidden;
}

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

.menu-category > ul > li > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-category > ul > li > a:hover {
    background-color: #f0f7ff;
    color: var(--primary-color);
    transform: translateX(4px);
}

.menu-category svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.menu-category svg path {
    fill: #90a4ae; /* Default icon color */
    transition: var(--transition);
}

.menu-category a:hover svg path {
    fill: var(--primary-color);
}

/* Подменю в сайдбаре */
.menu-category ul ul {
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
}

.menu-category ul ul li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-category ul ul li a:hover {
    color: var(--primary-color);
}

/* MAIN CONTENT */
.content {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    min-height: 80vh;
}

.box.text h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.2;
}

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

.refka a {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-color), #ff9100);
    color: white;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 3rem;
    box-shadow: 0 10px 20px rgba(255, 111, 0, 0.3);
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

.refka a:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 25px rgba(255, 111, 0, 0.4);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 111, 0, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(255, 111, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 111, 0, 0); }
}

.entry-content {
    color: var(--text-main);
    font-size: 1rem;
}

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

.entry-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

/* Навигация внутри статьи */
.entry-content nav {
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.entry-content nav ol {
    list-style-type: none;
    counter-reset: item;
}

.entry-content nav ol li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
}

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

.entry-content nav a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.entry-content nav a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Списки */
.entry-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

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

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

table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
}

table td:first-child {
    font-weight: 600;
    color: var(--primary-dark);
    width: 30%;
}

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

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hide_992 {
        display: none !important;
    }
    
    .content-row {
        grid-template-columns: 1fr;
    }
    
    .col-left {
        display: none; /* Или можно сделать выпадающим меню */
    }
}

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

    .wrap {
        padding: 0 0.75rem;
    }
    
    .head-top {
        flex-direction: column;
        gap: 1rem;
    }

    .head-top .flx {
        width: 100%;
        justify-content: space-between;
    }
    
    .download, .r20 {
        display: none;
    }

    .content {
        padding: 1.25rem;
    }
    
    table td {
        padding: 0.75rem;
    }
    
    table td:first-child {
        width: 40%;
    }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; 
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}
