@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");

:root {
    --main-color: #5768ea;
    --black-color: #393939;
    --white-color: #ffffff;
    --bg-color: #eef5ff;
}

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background-color: var(--bg-color);
    color: var(--black-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
ul,
ol,
p {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: black;
}

.container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

section {
    padding-bottom: 60px;
}

/* Navbar */

.nav {
    background-color: var(--white-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
}

.nav_inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 100%;
    vertical-align: middle;
}

.nav_links {
    display: flex;
    align-items: center;
}

.nav_link {
    display: flex;
    align-items: center;
    margin-right: 20px;
    cursor: pointer;
}

.nav_link a {
    font-size: 16px;
    color: var(--black-color);
    text-decoration: none;
}

.nav_link:last-child {
    margin-right: 0;
}

.nav_link_icon {
    margin-right: 5px;
}

.nav_right {
    display: flex;
    align-items: center;
}

.change_lang {
    display: flex;
    align-items: center;
}

.change_lang .lang-select {
    font-size: 16px;
    margin-left: 8px;
    text-decoration: none;
    color: var(--black-color);
    border: none;
    outline: none;
}

.search_form {
    margin-left: 25px;
    position: relative;
}

.search_form input {
    background-color: var(--bg-color);
    color: var(--black-color);
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    width: 280px;
}

.search_form button {
    padding: 12px;
    background-color: var(--main-color);
    border: none;
    border-radius: 50%;
    position: absolute;
    right: 0;
    cursor: pointer;
    font-size: 14px;
}

.menu {
    width: 40px;
    height: 40px;
    background-color: var(--main-color);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
    position: relative;
    z-index: 99;
  }

  .menu_lines div {
    width: 20px;
    height: 2px;
    background-color: var(--white-color);
    /* margin-bottom: 5px; */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: .3s ease;
  }

  .menu_lines div:nth-child(1) {
    top: 30%;
  }

  .menu_lines div:nth-child(3) {
    top: 70%;
  }

  .menu_lines.active div:nth-child(1) {
    top: 50%;
    transform: translate(-50%, 50%) rotate(45deg);
  }

  .menu_lines.active div:nth-child(2) {
    opacity: 0;
  }

  .menu_lines.active div:nth-child(3) {
    top: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
  }

  .off-screen-menu {
    background-color: rgb(34, 37, 49);
    height: 100vh;
    width: 100%;
    max-width: 450px;
    position: fixed;
    top: 0;
    right: -450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 3rem;
    transition: .3s ease;
    display: none;
  }

  .off-screen-menu ul {
    list-style: none;
  }

  .off-screen-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
  }

  .off-screen-menu.active {
    right: 0;
  }

  .off-screen-menu .search .search_form button {
    top: 30%;
  }

/* Header */

.header {
    margin: 40px 0;
}

.header_inner {
    display: flex;
    align-items: center;
}

.header_title {
    font-size: 48px;
    color: var(--black-color);
    max-width: 640px;
    font-weight: 600;
}

.header_subtitle {
    margin-top: 15px;
    font-size: 20px;
    line-height: 140%;
}

.btn {
    background-color: var(--main-color);
    padding: 16px 50px;
    color: var(--white-color);
    border-radius: 50px;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.header_btn {
    margin-top: 30px;
}

.header_right img {
    width: 100%;
}

/* Articles */

.articles {}

.articles_inner {
    display: flex;
}

.articles_left {
    max-width: 900px;
    margin-right: 20px;
}

.title {
    font-size: 28px;
    font-weight: 600;
}

.article-h {
    display: flex;
    align-items: center;
    background-color: var(--white-color);
    padding: 15px;
    border-radius: 20px;
    margin-top: 20px;
    cursor: pointer;
    width: 100%;
}

.article-h__left {
    max-width: 260px;
    width: 100%;
}

.article-h__left img {
    border-radius: 15px;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.article-h_right {
    margin-left: 20px;
    width: 100%;
}

.article-category {
    background-color: #ddebff;
    width: 98px;
    height: 24px;
    font-size: 12px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-title {
    font-size: 24px;
    font-weight: 600;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-description {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.article-date img {
    margin-right: 5px;
}

.article-date {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #777;
}

.line {
    height: 12px;
    width: 1px;
    background-color: #999;
    margin: 0 10px;
}

.author {
    font-size: 12px;
    color: #777;
}

.article-text {
    font-size: 16px;
    color: #555;
    line-height: 140%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
}

.to-articles-btn {
    background-color: var(--bg-color);
    border: 1px solid var(--main-color);
    color: var(--main-color);
    font-size: 14px;
    margin-top: 20px;
    cursor: pointer;
}

.articles_right {
    width: 100%;
}

.top-article {
    padding: 15px;
    background-color: var(--white-color);
    border-radius: 20px;
    margin-top: 20px;
    cursor: pointer;
}

.top-article-title {
    font-size: 16px;
}

.top-article-text {
    font-size: 14px;
}

.categories-title {
    margin-top: 30px;
    margin-bottom: 20px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
}

.category-item {
    padding: 10px 15px;
    font-size: 16px;
    background-color: var(--white-color);
    border-radius: 25px;
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

/* Recommend articles */

.rcmd-categories-title {
    margin-bottom: 20px;
}

.rcmd-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.article-v {
    background-color: var(--white-color);
    padding: 15px;
    border-radius: 20px;
    max-width: 325px;
    cursor: pointer;
}

.article-v__img img {
    border-radius: 15px;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.article-v_content {
    margin-top: 15px;
}

.article-v-title {
    /* display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden; */
    font-size: 20px;
}

.article-v-text {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* About */

.about-title {
    margin-bottom: 20px;
}

.about-text {
    font-size: 20px;
    line-height: 140%;
    margin-bottom: 20px;
    max-width: 893px;
}

.about-images {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.about-img {
    border-radius: 20px;
    width: 49%;
    margin-top: 20px;
    height: 296px;
    object-fit: cover;
}

.footer {
    background-color: var(--black-color);
    padding: 60px 0 80px;
}

.footer_up {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer_links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.footer_link {
    text-decoration: none;
    color: var(--white-color);
    margin-right: 20px;
    font-size: 14px;
    color: #a0a0a0;
}

.footer_link:last-child {
    /* margin-right: 0; */
}

.footer_line {
    border: 1px solid #535353;
    margin: 20px 0;
}

.footer_down {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer_down p {
    color: #a0a0a0;
    font-size: 14px;
}

.to-top {
    cursor: pointer;
}

/* Adaptive */

@media screen and (max-width: 1200px) {
    .nav_link_icon {
        display: none;
    }

    .header_title {
        font-size: 42px;
    }

    .title {
        font-size: 24px;
    }

    .article-h_right .article-title {
        font-size: 20px;
    }

    .search_form {
        margin-left: 15px;
    }

    .search_form input {
        width: 250px;
    }

    .articles_inner {
        flex-wrap: wrap;
    }

    .article-v-title {
        font-size: 16px;
    }

    .rcmd-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .articles_left {
        max-width: 100%;
        margin-right: 0px;
    }

    .top_articles_title {
        margin-top: 30px;
    }

    .about-img {
        width: 100%;
    }

    .nav_links {
        display: none;
    }

    .menu {
        display: flex;
        margin-left: 20px;
    }

    .off-screen-menu {
        display: flex;
    }

    .off-screen-menu .search .search_form {
        display: none;
    }
}

@media screen and (max-width: 875px) {
    .header_title {
        font-size: 36px;
    }

    .header_subtitle {
        font-size: 16px;
    }

    .top-article-title {
        font-size: 20px;
    }

    .article-v-title {
        font-size: 16px;
    }

    .rcmd-articles-grid {
        grid-template-columns: repeat(2, 2fr);
    }

    .about-text {
        font-size: 16px;
    }

    .article-v__img img {
        height: 130px;
    }
}

@media screen and (max-width: 675px) {
    .article-category {
        height: 20px;
    }

    .header_subtitle {
        margin-top: 5px;
    }

    .header_btn {
        margin-top: 15px;
    }

    .article-h {
        margin-top: 10px;
        padding: 10px;
        border-radius: 10px;
    }

    .container {
        padding: 0 10px;
    }

    .search_form {
        display: none;
    }

    section {
        padding-bottom: 20px;
    }

    .header_right {
        display: none;
    }

    .header_title {
        font-size: 24px;
    }

    .title {
        font-size: 18px;
    }

    .header_subtitle {
        font-size: 14px;
    }

    .article-h_right .article-title {
        font-size: 14px;
    }

    .top-article-title {
        font-size: 14px;
    }

    .top-article-text {
        display: none;
    }

    .article-h_right .article-text {
        display: none;
    }

    .header_right img {
        width: 50%;
        margin-left: 50%;
    }

    .btn {
        padding: 10px 25px;
        font-size: 12px;
    }

    .rcmd-articles-grid {
        gap: 10px;
    }

    .article-h_right {
        margin-left: 10px;
    }

    .article-h__left {
        max-width: 140px;
    }

    .article-h__left img {
        border-radius: 5px;
        height: 100px;
    }

    .top-article {
        margin-top: 10px;
        padding: 10px;
        border-radius: 10px;
    }

    .category-item {
        font-size: 14px;
        padding: 10px;
        border-radius: 10px;
    }

    .article-v {
        padding: 10px 10px 20px;
        border-radius: 10px;
    }

    .article-v__img img {
        border-radius: 10px;
        height: 100px;
    }



    .categories-title {
        margin-bottom: 15px;
    }

    .article-v-title {
        font-size: 14px;
    }

    .article-v_content {
        margin-top: 5px;
    }

    .about-title {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .about-images img {
        border-radius: 10px;
        margin-top: 10px;
        max-width: 670px;
        max-height: 236px;
        object-fit: cover;
        display: none;
    }

    .footer {
        padding: 40px 0 40px;
    }

    .footer_up .logo {
        margin-bottom: 10px;
    }

    .article-v-text {
        display: none;
    }

    .off-screen-menu .search .search_form {
        display: block;
    }


}

/* Articles Page start */

.breadcrumb {
    display: flex;
    list-style: none;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.breadcrumb-link a,
.breadcrumb-link {
    font-size: 16px;
    text-decoration: none;
    color: var(--black-color);
    margin-top: 5px;
}

.breadcrumb-link-active {
    color: #9c9c9c;
    text-decoration: none;
}

.breadcrumb-link::before {
    content: url(../img/about-page/breadcrumb-icon.svg);
    margin-right: 10px;
    margin-left: 10px;
}

.breadcrumb-link:first-child::before {
    content: "";
}

.header_left-about {
    width: 80%;
}

.header_left-about .header_subtitle {
    margin-bottom: 10px;
}

.btn-outline {
    background-color: var(--bg-color);
    padding: 16px 25px;
    color: var(--main-color);
    border-radius: 50px;
    border: 1px solid var(--main-color);
    font-size: 16px;
    cursor: pointer;
    transition: 0.4s;
}

.btn-outline:hover {
    background-color: var(--main-color);
    color: var(--white-color);
}

.active-category {
    background-color: var(--main-color);
    color: var(--white-color);
}

.about-page-btn {
    margin-top: 10px;
    margin-right: 5px;
}

/* Articles page Articles */

.about-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.sort {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    height: 19px;
    justify-content: flex-end;
}

.sort-text {
    font-size: 16px;
}

.sort-select {
    background: none;
    border: none;
    font-size: 16px;
    outline: none;
    color: var(--main-color);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-ul {
    list-style: none;
    display: flex;
}

.page-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 38px;
    border: 1px solid #c4c4c4;
    border-radius: 5px;
    margin-right: 15px;
    cursor: pointer;
}

.page-arrow:last-child {
    margin-right: 0;
    margin-left: 10px;
}

.pagination-item {
    width: 40px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c4c4c4;
    border-radius: 5px;
    margin-right: 5px;
    cursor: pointer;
}

.pagination-active {
    background-color: var(--main-color);
    color: var(--white-color);
    border: none;
}

/* Articles page adaptive */

@media screen and (max-width: 875px) {
    .about-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 675px) {
    .articles-header {
        margin: 20px 0;
    }

    .articles-header .header_subtitle {
        display: none;
    }

    .about-articles-grid {
        grid-template-columns: repeat(2, 2fr);
        gap: 10px;
    }

    .btn-outline {
        font-size: 14px;
        padding: 5px 10px;
    }

    .sort_text {
        font-size: 14px;
    }

    .sort-select {
        font-size: 14px;
    }

    .breadcrumb {
        margin-top: 10px;
    }

    .breadcrumb-link a,
    .breadcrumb-link {
        font-size: 12px;
    }
}

/* Read Article page start */

.breadcrumb-ra {
    margin-bottom: 40px;
}

.ra-content {
    background-color: var(--white-color);
    border-radius: 20px;
    padding: 20px 25px;
}

.ra-category {
    font-size: 14px;
    width: 120px;
    height: 27px;
}

.ra-title {
    font-size: 40px;
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 15px;
}

.ra-article-date {
    font-size: 16px;
}

.ra-article-date img {
    width: 16px;
}

.ra-line {
    height: 18px;
}

.ra-author {
    font-size: 16px;
}

.ra-img {
    margin: 20px 0;
}

.ra-img img {
    border-radius: 20px;
    width: 100%;
}

.ra-text {
    line-height: 140%;
    font-size: 20px;
    margin-bottom: 10px;
}



@media screen and (max-width: 875px) {
    .ra-category {
        font-size: 12px;
        width: 106px;
        height: 25px;
    }

    .ra-articles-title {
        margin-top: 20px;
    }

    .ra-title {
        font-size: 32px;
    }

    .ra-article-date img {
        width: 14px;
    }

    .ra-article-date {
        font-size: 14px;
    }

    .ra-author {
        font-size: 14px;
    }

    .ra-text {
        font-size: 16px;
        line-height: 150%;
    }

    .breadcrumb-ra {
        margin-bottom: 20px;
    }

    .ra-content {
        padding: 15px 20px;
    }
}

@media screen and (max-width: 675px) {
    .ra-content {
        padding: 10px 10px;
        border-radius: 10px;
    }

    .ra-category {
        font-size: 12px;
        width: 106px;
        height: 20px;
    }

    .ra-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .ra-article-date img {
        width: 12px;
    }

    .ra-article-date {
        font-size: 12px;
    }

    .ra-author {
        font-size: 12px;
    }

    .ra-line {
        height: 14px;
    }

    .ra-img {
        margin: 10px 0;
    }

    .ra-img img {
        border-radius: 5px;
    }

    .ra-text {
        font-size: 14px;
    }
}
