.section.news {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;

  @media screen and (max-width: 1024px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media screen and (max-width: 768px) {
    grid-template-columns: repeat(1, 1fr);
  }

  .modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f9f9f9;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    visibility: hidden;
    opacity: 0;
    transition:
      opacity 0.5s,
      visibility 0s 0.5s;

    @media screen and (max-width: 1024px) {
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
      height: 100vw;
    }

    @media screen and (max-width: 768px) {
      position: absolute;
      top: 0;
      display: inline-flex;
      padding-bottom: 24px;
      flex-direction: column;
      align-items: center;
      width: 100%;
      height: auto;
      gap: 24px;
    }

    &.active {
      visibility: visible;
      opacity: 1;
      transition: opacity 0.5s;
      z-index: 10;
    }

    .closeButtonSmall {
      display: none;
      cursor: pointer;

      @media screen and (max-width: 768px) {
        display: flex;
        justify-content: center;
        align-content: center;
      }
    }

    .closeButton {
      position: absolute;
      top: 50px;
      right: 50px;
      cursor: pointer;
      width: 48px;
      height: 48px;

      img {
        max-width: 100%;
        max-height: 100%;
      }

      @media screen and (max-width: 1920px) {
        top: 24px;
        right: 24px;
        width: 24px;
        height: 24px;
      }

      @media screen and (max-width: 1024px) {
        top: 24px;
        right: 24px;
        width: 48px;
        height: 48px;

        img {
          filter: invert(99%) sepia(2%) saturate(584%) hue-rotate(260deg) brightness(115%) contrast(95%);
        }
      }

      @media screen and (max-width: 768px) {
        display: none;
        top: 24px;
        right: 24px;
        width: 48px;
        height: 48px;

        img {
          filter: invert(99%) sepia(2%) saturate(584%) hue-rotate(260deg) brightness(115%) contrast(95%);
        }
      }
      &:hover {
        opacity: 0.8;
      }
    }
    .image {
      width: 33.33vw;
      height: 100%;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
      }

      @media screen and (max-width: 1024px) {
        height: 50vw;
        width: 100%;
        img {
          object-fit: cover;
          object-position: center;
        }
      }

      @media screen and (max-width: 768px) {
        height: 520px;
        width: 100%;
        img {
          object-fit: cover;
          object-position: center;
        }
      }
    }
    .text {
      box-sizing: border-box;
      flex: 1 1 0;
      background: #f9f9f9;
      padding: 225px 140px 129px 140px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      overflow-y: auto;

      .title {
        color: #121212;
        font-family: Roboto;
        font-size: 64px;
        font-style: normal;
        font-weight: 500;
        line-height: 120%;
      }
      .date {
        color: #121212;
        font-family: Roboto;
        font-size: 24px;
        font-style: normal;
        font-weight: 400;
        line-height: 150%; /* 36px */
        margin-bottom: 24px;
      }
      .detail {
        color: #727272;
        font-family: Roboto;
        font-size: 24px;
        font-style: normal;
        font-weight: 400;
        line-height: 150%; /* 36px */
        white-space: pre-wrap;

        .heading {
          display: inline;
          font-size: 20px;
          font-style: normal;
          font-weight: 600;
          line-height: 150%;
        }

        .newsLink {
          text-decoration: underline;
          color: #8c8c8c;
        }
      }

      @media screen and (max-width: 1920px) {
        padding: 94px 40px 40px 40px;
        gap: 8px;
        .title {
          font-size: 36px;
        }
        .date {
          font-size: 16px;
          margin-bottom: 24px;
        }
        .detail {
          font-size: 16px;
        }
      }

      @media screen and (max-width: 1024px) {
        padding: 24px;
        gap: 8px;
        .title {
          color: #121212;
          font-family: "Noto Sans TC";
          font-size: 20px;
          font-style: normal;
          font-weight: 500;
          line-height: 120%;
        }
        .date {
          font-size: 14px;
          margin-bottom: 20px;
        }
        .detail {
          font-size: 16px;
        }
      }

      @media screen and (max-width: 768px) {
        padding: 20px;
        gap: 8px;
        overflow: visible;

        .title {
          font-family: Roboto;
          font-size: 24px;
        }
        .date {
          font-size: 16px;
          margin-bottom: 8px;
        }
        .detail {
          font-size: 16px;
        }
      }
    }
  }

  .news-article {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 4 / 3;
    width: 100%;
    height: 100%;
    background: #f4f4f4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 1s ease;
    z-index: 1;
    cursor: pointer;
    overflow: hidden;

    @media screen and (max-width: 768px) {
      aspect-ratio: 3 / 2;
    }

    .news-image {
      position: relative;
      width: 100%;
      height: 100%;
      background-size: cover;
      background-position: center;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      align-items: flex-start;
      transition: all 0.5s ease;
      padding: 48px 24px;
      gap: 8px;
      box-sizing: border-box;

      @media screen and (max-width: 1920px) {
        padding: 25.6px 12.8px;
      }

      .title {
        color: #f9f9f9;
        font-family: Roboto;
        font-size: 40px;
        font-style: normal;
        font-weight: 600;
        line-height: 120%;
        z-index: 2;

        @media screen and (max-width: 1920px) {
          font-size: 21.333px;
        }

        @media screen and (max-width: 768px) {
          overflow: hidden;
          text-overflow: ellipsis;
          font-family: Roboto;
          font-size: 20px;
          font-style: normal;
          font-weight: 600;
          line-height: 120%;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
        }
      }

      .date {
        color: #f9f9f9;
        font-family: Roboto;
        font-size: 24px;
        font-style: normal;
        font-weight: 400;
        line-height: 150%;
        z-index: 2;

        @media screen and (max-width: 1920px) {
          font-size: 12.8px;
        }

        @media screen and (max-width: 768px) {
          font-size: 16px;
        }
      }

      &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        transition: background-color 0.5s ease;
        z-index: 1;
      }

      &:hover::before {
        background: rgba(0, 0, 0, 0.2);
      }
    }
  }
}
