/* Первый экран главной: маршрут по карте из точек (js/hero-route.js) */
.hero-route-section {
    padding-top: 36px;
    padding-bottom: 16px;
}
.hero-route-section .hero-intro {
    max-width: 760px;
    margin: 0 auto;
}
.hero-route-section h1 {
    color: #14a801;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin-bottom: .75rem;
}
.hero-route-section .hero-intro p {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: .6rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 1.25rem;
}

.hero-route {
    position: relative;
    max-width: 1040px;
    margin: 1.75rem auto 0;
}
.hero-route-map {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
}
.hero-route-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.hero-route .route-reveal {
    fill: none;
    stroke: #fff;
    stroke-width: 24;
    stroke-linecap: round;
}
.hero-route .route-line {
    fill: none;
    stroke: #14a801;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 0.1 8;
    vector-effect: non-scaling-stroke;
}
.hero-route .route-stop {
    fill: #fff;
    stroke: #14a801;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    transition: transform .4s cubic-bezier(.3, 1.8, .5, 1);
}
.hero-route .route-stop.is-visited {
    transform: scale(1);
}
.hero-route .route-plane {
    opacity: 0;
    transition: opacity .4s;
}
.hero-route .route-plane path {
    fill: #0d7400;
}
.hero-route.is-flying .route-plane {
    opacity: 1;
}
.hero-route.is-done .route-plane {
    opacity: 0;
}

.hero-route-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-route-label {
    position: absolute;
    padding: 2px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    color: #3d4a3b;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .35s, transform .35s;
}
.hero-route-label.is-top { transform: translate(-50%, calc(-100% - 6px)); }
.hero-route-label.is-bottom { transform: translate(-50%, 10px); }
.hero-route-label.is-left { transform: translate(calc(-100% - 12px), -50%); }
.hero-route-label.is-right { transform: translate(12px, -50%); }
.hero-route-label.is-visible {
    opacity: 1;
}
.hero-route-label.is-start {
    font-weight: 500;
}

.hero-route-pin {
    position: absolute;
    width: 0;
    height: 0;
}
.hero-route-pin-icon {
    position: absolute;
    left: -13px;
    top: -36px;
    width: 26px;
    height: 26px;
    border-radius: 50% 50% 50% 0;
    background: #14a801;
    box-shadow: 0 3px 8px rgba(20, 168, 1, .45);
    transform: rotate(-45deg) translate(0, -60px);
    opacity: 0;
}
.hero-route-pin-icon::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}
.hero-route-pulse {
    position: absolute;
    left: -14px;
    top: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(20, 168, 1, .35);
    opacity: 0;
}
.hero-route-now {
    position: absolute;
    left: 0;
    top: -48px;
    transform: translate(-50%, -100%) translateY(8px);
    padding: 6px 14px;
    border-radius: 12px;
    background: #14a801;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(20, 168, 1, .3);
    opacity: 0;
}
.hero-route-now b {
    display: block;
    font-size: 16px;
    font-weight: 700;
}
.hero-route.is-done .hero-route-pin-icon {
    animation: hero-pin-drop .7s cubic-bezier(.3, 1.4, .5, 1) forwards;
}
.hero-route.is-done .hero-route-pulse {
    animation: hero-pin-pulse 2.2s ease-out .6s infinite;
}
.hero-route.is-done .hero-route-now {
    animation: hero-bubble-in .5s ease-out .45s forwards;
}
@keyframes hero-pin-drop {
    from { opacity: 0; transform: rotate(-45deg) translate(40px, -40px); }
    to { opacity: 1; transform: rotate(-45deg) translate(0, 0); }
}
@keyframes hero-pin-pulse {
    from { opacity: .9; transform: scale(.4); }
    to { opacity: 0; transform: scale(2.4); }
}
@keyframes hero-bubble-in {
    to { opacity: 1; transform: translate(-50%, -100%); }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 6vw, 4.5rem);
    margin-top: 1rem;
    text-align: center;
}
.hero-stat-num {
    display: block;
    color: #14a801;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.hero-stat-label {
    color: #6c757d;
    font-size: .95rem;
}

@media (max-width: 575.98px) {
    .hero-route-section {
        padding-top: 32px;
    }
    .hero-route-label {
        font-size: 11px;
        padding: 1px 7px;
    }
    .hero-route-now {
        font-size: 11px;
        padding: 4px 10px;
    }
    .hero-route-now b {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-route *,
    .hero-route *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }
}

/* Широкий экран: текст слева, карта справа — чтобы финал маршрута был виден без прокрутки */
@media (min-width: 992px) {
    .hero-route-section {
        padding-top: 48px;
        padding-bottom: 40px;
    }
    .hero-route-section > .container {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        grid-template-areas: "intro map" "stats map";
        column-gap: 40px;
        align-items: center;
    }
    .hero-route-section .hero-intro {
        grid-area: intro;
        align-self: end;
        margin: 0;
    }
    .hero-route-section .hero-actions {
        justify-content: flex-start;
    }
    .hero-route {
        grid-area: map;
        width: calc(100% + 48px);
        max-width: none;
        margin: 0;
    }
    .hero-stats {
        grid-area: stats;
        align-self: start;
        justify-content: flex-start;
        margin-top: 1.75rem;
        text-align: left;
    }
}
