@charset "utf-8";

body{
  background-color: #F4F6F3;
}

.works-wrap {
  max-width: 1280px;
  width: 89%;
  margin: 150px auto 0;
  display: flex;
  justify-content: space-between;
  color:#333;
}

.works-ttl {
  position: relative;
  line-height: 1;
}
.works-ttl::before {
  content: "";
  position: absolute;
  display: block;
  width: 14px;
  height: 14px;
  left: -25px;
  top: -8px;
  background-color: #03BFB5;
  border-radius: 50%;
}

.works-ttl h2 {
  font-size: clamp(2.75rem, -0.625rem + 7.0313vw, 5rem);
  color: #333333;
  font-weight: 500;
  margin: 0 0 5px 0;
}

.works-ttl p {
  font-size: 18px;
  font-weight: 500;
  color: #333333;
}

.works-category {
  font-size: 18px;
  display: flex;
  margin-top: auto;
  border-bottom: 1px solid #707070;
  line-height: 1;
  position: relative;
}

.works_category_selecter {
  border: none;
  background-color: #F4F6F3;
  outline: none;
  appearance: none;
  font-size: 18px;
}

.triangle{
  width: 100%;
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding-right: 20px;
}
.triangle::after {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 10px;
  background-color: #535353;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: '';
  pointer-events: none;
}

.works-grid {
  display: grid;
  max-width: 1280px;
  width: 89%;
  margin: 77px auto 150px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 45px 58px;
}

.grid-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.grid-item a{
  color: #333;
  text-decoration: none;
  width: 100%;
  min-width: 0;
}
.grid-item a:hover{
  opacity: 0.8;
}

.grid-item p{
  font-size: 18px;
  margin-top: 18px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: keep-all;
  white-space: normal;
  max-width: 100%;
}
.grid-item p:last-of-type{
  font-size: 15px;
  margin-top: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

.grid-item-image{
  width: 100%;
  height: auto;
  min-width: 0;
  max-width: 100%;
  object-fit: cover;
}

@media screen and (max-width: 900px){
  .works-wrap {
    max-width: 1280px;
    margin: 60px auto 0;
    display: block;
    justify-content: space-between;
  }

  .works-ttl {
    position: relative;
    margin: auto;
    width: fit-content;
  }

  .works-ttl h2 {
    font-size: clamp(2.75rem, -0.625rem + 7.0313vw, 5rem);
    color: #333333;
    font-weight: 500;
    margin: 0 0 5px 0;
  }

  .works-ttl p {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
  }

  .works-category {
    font-size: 18px;
    display: block;
    margin-top: 40px;
    border-bottom: none;
    position: relative;
  }
  .works-category::after {
    content: "";
    display: inline-block;
    margin-top: 12px;
    height: 1px;
    width: 100%;
    background-color: #707070;
  }

  .works-grid {
    display: grid;
    max-width: 1280px;
    margin: 40px auto 58px;
    grid-template-columns: minmax(0, 1fr);
    grid-row-gap: 58px;
  }

  .grid-item {
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  .grid-item:nth-of-type(n+6)  {
    display: none;
  }

  .triangle{
    display: inline-flex;
    align-items: center;
    padding-right: 20px;
  }
  .triangle::after {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 10px;
    background-color: #535353;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    content: '';
    pointer-events: none;
  }

}