@import url(lower.css);

main {
  background-color: var(--bg-c);
}
.main {
  h2 {
    text-align: center;
    word-break: keep-all;
    font-size: max(1.5vw, 14.1px);
    color: var(--primary-c);
    margin-bottom: 1rem;
    line-height: 1.8;
    margin-bottom: max(5vw, 50px);
    font-weight: 500;
  }
  ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: max(5vw, 30px) max(3%, 10px);
    counter-reset: num 0;
  }
  li {
    counter-increment: num 1;
    img {
      width: 100%;
      aspect-ratio: 8/5;
      object-fit: cover;
      border-radius: 1em;
    }
    > h3 {
      font-size: max(1.5vw, 13.6px);
      font-weight: 500;
      color: var(--primary-c);
      margin-block: 1rem 0.6rem;
      word-break: keep-all;
      span {
        font-size: max(0.8em, 12px);
      }
      &::before {
        content: "service." counter(num);
        display: block;
        font-size: 0.9rem;
        font-weight: 300;
        margin-bottom: 0.2em;
      }
    }
    p {
      line-height: 1.8;
    }
  }
  .notes {
    grid-column: span 2;
    h3 {
      font-size: max(1.5vw, 13.8px);
      font-weight: 500;
      color: var(--primary-c);
      margin-bottom: 4px;
    }
    div {
      position: relative;
      padding-left: 1.6rem;
      padding-top: 0.4em;
      ~ div {
        margin-top: 2em;
      }
      &::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 3px;
        background-color: var(--primary-c);
      }
    }
  }
}

@media (width < 1024px) {
  .main {
    ul {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}
@media (width < 768px) {
  .main {
    padding-top: 0;
    li {
      &::before {
        content: "service." counter(num);
        display: block;
        font-size: 0.9rem;
        font-weight: 300;
        margin-bottom: 0.2em;
        text-align: center;
        color: var(--primary-c);
      }

      img {
        border-radius: 8px;
      }
      > h3 {
        text-align: center;
        &::before {
          display: none;
        }
        .pc {
          display: none;
        }
        span {
          font-size: 10.6px;
        }
      }
      p {
        font-size: 11px;
      }
    }
    .notes {
      &::before {
        display: none;
      }
      div {
        padding-left: 1rem;
        padding-top: 2px;
      }
      p {
        text-box: trim-end;
      }
    }
  }
}
