/* Базовые стили */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Кастомный скроллбар */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #E8ECF0; }
::-webkit-scrollbar-thumb { background: #3A6B8C; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #1A2A3A; }

body {
    font-family: 'Inter', sans-serif;
    background: #E8ECF0;
    color: #1A2A3A;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== ШАПКА ========== */
.header {
    background: rgba(26, 42, 58, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; transition: transform 0.3s ease; }
.logo:hover { transform: scale(1.03); }

.logo-icon { width: 45px; height: 45px; background: linear-gradient(135deg, #3A6B8C, #1A2A3A); border-radius: 12px; position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.logo-icon::before { content: "🏛"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; color: #FFFFFF; }

.logo-text { display: flex; flex-direction: column; }
.logo-small { font-size: 11px; letter-spacing: 1.5px; color: #A0C4D8; text-transform: uppercase; font-weight: 600; }
.logo-large { font-size: 18px; font-weight: 700; font-family: 'Playfair Display', serif; color: #FFFFFF; }

.nav { display: flex; gap: 32px; }
.nav-link { color: #D0DCE8; text-decoration: none; font-size: 15px; font-weight: 500; transition: color 0.3s; position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: #A0C4D8; transition: width 0.3s ease-in-out; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: #FFFFFF; }

/* ========== ОБЩИЕ ЭЛЕМЕНТЫ ========== */
.back-to-halls {
    display: inline-flex; align-items: center; gap: 10px;
    background: #3A6B8C; border: none; color: #FFFFFF;
    padding: 10px 28px; border-radius: 40px; font-size: 15px;
    font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin: 20px 0; text-decoration: none;
    box-shadow: 0 4px 15px rgba(58, 107, 140, 0.3);
}
.back-to-halls:hover { background: #2c5a78; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(58, 107, 140, 0.4); }

.hall-header { margin-bottom: 40px; }
.hall-main-title { font-family: 'Playfair Display', serif; font-size: 42px; font-weight: 700; color: #1A2A3A; margin-bottom: 16px; letter-spacing: -0.5px; }
.hall-description { font-size: 18px; color: #5A6E7A; max-width: 650px; line-height: 1.6; }

/* ========== ГАЛЕРЕЯ И ХОТСПОТЫ ========== */
.photo-gallery {
    position: relative; background: #1A2A3A; border-radius: 20px;
    overflow: visible; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.photo-container { display: none; position: relative; }
.photo-container.active { display: block; }
.gallery-image { width: 100%; height: auto; display: block; border-radius: 20px; }

.photo-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 42, 58, 0.85); backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    z-index: 50; display: none; border-radius: 20px; overflow: visible;
}
.photo-layer.active { display: block !important; }
.photo-layer .layer-header {
    position: absolute; top: 15px; right: 20px; z-index: 105;
    width: 100%; max-width: 100%; pointer-events: none;
}
.photo-layer .layer-image { width: 100%; height: auto; display: block; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); }

/* Кнопки закрытия общие */
.layer-close, .modal-close, .tooltip-close {
    position: absolute; 
    background: rgba(255,255,255,0.15); 
    border: 1px solid rgba(255,255,255,0.2);
    color: white; 
    font-size: 14px; 
    width: 32px; height: 32px; 
    border-radius: 50%; 
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    backdrop-filter: blur(5px);
    z-index: 50;
}

.layer-close:hover, .modal-close:hover, .tooltip-close:hover {
    background: #FFC107; color: #1A2A3A; border-color: #FFC107; transform: scale(1.15) rotate(90deg);
}
.layer-close { pointer-events: auto; right: 20px; top: 0; }

/* УЛУЧШЕННЫЕ Хотспоты */
.hotspot { position: absolute; transform: translate(-50%, -50%); background: transparent; border: none; cursor: pointer; z-index: 10; padding: 10px; }
.hotspot-ring {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; background: rgba(122, 184, 212, 0.3); border-radius: 50%;
    animation: smoothPulse 2.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1); border: 1px solid rgba(122, 184, 212, 0.5);
}
.hotspot-dot {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 16px; height: 16px; 
    background: radial-gradient(circle, #FFFFFF 30%, #A0C4D8 100%); 
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 0 15px rgba(58,107,140,0.8), inset 0 -2px 4px rgba(0,0,0,0.2);
}
.hotspot:hover .hotspot-dot { width: 22px; height: 22px; background: radial-gradient(circle, #FFFFFF 20%, #7AB8D4 100%); }

.hotspot-label {
    position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%) translateY(15px);
    margin-bottom: 8px; padding: 8px 18px; 
    background: rgba(26, 42, 58, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF; font-size: 13px; font-weight: 600; white-space: nowrap; border-radius: 10px;
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none;
    border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.hotspot-label::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border-width: 6px; border-style: solid; border-color: rgba(26, 42, 58, 0.95) transparent transparent transparent;
}
.hotspot:hover .hotspot-label { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.hotspot.special { z-index: 15; }
.hotspot.special .hotspot-ring { width: 65px; height: 65px; background: rgba(255, 193, 7, 0.25); border-color: rgba(255, 193, 7, 0.5); animation: smoothPulseSpecial 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1); }
.hotspot.special .hotspot-dot { width: 20px; height: 20px; background: radial-gradient(circle, #FFFDE7 20%, #FFC107 100%); box-shadow: 0 0 20px rgba(255, 193, 7, 0.8), inset 0 -2px 4px rgba(0,0,0,0.2); }
.hotspot.special:hover .hotspot-dot { width: 26px; height: 26px; }
.hotspot.special .hotspot-label { background: linear-gradient(135deg, #FFD54F, #FFC107); color: #1A2A3A; border: none; box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4); }
.hotspot.special .hotspot-label::after { border-color: #FFC107 transparent transparent transparent; }

@keyframes smoothPulse { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } }
@keyframes smoothPulseSpecial { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2); opacity: 0; } }

/* ========== ТУЛТИП ========== */
.exhibit-tooltip {
    position: absolute; max-width: 340px; 
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 16px; padding: 0; box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.8); z-index: 60; pointer-events: auto;
    overflow: hidden; opacity: 0; visibility: hidden; transform-origin: center top;
}
.exhibit-tooltip.visible { opacity: 1; visibility: visible; }
.tooltip-header { background: linear-gradient(135deg, #3A6B8C, #2c5a78); padding: 18px 20px; position: relative; }
.tooltip-header h3 { font-family: 'Playfair Display', serif; font-size: 18px; color: #FFFFFF; margin: 0; padding-right: 35px; line-height: 1.3; font-weight: 600;}
.tooltip-close { top: 12px; right: 12px; background: rgba(255,255,255,0.2); border: none;}
.tooltip-body { padding: 22px; }
.tooltip-desc { font-size: 14.5px; line-height: 1.6; color: #2A3A4A; margin: 0; }
.full-doc-link { display: inline-block; color: #3A6B8C; font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(58,107,140,0.3); transition: all 0.2s ease; padding-bottom: 2px;}
.full-doc-link:hover { color: #1A2A3A; border-color: #FFC107; }

/* ========== НАВИГАЦИЯ ФОТО ========== */
.photo-nav {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    margin-top: 35px; background: #FFFFFF; padding: 12px 25px; border-radius: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 1px solid rgba(208, 216, 224, 0.6);
}
.photo-nav-btn {
    display: inline-flex; align-items: center; gap: 10px; background: #3A6B8C; border: none;
    padding: 12px 30px; border-radius: 40px; color: #FFFFFF; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.photo-nav-btn.prev { justify-self: start; }
.photo-nav-btn.next { justify-self: end; }
.photo-nav-btn svg { width: 18px; height: 18px; stroke: white; stroke-width: 2.5; transition: transform 0.3s ease; }
.photo-nav-btn.prev:hover svg { transform: translateX(-3px); }
.photo-nav-btn.next:hover svg { transform: translateX(3px); }
.photo-nav-btn:hover:not(:disabled) { background: #2c5a78; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(58,107,140,0.35); }
.photo-nav-btn:disabled { background: #E8ECF0; color: #A0C4D8; box-shadow: none; cursor: not-allowed; }
.photo-nav-btn:disabled svg { stroke: #A0C4D8; }

.photo-counter { font-size: 16px; font-weight: 600; color: #1A2A3A; background: #F8FAFC; padding: 10px 28px; border-radius: 40px; border: 1px solid #E2E8F0; justify-self: center; letter-spacing: 1px; }
.photo-dots { display: flex; justify-content: center; gap: 14px; margin-top: 30px; }
.dot { width: 10px; height: 10px; background: #D0DCE8; border-radius: 50%; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.dot.active { width: 40px; background: #3A6B8C; border-radius: 5px; }
.dot:hover:not(.active) { background: #A0C4D8; transform: scale(1.3); }

/* ========== VUE TIMELINE ========== */
.vue-timeline-block {
    margin-top: 35px;
    background: linear-gradient(180deg, #1A2A3A 0%, #0F1A24 100%);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.vue-timeline-block h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.vue-subtitle {
    font-size: 15px;
    color: #A0C4D8;
    margin-bottom: 35px;
    border-left: 3px solid #3A6B8C;
    padding-left: 18px;
}

/* АККОРДЕОН-ЭФФЕКТ ДЛЯ КАРТОЧЕК */
.timeline-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
}

.era-card {
    flex: 1 1 0; 
    min-width: 180px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    border-left: 4px solid #3A6B8C;
    position: relative;
    overflow: hidden; /* Важно для обрезки контента при закрытии */
    border: 1px solid rgba(255,255,255,0.05); border-left: 4px solid #3A6B8C;
}

.era-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Развёрнутая карточка */
.era-card.expanded-card {
    flex: 3 1 0; 
    min-width: 450px;
    background: rgba(26, 42, 58, 0.8);
    cursor: default;
    border-left-color: #FFC107;
    transform: scale(1.01);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    z-index: 10;
}
.era-card.expanded-card:hover { transform: scale(1.01); } 

/* Свёрнутые карточки (когда одна развёрнута) */
.era-card.collapsed-card {
    opacity: 0.4;
    filter: blur(2px) grayscale(50%);
    pointer-events: auto; 
}
.era-card.collapsed-card:hover { opacity: 0.8; filter: blur(0); }

.era-name { font-weight: 700; font-size: 20px; color: #E8ECF0; margin-bottom: 10px; font-family: 'Playfair Display', serif; }
.era-desc { font-size: 14px; line-height: 1.5; color: #A0C4D8; opacity: 0.9; transition: opacity 0.3s; }

.click-hint { margin-top: 15px; font-size: 12px; color: #7AB8D4; transition: opacity 0.3s; font-weight: 600;}
.era-card:hover .click-hint { opacity: 1 !important; }

/* ==================================================== */
/* АНИМАЦИЯ ПЛАВНОГО ОТКРЫТИЯ/ЗАКРЫТИЯ (CSS GRID MAGIC) */
/* ==================================================== */

.expanded-wrapper {
    display: grid;
    grid-template-rows: 0fr; /* Исходное состояние - высота 0 */
    transition: grid-template-rows 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.expanded-wrapper.is-open {
    grid-template-rows: 1fr; /* Открытое состояние - высота по контенту */
}

.expanded-details {
    overflow: hidden; /* Скрываем все что не влезло в 0fr */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.expanded-wrapper.is-open .expanded-details {
    opacity: 1;
    visibility: visible;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Кнопка "Крестик" в правом верхнем углу */
.close-card-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.era-card.expanded-card .close-card-btn {
    opacity: 1;
    pointer-events: auto;
}

.close-card-btn:hover {
    background: #FFC107;
    color: #1A2A3A;
    border-color: #FFC107;
    transform: rotate(90deg) scale(1.1);
}

/* ==================================================== */

.expanded-img { width: 100%; max-height: 250px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.3);}
.expanded-full-desc { font-size: 15px; line-height: 1.7; color: #D0DCE8; margin-bottom: 20px; }

.expanded-facts { background: rgba(0,0,0,0.2); padding: 18px 20px; border-radius: 12px; border-left: 3px solid #7AB8D4; }
.expanded-facts strong { color: #A0C4D8; display: block; margin-bottom: 12px; font-size: 15px; }
.expanded-facts ul { margin-left: 20px; }
.expanded-facts li { font-size: 14px; color: #E8ECF0; margin-bottom: 8px; }

/* ========== МОДАЛКА С ДОКУМЕНТОМ ========== */
.full-doc-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(15, 26, 36, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.full-doc-page { position: relative; background: #ffffff; width: 85%; max-width: 850px; max-height: 85vh; padding: 60px; border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.4); overflow-y: auto; z-index: 2; }
.full-doc-page h1 { font-family: 'Playfair Display', serif; margin-bottom: 30px; color: #1A2A3A; border-bottom: 2px solid #E8ECF0; padding-bottom: 20px; line-height: 1.3;}
.full-doc-text { font-size: 16px; line-height: 1.8; color: #3A4A5A; text-align: justify; }
.modal-close { top: 25px; right: 25px; background: #F0F4F8; color: #1A2A3A; border-color: transparent; width: 40px; height: 40px; font-size: 16px;}
.modal-close:hover { background: #FFC107; }

/* Transition classes for Alpine Modal */
.modal-enter { transition: opacity 0.4s ease; }
.modal-enter-start { opacity: 0; }
.modal-enter-end { opacity: 1; }
.modal-leave { transition: opacity 0.3s ease; }
.modal-leave-start { opacity: 1; }
.modal-leave-end { opacity: 0; }

/* ========== ПОДВАЛ ========== */
.footer { background: #0F1A24; border-top: 1px solid rgba(255,255,255,0.05); padding: 70px 0 30px; margin-top: 50px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 50px; justify-content: space-between; margin-bottom: 50px; }
.footer-col { flex: 1; min-width: 220px; }
.footer-logo { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.footer-logo .logo-icon { width: 50px; height: 50px; }
.footer-logo span { font-size: 16px; font-weight: 600; line-height: 1.4; color: #FFFFFF; font-family: 'Playfair Display', serif;}
.footer-year { font-size: 14px; color: #6B8EA0; }
.footer-col h4 { font-size: 18px; font-weight: 600; margin-bottom: 25px; color: #FFFFFF; font-family: 'Playfair Display', serif;}
.footer-col p { font-size: 14.5px; color: #B0C4D8; margin-bottom: 12px; }
.footer-copyright { text-align: center; font-size: 13.5px; color: #6B8EA0; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); }

/* ========== АДАПТИВ ========== */
@media (max-width: 992px) {
    .era-card.expanded-card { min-width: 100%; flex: 100%; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .header-inner { flex-direction: column; text-align: center; gap: 15px; }
    .nav { gap: 15px; flex-wrap: wrap; justify-content: center;}
    .hall-main-title { font-size: 32px; }
    .photo-nav-btn { padding: 10px 20px; font-size: 14px; }
    
    .timeline-cards { flex-direction: column; }
    .era-card.expanded-card { min-width: 100%; }
    .expanded-img { max-height: 200px; }
    
    .full-doc-page { width: 95%; padding: 40px 20px; max-height: 90vh;}
    
    .footer-grid { flex-direction: column; gap: 40px; text-align: center; }
    .footer-logo { justify-content: center; }
}
/* Контейнер для позиционирования кнопки внизу */
.bottom-nav-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Стиль кнопки, основанный на вашем скриншоте */
.back-link-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: #1A2A3A; /* Темно-синий из вашей шапки */
    color: #FFFFFF !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-link-bottom:hover {
    background-color: #3A6B8C; /* Цвет из вашего скроллбара */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 107, 140, 0.2);
}

.back-link-bottom svg {
    transition: transform 0.3s ease;
}

.back-link-bottom:hover svg {
    transform: translateX(-5px); /* Стрелочка немного двигается влево */
}

/* Адаптив для телефонов */
@media (max-width: 768px) {
    .back-link-bottom {
        width: 100%;
        justify-content: center;
    }
}