.mainpage-counts .container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.mainpage-counts__header {
    text-align: center;
}

.mainpage-counts__stats {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 24px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    gap: 16px 8px;
    border-top: 1px solid rgba(24, 56, 60, 0.12);
    border-bottom: 1px solid rgba(24, 56, 60, 0.12);
}

.mainpage-counts__stat {
    flex: 1 1 140px;
    max-width: 280px;
    text-align: center;
    padding: 8px 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

@media (min-width: 768px) {
    .mainpage-counts__stat + .mainpage-counts__stat::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 48px;
        background: rgba(24, 56, 60, 0.12);
    }
}

.mainpage-counts__stat-value {
    display: block;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.1;
    color: var(--color-turquoise, #5fb4bb);
}

.mainpage-counts__stat-label {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: #18383c;
}

.mainpage-counts__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.mainpage-long-image-parallax {
    width: 100%;
    margin-top: -80px;
}

.mainpage-long-image-parallax__viewport {
    position: relative;
    width: 100%;
    overflow: hidden;

    aspect-ratio: 21 / 5;
}

.mainpage-long-image-parallax__viewport > picture {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.mainpage-long-image-parallax__img {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 130%;
    object-fit: cover;
    object-position: center center;
    transform: translate3d(0, calc(-50% + var(--parallax-shift, 0px)), 0);
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .mainpage-long-image-parallax__img {
        transform: translate3d(0, -50%, 0);
        will-change: auto;
    }
}
@media (min-width: 768px) {
    .mainpage-counts__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.mainpage-counts__card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(24, 56, 60, 0.08);
}

.mainpage-counts__card-media {
    margin: 0;
    line-height: 0;
}

.mainpage-counts__card-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

.mainpage-counts__card-body {
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.mainpage-counts__card-title {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    color: #18383c;
}

.mainpage-counts__card-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #18383c;
}

.mainpage-counts__card-text p {
    margin: 0 0 0.75em;
}

.mainpage-counts__card-text p:last-child {
    margin-bottom: 0;
}

@media (min-width: 1200px) {
    .mainpage-counts__head{
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .mainpage-counts__header .section-header__subtitle,
    .mainpage-counts__header .section-header__title {
        text-align: left;
    }
    .mainpage-counts__stat-value {
        font-size: 36px;
    }

    .mainpage-counts__card-body {
        padding: 24px 28px 32px;
    }

    .mainpage-counts__card-title {
        font-size: 20px;
    }

    .mainpage-counts__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .mainpage-counts__stats{
        border: none;
        padding: 0;
    }
    .mainpage-long-image-parallax {
        margin-top: -100px;
    }

}