a[data-scroll] {
    cursor: pointer;
}

.card_wrapper {
    height: 100%;
    overflow: hidden;
    .card {
        height: 100%;
        overflow: visible;
        text-decoration: none!important;
        &.open-popup {
            cursor: pointer;
        }
        .img_base {
            position: relative;
            display: flex;
            flex-direction: column;
            &.type_,
            &.type_inside {
                .img {
                    &:after {
                        content: '';
                        position: absolute;
                        left: 0;
                        top: 0;
                        right: 0;
                        bottom: 0;
                        pointer-events: none;
                        opacity: 0;
                        background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(122,122,122,0) 52%,rgba(0,0,0,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
                    }
                }
            }
            &.type_left,
            &.type_right {
                flex-direction: row;
                .img {
                    width: 50%;
                }
            }
            &.type_right {
                .caption {
                    order: -1;
                }
            }
            .labels_wrapper {
                position: absolute;
                z-index: 1;
                top: 15px;
                left: 15px;
                .label {
                    position: relative;
                    top: inherit;
                    left: inherit;
                    display: inline-block;
                    vertical-align: top;
                }
            }
            .label {
                position: absolute;
                z-index: 1;
                top: 15px;
                left: 15px;
                padding: 0 13px;
                background: #000;
                color: #fff;
                border-radius: 3px;
            }
            .img {
                background-size: cover!important;
                background-repeat: no-repeat!important;
                background-position: center center;
                height: 100%;
                padding: 0;
                overflow: hidden;
                &.img_contain {
                    background-size: contain!important;
                }
                &.has_background_ {
                    border-radius: var(--image_border_radius);
                }
                .overlay {
                    position: absolute;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    left: 0;
                    pointer-events: none;
                    z-index: 0;
                }
            }
            .caption {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                padding: 30px;
                &.align_center {
                    text-align: center;
                }
                &.align_right {
                    text-align: right;
                }
                &.position_top {
                    bottom: inherit;
                    top: 0;
                }
                &.is_empty {
                    padding: 0!important;
                }
                &.type_,
                &.type_inside {
                    color: #fff;
                    h1, h2, h3, h4, h5, h6 {
                        color: #fff!important;
                    }
                }
                &.type_top {
                    order: -1;
                }
                &.type_left,
                &.type_right {
                    flex: 1;
                }
                &.type_footer,
                &.type_top,
                &.type_left,
                &.type_right {
                    position: relative;
                    bottom: inherit;
                    left: inherit;
                    right: inherit;
                }
                .author {
                    .profile_img {
                        width: 28px;
                        height: 28px;
                        display: inline-block;
                        vertical-align: middle;
                        border-radius: 50em;
                        background-color: #ddd;
                        margin-right: 5px;
                        background-size: cover!important;
                        background-position: center center!important;
                        background-repeat: no-repeat!important;
                    }
                }
                .toptext {
                    margin-bottom: 5px;
                    opacity: 0.65;
                }
                h4 {
                    margin: 0 0 10px;
                }
                .description {
                    line-height: 1.5;
                }
                .button_wrap {
                    margin-top: 15px;
                }
            }
        }
        .caption_split {
            padding: 30px;
        }
    }
}

.card-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 30px;
    overflow-y: auto;
}

.card-popup {
    background: #fff;
    border-radius: 5px;
    max-width: 975px;
    width: 90%;
    max-height: 90%;
    padding: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
    animation: fadeInPopup 0.3s ease;
    .popup-close {
        position: absolute;
        top: 20px;
        right: 20px;
        border: none;
        background: none;
        font-size: 32px;
        line-height: 1;
        cursor: pointer;
        color: #333;
        &:hover,
        &:focus,
        &:active {
            color: #000;
        }
    }
    .popup_text {
        padding: 15px;
    }
}

@keyframes fadeInPopup {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .card-popup .popup-inner {
        padding: 20px;
    }
}


#accordion {
    .faq_group {
        display: grid;
        gap: 10px;
        margin: 0 0 65px;
        &.columns_2 {
            grid-template-columns: repeat(2, 1fr);
        }
        &.columns_3 {
            grid-template-columns: repeat(3, 1fr);
        }
        h4 {
            margin-bottom: 30px;
        }
    }
}

.accordion.type_readmore {
    .card {
        border: 0;
        padding: 0;
        margin: 0 0 35px;
        border-radius: 0;
        background: transparent;
        h5 {
            font-size: var(--body_font_size);
            .the_button {
                display: inline-block;
                vertical-align: top;
                cursor: pointer;
                &.collapsed {
                    &:after {
                        transform: rotate(45deg);
                        top: -3px;
                    }
                }
                &:after {
                    content: '';
                    display: inline-block;
                    margin-left: 7px;
                    vertical-align: middle;
                    border-radius: 0;
                    background: transparent!important;
                    position: relative;
                    top: 1px;

                    width: 8px;
                    height: 8px;
                    border-right: 2px solid;
                    border-bottom: 2px solid;
                    transform: rotate(225deg);
                    transition: transform 0.3s;
                }
            }
        }
    }
}

.accordion:not(.type_readmore) {
    .card {
        border-width: 0;
        border-style: solid;
        border-radius: 5px;
        border-color: #DEDEDE;
        padding: 0;
        margin: 0;
        background: transparent;
        .card-header {
            padding: 0;
            border-radius: 0;
            border: 0;
            background: transparent;
            h5 {
                margin: 0;
            }
            &:hover,
            &:focus,
            &:active {
                box-shadow: none!important;
                border: 0!important;
            }
            .the_button {
                display: block;
                width: 100%;
                cursor: pointer;
                background: #fff;
                text-transform: inherit;
                box-shadow: none!important;
                outline: 0!important;
                font-size: var(--body_font_size);
                font-weight: 600;
                line-height: 30px;
                color: #000;
                padding: 25px;
                text-align: left;
                position: relative;
                -webkit-transition: all 0.25s;
                -moz-transition: all 0.25s;
                -o-transition: all 0.25s;
                transition: all 0.25s;
                img {
                    display: inline-block;
                    vertical-align: middle;
                    width: 35px;
                }
                &:after {
                    content: '+';
                    position: absolute;
                    top: 50%;
                    right: 25px;
                    font-size: 28px;
                    font-weight: 300;
                    margin: 0;
                    color: var(--primary);
                    transform: translateY(-50%) rotate(45deg);
                    transition: all 0.25s;
                }
                &:hover,
                &:focus,
                &:active {
                    box-shadow: none!important;
                    border: 0!important;
                    color: var(--primary);
                }
                &.collapsed {
                    color: #000;
                    font-weight: 400;
                    &:after {
                        content: '+';
                        transform: translateY(-50%) rotate(0);
                    }
                    &:hover,
                    &:focus,
                    &:active {
                        box-shadow: none!important;
                        border: 0!important;
                        color: var(--primary);
                    }
                }
            }
        }
        .card-body {
            font-size: 17px;
            line-height: 32px;
            background: #fff;
            padding: 20px 30px;
            p {
                &:last-of-type {
                    margin: 0;
                }
            }
        }
    }
}

.swiper {
    .swiper-wrapper.img_contain {
        .swiper-slide {
            background-size: contain!important;
        }
    }
    .swiper-slide {
        background-size: cover!important;
        background-position: center center!important;
        background-repeat: no-repeat!important;
    }
    .swiper-button-next,
    .swiper-button-prev {
        color: #000;
        background: #fff;
        width: 55px;
        height: 55px;
        line-height: 55px;
        box-shadow: 0 0 1px rgba(0,0,0,0.1);
        text-align: center;
        border-radius: 50em;
        top: 50%;
        transform: translateY(-50%);
        &:after {
            font-size: 2.2rem;
        }
    }
    .swiper-pagination {
        position: relative;
        top: 0!important;
        bottom: 0!important;
        margin: 30px 0 0 0;
        .swiper-pagination-bullet {
            &.swiper-pagination-bullet-active {
                background: #000;
            }
        }
    }
}

.full_slider_wrapper {
    width: 100%;
    .swiper {
        height: 100%;
    }
    .img {
        height: 100%;
        width: 100%;
        background-size: cover!important;
        background-position: center center!important;
        background-repeat: no-repeat!important;
    }
    .caption {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        right: 0;
        .container {
            padding: 0;
        }
    }
}

.review_item {
    .review_comment {
        h5 {
            position: relative;
            &:before {
                content: open-quote;
            }
            &:after {
                content: close-quote;
            }
        }
    }
    .review_bottom {
        .img {
            display: inline-block;
            vertical-align: top;
            width: 50px!important;
            height: 50px!important;
            border-radius: 50em;
            background-size: cover!important;
            background-repeat: no-repeat!important;
            background-position: center center!important;
            margin-right: 20px;
        }
        .review_info {
            display: inline-block;
            vertical-align: top;
            line-height: 27px;
        }
    }
    .review_stars {
        .star {
            color: rgba(0,0,0,0.35);
            &.fill {
                color: #f9a608;
            }
        }
    }
    .col_featured_image {
        img {
            width: 100%;
            height: auto;
        }
    }
}

.cta-loop {
    overflow: hidden;
    width: 100%;
    position: relative;
    .cta-loop-wrapper {
        display: flex;
        white-space: nowrap;
        position: relative;
        left: 0;
        .cta-loop-item-wrapper {
            flex: none;
            padding-right: 60px;
            display: flex;
            align-items: center;
            .cta-loop-text {
                p, h1, h2, h3, h4, h5, h6 {
                    display: inline-block;
                    vertical-align: middle;
                    margin: 0;
                }
                img {
                    display: inline-block;
                    vertical-align: middle;
                    max-height: 75px;
                    width: auto;
                    margin: 0 25px;
                }
            }
        }
    }
}

@media (max-width: 768px) {

    .card_wrapper {
        .card {
            .img_base {
                &.type_left,
                &.type_right {
                    flex-direction: column;
                }
            }
        }
    }

    .card-popup-overlay {
        align-items: start;
    }

    .card-popup {
        padding: 20px;
        width: 100%;
        overflow: auto;
        .popup_text {
            padding: 15px 0;
        }
    }

    #accordion {
        .faq_group {
            margin: 0 0 30px;
            &.columns_2 {
                grid-template-columns: repeat(1, 1fr);
            }
            &.columns_3 {
                grid-template-columns: repeat(1, 1fr);
            }
            h4 {
                margin-bottom: 30px;
            }
        }
    }

}