/**
 * Yandex Map Section Styles
 * Стили для секции с Яндекс картой на главной странице
 */

/* Основная секция карты */
.yandex-map-section {
    padding: 40px 0;
    background: #f8f9fa;
    position: relative;
}

/* Заголовок секции */
.yandex-map-section .section-header {
    margin-bottom: 50px;
}

/* Контейнер карты */
.yandex-map-container {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Сама карта */
.yandex-map {
    width: 100%;
    height: 500px;
    position: relative;
    border-radius: 20px;
}

/* Индикатор загрузки */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #228B22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-loading p {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    color: #666666;
    margin: 0;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    
    .yandex-map {
        height: 400px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    
    .yandex-map-section .section-header {
        margin-bottom: 40px;
    }
    
    .yandex-map {
        height: 350px;
        border-radius: 15px;
    }
    
    .yandex-map-container {
        border-radius: 15px;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    
    .yandex-map {
        height: 300px;
    }
}

/* Анимация появления секции */
.yandex-map-section {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Поддержка reduced motion */
@media (prefers-reduced-motion: reduce) {
    .yandex-map-section,
    .loading-spinner {
        animation: none;
        transition: none;
    }
}

/* Стили для полноэкранного режима карты */
.yandex-map .ymaps-2-1-79-fullscreen-control {
    background: #228B22 !important;
}

.yandex-map .ymaps-2-1-79-fullscreen-control:hover {
    background: #1e7a1e !important;
}

/* Кастомизация элементов управления картой */
.yandex-map .ymaps-2-1-79-zoom-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
}

.yandex-map .ymaps-2-1-79-zoom-control__button {
    border-radius: 8px !important;
}

.yandex-map .ymaps-2-1-79-zoom-control__button:hover {
    background: #228B22 !important;
    color: #ffffff !important;
}

/* Стили для балунов (всплывающих окон) */
.yandex-map .ymaps-2-1-79-balloon__content {
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.yandex-map .ymaps-2-1-79-balloon__tail {
    border-top-color: #228B22 !important;
}

/* Эффект загрузки для всей секции */
.yandex-map-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.yandex-map-section.loaded {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease;
}
/* Стили для красных кластеров Яндекс.Карт */
.yandex-map .ymaps-2-1-79-cluster-icon {
    background: #dc3545 !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4) !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.yandex-map .ymaps-2-1-79-cluster-icon:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6) !important;
}

/* Стили для текста внутри кластера */
.yandex-map .ymaps-2-1-79-cluster-icon .ymaps-2-1-79-cluster-content {
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 14px !important;
    font-family: 'Jost', sans-serif !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Стили для отдельных красных меток - ЗАФИКСИРОВАНЫ */
/* Убираем все анимации и переходы для меток */

/* Стили для иконок отдельных меток */
/* Убираем тени и эффекты */

/* Стили для балунов кластеров */
.cluster-balloon-item {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background: #ffffff !important;
    color: #2c3e50 !important;
}

.cluster-balloon-item:last-child {
    border-bottom: none;
}

.cluster-balloon-item strong {
    color: #2c3e50 !important;
    font-weight: 600;
}

/* Кастомизация элементов управления картой для серой темы */
.yandex-map .ymaps-2-1-79-zoom-control__button {
    background: rgba(128, 128, 128, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid #606060 !important;
}

.yandex-map .ymaps-2-1-79-zoom-control__button:hover {
    background: #606060 !important;
    color: #ffffff !important;
}

.yandex-map .ymaps-2-1-79-fullscreen-control {
    background: rgba(128, 128, 128, 0.9) !important;
    border: 1px solid #606060 !important;
}

.yandex-map .ymaps-2-1-79-fullscreen-control:hover {
    background: #606060 !important;
}

/* Стили для балунов отдельных меток - ИСПРАВЛЯЕМ БЕЛЫЙ ТЕКСТ */
.yandex-map .ymaps-2-1-79-balloon__content,
.yandex-map .ymaps-2-1-79-balloon__content *,
.yandex-map .ymaps-2-1-79-balloon__layout,
.yandex-map .ymaps-2-1-79-balloon__layout *,
.yandex-map .ymaps-2-1-79-balloon__content-layout,
.yandex-map .ymaps-2-1-79-balloon__content-layout *,
.yandex-map .ymaps-2-1-79-balloon__text,
.yandex-map .ymaps-2-1-79-balloon__text * {
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #2c3e50 !important;
    background: #ffffff !important;
}

.yandex-map .ymaps-2-1-79-balloon__content strong,
.yandex-map .ymaps-2-1-79-balloon__layout strong,
.yandex-map .ymaps-2-1-79-balloon__text strong {
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.yandex-map .ymaps-2-1-79-balloon__tail {
    border-top-color: #ffffff !important;
}

/* Принудительно убираем белый цвет из всех элементов балуна */
.yandex-map .ymaps-2-1-79-balloon div,
.yandex-map .ymaps-2-1-79-balloon span,
.yandex-map .ymaps-2-1-79-balloon p,
.yandex-map .ymaps-2-1-79-balloon strong,
.yandex-map .ymaps-2-1-79-balloon b {
    color: #2c3e50 !important;
}

/* Стили для кластерных балунов */
.yandex-map .ymaps-2-1-79-cluster-balloon .ymaps-2-1-79-balloon__content,
.yandex-map .ymaps-2-1-79-cluster-balloon .ymaps-2-1-79-balloon__content *,
.yandex-map .ymaps-2-1-79-cluster-balloon div,
.yandex-map .ymaps-2-1-79-cluster-balloon span,
.yandex-map .ymaps-2-1-79-cluster-balloon p {
    color: #2c3e50 !important;
    background: #ffffff !important;
}

/* Анимация для кластеров при загрузке - ОТКЛЮЧЕНА */
@keyframes clusterAppear {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Стили для хинтов (подсказок при наведении) - ИСПРАВЛЕНО */
.yandex-map .ymaps-2-1-79-hint {
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #2c3e50 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    font-weight: 600 !important;
}

.yandex-map .ymaps-2-1-79-hint__content {
    color: #2c3e50 !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Дополнительные селекторы для всех элементов внутри хинтов */
.yandex-map .ymaps-2-1-79-hint *,
.yandex-map .ymaps-2-1-79-hint div,
.yandex-map .ymaps-2-1-79-hint span,
.yandex-map .ymaps-2-1-79-hint p,
.yandex-map .ymaps-2-1-79-hint text,
.yandex-map .ymaps-2-1-79-hint__content *,
.yandex-map .ymaps-2-1-79-hint__content div,
.yandex-map .ymaps-2-1-79-hint__content span,
.yandex-map .ymaps-2-1-79-hint__content p,
.yandex-map .ymaps-2-1-79-hint__content text {
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* Поддержка reduced motion для анимаций кластеров */
@media (prefers-reduced-motion: reduce) {
    .yandex-map .ymaps-2-1-79-cluster-icon {
        animation: none;
    }
    
    .yandex-map .ymaps-2-1-79-cluster-icon:hover,
    .yandex-map .ymaps-2-1-79-placemark-overlay:hover {
        transform: none !important;
        transition: none !important;
    }
}

/* ИСПРАВЛЕННЫЕ СТИЛИ - возвращаем переходы для карты, но полностью фиксируем балуны */

/* Разрешаем переходы для основных элементов карты и панелей */

/* Разрешаем hover эффекты ТОЛЬКО для кластеров */
.yandex-map .ymaps-2-1-79-cluster-icon:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6) !important;
}

/* ПОЛНОСТЬЮ отключаем переходы и анимации для балунов */
.yandex-map .ymaps-2-1-79-balloon,
.yandex-map .ymaps-2-1-79-balloon *,
.yandex-map .ymaps-2-1-79-balloon__layout,
.yandex-map .ymaps-2-1-79-balloon__content,
.yandex-map .ymaps-2-1-79-balloon__tail,
.yandex-map .ymaps-2-1-79-balloon__close-button {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Принудительно фиксируем позиции балунов во время движения карты */
.yandex-map .ymaps-2-1-79-balloon__layout {
    position: absolute !important;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Отключаем все анимации появления балунов */
.yandex-map .ymaps-2-1-79-balloon__content-layout {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Фиксируем позиции меток во время движения карты */
.yandex-map .ymaps-2-1-79-placemark-overlay {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Убираем все hover эффекты для меток */
.yandex-map .ymaps-2-1-79-placemark-overlay:hover {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}