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

/* ===========================
   Counter 2
   =========================== */
.counter2 {
    position: relative;
    z-index: 10;
    margin-left: -325px;

    @media (max-width: 1899px) {
        margin-left: 0px;
    }


    .container-fluid {
        max-width: 1620px;
    }

    &__wrapper {
        background: linear-gradient(90deg, #EFF3FA 0%, #FFFFFF 100%);
        border-radius: 15px;
        padding: 75px 0;
        border: 2px solid #19182533;

        @media (max-width: 991px) {
            padding: 50px 0;
        }
    }

    &__wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: vars.rem(45);
        flex-wrap: wrap;

        @media (max-width: 1399px) {
            gap: vars.rem(20);
        }

        @media (max-width: 767px) {
            justify-content: center;
        }

        @media (max-width: 575px) {
            flex-direction: column;
        }
    }

    &__item {
        display: flex;
        align-items: center;
        flex: 1;
        min-width: vars.rem(220);
        position: relative;

        @media (max-width: 575px) {
            min-width: 100%;
        }

        &--blue {
            .counter2__card {
                background-color: #0073E6;
                color: vars.$color-white;

                &:before {
                    border-left-color: #0073E6;
                    border-radius: 10px;
                }

                &::after {
                    border-left-color: #0073E6;
                }
            }

            .counter2__number {
                color: vars.$color-white;
            }

            .counter2__label {
                color: rgba(255, 255, 255, 0.8);
            }

            .counter2__icon-wrap {
                background-color: #001F3D; // Darker blue from image

                img {
                    filter: brightness(0) invert(1);
                }
            }
        }
    }

    &__icon-wrap {
        width: vars.rem(100);
        height: vars.rem(100);
        background-color: vars.$color-white;
        border: 2px solid #E8E8E8;
        border-right: none;
        border-radius: 100px 0 0 100px; // Semi-circle
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 2;
        flex-shrink: 0;

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





        img {
            max-width: vars.rem(45);
        }
    }

    &__card {
        background-color: vars.$color-white;
        padding: 20px 0px 20px 20px;
        border: 2px solid #E8E8E8;
        border-left: none;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        border-radius: 0 10px 10px 0;
        position: relative;
        flex-grow: 1;
        min-height: vars.rem(130);
        display: flex;
        flex-direction: column;
        justify-content: center;
        z-index: 1;

        @media (max-width: 1399px) {
            padding: vars.rem(10) vars.rem(10);
            max-width: 125px;
        }

        @media (max-width: 575px) {
            padding: vars.rem(5) vars.rem(5);
            max-width: 130px;
        }

        // The pointed shape on the right (Chevron)
        &::after {
            content: '';
            position: absolute;
            top: -2px;
            right: vars.rem(-30);
            width: 0;
            height: 0;
            border-top: vars.rem(67) solid transparent;
            border-bottom: vars.rem(67) solid transparent;
            border-left: vars.rem(30) solid #E8E8E8;
            z-index: 11;
        }

        &::before {
            content: '';
            position: absolute;
            top: 0;
            right: vars.rem(-28);
            width: 0;
            height: 0;
            border-top: vars.rem(65) solid transparent;
            border-bottom: vars.rem(65) solid transparent;
            border-left: vars.rem(28) solid vars.$color-white;
            z-index: 12;
        }
    }

    &__number {
        font-family: "DM Sans";
        font-weight: 700;
        font-size: vars.rem(45);
        line-height: vars.rem(24);
        letter-spacing: 0%;
        color: vars.$color-black;
        margin-bottom: vars.rem(20);
        display: block;

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

    &__label {
        font-family: "DM Sans";
        font-weight: 500;
        font-size: vars.rem(16);
        line-height: vars.rem(24);
        letter-spacing: 0%;
        text-transform: uppercase;
        color: #818181;
        display: block;

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


    &.bg-white {
        background-color: vars.$color-white;
        margin-left: 0;

        .counter2__wrapper {
            background: vars.$color-white;
        }

        .counter2__icon-wrap {
            border: 4px solid #191825;
            border-right: none;

            &.bg-black {
                border: 4px solid #0073E6;
                border-right: none;
            }
        }

        .counter2__card {
            background-color: #EFF3FA;

            &:before {
                content: "";
                position: absolute;
                top: 0;
                right: -1.75rem;
                width: 0;
                height: 0;
                border-top: 4.0625rem solid transparent;
                border-bottom: 4.0625rem solid transparent;
                border-left: 1.75rem solid #EFF3FA;
                z-index: 12;
            }
        }

    }

}