/* ========================= */
/*         Map Section       */
/* ========================= */
.map-section {
    max-width: 1120px;
    width: 100%;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
    z-index: 1;
}

.map-section:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.map-filter {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 10px;
    width: 100%;
}

.map-filter label {
    font-size: 1rem;
    color: #1a3c5e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-filter select {
    padding: 8px 12px;
    border: 1px solid #1a3c5e;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    color: #1a3c5e;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.map-filter select:hover,
.map-filter select:focus {
    border-color: #f25c05;
    box-shadow: 0 0 5px rgba(242, 92, 5, 0.3);
    outline: none;
}

/* Стили для выпадающего списка */
.map-filter select option {
    background: #fff;
    color: #1a3c5e;
}

/* Стили для выделенного элемента в выпадающем списке */
.map-filter select option:checked {
    background: #1a3c5e;
    color: #fff;
}

/* Стили для Select2 */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #1a3c5e !important;
    color: white !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #1a3c5e !important;
    border-radius: 10px !important;
    background: #fff !important;
    height: 36px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1a3c5e !important;
    line-height: 36px !important;
    padding-left: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.select2-container--default .select2-results__option {
    color: #1a3c5e !important;
}

/* Закругления для выпадающего меню Select2 */
.select2-container--default .select2-dropdown {
    border: 1px solid #1a3c5e !important;
    border-radius: 10px !important;
    background: #fff !important;
}

.select2-container--default .select2-results__options {
    border-radius: 10px !important;
}

.select2-container--default .select2-results__option {
    border-radius: 8px !important;
    margin: 2px 4px;
}

/* Закругления для поля ввода в Select2 */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #1a3c5e !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
}

/* Карта */
#map {
    width: 100%;
    height: 800px;
    border: 1px solid #1a3c5e;
    border-radius: 10px !important;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    overflow: hidden;
    display: block;
    z-index: 1;
}

#map:hover {
    border-color: #f25c05;
}

.ymaps-2-1-79-map {
    border-radius: 10px !important;
}

/* Список локаций */
#location-list {
    list-style: none;
    margin-top: 20px;
    padding: 0;
    font-family: 'Inter', sans-serif;
    display: none;
}

#location-list li {
    padding: 12px 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

#location-list li:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

/* Карточка локации */
.location-card {
    position: relative;
    padding: 25px;
    margin-bottom: 15px;
    background-color: #fff;
    border: 2px solid #1a3c5e;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 300px;
    gap: 10px;
}

.location-card:hover {
    background: linear-gradient(90deg, #ffffff, #f5f5f5);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(242, 92, 5, 0.2);
    border-color: #f25c05;
}

.location-name {
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #1a3c5e;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

.location-address {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #1a3c5e;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

.location-address strong {
    color: #1a3c5e;
    font-weight: 600;
}

/* Разделительные линии */
.location-services,
.location-address {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    width: 100%;
}

.location-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(26, 60, 94, 0.8);
    padding: 10px;
    border-radius: 10px;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 10px;
    color: #f25c05;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
}

.service-item:hover {
    background: linear-gradient(45deg, #f25c05, #ff6e00);
    color: #fff;
    animation: pulse 1.5s infinite;
}

.service-item .material-icons {
    font-size: 18px;
    color: #f25c05;
    transition: color 0.3s ease;
}

.service-item:hover .material-icons {
    color: #fff;
}

/* Эффект пульсации */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(242, 92, 5, 0.6), 0 0 5px rgba(0, 0, 0, 0.2);
    }
    100% {
        box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
    }
}

/* Контейнер для ссылок в карточке */
.location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    background: rgba(26, 60, 94, 0.8);
    padding: 10px;
    border-radius: 10px;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.card-link {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 10px;
    color: #f25c05;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.card-link:hover {
    background: linear-gradient(45deg, #f25c05, #ff6e00);
    color: #fff;
    animation: pulse 1.5s infinite;
}

.card-link .material-icons {
    font-size: 18px;
    color: #f25c05;
    transition: color 0.3s ease;
}

.card-link:hover .material-icons {
    color: #fff;
}

/* Стили для баллона на карте */
.ymaps-2-1-79-balloon {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    border-radius: 15px !important;
    background: #fff !important;
    overflow: visible !important;
}

.ymaps-2-1-79-balloon__layout {
    border-radius: 15px !important;
    background: #fff !important;
    overflow: visible !important;
}

.ymaps-2-1-79-balloon__content {
    border-radius: 15px !important;
    padding: 0 !important;
    background: #fff !important;
    width: 100% !important;
    overflow: visible !important;
}

/* Стили для стрелки баллона */
.ymaps-2-1-79-balloon__tail {
    display: block !important;
    background: #fff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important; /* Добавляем тень для стрелки */
    border: none !important; /* Убираем границу, так как треугольник не нуждается в ней */
    z-index: -1 !important; /* Устанавливаем стрелку позади балуна */
}

/* Стили для SVG внутри стрелки (треугольник) */
.ymaps-2-1-79-balloon__tail svg {
    fill: #fff !important; /* Цвет треугольника */
    stroke: #e0e0e0 !important; /* Цвет обводки треугольника */
    stroke-width: 1px !important; /* Толщина обводки */
}

.balloon-content {
    padding: 40px 0px 25px 25px;
    background: #fff;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    color: #1a3c5e;
    width: 100%;
    box-sizing: border-box;
}

.balloon-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a3c5e;
    margin-bottom: 12px;
}

.balloon-address {
    font-size: 1rem;
    color: #1a3c5e;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.balloon-address .material-icons {
    font-size: 16px;
    color: #1a3c5e;
}

.balloon-divider {
    border-bottom: 1px solid #e0e0e0;
    margin: 15px 0;
}

.balloon-content .location-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px auto;
    background: transparent;
    padding: 10px;
    border-radius: 10px;
    justify-content: center;
    max-width: fit-content;
}

.balloon-content .location-services .service-icon {
    font-size: 24px;
    color: #f25c05;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.balloon-content .location-services .service-icon:hover {
    transform: scale(1.2);
}

.balloon-content .location-services .service-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a3c5e;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.balloon-content .location-services .service-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.balloon-content .location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    background: rgba(26, 60, 94, 0.8);
    padding: 10px;
    border-radius: 10px;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.balloon-link {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 10px;
    color: #f25c05;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.balloon-link:hover {
    background: linear-gradient(45deg, #f25c05, #ff6e00);
    color: #fff;
    animation: pulse 1.5s infinite;
}

.balloon-link .material-icons {
    font-size: 18px;
    color: #f25c05;
    transition: color 0.3s ease;
}

.balloon-link:hover .material-icons {
    color: #fff;
}

/* Адаптивность для баллона */
@media screen and (max-width: 480px) {
    .balloon-content {
        padding: 40px 0px 15px 15px;
        min-width: 250px;
    }

    .balloon-name {
        font-size: 1.1rem;
    }

    .balloon-address {
        font-size: 0.9rem;
    }

    .balloon-content .location-actions {
        flex-direction: column;
        gap: 10px;
    }

    .balloon-content .location-actions .balloon-link {
        width: 100%;
        justify-content: center;
    }
}

/* ========================= */
/*        Tabs (Вкладки)     */
/* ========================= */
.tabs {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    border-bottom: 1px solid #ccc;
    justify-content: center;
}

.tabs .tab {
    cursor: pointer;
    padding: 8px 16px;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #1a3c5e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s ease;
}

.tabs .tab:hover {
    color: #f25c05;
}

.tabs .tab::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: #f25c05;
    transition: width 0.3s ease;
}

.tabs .tab:hover::after {
    width: 100%;
}

.tabs .tab.active {
    color: #1a3c5e;
    background: none;
    border: none;
}

.tabs .tab.active::after {
    width: 100%;
}

.tabs .tab .material-icons {
    transition: color 0.3s ease;
}

.tabs .tab:hover .material-icons {
    color: #f25c05;
}

.tabs .tab.active .material-icons {
    color: #1a3c5e;
}

/* ========================= */
/*        Media Queries      */
/* ========================= */
@media screen and (max-width: 768px) {
    .map-section {
        margin: 20px auto;
        padding: 15px;
    }
    
    .map-filter {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .map-filter label,
    .map-filter select,
    .tabs .tab {
        font-size: 0.9rem;
    }
    
    #map {
        height: 400px;
    }
    
    .location-card {
        padding: 15px;
        margin-bottom: 12px;
        min-height: 250px;
    }

    .location-actions {
        flex-direction: column;
        gap: 10px;
    }

    .card-link {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .map-section {
        padding: 10px;
    }
    
    .map-filter label,
    .map-filter select,
    .tabs .tab {
        font-size: 0.85rem;
    }
    
    #map {
        height: 300px;
    }
    
    .location-card {
        padding: 10px;
        margin-bottom: 10px;
        min-height: 200px;
    }
    
    .location-name {
        font-size: 1.1rem;
    }
    
    .location-address {
        font-size: 0.9rem;
    }

    .location-actions {
        flex-direction: column;
        gap: 10px;
    }

    .card-link {
        width: 100%;
        justify-content: center;
    }
}