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

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-wrap: wrap;
}

/* Шапка с панорамой - уменьшенная высота */
.header {
    position: relative;
    height: 300px; /* 70% от оригинальной 400px */
    overflow: hidden;
}

.header-panorama {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Контейнер для плиток панорамы */
.panorama-tiles {
    position: absolute;
    top: 0;
    left: 0;
 /*   width: 10000px;  Общая ширина всей панорамы */
    height: 100%;
    display: flex;
/*    transition: transform 0.1s linear;   */
    will-change: transform;
}

/* Отдельная плитка панорамы */
.panorama-tile {
    flex-shrink: 0;
/*    width: 500px;  Ширина одной плитки */
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.panorama-tile.loaded {
    opacity: 1;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
/*    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);*/
    z-index: 1;
}

.header-content {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    z-index: 3;
    text-align: left;
}

.site-title {
    font-family: 'PT Sans', sans-serif;
    font-size: 2.5rem; /* 70% от оригинального 3.5rem */
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.site-subtitle {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 400px;
}

/* Эффект панорамирования */
.panorama-moving {
/*    animation: panoramaMove 60s linear infinite; */
}

@keyframes panoramaMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-2500px); /* Сдвигаем на половину ширины */
    }
}

/* Основная навигация */
.main-nav {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.mobile-menu-btn {
    display: none;
    background-color: #2A5DB0;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 4px;
}

.nav-menu {
    display: flex;
    list-style: none;
    overflow-x: hidden;
    white-space: nowrap;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 15px 16px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    line-height: 1.2; /* Для двухстрочного текста */
    text-align: center; /* Центрируем текст */
}

.nav-link:hover,
.nav-link.active {
    color: #2A5DB0;
    background-color: #f0f7ff;
    border-bottom-color: #2A5DB0;
}

/* Специальные стили для двухстрочного пункта меню */
.nav-link br {
    display: block;
    content: "";
    margin: 2px 0;
}

/* Для мобильных - навигация вертикальная */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        overflow: visible;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        border-left: 4px solid transparent;
        text-align: left; /* На мобильных выравнивание слева */
    }
    
    .nav-link.active {
        border-left-color: #2A5DB0;
        border-bottom-color: #eee;
    }
}


/* Основной контент */
.main-content {
    padding: 30px 0;
}

/* Боковые колонки */
.sidebar {
    width: 25%;
    padding: 0 15px;
}

.left-sidebar {
    order: 1;
}

.right-sidebar {
    order: 3;
}

.content-column {
    width: 50%;
    padding: 0 15px;
    order: 2;
}

/* Общие стили для секций */
.section-title {
    font-family: 'PT Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2A5DB0;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.separator {
    height: 1px;
    background-color: #eaeaea;
    margin: 25px 0;
}

/* Левая колонка: Фотогалереи */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-thumb {
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

.gallery-info {
    padding: 15px;
}

.gallery-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.photo-count {
    color: #666;
    font-size: 0.9rem;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2A5DB0;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #1a3d7a;
}

/* Центральная колонка: Статья */
.article-header {
    margin-bottom: 25px;
}

.article-title {
    font-family: 'PT Sans', sans-serif;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.featured-article {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.article-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.article-meta i {
    margin-right: 5px;
}

.article-headline {
    font-size: 1.5rem;
    color: #2A5DB0;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-excerpt {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #2A5DB0;
    color: white;
    padding: 12px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: #1a3d7a;
}

.other-articles {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.section-subtitle {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

.articles-list {
    list-style: none;
}

.articles-list li {
    margin-bottom: 12px;
    padding-left: 5px;
}

.articles-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #444;
    text-decoration: none;
    transition: color 0.3s ease;
}

.articles-list a:hover {
    color: #2A5DB0;
}

.articles-list i {
    color: #2A5DB0;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Правая колонка: Поиск и дерево разделов */
.search-widget {
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    margin-bottom: 25px;
}

.search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
}

.search-input:focus {
    border-color: #2A5DB0;
}

.search-btn {
    background-color: #2A5DB0;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background-color: #1a3d7a;
}

/* Дерево разделов (4 уровня вложения) */
.tree-menu {
    list-style: none;
    margin-bottom: 30px;
}

.tree-item {
    margin-bottom: 5px;
}

.tree-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background-color: #f5f1eb;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 600;
    user-select: none;
}

.tree-header:hover {
    background-color: #e9e2d9;
}

.tree-header.active {
    background-color: #e9e2d9;
}

.tree-header.active .tree-icon {
    transform: rotate(90deg);
}

.tree-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: #2A5DB0;
}

.tree-submenu {
    list-style: none;
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.tree-submenu.expanded {
    max-height: 2000px;
}

.tree-submenu li {
    margin: 5px 0;
    padding: 8px 0;
}

.tree-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 3px;
}

.tree-submenu a:hover {
    color: #2A5DB0;
    background-color: #f0f7ff;
}

.tree-submenu i {
    font-size: 0.8rem;
}

/* Вложенные меню (уровень 2) */
.nested {
    position: relative;
}

.nested-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 3px;
    user-select: none;
    transition: background-color 0.3s ease;
}

.nested-toggle:hover {
    background-color: #f0f7ff;
}

.nested-toggle.active {
    background-color: #e9e2d9;
}

.nested-toggle.active .nested-icon {
    transform: rotate(90deg);
}

.nested-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: #2A5DB0;
}

.nested-menu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.nested-menu.expanded {
    max-height: 1000px;
}

/* Глубоко вложенные меню (уровень 3) */
.deep-nested {
    position: relative;
}

.deep-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px 6px 20px;
    border-radius: 3px;
    user-select: none;
    transition: background-color 0.3s ease;
    font-size: 0.95rem;
}

.deep-toggle:hover {
    background-color: #f5f9ff;
}

.deep-toggle.active {
    background-color: #e1e9f5;
}

.deep-toggle.active .deep-icon {
    transform: rotate(90deg);
}

.deep-icon {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
    color: #4a6fa5;
}

.deep-menu {
    list-style: none;
    padding-left: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.deep-menu.expanded {
    max-height: 800px;
}

/* Еще глубже вложенные меню (уровень 4) */
.deeper-nested {
    position: relative;
}

.deeper-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px 5px 25px;
    border-radius: 3px;
    user-select: none;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.deeper-toggle:hover {
    background-color: #f0f5ff;
}

.deeper-toggle.active {
    background-color: #d9e3f5;
}

.deeper-toggle.active .deeper-icon {
    transform: rotate(90deg);
}

.deeper-icon {
    transition: transform 0.3s ease;
    font-size: 0.65rem;
    color: #6a8bc5;
}

.deeper-menu {
    list-style: none;
    padding-left: 35px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.deeper-menu.expanded {
    max-height: 500px;
}

/* Подвал */
.footer {
    background-color: #1a2b3c;
    color: #b0b8c5;
    margin-top: 50px;
}

/* Статистика в подвале */
.footer-stats {
    background-color: #0d1f2d;
    padding: 30px 0;
    border-bottom: 1px solid #2a3b4c;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.footer-stats .stat-item {
    text-align: center;
    padding: 20px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.footer-stats .stat-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.footer-stats .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #4d9fff;
    margin-bottom: 8px;
}

.footer-stats .stat-label {
    font-size: 0.95rem;
    color: #b0b8c5;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px 30px;
    text-align: center;
}

.footer-line {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a3b4c;
}

.footer-text {
    margin-bottom: 25px;
    line-height: 1.7;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #b0b8c5;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact {
    margin-top: 20px;
    font-size: 0.95rem;
}

.footer-contact a {
    color: #4d9fff;
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
    
    .footer-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .sidebar,
    .content-column {
        width: 100%;
    }
    
    .sidebar {
        order: 2;
    }
    
    .content-column {
        order: 1;
    }
    
    .right-sidebar {
        order: 3;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .panorama-tiles {
        width: 4000px;
    }
    
    .panorama-tile {
        width: 400px;
    }
    
    @keyframes panoramaMove {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-2000px);
        }
    }
}

@media (max-width: 768px) {
    .header {
        height: 220px;
    }
    
    .site-title {
        font-size: 1.8rem;
    }
    
    .site-subtitle {
        font-size: 0.9rem;
        max-width: 300px;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        overflow: visible;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        border-left: 4px solid transparent;
    }
    
    .nav-link.active {
        border-left-color: #2A5DB0;
        border-bottom-color: #eee;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .article-image {
        height: 200px;
    }
    
    .footer-stats .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .panorama-tiles {
        width: 3000px;
    }
    
    .panorama-tile {
        width: 300px;
    }
    
    @keyframes panoramaMove {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-1500px);
        }
    }
    
    /* Адаптация дерева разделов для мобильных */
    .tree-submenu {
        padding-left: 10px;
    }
    
    .nested-menu {
        padding-left: 15px;
    }
    
    .deep-menu {
        padding-left: 20px;
    }
    
    .deeper-menu {
        padding-left: 25px;
    }
}

@media (max-width: 576px) {
    .header {
        height: 180px;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-subtitle {
        font-size: 0.8rem;
        max-width: 250px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-headline {
        font-size: 1.3rem;
    }
    
    .panorama-tiles {
        width: 2500px;
    }
    
    .panorama-tile {
        width: 250px;
    }
    
    @keyframes panoramaMove {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-1250px);
        }
    }
}