
/*
* 
* ==========================================================
* ARTICLES.SCSS
* ==========================================================
*
* Articles page CSS.
*
*/

$transition: all 0.4s;
$color-blue: #028be5;
$color-dark-blue: rgb(0, 76, 125);
$color-black: rgb(36, 39, 42);
$color-gray: rgb(86, 96, 105);
$color-red: rgb(202, 52, 52);
$color-green: rgb(26, 146, 96);
$color-yellow: rgb(246, 158, 0);
$background-gray: rgb(245, 247, 250);
$background-color-2: rgba(39, 156, 255, 0.08);
$background-color-red: rgba(202, 52, 52, 0.1);
$background-color-yellow: rgb(242, 227, 124);
$border-color: rgb(212, 212, 212);
$white: #fff;
$box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);

@keyframes sb-fade-in {
    0% {
        opacity: 0;
    }

    90% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.sb-articles-nav .sb-scroll-area {
    padding-right: 30px;
    max-height: 100%;

    &::-webkit-scrollbar-track {
        background: $white;
    }
}

.sb-articles-cnt {
    display: flex;
    max-width: 980px;
    margin: auto;
    justify-content: space-between;

    .sb-articles-body {
        max-width: 730px;
    }
}

.sb-articles-nav {
    max-width: 205px;
    padding-left: 30px;
    margin: 40px 15px 40px 0;
    position: -webkit-sticky;
    position: sticky;
    top: 30px;
    max-height: calc(100vh - var(--offset, 100px));

    a {
        display: block;
        text-decoration: none;
        color: $color-gray;
        padding: 5px 0 5px 15px;
        font-size: 13px;
        line-height: 23px;
        letter-spacing: .3px;
        border-left: 2px solid #80808030;
        transition: $transition;
        opacity: 0.7;

        &:hover, &.sb-active {
            opacity: 1;
            color: $color-black;
        }

        &.sb-active {
            border-color: $color-black;
        }
    }

    .sb-nav-sub {
        padding-left: 30px;
    }

    &.sb-active .sb-scroll-area {
        display: block;
    }
}

.sb-articles-nav-mobile-btn {
    display: none;
    font-size: 14px;
    letter-spacing: .3px;
    color: $color-gray;

    i {
        position: absolute;
        right: 15px;
        top: 16px;
    }
}

.sb-articles-parent-categories-cnt .sb-grid > div {
    border-radius: 4px;
    border: 1px solid $border-color;
    padding: 10px;
}

.sb-articles-page {
    .sb-articles-header {
        background: #081A27;
        color: $white;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        height: 300px;
        padding: 0 15px;
        letter-spacing: .3px;

        h1 {
            font-size: 30px;
            margin: 0 0 30px 0;
            color: $white;
            font-weight: 500;
        }

        > div {
            max-width: 950px;
            width: 100%;
        }
    }

    &.sb-articles-category-cnt, &.sb-article-cnt {
        .sb-articles-header {
            height: auto;
            padding: 40px 15px;

            h1 {
                display: none;
            }

            > div {
                width: 100%;
            }
        }
    }

    .sb-articles-body {
        padding: 40px 15px;
        font-size: 14px;
        line-height: 25px;
        color: $color-black;

        h1, h2, h3 {
            font-weight: 500;
        }

        h1, h2 {
            letter-spacing: .3px;
            margin: 25px 0 10px 0;
            transition: all 0.4s;
            color: $color-black;
            font-size: 20px;
            line-height: 32px;
        }

        h1 {
            font-size: 23px;
            line-height: 36px;
        }

        h3 {
            font-size: 17px;
            line-height: 30px;
            margin: 15px 0 5px 0;
        }

        p {
            font-weight: 400;
            font-size: 13px;
            line-height: 25px;
            overflow: hidden;
            text-overflow: ellipsis;
            color: $color-gray;
            margin: 5px 0;
            letter-spacing: .3px;
        }

        .sb-grid {
            > a {
                min-width: 0;
                display: block;
                text-decoration: none;
                padding: 20px;
                border-radius: 4px;
                border: 1px solid $border-color;
                transition: $transition;

                &:hover {
                    border-color: $color-blue;
                    box-shadow: 0 0 5px rgba(39, 156, 255, 0.2);

                    h2 {
                        color: $color-blue;
                    }
                }
            }

            img {
                & + h2, & + h2 + p {
                    margin-left: 65px;
                }
            }

            p {
                height: 50px;
                margin: 10px 0 0 0;
            }
        }

        .sb-content ul li {
            font-size: 14px;
            line-height: 30px;
        }

        .sb-parent-category-box, .sb-grid > a {
            position: relative;

            img {
                position: absolute;
                left: 20px;
                top: 20px;
                width: 50px;
                height: 50px;
            }
        }

        .sb-parent-category-box {
            padding: 0 0 40px 0;
            max-width: 600px;

            h1 {
                font-size: 30px;
                line-height: 35px;
            }

            p {
                font-size: 15px;
                margin-top: 10px;
            }

            img {
                left: 0;
                top: 0;

                & + div {
                    margin-left: 80px;
                }
            }
        }

        .sb-btn-text {
            font-size: 14px;
        }

        > div {
            max-width: 950px;
            margin: auto;
        }

    }

    .sb-subcategories .sb-subcategory-box, .sb-search-results {
        padding: 10px;
        border-radius: 4px;
        border: 1px solid $border-color;

        & + div {
            margin-top: 30px;
        }
    }

    .sb-subcategory-title {
        display: block;
        text-decoration: none;
        padding-bottom: 30px;
        margin: 20px;
        border-bottom: 1px solid $border-color;
        transition: $transition;

        &:hover h2 {
            color: $color-blue;
        }
    }

    .sb-subcategory-articles > a, .sb-search-results > a {
        text-decoration: none;
        border-radius: 4px;
        transition: $transition;
        display: block;
        padding: 20px;
        color: $color-black;
        position: relative;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: .3px;

        &:before {
            right: 20px;
            left: auto;
            top: 0;
            position: absolute;
            font-size: 10px;
            line-height: 60px;
        }

        &:hover {
            color: $color-blue;
            background-color: #028be50f;
        }
    }

    .sb-breadcrumbs {
        margin-bottom: 30px;

        a {
            text-decoration: none;
            font-size: 13px;
            line-height: 20px;
            color: $color-gray;
            letter-spacing: .3px;
            transition: $transition;

            &:hover {
                color: $color-black;
            }
        }

        a:not([href]) {
            opacity: 0.7;
        }

        i {
            color: $color-gray;
            margin: 0 10px;
            font-size: 8px;
        }

        & + div {
            margin-top: 30px;
        }
    }

    .sb-article {
        .sb-title {
            font-size: 30px;
            line-height: 35px;
            margin-top: 30px;
            color: $color-black;

            &:first-child {
                margin-top: 0;
            }
        }
    }

    h2.sb-articles-search-title {
        color: $color-gray;
        margin-bottom: 40px;

        span {
            color: $color-black;
        }
    }

    .sb-search-results > a {
        h3 {
            transition: $transition;
        }

        &:hover h3 {
            color: $color-blue;
        }
    }
}

.sb-rating-ext > * {
    animation: sb-fade-in 3s;
}

/*
 * -----------------------------------------------------------
 * RTL
 * -----------------------------------------------------------
 *
*/

.sb-articles-page.sb-rtl {

    .sb-articles-body {
        .sb-grid img + h2, .sb-grid img + h2 + p {
            margin-left: 0;
            margin-right: 65px;
        }

        .sb-parent-category-box img, .sb-grid > a img {
            right: 20px;
            left: auto;
        }

        .sb-parent-category-box img {
            left: auto;
            right: 0;

            & + div {
                margin-left: 0;
                margin-right: 80px;
            }
        }
    }

    .sb-subcategory-articles > a:before {
        content: "\74";
        left: 20px;
        right: auto;
        top: 0;
    }
}

/*
 * -----------------------------------------------------------
 * RESPONSIVE
 * -----------------------------------------------------------
 *
*/

@media (max-width: 768px) {
    .sb-articles-page {
        .sb-articles-header > div {
            min-width: 0;
            width: 100%;
        }
    }

    .sb-articles-cnt {
        flex-direction: column-reverse;
    }

    .sb-articles-nav {
        flex-direction: column-reverse;
        border: 1px solid $border-color;
        display: block;
        position: relative;
        margin: 15px;
        padding: 15px;
        max-height: none;
        max-width: none;
        border-radius: 4px;
        margin-bottom: 15px;

        .sb-articles-nav-mobile-btn {
            display: block;
        }

        > div:last-child {
            display: none;
        }

        .sb-scroll-area {
            overflow: auto;
            margin: 15px 0 0 -16px;

            a {
                opacity: 1;
                border-left: none !important;
            }
        }
    }
}
