
:root {
    /* Цветовая палитра */
    --primary-blue: #428CDC;
    --primary-blue-dark: #0052B4;
    --primary-orange: #fb4d00;
    --primary-orange-hover: #e04500;
    --text-main: #2A2D30;
    --text-secondary: #5F6469;
    --text-light: #ffffff;
    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e6e8eb;
    
    /* Размеры и отступы */
    --container-width: 1200px;
    --header-height: 4.5rem; /* ~72px */
    --radius-sm: 0.625rem; /* 10px */
    --radius-md: 1.25rem; /* 20px */
    --radius-lg: 1.5rem; /* 24px */
    
    /* Тени */
    --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(66, 140, 220, 0.2);
    
    /* Типографика */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --fz-sm: 0.875rem;
    --fz-base: 1rem;
    --fz-lg: 1.125rem;
    --fz-xl: clamp(1.5rem, 2.5vw, 2rem);
}

/* --- Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, opacity 0.3s ease;
}

ul, ol {
    list-style: none;
}

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

/* --- Utilities --- */
.wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.flx { display: flex; }
.jcsb { justify-content: space-between; }
.aic { align-items: center; }
.fxg { flex-grow: 1; }
.f12 { font-size: 0.75rem; }
.w500 { font-weight: 500; }

/* Margin Helpers */
.b10 { margin-bottom: 0.625rem; }
.b20 { margin-bottom: 1.25rem; }
.r10 { margin-right: 0.625rem; }
.r20 { margin-right: 1.25rem; }

/* Radius & Sizing Helpers */
.radius20 { border-radius: var(--radius-md); }
.h30 { height: 1.875rem; line-height: 1.875rem; }

/* Colors Helpers */
.fon-blu { background-color: rgba(66, 140, 220, 0.1); color: var(--primary-blue); }
.fon-blu2 { background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark)); color: white; }
.fon-orang { background: linear-gradient(135deg, var(--primary-orange), #ff7b00); color: white; }

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

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

/* Header Buttons & Downloads */
.download {
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.5rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 5px rgba(66, 140, 220, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 140, 220, 0.25);
}

.drop {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* Main Buttons (Login/Reg) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    filter: brightness(1.05);
}

.btn:active {
    transform: translateY(0);
}

/* Logo */
.logo svg {
    height: 2.5rem;
    width: auto;
}

/* Main Menu Navigation */
.main-menu ul {
    display: flex;
    gap: 1.5rem;
    padding: 0 1rem;
}

.main-menu a {
    font-weight: 600;
    font-size: 0.9rem;
    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-blue);
    transition: width 0.3s ease;
}

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

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

/* --- Layout Grid --- */
.content-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* --- Sidebar (.col-left) --- */
.col-left {
    align-self: start;
}

.menu-category {
    background: var(--bg-sidebar);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    overflow: hidden;
}

.menu-category ul li {
    margin-bottom: 0.25rem;
}

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

.menu-category ul li a svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

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

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

/* Nested lists in sidebar */
.menu-category ul ul {
    margin-left: 1rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border-color);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* --- Main Content (.content) --- */
.content {
    min-width: 0; /* Prevents overflow in grid items */
}

.box.text {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Article Typography */
.entry-content {
    font-size: 1rem;
    color: var(--text-secondary);
}

h1.center {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: var(--fz-xl);
    color: var(--text-main);
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Call to Action (.refka) */
.refka {
    text-align: center;
    margin: 2rem 0;
}

.refka a {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-orange), #ff9100);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(251, 77, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.refka a:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(251, 77, 0, 0.4);
}

.refka a:active {
    transform: translateY(-1px);
}

/* Table of Contents (nav ol) */
.entry-content nav {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.entry-content nav ol {
    padding-left: 1.5rem;
    margin: 0;
}

.entry-content nav ol li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.entry-content nav ol li a {
    color: var(--primary-blue);
    border-bottom: 1px dashed transparent;
}

.entry-content nav ol li a:hover {
    color: var(--primary-blue-dark);
    border-bottom-color: currentColor;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

table th {
    background-color: #f1f4f8;
    color: var(--text-main);
    font-weight: 600;
}

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

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

/* Lists in content */
.entry-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

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

/* --- Forms (Generic Styles requested) --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fff;
}

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

/* --- Media Queries --- */

/* Tablet & Smaller Desktop */
@media (max-width: 992px) {
    .hide_992 {
        display: none !important;
    }
    
    .content-row {
        grid-template-columns: 1fr;
    }
    
    .menu-category {
        display: none; /* Скрываем боковое меню на планшетах, либо можно сделать выпадающим */
    }

    .head-top {
        justify-content: center;
    }
    
    .logo {
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .box.text {
        padding: 1.25rem;
    }
    
    .head-top {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .flx {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    h1.center {
        font-size: 1.5rem;
    }
    
    .refka a {
        width: 100%;
        padding: 0.8rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    .logo svg {
        height: 2rem;
    }
}

/* --- Micro-animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.box.text {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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