@charset "UTF-8";

/* =====================
  news
===================== */

& article {
  position: relative;
  z-index: 2;
  padding-block-end: 119px;
  margin-inline: auto;

  @media not all and (width >=768px) {
    max-inline-size: 88.5vw;
    padding-block-end: 16.4vw;
  }

  .u-inner {
    @media (width <= 768px) {
      padding-inline: 0;
    }
  }
}

/* =====================
  News List
===================== */
.news-list {
  display: grid;
  margin-block-start: 55px;
  margin-inline: auto;
  background: white;

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

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

    &[hidden] {
      display: none;
    }

    /* ==== summary ==== */
    & summary {
      position: relative;
      display: grid;
      grid-template-columns: auto 1fr auto;
      grid-auto-flow: column;
      gap: 2px 39px;
      align-items: center;
      justify-content: flex-start;
      padding-block: 39px;
      padding-inline: 40px;
      font-size: 20px;
      font-weight: 500;
      cursor: pointer;

      /* ==== h2 ==== */
      & h2 {
        font-size: 16px;
        word-break: break-all;
      }

      @media not all and (width >= 768px) {
        grid-template: auto auto / 1fr auto;
        grid-template-areas:
          'time after'
          'h2 after';
        gap: 0;
        padding-block: calc((100 / 390) * 14.4 * 1vw);
        padding-inline: calc((100 / 390) * 16 * 1vw);
        font-size: calc((100 / 390) * 28 * 1vw);

        & h2 {
          grid-area: h2;

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

        & time {
          grid-area: time;
        }

        &::after {
          grid-area: after;
        }
      }

      & time {
        font-family: var(--title);
        font-size: 16px;
        font-weight: 400;
        color: var(--green);
        translate: 0 5px;

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

      &::after {
        inline-size: 24px;
        aspect-ratio: 1 / 1;
        content: '';
        background: var(--green);
        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;
        transition: clip-path 150ms ease 0s;
        will-change: clip-path;
      }

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

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

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

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

        /* ==== picture ==== */
        .picture {
          display: block flow;
          max-inline-size: 516px;
          margin-block-start: 24px;

          @media (width <= 768px) {
            max-block-size: calc((100 / 390) * 264 * 1vw);
          }
        }
      }
    }
  }

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

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

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

      &::after {
        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;
}
