* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
    background-color: #f5f7fa;
}

/* Шапка сайта */
.navbar {
    background: linear-gradient(135deg, #1a2530 0%, #2c3e50 100%);
    color: white;
    padding: 0 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    position: sticky;
    top: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 0;
}

.logo-text h1 {
    font-size: 1.5em;
    font-weight: 600;
}

.logo-text p {
    font-size: 0.85em;
    color: #bdc3c7;
    margin-top: 3px;
}

.header-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

a {
    color: #3498db;
    text-decoration: none;
}

.header-nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.95em;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #3498db;
}

.header-nav a.active {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.back-to-site {
    background-color: #3498db;
    color: white !important;
    padding: 10px 20px !important;
}

.back-to-site:hover {
    background-color: #2980b9 !important;
    transform: translateY(-2px);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border-radius: 20px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.15);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
}

/* Основной контейнер */
.main-container {
    display: flex;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Левая панель навигации */
.sidebar-title {
    color: #2c3e50;
    padding: 0 25px 25px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 25px;
}

.sidebar {
    width: 280px;
    background-color: white;
    padding: 25px 0;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    height: calc(100vh - 80px);
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section h3 {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7f8c8d;
    padding: 0 25px;
    margin-bottom: 15px;
}

.doc-nav-links {
    list-style: none;
}

.doc-nav-links li {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.doc-nav-links li:hover {
    border-left-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

.doc-nav-links li.active {
    border-left-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.doc-nav-links li.active a {
    color: #3498db;
    font-weight: 600;
}

.doc-nav-links a {
    display: flex;
    align-items: center;
    color: #2c3e50;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 0.95em;
    transition: color 0.2s;
}

.doc-nav-links a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #7f8c8d;
}

.doc-nav-links li.active a i,
.doc-nav-links li:hover a i {
    color: #3498db;
}

/* Основная область контента */
.content {
    flex-grow: 1;
    padding: 40px 50px;
    overflow-y: auto;
    max-width: 900px;
}

.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eaecef;
}

.page-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-header .description {
    color: #7f8c8d;
    font-size: 1.1em;
    line-height: 1.6;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 8px;
}

/* Стили для глав (остаются как в предыдущем шаблоне) */
.chapter {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.chapter h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaecef;
}

.chapter h3 {
    color: #3498db;
    font-size: 1.4em;
    margin: 25px 0 15px;
}

.chapter p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

.chapter ul, .chapter ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.chapter li {
    line-height: 1.7;
    margin-bottom: 8px;
    color: #555;
}

.code-block, .note, .warning {
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    line-height: 1.6;
}

.code-block {
    background-color: #282c34;
    color: #abb2bf;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.note {
    background-color: #e8f4fd;
    border-left: 4px solid #3498db;
}

.warning {
    background-color: #fdf2e8;
    border-left: 4px solid #e67e22;
}

.steps {
    counter-reset: step-counter;
}

.step {
    counter-increment: step-counter;
    margin-bottom: 25px;
    padding-left: 50px;
    position: relative;
}

.step:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #3498db;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Футер */
footer {
    background: #1a2530;
    color: #ecf0f1;
}

.footer-column h4 {
    color: #3498db;
}

.footer-column a, .footer-column div {
    color: rgba(224, 247, 250, 0.8);
}

.footer-column a:hover {
    color: #3498db;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}


/* Быстрые ссылки в контенте */
.quick-links {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.quick-links h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background-color: #e8f4fd;
    color: #3498db;
    transform: translateX(5px);
}

.quick-link i {
    margin-right: 10px;
    color: #3498db;
}


.copyright {
    color: rgba(224, 247, 250, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
/* Адаптивность */
@media (max-width: 480px) {
    .mt-content {
        margin-top: 20px;
    }
    .main-container {
        padding: 0 10px;
    }

    .content {
        padding: 0px;
    }

    .chapter {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        gap: 15px;
        padding: 15px 0;
    }
    
    .logo-area {
        width: 100%;
        justify-content: center;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .chapter {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
}

@media (min-width: 768px) {
    .content {
        padding: 20px 10px;
    }

    .mt-content {
        margin-top: 75px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        padding: 15px;
        margin-bottom: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5em;
        cursor: pointer;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .header-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 99;
    }
    
    .header-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .header-nav a {
        padding: 15px;
        border-radius: 5px;
        background-color: rgba(255,255,255,0.05);
    }
}

@media (min-width: 1200px) {
    .main-container {
        padding: 0 20px;
    }
    
    .content {
        padding: 30px;
    }

    .content-scrollable {
        overflow-y: auto;
        position: sticky;
        height: calc(100vh - 80px);
    }

    .chapter {
        margin-bottom: 60px;
    }
}
