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

/* ===========================
   Blog 2
   =========================== */
.blog2 {
    position: relative;
    background-color: vars.$color-white;

    &__subtitle {
        font-family: vars.$font-family-base;
        font-weight: 600;
        font-size: vars.rem(14);
        line-height: 100%;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #0073E6;
        display: block;
        margin-bottom: vars.rem(16);
    }

    &__title {
        font-family: vars.$font-family-base;
        font-weight: 800;
        font-size: clamp(vars.rem(28), 4vw + 1rem, vars.rem(48));
        line-height: 1.15;
        letter-spacing: -0.02em;
        color: vars.$color-heading;
        margin-bottom: vars.rem(60);
    }

    &__sidebar {
        background-color: vars.$color-white;
        border: 1px solid #19182526;
        border-radius: vars.rem(15);
        padding: vars.rem(35);
        height: 100%;

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

        .blog2__sidebar-text {
            color: #818181;
            font-size: vars.rem(16);
            margin-bottom: vars.rem(20);
        }

        .blog2__sidebar-link {
            font-family: vars.$font-family-base;
            font-weight: 700;
            font-size: vars.rem(16);
            color: vars.$color-heading;
            text-transform: uppercase;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: vars.rem(10);
            margin-bottom: vars.rem(80);
            transition: color 0.3s ease;

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

    &__newsletter {
        .blog2__newsletter-title {
            font-size: vars.rem(24);
            font-weight: 800;
            color: vars.$color-heading;
            margin-bottom: vars.rem(10);
        }

        .blog2__newsletter-desc {
            color: #818181;
            font-size: vars.rem(16);
            margin-bottom: vars.rem(30);
        }

        .blog2__input {
            width: 100%;
            background-color: #F4F7FA;
            border: 1px solid #1918251F;
            padding: vars.rem(18) vars.rem(25);
            border-radius: vars.rem(10);
            margin-bottom: vars.rem(20);
            font-size: vars.rem(14);
            font-family: vars.$font-family-base;
            font-weight: 500;
            text-transform: uppercase;
            height: 70px;

            &::placeholder {
                color: #9DA6AE;
            }
        }
    }

    &__btn {
        display: inline-flex;
        align-items: center;
        background-color: #0073E6;
        color: vars.$color-white;
        font-family: vars.$font-family-base;
        font-weight: 700;
        font-size: vars.rem(16);
        text-transform: uppercase;
        padding: vars.rem(18) vars.rem(35);
        border-radius: vars.rem(100);
        text-decoration: none;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        z-index: 1;

        // The dark shape at the end
        &::after {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            width: vars.rem(60);
            height: 100%;
            background-color: #000;
            clip-path: ellipse(40% 100% at 100% 50%);
            z-index: -1;
            transition: all 0.3s ease;
        }

        i {
            margin-left: vars.rem(15);
            font-size: vars.rem(18);
            position: relative;
            z-index: 2;
        }

        &:hover {
            background-color: #000;
            color: vars.$color-white;

            &::after {
                width: 100%;
                clip-path: ellipse(100% 100% at 50% 50%);
            }
        }
    }

    &__item {
        margin-bottom: vars.rem(30);

        &:last-child {
            margin-bottom: 0;
        }
    }

    &__thumb {
        width: 100%;
        height: 100%;
        border-radius: vars.rem(20);
        display: block;
        object-fit: cover;
        height: 280px;

        @media (max-width: 767px) {
            margin-bottom: vars.rem(20);
            height: auto;
        }
    }

    &__info-card {
        background-color: #F4F7FA;
        border-radius: vars.rem(20);
        padding: vars.rem(37) vars.rem(25);
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;

        @media (max-width: 1024px) {
            padding: vars.rem(15);
        }

        @media (max-width: 767px) {
            padding: 20px 10px;
        }
    }

    &__card-header {
        display: flex;
        align-items: flex-start;
        gap: vars.rem(20);
        margin-bottom: vars.rem(30);

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

    &__date {
        width: vars.rem(70);
        height: vars.rem(100);
        border: 2px solid #0073E6;
        border-radius: 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background-color: vars.$color-white;

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

        .blog2__day {
            font-family: vars.$font-family-base;
            font-weight: 700;
            font-size: 40px;
            line-height: 24px;
            letter-spacing: -2%;
            text-align: center;
            color: vars.$color-primary;
            margin-bottom: 10px;

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

        .blog2__month {
            font-family: vars.$font-family-base;
            font-weight: 600;
            font-size: 16px;
            line-height: 24px;
            letter-spacing: -2%;
            text-align: center;
            text-transform: uppercase;
            color: vars.$color-heading;

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

    &__meta {
        display: flex;
        align-items: center;
        gap: vars.rem(15);
        margin-bottom: 13px;

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

        .blog2__meta-item {
            font-size: vars.rem(14);
            font-weight: 500;
            color: #818181;
            display: flex;
            align-items: center;
            gap: vars.rem(7);

            i {
                color: #A4A4A4;
            }

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

    &__card-title {
        font-family: vars.$font-family-base;
        font-weight: 800;
        font-size: vars.rem(24);
        line-height: 1.4;
        color: vars.$color-heading;
        display: block;
        text-decoration: none;
        transition: color 0.3s ease;

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

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

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

    &__user-box {
        display: flex;
        align-items: center;
        background-color: vars.$color-white;
        padding: vars.rem(10) vars.rem(10) vars.rem(10) vars.rem(10);
        border-radius: vars.rem(100);
        position: relative;
        justify-content: space-between;
        gap: vars.rem(10);
        max-width: 310px;

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

    &__user-info {
        display: flex;
        align-items: center;
        gap: vars.rem(12);
    }

    &__user-thumb {
        width: vars.rem(50);
        height: vars.rem(50);
        border-radius: 50%;
        overflow: hidden;

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

    &__user-text {
        display: flex;
        flex-direction: column;
    }

    &__user-label {
        font-size: vars.rem(10);
        font-weight: 600;
        text-transform: uppercase;
        color: #9DA6AE;
        letter-spacing: 0.1em;
    }

    &__user-name {
        font-size: vars.rem(14);
        font-weight: 800;
        color: vars.$color-heading;
        white-space: nowrap;
    }

    &__arrow-btn {
        width: vars.rem(70);
        height: vars.rem(48);
        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;
        text-decoration: none;
        margin-right: -30px;

        @media (max-width: 1024px) {
            margin-right: -10px;
            width: 50px;
            height: 40px;
            font-size: vars.rem(14);
        }

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