/* Основные переменные */
:root {
    /* Цвета */
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #bbdefb;
    --accent-color: #00b0ff;
    --text-color: #212121;
    --text-light: #757575;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    
    /* Размеры */
    --border-radius: 6px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка сайта */
.site-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
    gap: 1rem;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    transition: var(--transition);
}

.logo:hover .logo-img {
    transform: rotate(15deg);
    border-color: var(--accent-color);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.highlight {
    color: var(--accent-color);
}

.tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.2rem;
}

/* Поиск */
.search-box {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.search-form {
    display: flex;
    position: relative;
    width: 200px;
}

.search-form input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    width: 250px;
}

.search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Основная навигация */
.main-navigation {
    background-color: var(--primary-dark);
}

.main-navigation ul {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin-right: 268px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    font-weight: 500;
}

.main-navigation a i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.main-navigation .current a {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Основное содержимое */
.main-content-area {
    padding: 2rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs .sep {
    margin: 0 0.5rem;
    color: var(--primary-light);
}

.page-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Боковая панель */
.sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
}

.sidebar-widgets {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

/* Тэги */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.tags-label {
    font-weight: 600;
    color: var(--text-color);
}

.tags-label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Подстраницы */
.subpages-list {
    margin-top: 2rem;
}

.subpage-item {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.subpage-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.subpage-item h3 a {
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.subpage-item h3 a i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Подвал */
.site-footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.footer-nav li,
.footer-contacts li {
    margin-bottom: 0.8rem;
    list-style: none;
}

.footer-nav a,
.footer-contacts a {
    color: white;
    display: flex;
    align-items: center;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-nav a:hover,
.footer-contacts a:hover {
    opacity: 1;
    text-decoration: none;
    transform: translateX(5px);
}

.footer-nav a i,
.footer-contacts a i {
    margin-right: 0.5rem;
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Мобильное меню */
.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    padding: 0.5rem;
    z-index: 1001;
}

/* Адаптация */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        order: -1;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-box {
        position: static;
        transform: none;
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form input:focus {
        width: 100%;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        margin-right: 0;
        padding-top: 4rem;
        height: 100%;
    }
    
    .header-top {
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .tagline {
        display: none;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .page-content,
    .sidebar-widgets {
        padding: 1.5rem 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}