/* =============================================
   КИНО-АТЛАС 3.0 – ИНЖЕНЕРНАЯ ГРАФИКА
   Полный набор стилей: фон, заголовок, карта, панели
   ============================================= */

.atlas-laboratory {
    position: relative;
    padding: 2rem 0 0 0;
    margin-bottom: 5rem;
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    overflow: hidden;
}

/* ----- ЧЕРТЁЖНЫЙ ФОН (сетка, размерные линии, штампы) ----- */
.lab-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.lab-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.6;
}

/* Размерные линии */
.lab-dimension-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dimension {
    position: absolute;
    display: flex;
    align-items: center;
    color: #FF6B00;
    opacity: 0.4;
}

.dimension.horizontal {
    bottom: 30px;
    right: 50px;
    flex-direction: column;
}

.dimension.vertical {
    top: 50px;
    left: 30px;
    flex-direction: row;
}

.dimension-line {
    background: #FF6B00;
    position: relative;
}

.horizontal .dimension-line {
    width: 180px;
    height: 1px;
    border-top: 1px dashed #FF6B00;
    margin: 5px 0;
}

.vertical .dimension-line {
    width: 1px;
    height: 120px;
    border-left: 1px dashed #FF6B00;
    margin: 0 5px;
}

.dimension-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.horizontal .dimension-arrow.left {
    left: -5px;
    border-width: 5px 8px 5px 0;
    border-color: transparent #FF6B00 transparent transparent;
}

.horizontal .dimension-arrow.right {
    right: -5px;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #FF6B00;
}

.vertical .dimension-arrow.top {
    top: -5px;
    border-width: 0 5px 8px 5px;
    border-color: transparent transparent #FF6B00 transparent;
}

.vertical .dimension-arrow.bottom {
    bottom: -5px;
    border-width: 8px 5px 0 5px;
    border-color: #FF6B00 transparent transparent transparent;
}

.dimension-text {
    font-size: 0.65rem;
    font-weight: 600;
    color: #FF6B00;
    background: rgba(255,107,0,0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Штампы */
.lab-legend-stamp {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    z-index: 15;
}

.stamp {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
}

.stamp-title {
    font-size: 0.6rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stamp-number {
    font-size: 0.5rem;
    color: #666;
    font-weight: 500;
}

/* ----- ЗАГОЛОВОК (СТАТУСНЫЙ, С ДЕТАЛЯМИ) ----- */
.lab-header {
    position: relative;
    z-index: 20;
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,107,0,0.08);
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,107,0,0.2);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #FF6B00;
    border-radius: 50%;
}

.badge-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: #FF6B00;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.lab-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.5rem 0;
    color: #0A0A0A;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.title-main {
    font-weight: 500;
    color: #333;
    position: relative;
}

.title-accent {
    color: #FF6B00;
    position: relative;
    padding: 0 0.2rem;
}

.title-accent::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255,107,0,0.1);
    z-index: -1;
    border-radius: 4px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem 0 0.8rem;
    padding: 0.5rem 1.8rem;
    background: white;
    border-radius: 60px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #FF6B00;
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(0,0,0,0.08);
}

.lab-subheader {
    color: #555;
    font-size: 0.95rem;
    max-width: 700px;
    margin: 0.5rem auto 0;
    font-weight: 400;
    line-height: 1.6;
}

/* Декоративная линия под заголовком */
.title-dimension {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.dimension-marker {
    width: 30px;
    height: 2px;
    background: repeating-linear-gradient(90deg, #FF6B00 0px, #FF6B00 4px, transparent 4px, transparent 8px);
}

/* ----- КАРТА В РАМКЕ (С КООРДИНАТАМИ) ----- */
.lab-main-composition {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    z-index: 20;
}

.lab-map-frame {
    position: relative;
    width: calc(70% - 1rem);
    min-width: 500px;
    flex: 1 1 auto;
    border-radius: 24px;
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.25), 
                0 0 0 1px rgba(255,255,255,0.9) inset,
                0 0 0 2px rgba(0,0,0,0.02);
    background: #fff;
    padding: 12px;
}

.map-wrapper {
    width: 100%;
    height: 520px;
    border-radius: 16px;
    overflow: hidden;
}

#mapContainer {
    width: 100%;
    height: 520px;
    background: #e9f0f5;
}

/* Координатные метки */
.map-coordinate {
    position: absolute;
    font-size: 0.6rem;
    font-weight: 600;
    color: #666;
    background: rgba(255,255,255,0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.04);
    z-index: 25;
}

.map-coordinate.north {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.map-coordinate.south {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.map-coordinate.west {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.map-coordinate.east {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Декоративные уголки */
.map-decor {
    position: absolute;
    width: 24px;
    height: 24px;
    border-style: solid;
    border-color: #FF6B00;
    opacity: 0.4;
    z-index: 30;
    pointer-events: none;
}

.top-left {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}

.top-right {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}

.bottom-left {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
}

.bottom-right {
    bottom: 0;
    right: 0;
    border-width: 0 2px 2px 0;
}

.map-compass {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #FF6B00;
    font-size: 1.4rem;
    z-index: 30;
    border: 2px solid rgba(255,107,0,0.2);
}

/* ----- ПРАВАЯ ПАНЕЛЬ – КОММЕРЧЕСКИЕ ПРОЕКТЫ ----- */
.commercial-panel-right {
    width: calc(28% - 1rem);
    min-width: 280px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.02);
    padding: 1.5rem 1.2rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.commercial-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.header-icon {
    width: 44px;
    height: 44px;
    background: #FF6B00;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.header-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: #000;
}

.header-text .subtitle {
    font-size: 0.7rem;
    color: #FF6B00;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.commercial-slider-container {
    position: relative;
    margin-bottom: 1rem;
}

.commercial-slider {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    gap: 1rem;
}

.commercial-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background: #fafafa;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.2s;
}

.commercial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(255,107,0,0.1);
}

.commercial-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0.75rem;
}

.commercial-card h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
}

.commercial-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.commercial-desc {
    font-size: 0.75rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,0,0,0.1);
    color: #d32f2f;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: auto;
    cursor: pointer;
    transition: background 0.2s;
    width: fit-content;
}

.video-badge:hover {
    background: rgba(255,0,0,0.2);
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s;
    z-index: 10;
}

.slider-prev:hover,
.slider-next:hover {
    background: #FF6B00;
    color: white;
    border-color: #FF6B00;
}

.slider-prev {
    left: -12px;
}

.slider-next {
    right: -12px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.slider-dot.active {
    background: #FF6B00;
    transform: scale(1.3);
}

/* ----- ПАНЕЛЬ ГОРОДА (ИСПРАВЛЕННАЯ, ПОЛНОСТЬЮ ВИДИМАЯ) ----- */
.city-panel-left {
    position: fixed;
    top: 20px !important;
    left: -500px !important;
    bottom: 20px !important;
    transform: none !important;
    width: 440px;
    max-width: calc(100% - 40px);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-radius: 0 24px 24px 0;
    box-shadow: 10px 0 40px rgba(0,0,0,0.15);
    z-index: 10000;
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.city-panel-left.active {
    left: 0 !important;
}

.city-panel-header {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.98);
    border-radius: 0 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.city-badge {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    background: rgba(255,107,0,0.1);
    padding: 0.4rem 1rem;
    border-radius: 40px;
    flex-wrap: wrap;
}

.badge-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: #000;
}

.badge-count {
    background: #FF6B00;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    font-weight: 800;
    font-size: 0.9rem;
}

.badge-label {
    font-size: 0.7rem;
    color: #666;
}

.panel-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    background: rgba(0,0,0,0.04);
    color: #000;
}

.city-panel-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.media-slider-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #000;
}

.media-slider {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.media-slider::-webkit-scrollbar {
    height: 4px;
}

.media-slider::-webkit-scrollbar-thumb {
    background: #FF6B00;
    border-radius: 4px;
}

.slider-item {
    flex: 0 0 120px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

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

.video-item {
    flex: 0 0 120px;
    height: 100px;
    background: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.project-description p {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-action-btn {
    width: 100%;
    padding: 0.9rem;
    background: #FF6B00;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.project-action-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,107,0,0.25);
}

.private-projects-section {
    background: #fafafa;
    border-radius: 20px;
    padding: 1.25rem;
}

.private-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.private-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.private-badge {
    font-size: 0.65rem;
    background: #FF6B00;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
}

.private-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.private-card {
    display: flex;
    gap: 0.75rem;
    background: white;
    border-radius: 16px;
    padding: 0.75rem;
    border: 1px solid rgba(0,0,0,0.04);
}

.private-card img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.private-info {
    flex: 1;
}

.private-info h5 {
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.private-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.65rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.private-desc {
    font-size: 0.65rem;
    color: #444;
}

/* ----- АДАПТИВНОСТЬ ----- */
@media (max-width: 1100px) {
    .lab-main-composition {
        flex-direction: column;
    }
    .lab-map-frame {
        width: 100%;
        min-width: auto;
    }
    .commercial-panel-right {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .lab-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 0.2rem;
    }
    .title-main,
    .title-accent {
        display: block;
    }
    .header-stats {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    .stat-divider {
        width: 80px;
        height: 1px;
    }
    .city-panel-left {
        top: 10px !important;
        bottom: 10px !important;
        width: 94%;
        left: -100% !important;
        border-radius: 16px;
    }
    .city-panel-left.active {
        left: 3% !important;
    }
    .map-wrapper,
    #mapContainer {
        height: 380px !important;
    }
    .lab-legend-stamp {
        display: none;
    }
    .map-coordinate {
        display: none;
    }
}

/* Отключение атрибуции Leaflet */
.leaflet-control-attribution {
    display: none !important;
}
/* ===== СТИЛИ МАРКЕРОВ И КЛАСТЕРОВ (ОРАНЖЕВЫЕ КРУЖКИ С ПУЛЬСАЦИЕЙ) ===== */
.custom-cluster {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.custom-cluster:hover {
    transform: scale(1.1);
    z-index: 1000 !important;
}
.cluster-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: radial-gradient(circle at 30% 30%, #FF6B00, #E05A00);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    border: 3px solid white;
    box-shadow: 0 8px 20px rgba(255,107,0,0.3);
}
.cluster-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255,107,0,0.2);
    border-radius: 50%;
    z-index: -1;
    animation: cluster-pulse 2s infinite;
}
@keyframes cluster-pulse {
    0% { transform: translate(-50%,-50%) scale(1); opacity: 0.6; }
    70% { transform: translate(-50%,-50%) scale(1.5); opacity: 0; }
    100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}

.city-marker {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: transform 0.2s;
}
.city-marker:hover {
    transform: scale(1.15);
    z-index: 1000;
}
.marker-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    background: #FF6B00;
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translate(-50%, -50%);
}
.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    background: rgba(255,107,0,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: marker-pulse 1.8s infinite;
}
@keyframes marker-pulse {
    0% { opacity: 0.8; transform: translate(-50%,-50%) scale(1); }
    70% { opacity: 0; transform: translate(-50%,-50%) scale(1.4); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1); }
}