@use "../abstracts/variables" as vars;

/* ===========================
   Projects 2
   =========================== */
.projects2 {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    background: white;


    &__bg {
        position: absolute;
        top: -130px;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;

        @media (max-width: 1199px) {
            display: none;
        }

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


    .section-top {
        &__subtitle {
            color: vars.$color-white;

            @media (max-width: 1199px) {
                color: #121117;
            }
        }

        &__title {
            color: vars.$color-white;

            @media (max-width: 1199px) {
                color: #121117;
            }
        }
    }


    &__item {
        position: relative;
        border-radius: vars.rem(20);
        overflow: visible;



        @media (max-width: 575px) {
            margin-bottom: vars.rem(10);
        }
    }

    &__thumb {
        width: 100%;
        height: auto;
        border-radius: vars.rem(20);
        display: block;
        transition: transform 0.3s ease;
    }

    &__content {
        position: absolute;
        bottom: vars.rem(0);
        left: 50%;
        transform: translateX(-50%);
        background-color: vars.$color-white;
        border-radius: vars.rem(20);
        padding: 25px;
        width: 85%;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: flex-start; // Align-center to match the button height
        justify-content: space-between;
        gap: vars.rem(5);
        z-index: 2;
        max-width: 420px;

        @media (max-width: 1399px) {
            position: relative;
            bottom: 0;
            left: 0;
            right: 0;
            transform: none;
            width: 100%;
            margin-top: vars.rem(-20);
        }

        @media (max-width: 575px) {
            padding: vars.rem(20);
            width: 90%;
            flex-direction: column;
            align-items: flex-start;
        }
    }

    &__text-wrap {
        flex-grow: 1;
    }

    &__badge {
        display: inline-block;
        background-color: #0073E6;
        color: vars.$color-white;
        font-family: "DM Sans";
        font-weight: 700;
        font-size: vars.rem(16);
        line-height: 100%;
        letter-spacing: 0.1em; // 10%
        text-align: center;
        text-transform: uppercase;
        padding: vars.rem(10) vars.rem(24);
        border-radius: vars.rem(8);
        margin-bottom: vars.rem(20);

        @media (max-width: 1199px) {
            font-size: 12px;
            line-height: 20px;
            padding: vars.rem(5) vars.rem(10);
            margin-bottom: vars.rem(10);
        }
    }

    &__card-title {
        font-family: "DM Sans";
        font-weight: 700;
        font-size: vars.rem(24);
        line-height: 100%;
        letter-spacing: -0.02em; // -2%
        text-transform: capitalize;
        color: vars.$color-heading;
        margin-bottom: vars.rem(15);

        @media (max-width: 1199px) {
            font-size: 20px;
            line-height: 28px;
            margin-bottom: vars.rem(10);
        }

        a {
            color: inherit;
            text-decoration: none;

            &:hover {
                color: #0073E6;
            }
        }
    }

    &__desc {
        font-family: "DM Sans";
        font-weight: 500;
        font-size: vars.rem(16);
        line-height: vars.rem(28);
        letter-spacing: -0.02em; // -2%
        color: vars.$color-secondary;
        margin-bottom: 0;

        @media (max-width: 1199px) {
            font-size: 14px;
            line-height: 24px;
        }
    }

    &__arrow {
        position: absolute;
        top: 25px;
        right: 25px;
        width: vars.rem(75);
        height: vars.rem(50);
        background-color: #121117;
        color: vars.$color-white;
        border-radius: vars.rem(100);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: vars.rem(18);
        flex-shrink: 0;
        transition: all 0.3s ease;
        margin-left: auto;

        @media (max-width: 1399px) {
            position: relative;
            top: 0;
            left: 0;
            margin-right: auto;
            margin-left: 0;
            margin-top: vars.rem(10);
            width: vars.rem(60);
            height: vars.rem(40);
        }

        &:hover {
            background-color: #0073E6;
            color: vars.$color-white;
            transform: rotate(-15deg);
        }
    }
}