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

/* ===========================
   Feature 3
   =========================== */
.feature3 {

    &__card {
        position: relative;
        border-radius: vars.rem(8);
        overflow: hidden;
        height: 100%;
        display: flex;
        flex-direction: column;
        background-color: vars.$color-bg;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
        height: 400px;

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

        &-thumb {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 100%;
            height: 345px;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            z-index: 1;
            border-radius: 4px;
            overflow: hidden;

            &::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
                z-index: 2;
                border-radius: 4px;
                overflow: hidden;
            }

            @media (max-width: 1399px) {
                height: 100%;
                object-fit: contain;
            }
        }

        &-icon {
            position: absolute;
            top: vars.rem(30);
            right: vars.rem(30);
            width: vars.rem(80);
            height: vars.rem(80);
            background-color: vars.$color-white;
            border: 2px solid vars.$color-primary;
            border-radius: vars.rem(15);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);

            @media (max-width: 991px) {
                width: vars.rem(60);
                height: vars.rem(60);
                top: vars.rem(20);
                right: vars.rem(20);
            }

            img {
                height: auto;

                @media (max-width: 991px) {
                    width: vars.rem(40);
                    height: vars.rem(40);
                }
            }
        }

        &-body {
            position: relative;
            z-index: 3;
            padding: vars.rem(120) vars.rem(30) vars.rem(24);
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            margin-top: auto;
            max-width: 320px;

            &:before {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                width: 340px;
                height: 150px;
                background: #191825BF;
                box-shadow: 0px 0px 30px 0px #00000014;
                border-radius: 8px;
                z-index: -1;
            }
        }

        &-title {
            color: vars.$color-white;
            font-size: vars.rem(28);
            font-weight: 800;
            margin-bottom: vars.rem(15);
            line-height: 1.2;
            transition: all 0.3s ease;

            @media (max-width: 1399px) {
                font-size: vars.rem(24);
                margin-bottom: vars.rem(10);
            }
        }

        &-desc {
            color: rgba(255, 255, 255, 0.7);
            font-size: vars.rem(16);
            line-height: 1.7;
            margin-bottom: 0;

            @media (max-width: 1399px) {
                font-size: vars.rem(14);
            }
        }

        &:hover {
            .feature3__link-bar {
                background-color: vars.$color-primary;

                .shape1 {
                    opacity: 0;
                    visibility: hidden;
                }

                .shape2 {
                    opacity: 1;
                    visibility: visible;
                }

                @media (max-width: 1399px) {
                    background-image: none;
                }

                .text,
                i {
                    color: vars.$color-white;
                }
            }
        }

        // Special case for the 2nd card hover-type as requested
        &--active {
            .feature3__link-bar {
                background-color: vars.$color-primary;

                .shape1 {
                    opacity: 0;
                    visibility: hidden;
                    width: 100%;
                }

                .shape2 {
                    opacity: 1;
                    visibility: visible;
                    width: 100%;
                }

                .text,
                i {
                    color: vars.$color-white;
                }
            }
        }
    }

    &__link-bar {
        position: relative;
        z-index: 4;
        background-color: vars.$color-white;
        padding: vars.rem(13) 0 vars.rem(15) vars.rem(35);
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: flex-start;
        transition: all 0.4s ease-in-out;
        text-decoration: none;
        border: 2px solid vars.$color-primary;
        border-radius: 8px;
        overflow: hidden;

        @media (max-width: 1399px) {
            padding: vars.rem(11) 0 vars.rem(11) vars.rem(35);
            font-size: vars.rem(12);
        }

        .shape1,
        .shape2 {
            position: absolute;
            top: 0;
            right: -30px;
            object-fit: cover;
            z-index: -1;
            transition: all 0.4s ease-in-out;
            width: 100%;
        }

        .shape2 {
            opacity: 0;
            visibility: hidden;
        }

        .text {
            color: vars.$color-heading;
            font-weight: 800;
            font-size: vars.rem(16);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            transition: all 0.3s ease;

            @media (max-width: 1399px) {
                font-size: vars.rem(12);
            }
        }

        i {
            color: vars.$color-primary;
            font-size: vars.rem(18);
            transition: all 0.3s ease;
        }
    }
}