.p-works-page {
  background: #fff;
}

.p-works-page .l-container {
  max-width: 1240px;
}

.p-works-hero {
  --sub-hero-image: url("../images/works-hero.jpg");
}

.p-works-cases {
  padding: 95px 0 150px;
}

.p-work-case {
  scroll-margin-top: 120px;
}

.p-work-case + .p-work-case {
  margin-top: 92px;
}

.p-work-case__bar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 94px;
  border-radius: 10px;
  background: #2d6e8f;
  padding: 0 30px;
}

.p-work-case__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 163px;
  height: 51px;
  border-radius: 8px;
  background: #fff;
  color: #2d6e8f;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.p-work-case__bar h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 0 39px;
}

.p-work-case__summary {
  display: grid;
  grid-template-columns: 463px minmax(0, 684px);
  gap: 53px;
  align-items: start;
  margin-top: 51px;
}

.p-work-case__summary figure {
  width: 463px;
  height: 308px;
  overflow: hidden;
  border-radius: 10px;
  margin: 0;
}

.p-work-case__summary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-work-case__summary h3 {
  position: relative;
  display: flex;
  align-items: center;
  color: #2d6e8f;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  min-height: 53px;
  margin: 5px 0 24px;
  padding-left: 69px;
}

.p-work-case__summary h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 53px;
  background: url("../images/works-writing-icon.svg") center / contain no-repeat;
}

.p-work-case__summary p {
  color: #000;
  font-size: 18px;
  line-height: 28px;
  margin: 0;
}

.p-work-case__steps {
  display: grid;
  grid-template-columns: 362px 363px 362px;
  gap: 56px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.p-work-case__steps li {
  position: relative;
  min-height: 373px;
  border: 1px solid #165e83;
  border-radius: 10px;
  padding: 30px 31px 28px;
  color: #000;
}

.p-work-case__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -51px;
  top: 164px;
  width: 44px;
  height: 44px;
  background: url("../images/works-step-arrow.svg") center / contain no-repeat;
  transform: rotate(90deg);
}

.p-work-case__steps span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 143px;
  height: 56px;
  margin: 0 auto 13px;
  border-radius: 5px;
  background: rgba(45, 110, 143, 0.07);
  color: #005f7b;
  font-size: 24px;
  font-weight: 700;
}

.p-work-case__steps h3 {
  color: #005f7b;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  line-height: 1.45;
  margin: 0 0 18px;
}

.p-work-case__steps p {
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}

.p-works-contact {
  position: relative;
  min-height: 482px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}

.p-works-contact__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("../images/works-contact-bg.png") center / cover no-repeat;
  z-index: 0;
}

.p-works-contact__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
}

.p-works-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 262px;
  height: 77px;
  border-radius: 5px;
  background: #fff;
  color: #005f7b;
  font-family: "Noto Serif JP", serif;
  font-size: 24px;
}

@media (max-width: 1023.98px) {
  .p-work-case__summary {
    grid-template-columns: 42% minmax(0, 1fr);
    gap: 36px;
  }

  .p-work-case__summary figure {
    width: 100%;
  }

  .p-work-case__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .p-work-case__steps li:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .p-works-hero {
    --sub-hero-sp-image-right: -250px;
    --sub-hero-sp-panel-left: -250px;
  }

  .p-works-cases {
    padding: 48px 0 64px;
  }

  .p-work-case {
    scroll-margin-top: 88px;
  }

  .p-work-case + .p-work-case {
    margin-top: 56px;
  }

  .p-work-case__bar {
    min-height: auto;
    display: block;
    padding: 18px 20px 22px;
  }

  .p-work-case__number {
    width: 132px;
    height: 44px;
    font-size: 18px;
    margin-bottom: 14px;
  }

  .p-work-case__bar h2 {
    font-size: 21px;
    margin: 0;
  }

  .p-work-case__summary {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
  }

  .p-work-case__summary figure {
    height: auto;
    aspect-ratio: 463 / 308;
  }

  .p-work-case__summary h3 {
    font-size: 22px;
    margin-top: 0;
  }

  .p-work-case__summary p {
    font-size: 16px;
    line-height: 1.8;
  }

  .p-work-case__steps {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
  }

  .p-work-case__steps li {
    min-height: auto;
    padding: 24px 22px;
  }

  .p-works-contact {
    min-height: 360px;
  }

  .p-works-contact a {
    width: 220px;
    height: 64px;
  }
}
