/* Базовые стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Контейнер */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок сайта */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    margin-bottom: 0;
}

.custom-header {
    position: relative;
}

.custom-header-media {
    height: 400px;
    overflow: hidden;
    position: relative;
}

.custom-header-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-branding {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 60px 0 20px;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.site-title a {
    color: white;
    text-decoration: none;
}

.site-description {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Навигация */
.navigation-top,
.main-navigation {
    background: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navigation-top .wrap {
    padding: 0;
}

.main-navigation {
    padding: 0;
}

.main-navigation .menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-navigation .menu li {
    margin: 0;
}

.main-navigation .menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.main-navigation .menu a:hover {
    background-color: #34495e;
}

.menu-toggle {
    display: none;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
}

/* Контент */
.site-content {
    background: white;
    margin-top: 0;
}

.twentyseventeen-panel {
    margin-bottom: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.panel-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.panel-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

.panel-content {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.95);
    margin: 40px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.panel-content .wrap {
    max-width: none;
    padding: 0;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 700;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.entry-content strong {
    color: #e74c3c;
    font-weight: 600;
}

/* Панели без фонового изображения */
.twentyseventeen-panel:not([style*="background-image"]) {
    background: #f8f9fa;
    padding: 80px 0;
    min-height: auto;
}

.twentyseventeen-panel:not([style*="background-image"]) .panel-content {
    background: white;
    margin: 0 40px;
}

/* Подвал */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 40px;
    margin-top: 0;
}

.widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ecf0f1;
    font-weight: 600;
}

.widget p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.search-form {
    display: flex;
    margin-top: 10px;
}

.search-field {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-submit {
    padding: 10px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-submit:hover {
    background: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    .site-description {
        font-size: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
    }
    
    .main-navigation .menu.active {
        display: flex;
    }
    
    .main-navigation .menu a {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .panel-content {
        margin: 20px;
        padding: 30px;
    }
    
    .entry-title {
        font-size: 1.8rem;
    }
    
    .widget-area {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Скрыть ненужные элементы */
.skip-link,
.screen-reader-text,
.menu-scroll-down,
svg {
    display: none !important;
}

/* Исправление для 2gis виджета */
.dg-widget-link {
    display: inline-block;
    padding: 10px 15px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin: 10px 0;
}

.dg-widget-link:hover {
    background: #c0392b;
}

/* Стили для внутренних страниц */
.page-content {
    background: white;
    padding: 40px;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1000px;
}

.page-content .entry-header {
    border-bottom: 3px solid #2c5282;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.page-content .entry-title {
    font-size: 2.5rem;
    color: #2c5282;
    margin: 0;
}

.page-content .entry-content h2 {
    color: #2c5282;
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.page-content .entry-content ul, 
.page-content .entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.page-content .entry-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.page-content .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.page-content .entry-content a {
    color: #2c5282;
    text-decoration: none;
}

.page-content .entry-content a:hover {
    text-decoration: underline;
}

/* Адаптивность для внутренних страниц */
@media (max-width: 768px) {
    .page-content {
        padding: 20px;
        margin: 20px;
    }
    
    .page-content .entry-title {
        font-size: 2rem;
    }
    
    .page-content .entry-content div[style*="grid"] {
        display: block !important;
    }
    
    .page-content .entry-content div[style*="grid"] > div {
        margin-bottom: 30px;
    }
} 