@charset "UTF-8";

/* =====================
  News List
===================== */
.news-list {
  display: grid;
  max-inline-size: 1120px;
  padding-block-end: 102px;
  margin-block-start: 95px;
  margin-inline: auto 120px;

  @media only screen and (width <= 768px) {
    padding-block-end: calc((100 / 390) * 102 * 1vw);
    margin-block-start: calc((100 / 390) * 95 * 1vw);
    margin-inline: auto;
  }

  @media not all and (width >= 768px) {
    padding-inline: calc((100 / 390) * 0 * 1vw);
    margin-block-start: calc((100 / 390) * 104 * 1vw);
  }

  /* ==== details ==== */
  & details {
    position: relative;
    display: grid;
    padding-inline: 40px;
    border-block-end: 1px solid var(--gray);

    &[hidden] {
      display: none;
    }

    @media only screen and (width <= 768px) {
      padding-inline: 0;
    }

    /* ==== summary ==== */
    & summary {
      position: relative;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 11px 16px;
      align-items: center;
      justify-content: flex-start;
      padding-block: 37px 31px;
      font-size: 20px;
      font-weight: 500;
      cursor: pointer;

      @media only screen and (width <= 768px) {
        gap: calc((100 / 390) * 11 * 1vw) calc((100 / 390) * 16 * 1vw);
        padding-block: calc((100 / 390) * 37 * 1vw) calc((100 / 390) * 31 * 1vw);
        padding-inline: calc((100 / 390) * 16 * 1vw);
      }

      /* ==== time ==== */
      & time {
        grid-area: 1 / 1 / 2 / 2;
        align-items: center;
        inline-size: fit-content;
        font-family: var(--poppins);
        font-size: 14px;
        font-weight: 400;
        font-feature-settings: 'case' on;

        @media not all and (width >= 768px) {
          font-size: calc((100 / 390) * 14 * 1vw);
          translate: unset;
        }
      }

      /* ==== category ==== */
      .category {
        grid-area: 1 / 2 / 2 / 3;
        inline-size: fit-content;
        padding: 4px 7px 3px;
        font-size: 13px;
        font-feature-settings: 'case' on;
        line-height: 1;
        color: #4f4c49;
        border: 1px solid var(--gray);

        @media only screen and (width <= 768px) {
          padding: calc((100 / 390) * 4 * 1vw) calc((100 / 390) * 7 * 1vw) calc((100 / 390) * 3 * 1vw);
          font-size: calc((100 / 390) * 13 * 1vw);
        }
      }

      /* ==== h2 ==== */
      & h2 {
        grid-area: 2 / 1 / 3 / 3;
        font-size: 20px;
        color: var(--primary);
        word-break: break-all;

        @media only screen and (width <= 768px) {
          padding-inline-end: 14vw;
          font-size: calc((100 / 390) * 20 * 1vw);
        }
      }

      &::after {
        position: absolute;
        inset-block-start: 49%;
        inset-inline-end: 0;
        inline-size: 25.5px;
        aspect-ratio: 1 / 1;
        content: '';
        background: var(--primary);
        clip-path: polygon(45% 0%, 55% 0%, 55% 45%, 100% 45%, 100% 55%, 55% 55%, 55% 100%, 45% 100%, 45% 55%, 0% 55%, 0% 45%, 45% 45%);
        mask-repeat: no-repeat;
        mask-position: center;
        mask-size: contain;
        translate: 0 -50%;
        transition: clip-path 150ms ease 0s;
        will-change: clip-path;
      }

      @media not all and (width >= 768px) {
        &::after {
          inset-inline-end: 4vw;
          inline-size: calc((100 / 390) * 25 * 1vw);
        }
      }
    }

    .container {
      display: grid;
      grid-template-rows: 0fr;
      grid-template-columns: 1fr;
      padding-block-end: 33px;
      padding-inline: 0;
      overflow: hidden;
      font-weight: 350;
      transition: grid-template-rows 250ms ease 0ms;
      animation: none;
      will-change: grid-template-rows;

      @media not all and (width >=768px) {
        padding-block: 0.9vw calc((100 / 390) * 25 * 1vw);
        padding-inline: calc((100 / 390) * 16 * 1vw);
        font-size: calc((100 / 390) * 14 * 1vw);
      }

      .wrap {
        display: grid;
        grid-template-rows: 0fr;
        grid-auto-flow: row;
        overflow: hidden;
        line-height: 1.8;

        @media only screen and (width <= 768px) {
          padding-inline: 0;
          font-size: calc((100 / 390) * 16 * 1vw);
          font-weight: 350;
        }
      }
    }
  }

  /* open */
  & details[open] {
    .container {
      grid-template-rows: 1fr;
    }

    & summary {
      padding-block-end: 13px;

      @media (width <= 768px) {
        padding-block-end: calc((100 / 390) * 11.3 * 1vw);
        padding-inline: calc((100 / 390) * 16 * 1vw);
      }

      &::after {
        inset-block-start: 56%;
        clip-path: polygon(45% 45%, 55% 45%, 55% 45%, 100% 45%, 100% 55%, 55% 55%, 55% 55%, 55% 100%, 55% 55%, 0% 55%, 0% 45%, 45% 45%);
      }
    }
  }
}

.u-link {
  gap: 10px;
  margin-block-start: 59px;
  margin-inline: auto;
  font-size: 16px;

  @media not all and (width >=768px) {
    gap: calc((100 / 390) * 20 * 1vw);
    margin-block-start: calc((100 / 390) * 59 * 1vw);
    font-size: calc((100 / 390) * 30 * 1vw);
  }

  &::after {
    inline-size: 24px;
    rotate: 0 0 1 90deg;
  }

  @media not all and (width >=768px) {
    &::after {
      inline-size: calc((100 / 390) * 50 * 1vw);
    }
  }
}

.more.on {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}
