/* Базовые стили */
:root {
    --primary: #2c3e50;
    --secondary: #e74c3c;
    --accent: #3498db;
    --light: #ecf0f1;
    --dark: #34495e;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка */
.site-header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent);
}

/* Контент */
.content-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.page-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: var(--primary);
    border-bottom: 3px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* Таймлайн */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
}

.event {
    position: relative;
    margin-bottom: 40px;
}

.event::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--secondary);
    border: 3px solid white;
}

.date {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.event-content h3 {
    color: var(--secondary);
    margin-bottom: 8px;
}

/* Боковая панель */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.widget h3 {
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    margin-bottom: 10px;
}

.widget a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: var(--accent);
}

/* Подвал */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h4 {
    color: var(--accent);
    margin-bottom: 15px;
}

/* Древовидная структура файлов */
.tree-view {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    overflow-x: auto;
}

.tree-view ul {
    list-style: none;
    padding-left: 20px;
    margin: 5px 0;
    position: relative;
}

.tree-view ul:before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    height: 100%;
    width: 1px;
    background: #ddd;
}

.tree-view li {
    position: relative;
    margin: 5px 0;
}

.tree-view li:before {
    content: '';
    position: absolute;
    top: 10px;
    left: -15px;
    width: 15px;
    height: 1px;
    background: #ddd;
}

.folder {
    color: #e67e22;
    font-weight: bold;
}

.file {
    color: #2c3e50;
}

.tree-view .folder:before {
    content: '📁 ';
    margin-right: 5px;
}

.tree-view .file:before {
    content: '📄 ';
    margin-right: 5px;
}

/* Стили для разделов документации */
.document-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.principles, .notes {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.principles h3, .notes h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

.principles ul, .notes ul {
    list-style-type: none;
    padding-left: 0;
}

.principles li, .notes li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.principles li:before, .notes li:before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #3498db;
}

.file-structure {
    margin: 30px 0;
}

.file-structure h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .site-header {
        flex-direction: column;
        gap: 20px;
    }
}