@use "../../utils" as *;

/*----------------------------
gallery section design
------------------------------*/

.td-gallery {
    background-color: #F1F1F1;
    padding: 100px 0;

    &-2{
        background-color: transparent;
        padding: 0 0;
    }

    @media #{$lg,$md} {
        padding: 70px 0;
        &-2{
            padding: 0 0;
        }
    }

    @media #{$xs} {
        padding: 60px 0;
        &-2{
            padding: 0 0;
        }
    }

    &-box {
        margin-top: 50px;

        @media #{$lg, $md} {
            margin-top: 40px;
        }

        @media #{$xs} {
            margin-top: 30px;
        }

        &-card {
            position: relative;
            width: 100%;
            overflow: hidden;

            &-img {
                position: relative;
                overflow: hidden;
                transition: transform 0.3s ease;

                img {
                    border-radius: 8px;
                    transition: transform 0.3s ease;

                    &:hover {
                        transform: scale(1.1);
                    }
                }

                &::after {
                    content: "";
                    position: absolute;
                    top: 0;
                    inset-inline-start: 0;
                    width: 100%;
                    height: 100%;
                    background: linear-gradient(to top, #049a487d, transparent);
                    pointer-events: none;
                    border-radius: 8px;
                }
            }

            &:hover &-img img {
                transform: scale(1.1);
            }

            &-text {
                position: absolute;
                bottom: 16px;
                inset-inline-start: 16px;
                color: var(--td-white);
                font-size: 16px;
                font-weight: 600;
                line-height: 125%;
                z-index: 1;

                @media #{$md, $xs} {
                    font-size: 14px;
                    font-weight: 500;
                }
            }
        }
    }

}

.responsive-img-box-1 {
    position: relative;
    padding-bottom: 140%;
    background: transparent;
    overflow: hidden;
    border-radius: 8px;

    @media #{$xs} {
        padding-bottom: 66%;
    }

    img {
        max-width: 100%;
        position: absolute;
        top: 0px;
        bottom: 0px;
        inset-inline-start: 0px;
        inset-inline-end: 0px;
        margin: auto;
    }
}

.responsive-img-box {
    position: relative;
    padding-bottom: 66%;
    background: transparent;
    overflow: hidden;
    border-radius: 8px;

    img {
        max-width: 100%;
        position: absolute;
        top: 0px;
        bottom: 0px;
        inset-inline-start: 0px;
        inset-inline-end: 0px;
        margin: auto;
    }
}