
/*
* 
* ==========================================================
* 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, .sb-articles-list-nav .sb-scroll-area {
    padding-right: 0;
    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 {
        flex: 1;
        max-width: 730px;
        min-width: 30%;
    }
}

.sb-articles-nav {
    flex-shrink: 0;
    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;
    }

    &:empty {
        display: none;
    }
}

.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-cnt-large {
        .sb-articles-cnt {
            max-width: 1100px;
        }

        .sb-articles-header > div {
            max-width: 1070px;
        }

        .sb-articles-body > div {
            max-width: 1070px;
        }
    }

    .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: 14px;
            line-height: 25px;
            overflow: hidden;
            text-overflow: ellipsis;
            color: $color-black;
            margin: 10px 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 {
                max-width: 100%;
                border-radius: 6px;
            }

            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;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;

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

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

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

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

            img {
                left: 0;
                top: 30px;
                border-radius: 4px;

                & + 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;

        p {
            color: $color-gray;

            &:empty {
                display: none;
            }
        }

        &: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 40px 20px 20px;
        color: $color-black;
        position: relative;
        font-size: 14px;
        line-height: 25px;
        letter-spacing: .3px;

        &:before {
            right: 20px;
            left: auto;
            top: 2px;
            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;
}

.sb-rating-ext {
    justify-content: center;

    .sb-rating {
        padding-top: 0;
        margin-top: 0;
        border: none;
    }

    &.sb-lang-nav-cnt {
        justify-content: space-between;
    }
}

.sb-lang-nav {
    margin-top: -22px;
    height: 45px;

    ul {
        top: auto;
        bottom: 35px;
        margin-left: -11px;

        li {
            padding: 6px 12px;
            background: none !important;

            a {
                display: flex;
                align-items: center;
                text-decoration: none;
            }
        }

        &:empty {
            display: none !important;
        }
    }

    p {
        margin: 0 !important;
        padding-top: 15px;
        display: flex;
        align-items: center;
        font-weight: 500 !important;
        color: $color-gray !important;

        &:after {
            transform: rotate(180deg);
            line-height: 62px;
        }
    }

    img {
        border-radius: 3px;
        width: 25px;
        height: 15px;
        display: block;
        margin-right: 10px;
    }

    &:hover ul {
        display: block;
    }
}

/*
 * -----------------------------------------------------------
 * 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;
    }
}

.sb-read-more-cnt .sb-btn {
    min-width: 250px;
}

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

.sb-articles-list-nav .sb-title {
    font-weight: 500;
    font-size: 18px;
    margin: 0 0 15px 0;
}

.sb-articles-list-nav .sb-scroll-area > div > div > a {
    display: block;
    text-decoration: none;
    padding: 10px 0;
    color: $color-gray;
    font-size: 13px;
    line-height: 23px;
    letter-spacing: .3px;
    padding: 5px 15px 5px 0;
    transition: $transition;

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

.sb-articles-list-nav .sb-articles-nav .sb-scroll-area {
    max-height: 100%;
}

.sb-articles-list-nav .sb-scroll-area > div + div {
    margin-top: 30px;
}

.sb-articles-list-nav a.sb-active {
    font-weight: 500;
    color: $color-black !important;
}

.sb-articles-list-nav {
}

.sb-articles-list-nav {
}

.sb-articles-list-nav {
}


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

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

    .sb-read-more-cnt .sb-btn {
        min-width: 0;
    }

    .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;
            }
        }
    }
}
