main#service {
  padding-bottom: var(--page-content-bottom);
}

/* セクション（中央固定） */
.service {
  height: 80vh;
  display: flex;
  align-items: center;
}

/* レイアウト */
.service__inner {
  display: flex;
  gap: 8rem;
  width: 100%;
  align-items: center;
}

/* 左ナビ */
.service__nav {
  width: 35rem;
}

.service__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service__nav li {
  margin-bottom: 2rem;
  cursor: pointer;
  color: #aaa;
  padding-left: 2rem;
  position: relative;
  transition: 0.3s;
}

.service__nav li.active {
  color: #000;
  font-weight: bold;
}

.service__nav li::before {
  content: "";
  width: .8rem;
  height: .8rem;
  background: #ccc;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: .8rem;
}

.service__nav li.active::before {
  background: var(--color-primary);
}

/* 右 */
.service__content {
  position: relative;
  width: 100%;
  height: 40rem;
}

/* コンテンツ */
.content-item {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
  opacity: 0;
}

.service__txt {
  max-width: 60rem;
}

.service__txt h3 {
  background: var(--color-primary);
  color: #fff;
  padding: .8rem 1.6rem;
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 3rem;
  font-weight: bold;
}

.service__txt p {
  max-width: 40rem;
  line-height: 1.8;
  font-size: 1.8rem;
  font-weight: 400;
}

.image img {
  max-width: 43rem;
}

@media (max-width: 1024px) {
  .service__inner {
    gap: 4rem;
  }

  .service__nav {
    width: 28rem;
  }

  .service__content {
    height: 42rem;
  }

  .content-item {
    gap: 3rem;
  }

  .service__txt h3 {
    font-size: 2.4rem;
  }

  .service__txt p {
    font-size: 1.6rem;
  }

  .image img {
    max-width: 36rem;
  }
}

@media (max-width: 768px) {
  main#service {
    padding-bottom: 0;
  }

  .service {
    height: auto;
    display: block;
    padding: 0 0 var(--page-content-bottom);
  }

  .service__inner {
    display: block;
  }

  .service__nav {
    display: none;
  }

  .service__content {
    display: grid;
    gap: 2.4rem;
    height: auto;
  }

  .content-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    padding: 2rem;
    border-radius: 1.6rem;
    background: #fff;
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .08);
    opacity: 1 !important;
    transform: none !important;
  }

  .service__txt {
    max-width: none;
  }

  .service__txt h3 {
    margin-bottom: 1.4rem;
    padding: .7rem 1.2rem;
    font-size: 2rem;
    line-height: 1.45;
  }

  .service__txt p {
    max-width: none;
    font-size: 1.4rem;
    line-height: 1.9;
  }

  .image {
    order: -1;
    width: 100%;
  }

  .image img {
    width: 100%;
    max-width: none;
    height: 24rem;
    object-fit: cover;
    border-radius: 1.2rem;
  }
}

@media (max-width: 430px) {
  .content-item {
    padding: 1.6rem;
  }

  .image img {
    height: 22rem;
  }

  .service__txt h3 {
    font-size: 1.8rem;
  }
}
