/**
 * Стили для интерактивной Яндекс.Карты - SPECSERVIS
 * Оранжево-черная цветовая схема
 * @package ProjectServis
 */

/* CSS Переменные для карты */
:root {
    --map-primary: #FF6B35;
    --map-secondary: #FF8C42;
    --map-accent: #FFB366;
    --map-dark: #1A1A1A;
    --map-medium-dark: #2C2C2C;
}

/* ===================================
   Контейнер карты - УЛУЧШЕННЫЙ ДИЗАЙН
   =================================== */
.map-container {
    position: relative;
    width: 100%;
    margin: 3rem 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 107, 53, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: var(--map-medium-dark);
    padding: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-container:hover {
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.7),
        0 0 0 2px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Внутренний контейнер с картой */
.map-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 107, 53, 0.1) 0%,
        transparent 50%,
        rgba(255, 107, 53, 0.05) 100%);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-container:hover::before {
    opacity: 1;
}

#yandex-map {
    width: 100%;
    height: 450px;
    position: relative;
    z-index: 1;
    border-radius: 14px;
    overflow: hidden;
}

/* Стилизация элементов Яндекс.Карт */
ymaps[class*="copyrights-pane"] {
    opacity: 0.3;
    transition: opacity 0.3s ease;
    filter: brightness(0.7);
}

ymaps[class*="copyrights-pane"]:hover {
    opacity: 0.6;
    filter: brightness(1);
}

/* Стилизация контролов карты */
ymaps[class*="zoom"] {
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

ymaps[class*="zoom__button"] {
    background: rgba(26, 26, 26, 0.9) !important;
    border-color: rgba(255, 107, 53, 0.2) !important;
    transition: all 0.3s ease !important;
}

ymaps[class*="zoom__button"]:hover {
    background: rgba(255, 107, 53, 0.2) !important;
    border-color: rgba(255, 107, 53, 0.5) !important;
}

ymaps[class*="geolocation"] {
    background: rgba(26, 26, 26, 0.9) !important;
    border-radius: 8px !important;
    border-color: rgba(255, 107, 53, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

ymaps[class*="geolocation"]:hover {
    background: rgba(255, 107, 53, 0.2) !important;
    border-color: rgba(255, 107, 53, 0.5) !important;
}

/* ===================================
   Стилизация стандартного балуна Яндекс.Карт
   =================================== */
/* Оранжевый пресет для метки уже применен через islands#orangeIcon */


/* ===================================
   Запасной вариант (fallback)
   =================================== */
.map-fallback {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.map-fallback-content {
    text-align: center;
    padding: 2rem;
}

.map-fallback-content i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.map-fallback-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.map-fallback-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.map-fallback-content .btn {
    background: #fff;
    color: #667eea;
    padding: 0.8rem 2rem;
    font-weight: 600;
}

.map-fallback-content .btn:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
}

/* ===================================
   Секция с картой
   =================================== */
.map-section {
    margin-top: 4rem;
}

.map-section .section-header {
    position: relative;
    padding-bottom: 1rem;
}

.map-section .section-title {
    background: linear-gradient(135deg, var(--map-primary), var(--map-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.map-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--map-primary), var(--map-secondary));
    border-radius: 2px;
}

/* ===================================
   Адаптивность
   =================================== */
@media (max-width: 768px) {
    #yandex-map {
        height: 380px;
    }

    .map-container {
        border-radius: 16px;
        padding: 6px;
        box-shadow:
            0 15px 45px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 107, 53, 0.2);
    }

    .map-section {
        margin-top: 3rem;
    }
}

@media (max-width: 480px) {
    #yandex-map {
        height: 320px;
    }

    .map-container {
        margin: 2rem 0;
        border-radius: 12px;
        padding: 5px;
    }

    .map-section {
        margin-top: 2rem;
    }

    .map-section .section-title::after {
        width: 40px;
        height: 2px;
    }
}
