﻿/* Боковое меню */
.sidebar-menu-maps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 262.5px; !important;
    margin-top: 32px;
}

/* Обёртка для каждого пункта меню */
.menu-item-wrapper-maps {
    position: relative;
}

/* Основной пункт меню */
.menu-item-maps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.43;
    padding: 8px 14px 8px 19px;
    background-color: #eee;
    color: #003b7f;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s;
    position: relative;
    cursor: pointer;
}

/* Правая голубая полоса */
.menu-item-maps::after {
    content: "";
    width: 30.3px;
    height: 100%;
    background-color: #5aa5ff;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}

.menu-item-maps:hover {
    background-color: #eee !important;
    color: #003b7f !important;
}

/* Белая стрелка */
.menu-item-maps::before {
    content: ">";
    font-size: 9px;
    color: #ffffff;
    position: absolute;
    font-weight: 400;
    right: 13px;
    transform: translateY(20%) rotate(90deg) scaleY(2.1);
    z-index: 2;
}

.sidebar-menu-maps .menu-item-maps:first-child::before {
    top: 30%;
}

.menu-item-wrapper-maps.open .menu-item-maps::before {
    transform: translateY(10%) rotate(-90deg) scaleY(2.1);
    right: 11px;
}

.sidebar-menu-maps .menu-item-maps:not(:first-child)::before {
    top: 50%;
}

/* Подменю */
.submenu-maps {
    display: none;
    flex-direction: column;
    margin-top: 6px;
}

.sidebar-menu-maps .submenu-maps a {
    display: block;
    width: 100%;
    color: #003b7f;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 10px;
    cursor: pointer;
    padding-left: 25px;
}

.submenu-maps a:hover {
    background-color: #003b7f;
    color: #ffffff !important;
    font-weight: 400;
}

/* При открытии */
.menu-item-wrapper-maps.open .submenu-maps {
    display: flex;
}

.submenu-maps a:hover {
    text-decoration: underline;
}

#content-area-maps,
.section-content {
    width: 100%;
    height: auto;
    min-height: 400px; /* минимальная высота */
}

#map {
    width: 100%;
    aspect-ratio: 16/9; /* или любое соотношение */
    height: auto; /* высота будет зависеть от ширины */
}

@media (max-width: 992px) {
    /* Меню растягиваем на всю ширину */
    .sidebar-menu-maps {
        width: 100%;
        margin-top: 0;
        order: 0;
    }

    /* Пункты меню — меньше шрифт, больше паддингов */
    .menu-item-maps {
        font-size: 12px;
        font-weight: 700;
        padding: 12px 20px;
    }

    /* НЕ скрываем стрелки и правые полосы */
    .menu-item-maps::before,
    .menu-item-maps::after {
        display: block; /* оставляем как есть */
    }

    /* Подменю */
    .submenu-maps a {
        font-size: 12px;
        font-weight: 700;
        padding-left: 25px;
    }

    /* Flex-структура контента */
    .content-layout {
        flex-direction: column;
        gap: 20px;
    }

    /* Контент (карта) на всю ширину */
    #content-area-maps {
        width: 100%;
        order: 1;
        margin-top: 0;
    }

    /* Карта растягивается на всю ширину контейнера */
    #map {
        width: 100% !important;
    }
}

/* --- Адаптивность для мобильных устройств <768px --- */
@media (max-width: 767px) {
    .sidebar-menu-maps {
        width: 100%;
    }

    .menu-item-maps {
        font-size: 12px;
        padding: 12px 20px;
    }

    .submenu-maps a {
        font-size: 12px;
        padding-left: 20px;
    }

    #map {
        width: 100% !important;
    }
}

.menu-item-wrapper-maps .submenu-maps {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.menu-item-wrapper-maps.open .submenu-maps {
    display: flex;
    max-height: 1000px; /* достаточно для длинного списка */
}

.menu-item-maps::before {
    transition: transform 0.4s ease;
}

.menu-item-wrapper-maps.open .menu-item-maps::before {
    transform: translateY(10%) rotate(-90deg) scaleY(2.1);
}

.menu-item-maps {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.menu-item-maps:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.submenu-maps a {
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}

.submenu-maps a:hover {
    background-color: #003b7f;
    color: #fff;
    text-decoration: underline;
}

.address-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.address-icon img {
    width: 32px;
    height: 32px;
}

.address-title {
    font-weight: 700;
    color: #003b7f;
    font-size: 16px;
}

.address-value {
    font-size: 15px;
    color: #2c2c2c;
}
