/* Базовые стили и кастомный скроллбар */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pragmatica Extended', 'Arial', sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #e67e22;
    --accent: #16a085;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333;
    --shadow: 0 10px 30px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #f8f5f0 0%, #e6e2d8 100%);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(44, 62, 80, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
    border-radius: 10px;
    border: 2px solid #f8f5f0;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #d35400, #138a72);
}

/* Навигация */
header {
    background-color: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--secondary);
}

/* Герой секция */
.hero {
    height: 100vh;
    margin-top: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.7) 0%, rgba(230, 126, 34, 0.4) 100%);
    z-index: -1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover;
    z-index: -2;
    filter: brightness(0.7);
}

.hero-content {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 1.5s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: white;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn:hover:before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Секции музея */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--dark);
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    border-radius: 2px;
}

/* Экспонаты */
.exhibits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.exhibit-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(50px);
    position: relative;
    cursor: pointer;
}

.exhibit-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.exhibit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.exhibit-img {
    height: 220px;
    background: linear-gradient(45deg, #2c3e50, #4a6491);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
}

.exhibit-img:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.exhibit-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.exhibit-content h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.5rem;
}

.exhibit-content p {
    color: #555;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--secondary);
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--accent);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* О музее */
.about {
    background: linear-gradient(to bottom, var(--primary) 0%, #1a2530 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.about:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.about .section-title {
    color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.stat h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Контакты */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

/* Футер */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* Стили для расширенной карточки */
.exhibit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    z-index: 10;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.exhibit-overlay.active {
    opacity: 1;
    visibility: visible;
}

.exhibit-overlay h3 {
    margin-bottom: 2rem;
    color: var(--dark);
    font-size: 1.8rem;
}

.exhibit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.action-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.close-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: none;
}

.close-overlay:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s ease;
    border: none;
}

.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

/* Видео контейнер */
.video-container {
    position: relative;
    background: #000;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 500px;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-info {
    padding: 1.5rem;
    background: white;
}

.video-info h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Анимации */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .exhibits {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .exhibits {
        grid-template-columns: 1fr;
    }
    
    .exhibit-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .video-player {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 4rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Стили для изображений экспонатов */
.exhibit-img {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #2c3e50, #4a6491);
}

.exhibit-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.exhibit-card:hover .exhibit-img img {
    transform: scale(1.05);
}

.exhibit-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    font-weight: bold;
    text-align: center;
}

/* Стиль для случая, когда изображение не загружается */
.exhibit-img.no-image {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
}

.exhibit-img.no-image:after {
    content: '📷 ' attr(data-title);
}