
:root {
    /* Цветовая палитра */
    --primary-blue: #0f5bce;
    --primary-blue-hover: #0a46a3;
    --secondary-blue: #428CDC;
    --accent-orange: #ff5722;
    --accent-orange-hover: #e64a19;
    --text-main: #1f2937;
    --text-secondary: #6b7280;
    --bg-body: #f3f4f6;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10b981;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow-blue: 0 0 15px rgba(66, 140, 220, 0.3);

    /* Размеры и отступы */
    --container-width: 1200px;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-full: 9999px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', system-ui, -apple-system, 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-base);
}

ul, ol {
    list-style: none;
}

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

/* Utilities based on HTML classes */
.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; }
.w500 { font-weight: 500; }
.f12 { font-size: 0.75rem; }

.b10 { margin-bottom: 0.625rem; }
.b20 { margin-bottom: 1.25rem; }
.r10 { margin-right: 0.625rem; }
.r20 { margin-right: 1.25rem; }
.h30 { height: 1.875rem; display: flex; align-items: center; }
.radius20 { border-radius: var(--radius-full); }

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

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

/* Interactive Elements & Buttons */
.download {
    background: rgba(66, 140, 220, 0.1);
    color: var(--primary-blue);
    padding: 0 1rem;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.download:hover {
    background: rgba(66, 140, 220, 0.2);
    border-color: var(--secondary-blue);
}

.btn-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-base);
}

.btn-icon:hover {
    background: var(--bg-white);
    transform: scale(1.1);
}

.fon-blu, .fon-blu2 {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: white;
    padding: 0 1.25rem;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-glow-blue);
    border: none;
    cursor: pointer;
}

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

.fon-blu svg path, .fon-blu2 svg path {
    fill: white;
}

.fon-orang {
    background: linear-gradient(135deg, #ff7043, var(--accent-orange));
    color: white;
    padding: 0 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
}

.fon-orang:hover {
    background: linear-gradient(135deg, #ff8a65, #f4511e);
    transform: translateY(-1px);
}

/* Dropdowns & Time */
.drop {
    padding: 0 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.drop:hover {
    color: var(--primary-blue);
}

.drop.time {
    font-weight: 600;
    color: var(--text-main);
}

/* Logo Area */
.head-bottom {
    padding-top: 0.75rem;
    align-items: center;
}

.logo a {
    display: block;
    width: 140px;
    transition: var(--transition-base);
}

.logo svg {
    width: 100%;
    height: auto;
}

.logo svg path[fill="#fff"] {
    fill: var(--primary-blue); /* Перекрашиваем белый лого в синий для светлой темы */
}
.logo svg circle { fill: var(--accent-orange); }

.logo:hover {
    opacity: 0.8;
}

/* Main Menu */
.main-menu ul {
    display: flex;
    gap: 0.5rem;
    margin-left: 2rem;
    flex-wrap: wrap;
}

.main-menu a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.main-menu a:hover {
    background: rgba(66, 140, 220, 0.05);
    color: var(--primary-blue);
}

.main-menu a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

/* Sidebar Menu */
.menu-category {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 5rem;
}

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

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

.menu-category > ul > li > a:hover {
    background-color: #f0f7ff;
    color: var(--primary-blue);
    border-color: #dbeafe;
    padding-left: 1.25rem; /* Slide effect */
}

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

/* Nested Submenu */
.menu-category ul ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
    border-left: 2px solid var(--border-color);
    padding-left: 0.5rem;
}

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

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

.menu-category ul ul svg {
    width: 1rem;
    height: 1rem;
}

/* Content Area */
.content {
    min-width: 0; /* Prevents flex/grid overflow */
}

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

/* Article Typography */
h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    text-align: center;
    background: -webkit-linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--text-main);
    border-left: 4px solid var(--accent-orange);
    padding-left: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.refka a {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    font-weight: 700;
    padding: 1rem 3rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 20px rgba(255, 87, 34, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

.refka a:hover {
    transform: scale(1.05);
    background: var(--accent-orange-hover);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 87, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

nav ol, .entry-content ul {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

nav ol li, .entry-content ul li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

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

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

/* Tables */
.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: var(--bg-white);
    font-size: 0.95rem;
}

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

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

table tr td:first-child {
    font-weight: 600;
    color: var(--text-main);
    width: 30%;
}

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

/* Form Elements (Generic) */
input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .hide_992 { display: none !important; }
    
    .content-row {
        grid-template-columns: 1fr;
    }
    
    .col-left {
        order: 2; /* Move sidebar below content on tablets */
    }
}

@media (max-width: 768px) {
    .head-top {
        justify-content: center;
    }
    
    .logo {
        margin: 0 auto;
    }
    
    .content-row {
        margin-top: 1rem;
        gap: 1rem;
    }
    
    .box.text {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    table td, table th {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    table tr td:first-child {
        width: 40%;
    }
    
    .refka a {
        width: 100%;
        padding: 1rem;
    }
}
