/* 共通樣式 */

:root {
  --main-color: #000;
  --sub-color: #e47140;
  --gray-color: #727272;
}

* {
  letter-spacing: 1px;
  font-weight: 300;
  font-family: "Noto Sans TC", sans-serif !important;
}

p,
li {
  line-height: 32px;
}

ul {
  list-style: none;
}

img {
  width: 100%;
  height: auto;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
}

.btn:focus,
.form-control:focus {
  border-color: var(--main-color) !important;
  box-shadow: none !important;
  outline: 0 none !important;
}

.badge {
  font-weight: 400 !important;
}

.navbar {
  background-color: var(--main-color) !important;
  .navbar-collapse {
    flex-grow: 0;
  }
  .navbar-brand {
    font-size: 50px;
    font-weight: 500;
    font-family: "Roboto Slab", serif !important;
    color: var(--sub-color);
    transition: all 0.3s;
    &:hover {
      opacity: 0.9;
      color: var(--sub-color);
    }
  }
}

.blog-post-tags {
  .badge {
    background-color: var(--main-color);
    &:hover {
      color: var(--main-color);
      background-color: #fff;
      border: 1px solid var(--main-color);
    }
  }
}

.blog-post-title {
  margin: 10px 0 20px;
  a {
    font-size: 50px;
    font-weight: 600;
  }
}

.pagination {
  justify-content: center;
  .page-link {
    color: var(--main-color);
  }
  .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--main-color);
    border-color: var(--main-color);
  }
}

.post-title {
  a {
    color: #000;
    text-decoration: none;
    font-size: 22px;
    font-weight: 500;
  }
}

.post-block-title {
  margin-bottom: 20px;
  position: relative;
  font-size: 22px;
  &::after {
    position: absolute;
    z-index: -10;
    top: 15px;
    left: 0;
    width: 100%;
    height: 0px;
    content: "";
    border-bottom: 1px solid #929292;
    bottom: 5px;
  }
  span {
    font-weight: 500;
    background: #fff;
  }
}

.news-info {
  margin-top: 10px;
  line-height: 20px;
  a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-color);
    text-decoration: none;
    transition: all 0.3s;
    &:hover {
      opacity: 0.8;
    }
  }
  small {
    color: var(--gray-color);
  }
}

.news-thumbnail {
  height: 100%;
  object-fit: cover;
}

// 文字省略
.line-clamp {
  max-width: 150px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-depiction {
  // max-width: 350px;
  margin: 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 26px;
  a {
    color: #7a7a7a;
    text-decoration: none;
  }
}

.top-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 10;
  opacity: 0; // scrollTop = 0
  transition: all .5s;
  button {
    border: none;
    background: var(--sub-color);
    border-radius: 100px;
    width: 55px;
    height: 55px;
  }
}

.show {
  opacity: 1; // scrollTop > 100
} 

/* sidebar.html Start */

.news-sidebar {
  position: sticky;
  top: 15px;
  .news-featured {
    position: unset;
  }
}

.search-btn {
  border: 1px solid var(--main-color) !important;
  svg {
    color: var(--main-color);
  }
  &:hover {
    background-color: var(--main-color) !important;
    svg {
      color: #fff;
    }
  }
}

.tags {
  margin: 0 5px 5px 0;
  padding: 7px 10px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--main-color) !important;
  border: 1px solid var(--main-color) !important;
  &:hover {
    color: #fff !important;
    background-color: var(--main-color);
  }
}

/* sidebar.html End */

/* single.html Start */

.blog-post.content {
  h4 {
    font-size: 16px;
    font-weight: 300;
    line-height: 32px;
    a {
      padding: 5px 8px;
      margin-right: 3px;
      border: 1px solid #000;
      border-radius: 5px;
      font-size: 14px;
      &:hover {
        color: #fff !important;
      }
    }
  }
  .back-link {
    color: #000;
    display: block;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    &:hover {
      opacity: 0.7;
    }
  }
}

/* single.html End */

/* content.html Start */

.news-main {
  height: 100%;
  overflow: hidden;
  .post-title {
    a {
      font-size: 34px;
    }
  }

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

  .news-info {
    a {
      font-size: 16px;
    }
  }
}

/* content.html End */

/* focus.html Start */

.focus-content {
  position: sticky;
  top: 20px;
}

/* focus.html End */

/* recent.html Start */

.recent-content {
  .news-list {
    margin: 0;
    li {
      margin: 15px 0;
      img {
        width: 140px;
        height: 105px;
        object-fit: cover;
      }
      small {
        display: block;
      }
      .news-info {
        margin-top: 0px;
      }
    }
    li:last-child {
      margin: 0;
    }
  }
}

/* recent.html End */

/* news-tab.html Start */

.tab-category {
  .nav-link {
    color: var(--main-color);
    font-weight: 500;
  }
  .nav-pills .nav-link.active,
  .nav-pills .show > .nav-link {
    color: var(--sub-color);
    background-color: var(--main-color);
  }
}

.tab-content {
  .bg-img {
    position: relative;
    height: 370px;
    // 設置背景混和模式為相乘模式
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center center;
    cursor: pointer;
    section {
      padding: 10px 25px;
      position: absolute;
      bottom: 0;
      color: #fff;
      a {
        color: #fff;
        text-decoration: none;
      }
      small {
        font-size: 12px;
      }
    }
  }
}

/* news-tab.html End */

/* news-all.html Start */

.news-all {
  .post-title {
    margin: 5px auto;
    a {
      font-size: 36px;
    }
  }
  .news-info {
    a {
      font-size: 18px;
    }
  }
  hr {
    margin: 1.5rem 0;
  }
  .first-img {
    height: 50vh;
    object-fit: cover;
  }
  .line {
    padding: 0 12px;
  }
}

/* news-all.html End */

/* news-featured.html Start */

.news-featured {
  position: sticky;
  top: 20px;
}

/* news-featured.html End */
