.carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    height: calc(100svh - 80px);
    overflow: hidden;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    /* background: var(--red-slider-gradient); */
    z-index: 1;
    pointer-events: none;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.slide-content {
    max-width: 530px;
    min-height: 350px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 0;
    color: var(--white);
    border-radius: 10px;
    margin-left: 10%;
    margin-right: 10%;
    position: relative;

    h2 {
        padding: 30px 0 0 30px;
    }

    p {
        padding: 0 0 0 30px;
    }

    .carousel-controls-row {
        padding: 10px 0 0 30px;
    }
}

.slide-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.carousel-indicators {
    position: static;
    display: flex;
    gap: 12px;
    margin: 0 8px;
}

.carousel-indicators button {
    position: relative;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 24px;
    background: white;
    cursor: pointer;
    outline: none;
    padding: 0;
}

.carousel-indicators button.active {
    width: 60px;
    background: white;
}

.carousel-indicators button span {
    content: "";
    position: absolute;
    top: 10%;
    left: 5%;
    height: 80%;
    background: var(--red);
    border-radius: inherit;
    transition: width 0.5s;
    z-index: 1;
    opacity: 0;
    width: 10%;
}

.carousel-indicators button.active span {
    width: 90%;
    transition: width 0.5s;
    opacity: 1;
}

.carousel-control {
    position: static;
    transform: none;
    background: rgba(255, 255, 255);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 1023px) {
    .carousel-indicators button {
        width: 18px;
        height: 18px;
    }

    .carousel-indicators button.active {
        width: 45px;
    }

    .carousel-control {
        width: 30px;
        height: 30px;
    }

    .carousel-control svg {
        width: 15px;
        height: 15px;
    }
}

/* @media (width <=1023px) {
    .carousel-indicators button {
        width: 14px;
        height: 14px;
    }

    .carousel-indicators button.active {
        width: 35px;
    }

    .carousel-control {
        width: 24px;
        height: 24px;
    }

    .carousel-control svg {
        width: 12px;
        height: 12px;
    }
} */

.carousel-controls-row {
    position: absolute;
    bottom: 0px;
    display: flex;
    align-items: center;
    gap: 24px;
}

@media (max-width: 599px) {
    .slide-content {
        width: 100%;
        height: 40%;
        top: auto;
        bottom: 0;
        gap: 24px;
        justify-content: flex-start;
        padding: 0;
        /* Remove any inherited padding */
        box-sizing: border-box;

        .carousel-controls-row {
            padding: 0;
        }
    }

    .carousel,
    .carousel-inner,
    .carousel-item {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .carousel::before {
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 40%;
    }

    .slide-content h2,
    .slide-content p {
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .carousel-controls-row {
        position: absolute;
        left: 0;
        right: 0;
        margin: 0 auto;
        bottom: 24px;
        width: fit-content;
    }
}

@media (max-width: 499px) {
    .carousel-indicators button {
        width: 14px;
        height: 14px;
    }

    .carousel-indicators {
        gap: 10px;
    }

    .carousel-control {
        width: 22px;
        height: 22px;
    }

    .slide-content {
        margin: 0 10%;
        position: relative;
        min-height: 350px;
        width: 80%;
        padding: 0;

        .carousel-controls-row {
            padding: 0;
        }

    }

    .slide-content h2 {
        padding: 20px 16px 0 16px;
    }

    .slide-content p {
        padding: 0 16px;
    }

    .carousel-indicators button.active {
        width: 36px;
        background: white;
    }

    .carousel-controls-row {
        position: absolute;
        left: 0;
        right: 0;
        margin: 0 auto;
        bottom: 24px;
        gap: 14px;
        width: fit-content;
    }

    .achievement {
        .counter {
            font-size: 32px;
            color: var(--black);
        }
    }

    .carousel-item {
        justify-content: end;
        /* background: rgba(0, 0, 0, 0.7); */
    }

    .carousel::before {
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 40%;
        /* background: var(--red-holding-gradient-hover); */
    }
}

.achievement {
    display: flex;
    gap: 5%;

    .block-wide {
        gap: 2%;
    }

    .block-wide .block-text {
        width: 70%;
    }
}


@media (min-width: 1201px) and (max-width:1220px) {
    .achievement {
        gap: 5%;
    }

    .achievement>.block-description {
        width: 35%;
    }
}

@media (max-width:1024px) {
    .achievement {
        gap: 40px;
        flex-direction: column;

        .block-description {
            width: 100%;
        }

        .block-wide-wrapper {
            width: 100%;
        }

        .block-wide {
            padding: 8px;

            .counter-container {
                min-width: 20%;
            }

            .block-text {
                width: 86%;
            }

            .counter {
                font-size: 42px;
                color: var(--black);
            }
        }
    }
}

@media (max-width: 630px) {
    .achievement {
        .block-wide {
            .counter-container {
                min-width: 25%;
            }
        }
    }
}

@media (max-width: 500px) {
    .achievement {
        .block-wide {
            .counter-container {
                min-width: 28%;
            }
        }
    }
}

@media (max-width: 450px) {
    .achievement {
        .block-wide {
            .counter-container {
                min-width: 33%;
            }
        }
    }
}

@media (max-width:1024px) {
    .achievement {
        .block-wide {
            padding: 8px 20px 8px 8px;
            min-height: 95px;

            h4 {
                font-size: 16px;
            }
        }
    }
}

@media (max-width:420px) {
    .achievement {
        .block-wide {
            .counter {
                font-size: 36px;
            }
        }
    }

    .achievement>.block-description>.block-text {
        flex-direction: column-reverse;
    }

    .block-description {
        width: 100%;
        gap: 24px;
    }

    .block-wide-wrapper {
        width: 100%;
    }


}

.activity {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, 1fr);

    img {
        aspect-ratio: 1 / 1;
    }

    /* gap: 18px; */
}

@media (min-width: 1024px) and (max-width: 1200px) {
    .activity .container-text {
        gap: 12px;
    }

    h3 {
        font-size: 24px;
    }
}

/* .activity>* {
    max-height: 600px;
} */


/* template */
/* grid-area: row-start / column-start / row-end / column-end; */

.distribution {
    grid-area: 1 / 1 / 2 / 13;
    display: flex;
    gap: 8%;
    align-items: center;

    .container-img {
        width: 40%;
    }

    .container-text {
        width: 52%;
    }

    img {
        width: 100%;
        height: fit-content;
        object-fit: cover;
        display: block;
    }
}

/* @media (max-width: 1023px) {
    .distribution {
        grid-area: 1 / 1 / 2 / 13;
        flex-direction: column;
    }
} */

.production {
    display: flex;
    align-items: center;
    grid-area: 2 / 1 / 3 / 8;
    gap: 7%;

    .container-img {
        width: 33%;
    }

    .container-text {
        width: 60%;
    }

    img {
        width: 100%;
        object-fit: cover;
        display: block;
    }
}

/* @media (max-width: 1023px) {
    .production {
        grid-area: 2 / 1 / 3 / 13;
        flex-direction: column;
    }
} */

.international-log {
    grid-area: 2 / 9 / 4 / 13;
    display: flex;
    margin-top: 100px;
    flex-direction: column;
    gap: 24px;

    .container-img {
        width: 100%;
    }

    .container-text {
        width: 100%;
    }

    img {
        width: 100%;
        object-fit: cover;
        display: block;
    }
}

/* @media (max-width: 1023px) {
    .international-log {
        grid-area: 3 / 1 / 4 / 13;
    }
} */

.warehouse-log {
    grid-area: 3 / 2 / 5 / 6;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-left: -50px;
    margin-right: 50px;
    /* transform: translateX(-50px); */

    .container-img {
        width: 100%;
    }

    .container-text {
        width: 100%;
    }

    img {
        width: 100%;
        /* height: 100%; */
        object-fit: cover;
        display: block;
    }

}

/* @media (max-width: 1023px) {
    .warehouse-log {
        grid-area: 4 / 1 / 5 / 13;
    }
} */

.building {
    grid-area: 4 / 7 / 5 / 13;
    display: flex;
    align-items: center;
    gap: 7%;
    margin-left: -75px;
    /* transform: translateX(-75px); */
    margin-top: -250px;
    /* transform: translateY(-250px); */

    .container-img {
        width: 46%;
    }

    .container-text {
        width: 47%;
    }

    img {
        width: 100%;
        /* height: 100%; */
        object-fit: cover;
        display: block;
    }
}

@media (min-width: 1201px) and (max-width: 1400px) {

    .building h3,
    .building p {
        width: 120%;
    }
}

/* @media (max-width: 1023px) {
    .building {
        flex-direction: column;
        grid-area: 5 / 1 / 6 / 13;
    }
} */

.recyclable {
    grid-area: 5 / 3 / 6 / 12;
    display: flex;
    align-items: center;
    gap: 9%;
    margin-top: -120px;
    /* transform: translateY(-120px); */
    margin-bottom: 100px;

    .container-img {
        width: 39%;
    }

    .container-text {
        width: 52%;
    }

    img {
        width: 100%;
        object-fit: cover;
        display: block;
    }
}

/* @media (max-width: 1023px) {
    .recyclable {
        flex-direction: column;
        grid-area: 6 / 1 / 7 / 13;
    }
} */

.retail {
    grid-area: 6 / 4 / 7 / 13;
    display: flex;
    align-items: center;
    gap: 9%;

    .container-img {
        width: 39%;
    }

    .container-text {
        width: 52%;
    }

    img {
        width: 100%;
        /* height: 100%; */
        object-fit: cover;
        display: block;
    }
}

/* @media (max-width: 1023px) {
    .retail {
        flex-direction: column;
        grid-area: 7 / 1 / 8 / 13;
    }
} */

@media (max-width: 1350px) {
    .building {
        margin-top: -200px;
    }

    .recyclable {
        margin-top: -100px;
        margin-bottom: 80px;

    }
}

@media (max-width: 1300px) {
    .building {
        margin-top: -100px;
    }

    .recyclable {
        margin-top: -50px;
        margin-bottom: 80px;

    }
}

@media (max-width: 1260px) {
    .building {
        margin-top: 0;
    }

    .recyclable {
        margin-top: 0;
        margin-bottom: 80px;
    }
}

@media (max-width: 1023px) {
    .activity {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .activity img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        aspect-ratio: 3/2;
    }

    .activity .container-img {
        width: 45%;
        height: 100%;
    }

    .distribution {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 24px;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }

    .production {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }

    .international-log {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 0;
        gap: 24px;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }

    .warehouse-log {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        margin-right: 0;
        gap: 24px;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }

    .building {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        gap: 24px;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }

    .recyclable {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        margin-bottom: 0;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }

    .retail {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;

        .container-img {
            width: 100%;
        }

        .container-text {
            width: 100%;
            gap: 14px;
        }
    }


}

.work-model {
    background: var(--red-gradient);
    padding: 40px 10% 60px 10%;
    gap: 24px;
    display: flex;
    flex-direction: column;
    margin-bottom: 60px;
}

.work-model-wrapper {
    background: var(--white);
    border-radius: 20px;
    padding: 60px 135px;
    display: flex;
    flex-direction: column;
    gap: 40px;

    h3 {
        font-weight: lighter;
    }
}

.work-model-main {
    display: flex;
    width: 100%;
    gap: 5%;
}

.name-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 40%;
}

.name-container-item {
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    height: 40px;

    p {
        text-align: left;

    }
}

.model-container {
    display: flex;
    justify-content: space-between;
    width: 55%;
}

.model-container-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 26.5%;
}


.model-item {
    background: var(--red-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    width: 100%;
    height: 40px;
    box-shadow: var(--shadow-base);
}



.model-item:hover {
    background: var(--red-hover);
}

.model-item-disable {
    background: var(--grey-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    width: 100%;
    height: 40px;
}



.work-model-add {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.model-add-container {
    padding: 0 0 0 20px;
    display: flex;
    flex-wrap: wrap;
    column-gap: 5%;
    row-gap: 24px;
}

.model-add-item {
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--grey-gradient);
    box-shadow: var(--shadow-base);
    border-radius: 10px;
    height: 54px;
    width: 30%;

    p {
        text-align: left;
    }
}

@media (min-width: 950px) and (max-width: 1200px) {
    .work-model-wrapper {
        padding: 30px 70px;
    }

    .work-model-main {
        gap: 5%;
    }

    .name-container {
        width: 40%;
    }
}

@media (max-width: 1024px) {
    .model-add-container {
        justify-content: space-evenly;
        padding: 0;
    }

    .model-add-item {
        width: 38%;

        p {
            font-size: 12px;
        }
    }
}

@media (max-width: 950px) {
    .work-model {
        padding: 30px 5% 45px 5%;
    }

    .work-model-wrapper {
        padding: 24px;

        h3 {
            font-weight: normal;
        }
    }

    .name-container {
        gap: 20px
    }

    .name-container-item {
        padding: 0px;
    }

    .model-container-col {
        gap: 20px;
    }

    .model-item {
        height: 40px;
    }

    .model-item-disable {
        height: 40px;
    }

    .model-item-disable>img {
        height: 10px;
    }

    .model-item>img {
        height: 10px;
    }

}

@media (max-width: 550px) {
    .work-model .container-heading {
        margin-left: 5%;

        h2 {
            width: min-content;
        }

    }

    .name-container {
        gap: 28px;
    }

    .name-container-item {
        gap: 8px;
        height: 30px;

        p {
            font-size: 12px;
        }

        img {
            width: 12px;
        }
    }

    .name-container-item img {
        display: none;
    }

    .model-container {
        padding-top: 26px;

        .model-container-col {
            gap: 28px;
        }

        .model-item {
            height: 30px;
            font-size: 12px;
        }

        .model-item-disable {
            height: 30px;
            font-size: 12px;
        }
    }

    .model-add-item {
        width: 100%;
    }
}

.partners>.heading-container {
    margin-left: 10%;
}

.marquee-wrapper {
    padding: 60px 0 160px 0;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.marquee-container {
    overflow: hidden;
}

.marquee-track {
    display: flex;
    align-items: center;
}

/* .marquee-item {
    box-sizing: border-box;
    display: flex;
    align-items: center;
} */

.marquee-track>div>img {
    user-select: none;
}

.right-to-left .marquee-track {
    animation: move-left 30s linear infinite;
}

.left-to-right .marquee-track {
    animation: move-right 30s linear infinite;
}

.marquee-container-reverse {
    /* display: flex; */
    flex-direction: row-reverse;
}

@keyframes move-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes move-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

@media (max-width: 1024px) {
    .marquee-wrapper {
        gap: 40px;
        padding: 45px 0 120px 0;

        img {
            width: 120px;
            height: auto
        }
    }
}

/* ---------- CSS ---------- */
.marquee-container {
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 100px;
    align-items: center;
    width: max-content;
    /* ширина = ширина вмісту */
    will-change: transform;
}

.marquee-content,
.marquee-content.clone {
    display: flex;
    flex-wrap: nowrap;
    gap: 100px;
    align-items: center;

    img {
        max-width: 180px;
        max-height: 144px;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 600px) {

    .marquee-content,
    .marquee-content.clone {
        display: flex;
        flex-wrap: nowrap;
        gap: 60px;
        align-items: center;

        img {
            max-width: 120px;
            max-height: 96px;
            width: auto;
            height: auto;
            object-fit: contain;
        }
    }
}

/* ВАЖЛИВО: щоб діти НЕ стискались і не змінювали ширину */
.marquee-content>* {
    flex: 0 0 auto;
}

/* Анімації — використовують змінні, які ми виставляємо з JS */
.right-to-left .marquee-track {
    animation: move-left 90s linear infinite;
}

.left-to-right .marquee-track {
    animation: move-right 90s linear infinite;
}

@keyframes move-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(var(--marquee-shift) * -1));
    }
}

@keyframes move-right {
    0% {
        transform: translateX(calc(var(--marquee-shift) * -1));
    }

    100% {
        transform: translateX(0);
    }
}