@media screen and (max-width: 1000px) {
  .pad-x {
    padding-left: 20px;
    padding-right: 20px;
  }
}

html {
  margin-top: 0px !important;
}

.contents {

  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.case-text-title {
  color: #202020;
  font-size: 32px;
  font-weight: bold;
  text-align: center;
}

.case-detail-wrapper {
  background-color: #fff;
}

.case-detail {
  margin: 0 auto;
  max-width: 1080px;
}

.case-detail__back a {
  border: 1px solid #00113f;
  color: #00113f;
  display: inline-block;
  padding: 6px 13px;
  padding-left: 28px;
  position: relative;
  text-decoration: none;
  font-size: 1.4rem;
}

.case-detail__back a:hover {
  opacity: 0.7;
}

.case-detail__back a::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.case-detail__featured img {
  display: block;
  height: auto;
  width: 100%;
}

.case-gallery {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 220px;
  margin-bottom: 20px;
}

.case-gallery--single {
  grid-template-columns: minmax(0, 1fr);
}

.case-gallery__main {
  min-width: 0;
}

.case-gallery__main-image-wrap {
  height: 428px;
  position: relative;
}

.case-gallery__main-image-wrap img {
  display: block;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.3s ease;
  width: 100%;
}

.case-gallery__main-image-wrap img.is-fading {
  opacity: 0.35;
}

.case-gallery__button {
  background-color: #000 !important;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  z-index: 2;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  font-size: 0;
  box-shadow: none;
  opacity: 1 !important;
}

.case-gallery__button--prev {
  left: 12px;
}

.case-gallery__button--next {
  right: 12px;
}

.case-gallery__button-icon {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #fff;
}

.case-gallery__button--prev .case-gallery__button-icon {
  transform: translateX(-1px) rotate(180deg);
}

.case-gallery__button--next .case-gallery__button-icon {
  transform: translateX(1px);
}

.case-gallery__thumbs {
  display: grid;
  gap: 16px;
  height: 428px;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.case-gallery__thumb {
  background: none;
  border: 2px solid transparent;
  box-sizing: border-box;
  cursor: pointer;
  display: block;
  height: 100%;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  width: 100%;
}

.case-gallery__thumb.is-active {
  /*border-color: #d1d1d1;*/
}

.case-gallery__thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.case-detail__header {
  margin-bottom: 10px;
}

.case-detail__title {
  font-size: 3.0rem;
  line-height: 1.4;
  font-weight: bold;
  font-feature-settings: "palt";
  color: #000;


}

.case-detail__summary {
  font-size: 1.6rem;
  line-height: 1.7;
  margin-bottom: 50px;
}

.case-detail__subheading {
  align-items: center;
  display: flex;
  font-size: 24px;
  gap: 1px;
  line-height: 1.4;
  margin-bottom: 5px;
  font-weight: bold;
  color: #000;
}

.case-detail__subheading::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("/cms/wp-content/themes/konmi_child/img/icon-detail-info.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 24px;
}

.case-detail__meta {
  display: grid;
  gap: 6px 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0px;
}


.case-detail__row {
  border-bottom: 1px solid #d9d9d9;
  display: block;
  padding: 20px 0 10px;
}

.case-detail__row dt {
  display: block;
  font-weight: bold;
  margin-bottom: 0px;
  width: auto;
  font-size: 1.8rem;
  margin-left: 10px;
  position: relative;
  color: #000;
}

.case-detail__row dt::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 2px;
  display: block;
  width: 6px;
  height: 80%;
  background-color: var(--color-main);
  display: flex;
  align-items: center;
  bottom: 0;
}

.case-detail__row dd {
  display: block;
  margin: 0;
  width: auto;
}

.case-detail__content {
  line-height: 1.8;
  margin-bottom: 32px;
}

.case-detail__back {
  margin-top: 35px;
}

span.case-detail__term {
  background-color: var(--color-main);
  color: #fff;
  padding: 3px 14px 3px;
}

.case-gallery--single .case-gallery__main-image-wrap {
  height: 520px;
}

/*
button,
.button {
  margin-bottom: 0;
}

button:hover,
.button:hover,
button:focus,
.button:focus,
button:active,
.button:active,
.button:visited,
button:visited {
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  font-size: 0;
  box-shadow: none;
  background-color: #000000 !important;
}
*/
@media screen and (max-width: 640px) {
  .case-gallery {
    grid-template-columns: 1fr;
  }

  .case-gallery__button {
    height: 40px;
    width: 40px;
  }

  .case-gallery__main-image-wrap {
    height: 360px;
  }

  .case-gallery__main-image-wrap img {
    height: 100%;
  }

  .case-gallery__thumbs {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
    overflow: hidden;
  }

  .case-gallery__thumb {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .case-detail__title {
    font-size: 28px;
  }

  .case-detail__summary {
    font-size: 16px;
  }

  .case-detail__subheading {
    font-size: 20px;
  }

  .case-detail__row {
    display: block;
  }

  .case-detail__meta {
    grid-template-columns: 1fr;
  }

  .case-detail__row dt {
    margin-bottom: 8px;
  }
}

@media screen and (max-width: 480px) {
  .case-detail__title {
    font-size: 2.2rem;
  }

  .contents {
    padding-top: 55px;
  }

  span.case-detail__term {
    padding: 3px 12px 3px;
    font-size: 1.3rem;
  }

  .case-gallery__main-image-wrap {
    height: 200px;
  }

  .case-gallery__button {
    height: 30px;
    width: 30px;
  }

  .case-detail__summary {
    font-size: 1.3rem;
  }

  .case-detail__subheading {
    font-size: 18px;
  }

  .case-detail__subheading::before {
    flex: 0 0 18px;
  }

  .case-detail__row dt {
    font-size: 1.6rem;
  }

  .case-detail__row dd {
    font-size: 1.3rem;
  }

  .case-detail__meta {
    gap: 0px 24px;
  }
}

*,
*:before,
*:after {
  box-sizing: initial !important;
}