/* color */
/* font */
/* transition */
.newsItem:before, .newsItem:after, .newsDate, .newsText:after, .newsCategory, .newsTitle, .newsDesc {
  transition: all 0.5s ease-in-out; }

@keyframes rotate {
  0% {
    transform: rotate(0deg); }
  100% {
    transform: rotate(360deg); } }

.newsList {
  margin-top: 70px; }
  @media (max-width: 640px) {
    .newsList {
      margin-top: 30px;
      overflow-x: clip; } }

.newsItem {
  display: grid;
  grid-template-columns: 1fr 1fr 2.5fr;
  grid-template-areas: "newsImg newsDate newsText";
  gap: 60px;
  padding: 20px;
  margin-bottom: 30px;
  position: relative; }
  @media (max-width: 1180px) {
    .newsItem {
      gap: 40px; } }
  @media (max-width: 1024px) {
    .newsItem {
      grid-template-rows: auto 1fr;
      grid-template-columns: 1fr 2fr;
      grid-template-areas: "newsImg newsDate" "newsImg newsText";
      row-gap: 10px; } }
  @media (max-width: 640px) {
    .newsItem {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto;
      grid-template-areas: "newsImg" "newsDate" "newsText";
      justify-content: center; } }
  @media (min-width: 1181px) {
    .newsItem:hover:before {
      content: "";
      position: absolute;
      opacity: 0; }
    .newsItem:hover:after {
      content: "";
      position: absolute;
      opacity: 0.9; }
    .newsItem:hover .newsText:after {
      content: "";
      position: absolute;
      opacity: 0.3; }
    .newsItem:hover .newsDate {
      color: #aadcfe; }
      [data-theme="dark"] .newsItem:hover .newsDate {
        color: #3f5165; } }
  @media (min-width: 1181px) and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .newsItem:hover .newsDate {
      color: #3f5165; } }
  @media (min-width: 1181px) {
    .newsItem:hover .newsCategory {
      background-color: #aadcfe;
      color: #036eb8; }
      [data-theme="dark"] .newsItem:hover .newsCategory {
        background-color: rgba(255, 255, 255, 0.7);
        color: #3f5165; } }
  @media (min-width: 1181px) and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .newsItem:hover .newsCategory {
      background-color: rgba(255, 255, 255, 0.7);
      color: #3f5165; } }
  @media (min-width: 1181px) {
    .newsItem:hover .newsTitle {
      color: #fff; }
      [data-theme="dark"] .newsItem:hover .newsTitle {
        color: #3f5165; } }
  @media (min-width: 1181px) and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .newsItem:hover .newsTitle {
      color: #3f5165; } }
  @media (min-width: 1181px) {
      .newsItem:hover .newsTitle:after {
        content: "";
        position: absolute;
        opacity: 0; }
    .newsItem:hover .newsDesc {
      color: #fff; } }
  .newsItem:before {
    content: "";
    position: absolute;
    pointer-events: none;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    opacity: 0.7;
    box-shadow: 0px 2px 9.6px 0.4px rgba(0, 0, 0, 0.18);
    z-index: -1; }
    [data-theme="dark"] .newsItem:before {
      background-color: #fff;
      opacity: 0.25; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .newsItem:before {
        background-color: #fff;
        opacity: 0.25; } }
    @media (max-width: 640px) {
      .newsItem:before {
        display: none; } }
  .newsItem:after {
    content: "";
    position: absolute;
    pointer-events: none;
    width: calc(100% + 20px);
    height: 100%;
    left: -20px;
    top: 0;
    box-shadow: 0px 2px 9.6px 0.4px rgba(0, 0, 0, 0.57);
    background-color: #3c96d4;
    opacity: 0;
    z-index: -1; }
    [data-theme="dark"] .newsItem:after {
      background-color: #bec9cd; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .newsItem:after {
        background-color: #bec9cd; } }
    @media (max-width: 640px) {
      .newsItem:after {
        display: none; } }

.newsLink {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2; }

.newsImg {
  aspect-ratio: 1;
  width: 230px;
  font-size: 0;
  border-radius: 24px;
  overflow: hidden;
  grid-area: newsImg; }
  @media (max-width: 640px) {
    .newsImg {
      margin-left: auto;
      margin-right: auto; } }
  .newsImg img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover; }

.newsDate,
.newsText {
  padding-top: 24px; }
  @media (max-width: 1024px) {
    .newsDate,
    .newsText {
      padding-top: 0; } }

.newsDate {
  color: #525252;
  font-size: 17px;
  letter-spacing: 1.36px;
  grid-area: newsDate; }
  [data-theme="dark"] .newsDate {
    color: #fff; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .newsDate {
      color: #fff; } }

.newsText {
  position: relative;
  grid-area: newsText; }
  .newsText .btn {
    margin-top: 20px; }
    @media (max-width: 640px) {
      .newsText .btn {
        margin-left: auto; } }
  .newsText:after {
    content: "";
    position: absolute;
    width: 240px;
    aspect-ratio: 242/196;
    background-image: url("../assets/images/news_icon.svg");
    right: -70px;
    bottom: -20px;
    opacity: 0; }

.newsCategory {
  color: #fff;
  padding: 8px 20px;
  letter-spacing: 1.6px;
  background-color: #525252;
  border-radius: 25px;
  width: fit-content;
  margin-bottom: 10px;
  line-height: 1;
  text-box-edge: cap alphabetic;
  text-box-trim: trim-end; }

.newsTitle {
  font-size: 18px;
  font-weight: 500;
  font-family: "Noto Sans TC", sans-serif;
  color: #036eb8;
  padding: 0 5px 5px;
  margin-bottom: 10px;
  line-height: calc(29/18);
  letter-spacing: 1.8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative; }
  [data-theme="dark"] .newsTitle {
    color: #fff; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .newsTitle {
      color: #fff; } }
  @media (max-width: 1024px) {
    .newsTitle {
      font-size: 16px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden; } }
  @media (max-width: 640px) {
    .newsTitle {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden; } }
  .newsTitle:after {
    content: "";
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    height: 1px;
    background-color: #036eb8; }
    [data-theme="dark"] .newsTitle:after {
      background-color: #fff; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .newsTitle:after {
        background-color: #fff; } }

.newsDesc {
  font-size: 14px;
  color: #525252;
  letter-spacing: 1.12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden; }
  [data-theme="dark"] .newsDesc {
    color: #fff; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .newsDesc {
      color: #fff; } }
  @media (max-width: 1024px) {
    .newsDesc {
      font-size: 16px; } }
  @media (max-width: 640px) {
    .newsDesc {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden; } }

.newsContent .newsDate {
  text-align: right;
  font-size: 15px;
  color: #3c96d4;
  letter-spacing: 0.9px;
  margin-bottom: 30px; }

.newsContent .newsTitle {
  font-size: 24px;
  font-weight: 700;
  padding: 0 20px;
  letter-spacing: 2.88px;
  margin-bottom: 20px;
  display: block; }
  .newsContent .newsTitle:after {
    content: "";
    position: absolute;
    display: none; }
  @media (max-width: 640px) {
    .newsContent .newsTitle {
      padding: 0;
      font-size: 20px;
      letter-spacing: 1.6px; } }


/* News pagination */
.newsPaginationWrap {
  width: 100%;
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin: 40px auto 80px;
}

.newsPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.newsPaginationPage {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  border-radius: 50%;
  color: #fff;
  background-color: #1685c1;
  text-decoration: none;
  line-height: 1;
  font-size: 14px;
  font-weight: 700;
}

.newsPaginationPage:hover,
.newsPaginationPage:focus-visible {
  color: #fff;
  background-color: #036eb8;
}

.newsPaginationPage.is-current {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  color: #fff;
  background-color: #f58220;
  font-size: 20px;
}

.newsPaginationIndicator {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.newsPaginationIndicator.is-prev {
  border-right: 8px solid #1685c1;
}

.newsPaginationIndicator.is-next {
  border-left: 8px solid #1685c1;
}

@media (max-width: 1024px) {
  .newsPaginationWrap {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .newsPaginationWrap {
    margin: 25px auto 50px;
  }

  .newsPagination {
    gap: 6px;
  }

  .newsPaginationPage {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 13px;
  }

  .newsPaginationPage.is-current {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 18px;
  }

  .newsPaginationIndicator {
    border-top-width: 5px;
    border-bottom-width: 5px;
  }

  .newsPaginationIndicator.is-prev {
    border-right-width: 7px;
  }

  .newsPaginationIndicator.is-next {
    border-left-width: 7px;
  }
}
