#cms-gallery {
    display: none;
}

#custom-gallery-v7 {
    .custom-gallery-v7-controls {
        bottom: 140px;

        @media screen and (max-width: 1079px) {
            bottom: 10px;
        }
    }
}

.visually-hidden-gallery-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.custom-gallery-v7 {
    --gradient-base-color: #000;
    --image-height: 37vw;
    --gradient-color: linear-gradient(180deg, rgba(1, 73, 145, 0) 0%, var(--gradient-base-color) 80.73%);
    --text-color: #fff;
    --slide-button-bg-color: var(--secondary-color);
    --slide-button-text-color: var(--secondary-color-contrast);
    --arrow-button-color: #fff;
    --arrow-button-size: 36px;
    --bullet-bg-color: #fff;
    --pagination-dots-bg-color: #fff;
    --control-buttons-color: #fff;
    --control-buttons-size: 32px;
}

.only-in-cms {
    display: none !important;
}

.custom-gallery-v7.gallery-size-extra-large {
    --image-height: 50vw;
}

.custom-gallery-v7.gallery-size-large {
    --image-height: 42.9vw;
}

.custom-gallery-v7.gallery-size-medium {
    --image-height: 37vw;
}

.custom-gallery-v7.gallery-size-small {
    --image-height: 31vw;
}

.custom-gallery-v7 {
    position: relative;

    .swiper-slide-item {
        height: var(--image-height);

        @media screen and (max-width: 767px) {
            height: 400px;
        }

        &:after {
            content: '';
            display: block;
            position: absolute;
            width: 100%;
            height: 100%;
            bottom: 0;
            left: 0;
            background: var(--gradient-color);
            z-index: 1;
        }

        .slide-media {
            width: 100%;
            height: 100%;
        }

        .gallery-image {
            display: block;
            width: 100%;
            height: 100%;

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

        .slide-content {
            position: absolute;
            bottom: 0;
            left: 0;
            color: var(--text-color);
            padding: 55px 20px 50px;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            width: calc(100% - 500px);
            max-width: 1000px;
            z-index: 2;
            line-height: 1.05;

            @media screen and (max-width: 1079px) {
                width: 100%;
                bottom: 65px;
                max-width: 100%;
                padding: 25px 20px 20px;
            }

            @media screen and (max-width: 767px) {
                bottom: 0;
            }

            .title {
                --font-size: 16px;
                --line-height: 1.1;
                --lines-to-show: 4;

                display: block;
                display: -webkit-box;
                font-size: var(--font-size);
                line-height: var(--line-height);
                overflow: hidden;
                text-overflow: ellipsis;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: var(--lines-to-show);

                h1 {
                    font-size: 3em;

                    @media screen and (max-width: 1499px) {
                        font-size: 2.5em;
                    }

                    @media screen and (max-width: 959px) {
                        font-size: 1.5em;
                    }

                    span {
                        font-weight: 900;
                    }
                }

                h2 {
                    font-size: 2.75em;

                    @media screen and (max-width: 1499px) {
                        font-size: 2.25em;
                    }

                    @media screen and (max-width: 959px) {
                        font-size: 1.4em;
                    }
                }

                h3 {
                    font-size: 2.5em;

                    @media screen and (max-width: 1499px) {
                        font-size: 2em;
                    }

                    @media screen and (max-width: 959px) {
                        font-size: 1.3em;
                    }
                }
            }

            .description {
                margin-top: .5em;

                --font-size: 18px;
                --line-height: 1.4;
                --lines-to-show: 10;

                display: block;
                display: -webkit-box;
                font-size: var(--font-size);
                line-height: var(--line-height);
                overflow: hidden;
                text-overflow: ellipsis;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: var(--lines-to-show);

                @media screen and (max-width: 1499px) {
                    font-size: 1em;
                }

                @media screen and (max-width: 959px) {
                    margin-top: .75em;

                    p {
                        font-weight: 400;
                    }
                }
            }
        }

        .gallery-button {
            margin-top: .5em;

            @media screen and (max-width: 1499px) {
                margin-top: .25em;
            }

            @media screen and (max-width: 959px) {
                margin-top: 0.15em;
            }

            a {
                font-size: 1.15em;
                display: inline-block;
                background-color: var(--slide-button-bg-color);
                color: var(--slide-button-text-color);
                border: 1px solid var(--slide-button-bg-color);
                border-radius: 3px;
                text-decoration: none;
                padding: .45em 2em;
                font-weight: 700;
                transition: background-color .25s linear, color .25s linear;

                @media screen and (max-width: 1499px) {
                    font-size: 1em;
                    font-weight: 500;
                }

                &:hover {
                    color: var(--slide-button-bg-color);
                    background-color: var(--slide-button-text-color);
                }
            }
        }
    }

    .custom-gallery-v7-controls {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 10px 20px;
        position: absolute;
        column-gap: 1.5em;
        width: 400px;
        right: 0;
        bottom: 0;
        z-index: 2;
        box-sizing: border-box;

        @media screen and (max-width: 1079px) {
            width: 100%;
            bottom: 10px;
            left: 0;
            right: unset;
            justify-content: flex-start;
        }

        @media screen and (max-width: 767px) {
            position: static;
            background-color: var(--gradient-base-color);
            justify-content: space-between;
        }

        .js-custom-gallery-v7-pag {
            max-width: 250px;
        }

        .custom-swiper-navigation {
            width: auto;
            margin-top: unset;
        }

        .custom-swiper-control-button {
            color: var(--arrow-button-color);

            button {
                width: var(--arrow-button-size);
                height: var(--arrow-button-size);
            }
        }

        .custom-swiper-play-pause-btn {
            position: relative;
            z-index: 4;
            color: var(--control-buttons-color);

            &:after {
                content: "";
                position: absolute;
                left: 0;
                top: 0;
                z-index: -1;
                width: var(--control-buttons-size);
                aspect-ratio: 1 / 1;
                border: 2px solid var(--control-buttons-color);
                transform: rotate(45deg);
                transform-origin: center center;
                box-sizing: border-box;
            }
        }
    }
}