/* ===== ОСНОВНЫЕ ЦВЕТА ===== */
:root {
    --chuvash-gold: #E6A800;
    --chuvash-purple: #4A192C;
    --chuvash-purple-light: #6B2A40;
    --chuvash-white: #FDFBF7;
    --chuvash-black: #1A110D;
    --chuvash-gold-light: #FFE066;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /*
        Основной шрифт для текста статей — Liberation Serif
        Liberation Serif — системный, поэтому не подключается через Google Fonts
    */
    font-family: 'Liberation Serif', 'PT Serif', 'Times New Roman', serif;
    background: var(--chuvash-white);
    color: var(--chuvash-black);
    display: flex;
    min-height: 100vh;
}

/* ===== БОКОВОЕ МЕНЮ ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: var(--chuvash-purple);
    color: #d4c5b8;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 1000;
    box-shadow: 2px 0 15px rgba(0,0,0,0.5);
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 0 12px;
}
.sidebar-inner::-webkit-scrollbar { width: 3px; }
.sidebar-inner::-webkit-scrollbar-thumb { background: var(--chuvash-gold); border-radius: 10px; }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 30px 8px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 20px;
    min-height: 50px;
}

.logo-text {
    font-family: 'Inter', 'PT Sans', 'Arial', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--chuvash-gold);
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}
.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--chuvash-gold);
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle-btn:hover {
    background: var(--chuvash-purple-light);
}

.nav-item {
    font-family: 'Inter', 'PT Sans', 'Arial', sans-serif;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: #d4c5b8;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}
.nav-item:hover {
    background: var(--chuvash-purple-light);
    color: #fff;
}
.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    color: var(--chuvash-gold);
}
.nav-item:hover i {
    color: var(--chuvash-gold-light);
}

.nav-text {
    opacity: 1;
    transition: opacity 0.2s;
}
.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.divider {
    height: 1px;
    background: rgba(255, 215, 0, 0.2);
    margin: 16px 12px;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    padding-top: 16px;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    margin-left: 250px;
    padding: 40px 60px;
    max-width: 900px;
    flex: 1;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    background: var(--chuvash-white);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 72px;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

/* ===== СТИЛИ ДЛЯ ТЕКСТА (Liberation Serif, увеличенный) ===== */
.content-article h1 {
    font-family: 'Liberation Serif', 'PT Serif', 'Times New Roman', serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--chuvash-purple);
}
.content-article .meta {
    font-family: 'Inter', 'PT Sans', 'Arial', sans-serif;
    color: #6b5f54;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd6ce;
    padding-bottom: 20px;
}
.content-article .meta i {
    color: var(--chuvash-gold);
}
.content-article p {
    font-family: 'Liberation Serif', 'PT Serif', 'Times New Roman', serif;
    font-size: 21px;
    line-height: 1.9;
    margin-bottom: 28px;
    color: var(--chuvash-black);
}
.content-article .epigraph {
    font-family: 'Liberation Serif', 'PT Serif', 'Times New Roman', serif;
    font-style: italic;
    font-size: 23px;
    color: var(--chuvash-purple);
    padding-left: 30px;
    border-left: 4px solid var(--chuvash-gold);
    margin: 30px 0 40px 0;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .main-content {
        padding: 20px;
        margin-left: 0 !important;
    }
    .sidebar {
        transform: translateX(-100%);
        width: 280px !important;
        transition: transform 0.3s;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .overlay.active {
        display: block;
    }
    .sidebar.collapsed {
        width: 280px !important;
    }
    .content-article h1 {
        font-size: 32px;
    }
    .content-article p {
        font-size: 18px;
        line-height: 1.8;
    }
    .content-article .epigraph {
        font-size: 19px;
    }
}