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

/*----------------------------------------*/
/*  Blog styles
/*----------------------------------------*/
// blog shapes

.blog-shapes {
    .shape-one {
        background: linear-gradient(89.78deg, rgba(3, 3, 3, 1) 57.65146017074585%, rgba(15, 49, 65, 1) 100%);
        height: 90px;
        width: 514px;
        transform: rotate(26deg) scale(-1, 1);
        position: absolute;
        top: 22%;
        left: -70px;
        z-index: -1;
        @media #{$xs,$sm,$md} {
            height: 70px;
            width: 234px;
            transform: rotate(140deg) scale(-1, 1);
            position: absolute;
            top: 10%;
            right: -120px;
        }
    }

    .shape-two {
        background: linear-gradient(89.78deg, rgb(3, 3, 3) 57.6514601707%, rgb(15, 49, 65) 100%);
        height: 90px;
        width: 514px;
        transform: rotate(140deg) scale(-1, 1);
        position: absolute;
        top: 27%;
        right: -100px;
        z-index: -1;
        @media #{$xs,$sm,$md} {
            height: 70px;
            width: 234px;
            transform: rotate(140deg) scale(-1, 1);
            position: absolute;
            top: 10%;
            left: -100px;
        }
    }
}

.single-blog-item {
    border-radius: 16px;
    transition: .3s;
    border: 1px solid rgba(101, 84, 255, 0.2);

    &:hover {
        box-shadow: -6px 6px 25px rgba(101, 84, 255, 0.3);
    }

    .blog-thumb-box {
        height: 100%;
        position: relative;
        margin-bottom: 30px;

        .blog-thumb {
            overflow: hidden;
            @include border-radius(16px);

            img {
                height: 100%;
                width: 100%;
            }

            &:hover {
                img {
                    transform: scale(1.05);
                }
            }
        }
    }

    .blog-contents {
        padding: 16px 16px 14px;

        .title {
            margin-bottom: 15px;
            line-height: 1.3;

            a:hover {
                color: var(--td-primary);
            }
        }

        .description {
            font-size: 14px;
            font-weight: 500;
        }
    }

    .blog-date {
        background: var(--td-primary);
        border-radius: 8px 8px 8px 16px;
        padding: 10px 12px 10px 12px;
        flex-direction: row;
        height: 39px;
        backdrop-filter: blur(2px);
        display: inline-flex;
        align-items: center;
        position: absolute;
        bottom: 0;
        left: 0px;

        &::before {
            position: absolute;
            content: "";
            inset: 0;
            @include border-radius(16px);
            padding: 1px;
            background: linear-gradient(95.42deg, $primary 0%, $primary-alt 100%);
            -webkit-mask: linear-gradient(var(--td-white) 0 0) content-box, linear-gradient(var(--td-white) 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            z-index: -1;
            border-radius: 8px 8px 8px 16px;
        }

        span {
            color: var(--td-pale-cornflower-blue);
            font-size: 13px;
            font-weight: 700;
        }
    }

    &:hover {
        .blog-thumb {
            img {
                transform: scale(1.05);
            }
        }
    }

    .blog-link {
        .btn-text {
            position: relative;
            font-size: 16px;
            font-weight: 700;

            &::after {
                position: absolute;
                content: "";
                inset-inline-start: auto;
                bottom: -2px;
                background: var(--td-primary);
                width: 0;
                height: 1px;
                transition: 0.3s;
                inset-inline-end: 0;
            }

            &:hover {
                color: var(--td-primary);

                &::after {
                    width: 100%;
                    inset-inline-start: 0;
                    inset-inline-end: auto;
                }
            }
        }
    }
}