/* Полосы направлений на главной: на ПК колонки во всю ширину, на узком экране стопка. */
.home-location-strips {
    display: grid;
    grid-template-columns: repeat(var(--home-location-strip-count, 5), minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
}

.home-location-strip {
    display: block;
    position: relative;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.home-location-strip:hover,
.home-location-strip:focus {
    color: inherit;
    text-decoration: none;
}

.home-location-strip:focus-visible {
    outline: 3px solid #e7ff83;
    outline-offset: -6px;
    z-index: 1;
}

.home-location-strip__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 0.4 / 1;
    max-height: 760px;
    overflow: hidden;
    background: #335b4f;
}

.home-location-strip__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.3s ease;
}

.home-location-strip__media::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    background: linear-gradient(to top, rgba(18, 24, 32, 0.5), rgba(18, 24, 32, 0));
    pointer-events: none;
}

.home-location-strip__title {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 24px 16px;
    color: #fbf9f7;
    font-size: 30px;
    font-weight: 300;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
    .home-location-strip:hover .home-location-strip__media img,
    .home-location-strip:focus-visible .home-location-strip__media img {
        transform: scale(1.07);
    }
}

@media (max-width: 1199.98px) {
    .home-location-strip__title {
        font-size: 24px;
        padding: 16px 12px;
    }
}

@media (max-width: 991.98px) {
    .home-location-strips {
        display: flex;
        flex-direction: column;
    }

    .home-location-strip__media {
        aspect-ratio: 2.5 / 1;
        max-height: 200px;
    }

    .home-location-strip__media::after {
        top: 0;
        height: auto;
        background: linear-gradient(to top, rgba(18, 24, 32, 0.34), rgba(18, 24, 32, 0.16));
    }

    .home-location-strip__title {
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-location-strip__media img {
        transition: none;
    }
}
