/* Стили для карты */
.map-region-container {
    background-color: #fff;
}

.map {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

.map svg {
    width: 100%;
    height: 100%;
}

.region {
    stroke-width: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.region:hover {
    fill: #0066cc;
}

.region.active {
    fill: #0066cc;
}

/* Стили для тултипа */
#tooltip {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 14px;
    z-index: 10000;
    pointer-events: none;
    display: none;
    border: 1px solid #ddd;
    max-width: 220px;
    backdrop-filter: blur(5px);
    transform: translate(-50%, -100%);
    margin-top: -10px;
}

.tooltip-title {
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 4px;
    font-size: 14px;
}

#tooltip-dop {
    font-size: 12px;
    color: #666;
}

/* Стили для модального окна региона */
.region-modal {
    position: fixed;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-width: 320px;
    z-index: 10001;
    display: none;
}

.region-modal h4 {
    margin-top: 0;
    color: #0066cc;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

.region-modal p {
    margin: 8px 0;
    line-height: 1.4;
}

.region-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
}

.region-stat-left {
    text-align: left;
    flex: 1;
}

.region-stat span:first-child {
    font-weight: 500;
    color: #666;
    font-size: 13px;
}

.region-stat span:last-child {
    color: #0066cc;
    font-weight: bold;
    font-size: 14px;
    text-align: right;
    min-width: 60px;
}

.close-region-info {
    position: absolute;
    top: 12px;
    right: 15px;
    cursor: pointer;
    font-weight: bold;
    color: #999;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    background: #f5f5f5;
    line-height: 1;
}

.close-region-info:hover {
    background-color: #e0e0e0;
    color: #666;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .map {
        height: 70vh;
    }

    .region-modal {
        max-width: 280px;
        padding: 15px;
        margin: 10px;
    }

    .region-modal h4 {
        font-size: 16px;
        padding-right: 30px;
    }

    .region-modal p {
        font-size: 14px;
    }

    .region-stat {
        margin-bottom: 10px;
    }

    #tooltip {
        max-width: 180px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .map {
        height: 60vh;
    }

    .region-modal {
        max-width: calc(100vw - 40px);
        padding: 12px;
        margin: 10px;
    }

    .region-stat {
        flex-direction: column;
        gap: 5px;
    }

    .region-stat span:last-child {
        text-align: left;
    }
}







.ft {
    background-color: #ffffff;
    color: #333;
    min-height: 100px;
    display: flex;
    justify-content: center;
    /*align-items: center;*/
    padding: 20px;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    /*max-width: 1200px;*/
    width: 100%;
}



.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    flex: 1;
    min-width: 200px;
    max-width: 220px;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.stat-card:nth-child(1)::before {
    background: #777;
}

.stat-card:nth-child(2)::before {
    background: #0086c8;
}

.stat-card:nth-child(3)::before {
    background: #45ae38;
}

.stat-card:nth-child(4)::before {
    background: #9d080d;
}

.stat-card:nth-child(5)::before {
    background: #777;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.stat-card:nth-child(1) .stat-number {
    color: #777;
}

.stat-card:nth-child(2) .stat-number {
    color: #0086c8;
}

.stat-card:nth-child(3) .stat-number {
    color: #45ae38;
}

.stat-card:nth-child(4) .stat-number {
    color: #9d080d;
}

.stat-card:nth-child(5) .stat-number {
    color: #777;
}

.stat-label {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

.plus {
    font-size: 2rem;
    margin-left: 5px;
    vertical-align: super;
}

/* Анимация появления */
@keyframes matrixEffect {
    0% {
        opacity: 0;
        transform: translateY(20px);
        text-shadow: 0 0 10px currentColor;
    }
    50% {
        opacity: 1;
        transform: translateY(-5px);
        text-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        /* text-shadow: 0 0 10px currentColor;*/
    }
}

.animate {
    animation: matrixEffect 1.5s ease-out forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        max-width: 300px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 2rem;
    }

    .plus {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 12px;
    }
}
