@charset "UTF-8";

/*====================================
 * Work Page Stylesheet (BEM Refactored & Nested Media Queries)
 * =====================================*/

/*------------------------------------
 * 共通レイアウト & コンテナ
 * ------------------------------------*/
.breadcrumbs .breadcrumbs__list .breadcrumbs__item {
  color: #28343B;
}

.container {
  background: linear-gradient(270deg, #A8D8F6 0%, #6FBEF0 25.48%, #5CB6EE 45.67%, #6FBEF0 60.1%, #A8D8F6 100%);
}

.data__wrap {
  background-color: #FAFDFF;
  @media screen and (min-width: 1024px) {
    background-image: url(../images/data/bg_data.webp);
    background-repeat: repeat-y;
    background-size: 100%;
    background-position: center 300px;
  }
}

.data__contents {
  padding: 24px 0 0 0;
  @media screen and (min-width: 1024px) {
    max-width: 1280px;
    margin-inline: auto;
    padding: 72px 0 0 0;
  }
}

.page-nav {
  display: none;
  @media screen and (min-width: 1024px) {
    display: block;
    padding-bottom: 72px;
    & nav {
      position: sticky;
      top: 100px;
    }
  }
}

.data__section {
  padding-bottom: 32px;
  @media screen and (min-width: 1024px) {
    padding-bottom: 64px;
  }
  &:last-of-type {
    padding-bottom: 0;
  }
}

.data__section-heading {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  color: #35A7EE;
  padding: 0px 10px 8px 15px;
  border-width: 0px 0px 1px 1px;
  border-style: solid;
  border-color: #93D3FB;

  @media screen and (min-width: 768px) {
    font-size: 28px;
    padding: 8px 20px 13px 25px;
  }

  &:has(.data__heading-date) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0 16px;
  }

}

.data__heading-br {
  @media screen and (min-width: 768px) {
    display: none;
  }
}

.data__heading-date {
  font-size: 14px;
  text-wrap: nowrap;
}

.data__card-item {
  padding: 20px 16px 24px;
  border-bottom: solid 2px #E3F4FF;

  &:last-child {
    border-bottom: none;
  }

  @media screen and (min-width: 768px) {
    padding: 24px 32px 64px 32px;
    margin-bottom: 64px;
    border-bottom: solid 3px #E3F4FF;
  }
}

.data__card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 20px;
  line-height: 2.0;
  letter-spacing: 0.05em;
  color: #35A7EE;
  background: url(../images/data/icon_check.svg) no-repeat center left;
  background-size: 17px 17px;
  padding-left: 23px;
  margin-bottom: 10px;

  @media screen and (min-width: 768px) {
    font-size: 24px;
    line-height: 1.6;
    background-size: 21px 21px;
    padding-left: 31px;
  }
}

.data__heading-notes::after {
  content: "※";
  font-size: 15px;
}

.data__card-date {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: #229DEA;
}

.data__card-image {
  width: 100%;
  height: 170px;

  @media screen and (min-width: 768px) {
    height: 200px;
  }

  & img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.data__card-value {
  font-weight: 700;
  color: #229DEA;
  text-align: right;
  letter-spacing: 0;

  @media screen and (min-width: 768px) {
    margin-top: 10px;
  }
}

.data__card-value--ratio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-self: center;
  gap: 0 44px;

  @media screen and (min-width: 768px) {
    gap: 0 30px;
  }
}

.data__card-numb {
  font-family: "Ubuntu Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  font-size: 40px;
  margin: 0 0.05em;
  display: inline-block;
  vertical-align: -2px;
  line-height: 1.2;

  @media screen and (min-width: 768px) {
    font-size: 50px;
  }
}

.data__card-unit--large {
  font-size: 25px;
  margin: 0 0 0 0.05em;
  display: inline-block;
  vertical-align: 1px;
  line-height: 1.2;

  @media screen and (min-width: 768px) {
    font-size: 31px;
  }
}

.data__card-unit {
  font-size: 18px;
  margin: 0 0 0 0.05em;
  display: inline-block;
  line-height: 1.2;
}

.data__card-notes {
  display: flex;
  justify-content: end;
  font-size: 14px;
  color: #229DEA;
  line-height: 1.4;
  margin-top: 4px;

    @media screen and (min-width: 768px) {
      margin-top: 10px;
    }
}

/*------------------------------------
 * グリッドレイアウト定義
 * ------------------------------------*/
.data__card-list {
  @media screen and (min-width: 768px) {
    display: grid;
  }
}

.data__card-list--col3 {
  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);

    & .data__card-item {
      position: relative;

      &::after {
        position: absolute;
        content: "";
        top: 50%;
        right: -1.5px;
        transform: translateY(-50%);
        width: 3px;
        height: 250px;
        background: #E3F4FF;
      }
    }

    & .data__card-item:nth-child(2n)::after {
      display: none;
    }

    & .data__card-item:last-child::after {
      display: none;
    }

    & .data__card-item--wide {
      grid-column: 1 / 3;
      grid-row: 1 / 2;
      width: 75%;
      justify-self: center;
      border-bottom: none; /* ワイド要素は1行のみなのでborderを消す */
      padding-bottom: 32px;
      margin-bottom: 0;
    }

    /* border-bottom の行数に応じたオンオフ制御 (768px以上での2カラム動作時) */
    /* 総数2個以下の場合はすべて消す */
    &:not(:has(.data__card-item:nth-child(3))) .data__card-item {
      border-bottom: none;
      padding-bottom: 32px;
      margin-bottom: 0;
    }
    /* 総数3個以上の場合は3番目（2行目）以降を消す */
    &:has(.data__card-item:nth-child(3)) .data__card-item:nth-child(n+3) {
      border-bottom: none;
      padding-bottom: 32px;
      margin-bottom: 0;
    }
  }

  @media screen and (min-width: 1281px) {
    grid-template-columns: repeat(3, 1fr);

    & .data__card-item::after {
      position: absolute;
      content: "";
      top: 50%;
      right: -1.5px;
      transform: translateY(-50%);
      width: 3px;
      height: 250px;
      background: #E3F4FF;
    }
    & .data__card-item:nth-child(2n)::after {
      display: block;
    }

    & .data__card-item:last-child::after {
      display: block;
    }

    & .data__card-item:nth-child(3n)::after {
      display: none;
    }

    & .data__card-item:last-child::after {
      display: none;
    }

    & .data__card-item--wide {
      grid-column: 1 / 3;
      grid-row: 1 / 2;
      width: 100%;
      border-bottom: none;
      padding-bottom: 32px;
      margin-bottom: 0;
    }

    /* border-bottom の行数に応じたオンオフ制御 (1280px以上での3カラム動作時) */
    /* 総数3個以下の場合はすべて消す */
    &:not(:has(.data__card-item:nth-child(4))) .data__card-item {
      border-bottom: none;
      padding-bottom: 32px;
      margin-bottom: 0;
    }
    /* 総数4個以上の場合は4番目（2行目）以降を消す。かつ、768px指定で消えた3番目のborderと余白を復活させる */
    &:has(.data__card-item:nth-child(4)) {
      & .data__card-item:nth-child(n+4) {
        border-bottom: none;
        padding-bottom: 32px;
        margin-bottom: 0;
      }
      & .data__card-item:nth-child(-n+3) {
        border-bottom: solid 3px #E3F4FF;
        padding-bottom: 64px;
        margin-bottom: 64px;
      }
    }
  }
}

.data__card-list--col2 {
  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);

    & .data__card-item {
      position: relative;

      &::after {
        position: absolute;
        content: "";
        top: 50%;
        right: -1.5px;
        transform: translateY(-50%);
        width: 3px;
        height: 250px;
        background: #E3F4FF;
      }

      &:nth-child(2n)::after,
      &:last-child::after {
        display: none;
      }
    }

    /* border-bottom の行数に応じたオンオフ制御 (768px以上での2カラム動作時) */
    /* 総数2個以下の場合はすべて消す */
    &:not(:has(.data__card-item:nth-child(3))) .data__card-item {
      border-bottom: none;
      padding-bottom: 32px;
      margin-bottom: 0;
    }
    /* 総数3個以上の場合は3番目（2行目）以降を消す */
    &:has(.data__card-item:nth-child(3)) .data__card-item:nth-child(n+3) {
      border-bottom: none;
      padding-bottom: 32px;
      margin-bottom: 0;
    }
  }

  @media screen and (min-width: 1281px) {
    grid-template-columns: repeat(2, 1fr);

    & .data__card-item::after {
      position: absolute;
      content: "";
      top: 50%;
      right: -1.5px;
      transform: translateY(-50%);
      width: 3px;
      height: 250px;
      background: #E3F4FF;
    }

    & .data__card-item:nth-child(2n)::after,
    & .data__card-item:last-child::after {
      display: none;
    }
  }
}

@media screen and (min-width: 1281px) {
  .data__section:has(.data__card-item--wide) .data__section-heading {
    width: calc(100% * 2 / 3);
    box-sizing: border-box;
  }
}
