@charset "UTF-8";

.works {
  padding: 5% 0 15%;

  @media (width <= 767px) {
    padding: 12% 0 30%;
  }

  .tab {
    display: flex;
    flex-wrap: wrap;
    margin: auto;
    justify-content: center;

    label {
      order: -1;
      position: relative;
      padding: 2% 0;
      text-align: center;
      cursor: pointer;
      color: #0F5CA8;
      font-size: 1.8rem;
      font-weight: bold;
      background-color: #FFF;
      border-top: 2px solid #0F5CA8;
      border-right: 2px solid #0F5CA8;
      width: calc(100% / 4 - 2.5%);

      @media (width <= 767px) {
        padding: 5.5% 0;
        font-size: 1.6rem;
        width: calc(100% / 2 - 5%);
      }

      &:first-child {
        border-left: 2px solid #0F5CA8;
      }
      @media (width <= 767px) {
        &:nth-of-type(3) {
          border-left: 2px solid #0F5CA8;
        }
      }
      &:hover,
      &:has(:checked) {
        background-color: #0F5CA8;
        color: #fff;
      }
      input {
        display: none;
      }
      &:has(:checked) + div {
        display: block;
      }
    }
    > div {
      display: none;
      width: 100%;
      padding: 6% 0 8%;

      @media (width <= 767px) {
        padding: 14% 0 10%;
      }
    }
  }
  .tab_content {
    background-color: #F2F2F2;
    border: 2px solid #0F5CA8;

    h3 {
      text-align: center;
      font-size: 3.4rem;
      margin-bottom: 5.5%;

      @media (width <= 767px) {
        font-size: 2.4rem;
        margin-bottom: 10%;
      }
    }
  }
  .works_list.clm3_grid {
    gap: 4.5rem;
    align-items: start;
    width: 90%;
    margin: 0 auto;

    @media (width <= 820px) {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 2.5rem;
    }
    @media (width <= 767px) {
      grid-template-columns: 1fr;
      gap: 2rem;
    }

    .grid_item {
      display: flex;
      flex-direction: column;
      height: 100%;
      filter: drop-shadow(0px 0px 10px #ccc);

      h4 {
        text-align: center;
        font-size: 2.6rem;
        font-weight: bold;
        line-height: 1.5;
        color: #FFF;
        padding: 6% 2%;
        background-color: #0F5CA8;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        @media (width <= 1024px) {
          font-size: 1.8rem;
          padding: 4% 2%;
        }
      }
      img {
        width: 100%;
      }
      .txt_box {
        background-color: #FFF;
        padding: 7% 8% 9%;
        display: flex;
        flex: 1;
        flex-direction: column;
        justify-content: flex-start;

        .cmn_txt {
          text-indent: -0.5em;
          padding-left: 0.5em;
          
          &::before {
            content: "・";
            display: inline-block;
          }
        }
      }
    }
  }
}