.map3d {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    background: #f3f3f3;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.map3d__bg {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.bld3d {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20%;
    pointer-events: auto;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
    transform-origin: center;
    transition: transform .12s ease, filter .12s ease;
    cursor: pointer;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bld3d.is-hover {}

.bld3d svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

/* Зоны (части здания) */
.zone {
    cursor: pointer;
    pointer-events: all;
    transition: filter .12s ease, opacity .12s ease, stroke .12s ease, stroke-width .12s ease, fill .12s ease;
    opacity: 1;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* При наведении на один элемент - выделяем всю группу */
.zone.is-hovered {
    outline: none;
    filter: brightness(1.15);
    stroke: white;
    stroke-width: 3;
    opacity: 0.9;
}

/* Active — единая заливка, но исключаем белые элементы (цифры) */
.zone.is-active {
    outline: none;
    filter: none;
    stroke: white;
    stroke-width: 3;
    opacity: 1;
}

/* ИСКЛЮЧЕНИЕ: для белых элементов (цифр) убираем обводку ВСЕГДА */
.zone[fill="white"] {
    stroke: none !important;
    stroke-width: 0 !important;
}

.zone[fill="white"].is-active,
.zone[fill="white"].is-hovered,
.zone[fill="white"]:hover{
    stroke: none !important;
    stroke-width: 0 !important;
    filter: none !important;
}

/* ПЛАНШЕТЫ И ТЕЛЕФОНЫ (<=1200) */
@media (max-width: 1200px) {
    .map3d {
        margin: auto;
    }

    .map3d__popup {
        position: absolute;
        background: #fff;
        border-radius: 12px;
        z-index: 5;
    }
}

.map3d__layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* popup */

.map3d__popup {
    position: absolute;
    inset: 0;
    width: 90%;
    height: 90%;
    max-width: none;
    min-width: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    padding: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    margin: 0%;
    left: 5%;
    top: 5%;
    overflow-y: auto;
}

.map3d__popup[hidden] {
    display: none;
    width: 0;
    height: 0;
}

.map3d__popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, .06);
    cursor: pointer;
    font-size: 24px;
    line-height: 36px;
    z-index: 2;
}


.map3d__popup-text {
    line-height: 1.45;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 8px;
}


.map3d__popup-text ul {
    margin: 6px 0 14px;
    padding: 10px;

}

.map3d__popup-text li {
    margin-bottom: 6px;
}

.map3d__popup-text a {
    color: var(--main-blue);
    text-decoration: none;
    font-weight: 700;
}

.map3d__popup-text a:hover {
    text-decoration: underline;
}

/* ПЛАНШЕТЫ И ТЕЛЕФОНЫ */
@media (max-width: 1200px) {
    .map3d {
        margin: auto;
    }

    .map3d__popup {
        padding: 16px;
    }


    .map3d__popup-text {
        font-size: 13px;
    }
}

/* ========== НОВЫЕ СТИЛИ ДЛЯ СЛАЙДЕРА МАРШРУТА ========== */
/* ========== НОВЫЕ СТИЛИ ДЛЯ СЛАЙДЕРА МАРШРУТА ========== */
.map3d__route-back {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--main-blue);
    border-radius: 20px;
    background: #fff;
    color: var(--main-blue);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color .2s, color .2s;
}

.map3d__route-back:hover {
    background: var(--main-blue, #4668AA);
    color: #fff;
}

/* Строка: вход + этаж + фрагмент */
.map3d__route-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Синий круг с номером входа */
.map3d__route-enter-badge {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--main-blue, #4668AA);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1;
}

/* Этаж + фрагмент */
.map3d__route-floor-fragment {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--main-blue-dark__80);
    flex-wrap: wrap;
}

.map3d__route-fragment-sep {
    color: var(--main-blue, #4668AA);
    font-weight: 700;
}



/* Слайдер */
.map3d__route-images {
    margin-bottom: 16px;
}

.map3d__route-image-wrap {
    display: flex;
    justify-content: center;
}

.map3d__route-image-wrap img {
    height: auto;
    border-radius: 24px;
    display: block;
    max-height: 50vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Анимация ухода влево */
.map3d__route-image-wrap img.slide-out-left {
    opacity: 0;
    transform: translateX(-30px);
}

/* Анимация ухода вправо */
.map3d__route-image-wrap img.slide-out-right {
    opacity: 0;
    transform: translateX(30px);
}

/* Анимация появления слева */
.map3d__route-image-wrap img.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

/* Анимация появления справа */
.map3d__route-image-wrap img.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.map3d__route-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.map3d__route-controls button {
    background: var(--main-blue, #4668AA);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.map3d__route-controls button:hover {
    background: #2d4a8a;
}

.map3d__route-controls span {
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

/* ========== ОСТАЛЬНЫЕ СТИЛИ (БЕЗ ИЗМЕНЕНИЙ) ========== */
.neo-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
    min-width: 0;
}

.neo-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0px 10px;
    border-radius: 999px;
    border: 1px solid var(--main-blue-secondary__50);
    box-sizing: border-box;
    min-width: 0;
    background: transparent;
    height: 45px;
}

.neo-step__badge {
    flex: 0 0 33px;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: var(--main-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1;
}

.neo-step__text {
    min-width: 0;
    color: var(--main-blue);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    white-space: wrap;
}

.route-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 48px;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}

.route-card__steps {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.route-step-badge {
    flex: 0 0 33px;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: #a8b3c9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.route-card__steps-text {
    min-width: 0;
    color: var(--main-blue-secondary-dark);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-card__title {
    color: var(--main-blue-dark__80);
    font-size: 1.5rem;
    font-weight: 700;
}

.route-card__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.route-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
    padding: 0 24px;
    height: 40px;
    border-radius: 999px;
    background: var(--main-blue);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    transition: opacity .2s ease, transform .2s ease;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
}

.route-card__btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.route-card__btn-arrow {
    flex: 0 0 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 12px solid #fff;
}

@media (max-width: 1200px) {
    .row {
        flex-direction: column !important;
        gap: 24px;
    }

    .neo-steps-grid,
    .route-card {
        width: 100%;
        flex: none;
    }

    .neo-step {
        padding: 12px 16px;
        gap: 12px;
    }

    .neo-step__text {
        font-size: 1rem;
    }

    .route-card {
        padding: 28px 24px;
        gap: 24px;
        border-radius: 24px;
    }

    .route-card__steps-text {
        font-size: 1rem;
    }

    .route-card__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .neo-steps-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .neo-step {
        padding: 10px 14px;
        gap: 10px;
    }

    .neo-step__text {
        font-size: 0.875rem;
    }

    .route-card {
        padding: 20px 16px;
        gap: 18px;
        border-radius: 20px;
    }

    .route-card__steps {
        flex-wrap: wrap;
        gap: 8px;
    }

    .route-step-badge {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        font-size: 1.125rem;
    }

    .route-card__steps-text {
        width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.9375rem;
    }

    .route-card__title {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .route-card__actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* popup видео */
.route-video-modal[hidden] {
    display: none;
}

.route-video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.route-video-modal__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(16, 31, 61, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.route-video-modal__dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 60vw;
    max-width: 60vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(15, 35, 95, 0.28);
    overflow: hidden;
}

.route-video-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(70, 104, 170, 0.12);
    color: var(--main-blue);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
    z-index: 5;
}

.route-video-modal__close:hover {
    background: rgba(70, 104, 170, 0.2);
    transform: scale(1.04);
}

.route-video-modal__header {
    padding: 24px 72px 16px 24px;
    flex: 0 0 auto;
    z-index: 3;
}

.route-video-modal__title {
    color: var(--main-blue-dark__80);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
}

.route-video-modal__body {
    padding: 0 24px 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.route-video-modal__player-host {
    width: 100%;
    z-index: 4;
}

.route-video-source,
.route-video-modal__player-host>* {
    width: 100%;
}

.route-video-modal__player-host .neo-player,
.route-video-modal__player-host .player,
.route-video-modal__player-host .video-js,
.route-video-modal__player-host .bx-player-container,
.route-video-modal__player-host .bx-player-block {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    max-height: calc(90vh - 140px);
}

.route-video-modal__player-host video,
.route-video-modal__player-host iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    border: 0;
}

.route-video-modal__player-host .neo-player>div,
.route-video-modal__player-host .player>div,
.route-video-modal__player-host .bx-player-container>div,
.route-video-modal__player-host .bx-player-block>div {
    width: 100% !important;
    height: 100% !important;
}

.route-video-player-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    border-radius: 24px;
    background: var(--main-blue-light);
    color: var(--main-blue-dark__80);
    font-weight: 700;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.route-video-storage[hidden] {
    display: none !important;
}

body.route-video-modal-open {
    overflow: hidden;
}

@media (max-width: 1200px) {
    .route-video-modal__dialog {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        left: unset;
        top: unset;
        transform: unset;
    }

    .route-video-modal__header {
        padding: 20px 68px 12px 20px;
    }

    .route-video-modal__title {
        font-size: 1.25rem;
    }

    .route-video-modal__body {
        padding: 0 20px 20px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 768px) {
  /*  .map3d{
        height: 70vh;

    }
    .map3d__bg{
        display: none;
    }

        .map3d__layer{
        display: none;
    }*/
    .map3d-search__clear {
        right: 10px;
    }
    .map3d__popup-close{
        display: none;

    }

    .route-video-modal__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .route-video-modal__header {
        padding: 16px 56px 12px 16px;
    }

    .route-video-modal__title {
        font-size: 1rem;
        line-height: 1.2;
    }

    .route-video-modal__body {
        padding: 0 16px 16px;
    }

    .route-video-player-empty {
        min-height: 220px;
        border-radius: 16px;
    }
}

.route-video-modal__player-host,
.route-video-modal__player-host * {
    pointer-events: auto;
}

body.route-video-modal-open {
    overflow: hidden;
}









/* ========== ПОИСК ========== */
.map3d-search {
    position: relative;
    z-index: 10;
}

.map3d-search__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(70, 104, 170, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.map3d-search__input:focus {
    border-color: var(--main-blue, #4668AA);
    box-shadow: 0 0 0 3px rgba(70, 104, 170, 0.15);
}

.map3d-search__list {
    position: absolute;
    background: #fff;
    top: 100%;
    border: 1px solid rgba(70, 104, 170, 0.3);
    border-top: none;
    border-radius: 0 0 20px 20px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    box-sizing: border-box;
}

.map3d-search__list[hidden] {
    display: none;
}


.map3d-search__item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: background .15s;
}

.map3d-search__item:hover {
    background: rgba(70, 104, 170, 0.08);
}

.map3d__search-highlight {
    color: var(--main-orange, #EC7C25) !important;
    font-weight: 800 !important;
    padding: 2px 6px;
    border-radius: 6px;
}

.neo-search-input.map3d__search-active {
    border-color: var(--main-orange, #EC7C25);
    box-shadow: 0 0 0 3px rgba(236, 124, 37, 0.15);
}

.map3d-search__clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 4px 6px;
    z-index: 2;
    transition: color 0.15s;
}

.map3d-search__clear:hover {
    color: #333;
}

.map3d-search__clear[hidden] {
    display: none;
}

/* Чтобы текст не заезжал под кнопку */
.neo-search-input {
    padding-right: 36px;
}





/* Стили для списка автобусных маршрутов */
.bus-routes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.bus-route-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: background-color 0.2s;
}

.bus-route-item:hover {
    background: #e9ecef;
}

.bus-route-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bus-route-info {
    flex: 1;
    min-width: 0;
}

.bus-route-number {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    margin-bottom: 2px;
}

.bus-route-direction {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.3;
}

/* Анимация для маркера остановки */
.bus-stop-marker {
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.bus-stop-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}
























.map3d {
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    cursor: grab;
}

.map3d.dragging {
    cursor: grabbing;
}

.map3d__zoom-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Высота будет определяться содержимым */
    transform-origin: 0 0;
    pointer-events: auto;
}

.map3d__bg {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    pointer-events: none;
}

.map3d__layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

/* Кнопки масштаба */
.map3d__zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.map3d__zoom-btn,
.map3d__reset-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(70, 104, 170, 0.3);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--main-blue, #4668AA);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
   box-shadow: 0 4px 10px -2px var(--main-blue);
}

.map3d__zoom-btn:hover,
.map3d__reset-btn:hover {
    background: var(--main-blue-secondary);
    color: white;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .map3d__zoom-controls {
        bottom: 12px;
        right: 12px;
    }
    
    .map3d__zoom-btn,
    .map3d__reset-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
}