/* Главная страница: круговая схема на широких экранах и карточки на мобильных. */
/* Главная: фотографии и обычные ссылки вместо круговой схемы на телефоне и планшете. */
.home-page .home-directions__intro {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
.home-page .home-directions__cards { display: none; }

@media (max-width: 980px) {
    .home-page .site-main { min-height: 0; padding: 0; background: #f3f7fb; }

    .home-page .home-diagram { display: none; }
    .home-page .home-directions {
        margin: 0;
        padding: 0;
        color: #004587;
        background: #f8fcff;
        text-align: left;
    }
    .home-page .home-directions__intro {
        position: relative;
        width: auto;
        height: auto;
        min-height: clamp(170px, 34vw, 240px);
        padding: 28px max(24px, calc((100% - 592px) / 2)) 40px;
        overflow: visible;
        clip-path: none;
        color: #fff;
        background-color: #06488e;
        background-image: linear-gradient(90deg, rgba(0, 66, 137, .94), rgba(0, 72, 147, .24)), image-set(url("backgrounds/panorama-800.webp") 1x, url("backgrounds/panorama-1600.webp") 2x);
        background-size: cover;
        background-position: center, center 42%;
    }
    .home-page .home-directions__intro::after {
        content: '';
        position: absolute;
        right: 0;
        bottom: -16px;
        left: 0;
        height: 70px;
        background: linear-gradient(to bottom, rgba(248, 252, 255, 0), #f8fcff 85%);
        pointer-events: none;
    }
    .home-page .home-directions__intro::before {
        content: '';
        display: block;
        width: 44px;
        height: 4px;
        margin-bottom: 12px;
        border-radius: 2px;
        background: #45c5ff;
    }
    .home-page .home-directions h1,
    .home-page .home-directions h2,
    .home-page .home-directions p { margin: 0; padding: 0; text-indent: 0; }
    .home-page .home-directions h1 {
        color: #fff;
        font-size: clamp(30px, 8vw, 44px);
        font-weight: 700;
        line-height: 1.05;
    }
    .home-page .home-directions .home-directions__context {
        padding: 0 8px;
        color: #52657b;
        font-size: 12px;
        line-height: 1.5;
    }
    .home-page .home-directions__cards {
        position: relative;
        display: grid;
        gap: 18px;
        max-width: 640px;
        margin: -18px auto 0;
        padding: 0 14px 24px;
    }
    .home-page .home-direction {
        display: block;
        min-width: 0;
        overflow: hidden;
        border: 2px solid #fff;
        border-radius: 16px;
        background: #fff;
        color: #004587;
        box-shadow: 0 6px 15px rgba(0, 63, 128, .22);
        text-decoration: none;
    }
    .home-page .home-direction:hover { border-color: #45c5ff; }
    .home-page .home-direction:focus-visible { outline: 3px solid #002d69; outline-offset: 4px; }
    .home-page .home-direction__photo { display: block; }
    .home-page .home-direction__photo img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 0;
        filter: saturate(1.3) contrast(1.05) brightness(1.06);
    }
    .home-page .home-direction__body {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 36px;
        align-items: center;
        gap: 12px;
        padding: 18px 16px;
        background: #fff;
    }
    .home-page .home-direction__body::before {
        content: '';
        position: absolute;
        inset: -20px 0 auto;
        height: 20px;
        background: #fff;
        clip-path: polygon(0 0, 100% 100%, 0 100%);
    }
    .home-page .home-direction__body::after {
        content: '';
        position: absolute;
        top: -18px;
        left: 0;
        width: 60px;
        height: 14px;
        background: #45c5ff;
        clip-path: polygon(0 0, 100% 70%, 100% 100%, 0 100%);
    }
    .home-page .home-direction__body > div { min-width: 0; }
    .home-page .home-directions h2 {
        color: #004587;
        font-size: clamp(20px, 5.6vw, 26px);
        font-weight: 700;
        line-height: 1.2;
        overflow-wrap: break-word;
    }
    .home-page .home-direction__body p {
        margin-top: 8px;
        color: #4b5a70;
        font-size: 15px;
        line-height: 1.45;
    }
    .home-page .home-direction__arrow {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        color: #fff;
        background: #00488f;
    }
    .home-page .home-direction__arrow svg { display: block; }
}
