/* GENERAL */

html {
  font-size: 16px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.flex {
  display: flex;
}

.jcc {
  justify-content: center;
}

.jcl {
  justify-content: left;
}

.jsb {
  justify-content: space-between;
}

.jse {
  justify-content: space-evenly;
}

.aic {
  align-items: center;
}

.ais {
  align-items: start;
}

.wrap {
  flex-wrap: wrap;
}

a {
  text-decoration: none;
}

img {
  object-fit: cover;
}

.tac {
  text-align: center;
}

/* CUSTOM STYLES */

:root {
  --bg: #0b1529;
  --bgSoft: #1f3050;
  --text: #dee4eb;
  --textSoft: #cbd2d9;
}

body {
  background: linear-gradient(to right, #1f2937, #111827, #000);
  font-family: 'Open Sans', sans-serif;
  color: #fff;
}

body.light {
  background: antiquewhite;
  color: #0b1529;
}

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

.container {
  max-width: 1336px;
  padding: 0 50px;
  margin: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* --- hover animation --- */

.hover-underline {
  position: relative;
  padding-bottom: 4px;
}

.hover-underline::after {
  background: none repeat scroll 0 0 transparent;
  bottom: 0;
  content: '';
  display: block;
  height: 3px;
  border-radius: 30px;
  left: 50%;
  position: absolute;
  background: teal;
  transition: width 0.2s ease 0s, left 0.2s ease 0s;
  width: 0;
}

.hover-underline:hover:after {
  width: 100%;
  left: 0;
}

/* header */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: linear-gradient(to right, #1f2937, #111827, #000);
}

.logo a {
  font-weight: 800;
  font-size: 48px;
  background: linear-gradient(to right, #2563eb, #14b8a6);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.toggle {
  width: 50px;
  height: 22px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  background-color: var(--bgSoft);
  border: 0.3px solid var(--textSoft);
  padding: 5px;
  position: relative;
}

.bi-circle-fill {
  color: var(--textSoft);
  font-size: 22px;
  z-index: 50;
  position: absolute;
  left: 0;
}

.light .bi-circle-fill {
  left: unset;
  right: 0;
}

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

.nav-items a {
  margin: 0 12px;
  font-weight: 500;
  font-size: 18px;
}

.search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-left: 12px;
  background-color: var(--bgSoft);
  color: var(--textSoft);
  padding: 8px 12px;
  border-radius: 12px;
  & span {
    margin-left: 8px;
  }
}

/* list */

.list-item {
  padding: 12px;
  border-bottom: 1px solid #324d7f;
  margin-bottom: 10px;
  border-radius: 12px;
  &:hover {
    background: linear-gradient(to left, #1f2937, #111827, #000);
  }
  .list-item-content {
    /* flex: 1; */
    .list-item-title {
      font-size: 28px;
      font-weight: 600;
    }
    .list-item-details {
      gap: 4px;
      color: var(--textSoft);
      .list-item-details-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
      }
      .list-item-details-author {
        font-size: 12px;
      }
      time {
        margin-left: 8px;
        font-size: 12px;
        i {
          margin-right: 4px;
        }
      }
    }
    .list-item-desc {
      margin-top: 12px;
      color: var(--text);
      font-size: 14px;
    }
  }
  .list-item-img {
    /* flex: 1; */
    width: 300px;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
  }
  .list-item-categories {
    margin-top: 12px;
    .list-item-category {
      background-color: #bedbfe;
      color: #000;
      padding: 2px 8px;
      border-radius: 8px;
      font-size: 12px;
    }
  }
}

/* pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  font-size: 14px;
  margin: 80px 0 40px 0;
}

.page-item {
  width: 30px;
  height: 30px;
  border: 1px solid gray;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
}

.page-item.active {
  background-color: var(--textSoft);
  color: var(--bg);
}

.page-item.disabled {
  background-color: #313845;
  cursor: not-allowed;
}

/* single */

.single {
  .single-title {
    text-align: center;
    font-size: 48px;
    font-weight: 600;
  }
  .single-content {
    text-align: left;
  }
  hr {
    border: 1px solid #1f3050;
    border-radius: 8px;
    margin: 12px 0;
  }
  .single-cover-img {
    width: 100%;
    max-height: 600px;
    border-radius: 12px;
    object-fit: cover;
  }
  .single-description {
    margin: 12px 0;
    color: var(--textSoft);
    font-weight: 300;
    padding: 8px 12px;
    border-left: 4px solid #14b8a6;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
  }
  .single-details {
    gap: 12px;
    margin: 12px 0;
    img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
    }
    .single-author-name {
      font-size: 14px;
      color: var(--textSoft);
    }
    .single-date {
      font-size: 12px;
      gap: 10px;
    }
  }
  .single-categories {
    gap: 10px;
    .single-category {
      background-color: #bedbfe;
      color: #000;
      padding: 2px 8px;
      border-radius: 8px;
      font-size: 12px;
    }
  }
  .single-content-post {
    line-height: 32px;
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    img {
      margin: 20px 0;
    }

    h1 {
    }
    h2 {
    }
    h3 {
    }
    h4 {
    }
    h5 {
    }
    h6 {
    }
    p {
    }
    a {
      text-decoration: underline;
    }
    blockquote {
      border-left: 3px solid #bedbfe;
      padding-left: 8px;
    }
    img {
      width: 100%;
      object-fit: cover;
      border-radius: 12px;
    }
    pre {
      width: 100%;
      padding: 12px;
      border-radius: 12px;
    }
    p code {
      background-color: #808080;
      color: #fff;
      padding: 1px 4px;
      border-radius: 4px;
    }
  }
}

/* categories list */

.categories-list {
  max-width: 500px;
  margin: 0 auto;
  background: linear-gradient(to right, #1f2937, #111827, #000);
  box-shadow: 0px -1px 15px 0px #2563eb;
  border-radius: 12px;
  padding: 18px;
  gap: 32px;
  .category-name {
    background-color: #bedbfe;
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
  }
}

/* footer */

.footer {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to right, #1f2937, #111827, #000);
  padding: 22px 44px;
  margin-top: 32px;
  box-shadow: 0px -1px 15px 0px #14b8a6;
  border-top-right-radius: 18px;
  border-top-left-radius: 18px;
  display: flex;
  justify-content: space-between;

  .footer-nav,
  .footer-socials {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    a {
      font-size: 18px;
      color: #fff;
    }
  }
  .footer-socials {
    i {
      margin-right: 4px;
    }
  }
}

/* media queries */

@media (max-width: 1536px) {
  .container {
    max-width: 1336px;
  }
}

@media (max-width: 1366px) {
  .container {
    max-width: 1280px;
  }
}

@media (max-width: 1280px) {
  .container {
    max-width: 1024px;
  }
}

@media (max-width: 1024px) {
  .container {
    max-width: 768px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* mobile */

@media (max-width: 768px) {
  .container {
    max-width: 640px;
    padding: 0 5px;
  }
  .nav-items a {
    margin: 0 8px;
    font-weight: 400;
  }
  .footer {
    padding: 16px 0;
    justify-content: space-around;
    .footer-nav {
      a {
        font-size: 16px;
      }
    }
  }
  .single {
    .single-title {
      font-size: 22px;
    }
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .container {
    max-width: 475px;
    padding: 0 5px;
  }
}
