/* Full theme CSS - Updated */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0 !important;
    padding: 0 !important;
}

/* Убираем skip-link */
.skip-link,
a.skip-link,
.screen-reader-text {
    display: none !important;
    visibility: hidden !important;
}

.site { 
    margin: 0 !important;
    padding: 0 !important;
}

.site-header {
    background: transparent;
    position: relative;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.site-logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.site-logo:hover { 
    opacity: 0.8; 
}

.main-navigation { 
    flex: 1; 
    display: flex; 
    justify-content: flex-end; 
}

.main-navigation ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-navigation li {
    position: relative;
}

/* Основные ссылки меню */
.main-navigation a {
    display: block;
    padding: 10px 18px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.main-navigation a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    color: #667eea;
}

/* Выпадающее подменю */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.main-navigation ul ul li {
    width: 100%;
}

/* Индикатор подменю */
.menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 10px;
    margin-left: 5px;
    opacity: 0.6;
}

.menu-toggle {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* Мобильная версия */
@media (max-width: 968px) {
    .header-inner { 
        padding: 20px 15px; 
    }
    
    .site-logo { 
        font-size: 24px; 
    }
    
    .menu-toggle { 
        display: block; 
    }
    
    .main-navigation {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: white;
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        overflow-y: auto;
        animation: slideInRight 0.3s ease-out;
    }
    
    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
    
    .main-navigation.active { 
        display: flex; 
    }
    
    .main-navigation ul { 
        flex-direction: column; 
        gap: 5px; 
        width: 100%; 
    }
    
    .main-navigation a { 
        padding: 14px 16px; 
        font-size: 15px; 
    }
    
    /* Подменю в мобильной версии */
    .main-navigation ul ul {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(102,126,234,0.05);
        margin: 5px 0 5px 15px;
        padding: 5px;
    }
    
    .main-navigation li.menu-open > ul {
        display: flex;
    }
    
    .menu-item-has-children > a {
        position: relative;
        padding-right: 40px;
    }
    
    .submenu-toggle {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #667eea;
        font-size: 18px;
        cursor: pointer;
        padding: 5px 10px;
    }
    
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 32px;
        color: #2c3e50;
        cursor: pointer;
        padding: 5px;
        line-height: 1;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active { 
        display: block; 
    }
}

.site-main { 
    min-height: calc(100vh - 200px); 
    width: 100%; 
    margin: 0; 
    padding: 0; 
}

.page-content { 
    padding: 0; 
    width: 100%; 
}

.page-content > * { 
    max-width: 100%; 
}

.site-footer {
    width: 100%;
    background: #2c3e50;
    color: rgba(255,255,255,0.8);
    padding: 40px 20px;
    margin: 0;
    text-align: center;
}

/* Кнопка "Наверх" с эффектом масштабирования */
#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 9999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-8px) scale(1.2);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#backToTop:active {
    transform: translateY(-8px) scale(1.1);
}

@media (max-width: 768px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
}