/* ===== ОБНОВЛЕННЫЙ СТИЛЬ ДЛЯ МНОЖЕСТВА РАЗДЕЛОВ ===== */

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

:root {
    /* Цветовая палитра */
    --primary-color: #2c5aa0;
    --primary-light: #4a7bc8;
    --secondary-color: #4a9e3a;
    --accent-color: #ff9d00;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --gray-light: #e9ecef;
    --gray-medium: #6c757d;
    --gray-dark: #495057;
    
    /* Цвета для колонок */
    --old-color: #8b4513;
    --old-light: #a0522d;
    --new-color: #2e8b57;
    --new-light: #3cb371;
    
    /* Тени и эффекты */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
    
    /* Скругления */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
    
    /* Анимации */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-color);
    background-color: #f5f7fa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Шапка */
.header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-link {
    text-decoration: none;
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
}

.logo-link:hover {
    transform: translateY(-2px);
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    gap: 2px;
}

.logo-san {
    color: var(--primary-color);
}

.logo-chern {
    color: var(--secondary-color);
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-top: -2px;
    font-weight: 500;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(44, 90, 160, 0.05);
}

/* Герой-секция */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('1.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: 500;
}

/* Основной контент */
.main-content {
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title p {
    color: var(--gray-medium);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.global-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.control-btn {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.control-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding: 8px 16px;
    background-color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.view-toggle span {
    font-weight: 500;
    color: var(--gray-dark);
}

.view-btn {
    background: none;
    border: 1px solid var(--gray-light);
    color: var(--gray-medium);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.view-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Контейнер для секций */
.sections-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.sections-container.list-view {
    gap: 10px;
}

/* Стили для каждой секции (раздела) */
.category-section {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.category-section:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.list-view .category-section {
    border-radius: var(--radius-md);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: var(--light-color);
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-header:hover {
    background-color: #f0f2f5;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-title i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(44, 90, 160, 0.1);
    border-radius: 50%;
}

.category-title h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.category-stats {
    display: flex;
    gap: 15px;
}

.stat-badge {
    padding: 6px 15px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.old-stat {
    background-color: rgba(139, 69, 19, 0.1);
    color: var(--old-color);
    border: 1px solid rgba(139, 69, 19, 0.2);
}

.new-stat {
    background-color: rgba(46, 139, 87, 0.1);
    color: var(--new-color);
    border: 1px solid rgba(46, 139, 87, 0.2);
}

.toggle-section {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-medium);
    transition: var(--transition-fast);
    font-size: 1.2rem;
}

.toggle-section:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* Содержимое секции */
.category-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
}

.category-section.expanded .category-content {
    max-height: 2000px;
    padding: 0;
}

.list-view .category-section.expanded .category-content {
    max-height: 1000px;
}

/* Контейнер сравнения внутри секции */
.comparison-container {
    display: flex;
    min-height: 500px;
    padding: 25px;
}

.list-view .comparison-container {
    flex-direction: column;
    min-height: auto;
    padding: 20px;
}

/* Колонки */
.column {
    flex: 1;
    padding: 0 15px;
    overflow-y: auto;
    max-height: 700px;
}

.list-view .column {
    max-height: 400px;
    margin-bottom: 20px;
    padding: 0;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 5;
}

.column-badge {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.old-badge {
    background-color: rgba(139, 69, 19, 0.1);
    color: var(--old-color);
    border: 2px solid var(--old-color);
}

.new-badge {
    background-color: rgba(46, 139, 87, 0.1);
    color: var(--new-color);
    border: 2px solid var(--new-color);
}

.photo-count {
    color: var(--gray-medium);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

/* Контейнер для фотографий */
.photos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 5px;
}

.list-view .photos-container {
    grid-template-columns: 1fr;
}

/* Элементы фотографий */
.photo-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.photo-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover .photo-wrapper img {
    transform: scale(1.05);
}

.photo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
}

.photo-number {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.old-photo .photo-number {
    background-color: var(--old-color);
}

.new-photo .photo-number {
    background-color: var(--new-color);
}

.photo-date {
    color: var(--gray-medium);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Разделительная линия */
.divider-column {
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.list-view .divider-column {
    width: 100%;
    height: 60px;
    flex-direction: row;
    padding: 0 20px;
}

.divider-line {
    flex: 1;
    width: 3px;
    background: linear-gradient(to bottom, var(--old-color), var(--new-color));
}

.list-view .divider-line {
    width: auto;
    height: 3px;
    background: linear-gradient(to right, var(--old-color), var(--new-color));
}

.divider-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 20px 0;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px 0;
}

.list-view .divider-label {
    writing-mode: horizontal-tb;
    transform: none;
    margin: 0 20px;
}

/* Управление для секции */
.section-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    background-color: #f9f9f9;
}

.section-btn {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.section-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.sync-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Навигация по разделам */
.sections-nav {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.sections-nav h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    background-color: var(--light-color);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.nav-links a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Сообщения об отсутствии фото */
.no-photos, .no-images-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-medium);
    grid-column: 1 / -1;
}

.no-photos i, .no-images-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-photos p, .no-images-message p {
    margin-bottom: 10px;
}

/* Блок описания работ */
.works-description {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.works-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.work-item {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    border-top: 4px solid transparent;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--secondary-color);
}

.work-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(44, 90, 160, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.work-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.work-item p {
    color: var(--gray-medium);
    font-size: 0.95rem;
}

/* Призыв к действию */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 40px;
}

.cta-content h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition-normal);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cta-button:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Подвал */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 20px 20px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-section p, .footer-section a {
    color: #aaa;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-section i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 5px;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 90%;
    width: 1000px;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-image-container {
    height: 70%;
    overflow: hidden;
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 25px;
    background-color: white;
    height: 30%;
    overflow-y: auto;
}

.modal-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-info p {
    color: var(--gray-medium);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.modal-nav-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.modal-nav-btn:hover {
    background-color: var(--primary-light);
}

.modal-nav-btn:disabled {
    background-color: var(--gray-light);
    color: var(--gray-medium);
    cursor: not-allowed;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-item, .work-item {
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
}

.photo-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.photo-item:nth-child(even) {
    animation-delay: 0.2s;
}

.category-section {
    animation: fadeIn 0.6s ease forwards;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .comparison-container {
        min-height: 400px;
    }
    
    .column {
        max-height: 600px;
    }
}

@media (max-width: 992px) {
    .comparison-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .column {
        max-height: 400px;
        margin-bottom: 20px;
        padding: 0;
    }
    
    .divider-column {
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
    }
    
    .divider-line {
        width: auto;
        height: 3px;
        flex: 1;
        background: linear-gradient(to right, var(--old-color), var(--new-color));
    }
    
    .divider-label {
        writing-mode: horizontal-tb;
        transform: none;
        margin: 0 20px;
    }
    
    .photos-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .category-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .toggle-section {
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .works-description {
        padding: 30px 20px;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        flex-direction: column;
    }
    
    .modal-image-container {
        height: 50%;
    }
    
    .modal-info {
        height: 50%;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .global-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-toggle {
        margin-left: 0;
        justify-content: center;
    }
    
    .photos-container {
        grid-template-columns: 1fr;
    }
    
    .photo-wrapper {
        height: 200px;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .cta-content h3 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}