.page-title-banner--case-study {
  background-position: center 80%;
}

.page-title-banner--case-study .page-title-banner__visual-label {
  top: calc(50% - (var(--header-h, 110px) / 2) - 10px);
  font-weight: 900 !important;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 0.55px currentColor;
  text-shadow:
    0.3px 0 0 currentColor,
    -0.3px 0 0 currentColor,
    0 0.3px 0 currentColor,
    0 -0.3px 0 currentColor,
    0 2px 8px rgba(0, 0, 0, 0.38);
}

.page-article--with-title-banner .page-title-banner--case-study {
  height: calc(var(--header-h, 110px) + 300px);
}

.page-article--with-title-banner .page-title-banner--case-study .page-title-banner__inner {
  height: 300px;
}

.page-title-banner--case-study .page-title-banner__visual-en {
  left: 50%;
  right: auto;
  width: min(1160px, calc(100% - 48px));
  max-width: calc(100% - 48px);
  bottom: 0;
  transform: translateX(-50%);
  text-align: right;
  box-sizing: border-box;
}

.page-title-banner--case-study .page-title-banner__visual-en--image {
  justify-content: flex-end;
}

.case-study-lead {
  padding: 90px 0 66px;
  background: #dbebf1;
  text-align: center;
}

.case-study-lead h2 {
  margin: 0 0 38px;
  color: #111111;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.case-study-lead p {
  margin: 0;
  color: #111111;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.page-article--case-study .page-content .case-study-lead h2,
.page-article--case-study .page-content .case-study-lead p {
  color: #000000;
}

.page-article--case-study .page-content .case-study-lead p {
  font-weight: 400;
}

.case-study-list {
  padding: 110px 0 124px;
  background: #ffffff;
}

.case-study-grid {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  border-left: 3px solid #0079c4;
  border-right: 3px solid #0079c4;
}

.case-study-grid::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #0079c4;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.case-study-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 549px;
  padding: 62px 28px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #0079c4;
  text-align: center;
}

.case-study-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 8px;
  background: #0079c4;
}

.case-study-card--white {
  background: #ffffff;
}

.case-study-card--tint {
  background: #dbebf1;
}

.case-study-card h3 {
  min-height: 76px;
  margin: 0 0 40px;
  color: #0079c4;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.case-study-card__image {
  width: 356px;
  max-width: 100%;
  height: 250px;
  margin: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-study-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  border: 1px solid #9e9e9e;
}

.case-study-card__image span {
  display: block;
  width: 356px;
  max-width: 100%;
  height: 250px;
  background: #bfbfbf;
}

.case-study-card .exhibition-blue-button {
  min-width: 181px;
  width: 181px;
  height: 45px;
  padding: 0 24px;
  background: #0079c4;
  margin-top: 0;
  font-size: 19px;
}

.page-article--case-study .page-content .case-study-card h3 {
  color: #0079c4 !important;
  -webkit-text-fill-color: #0079c4 !important;
  font-size: 30px;
  font-weight: 900;
}

@media (max-width: 1023px) {
  .case-study-list {
    padding-top: 70px;
    padding-bottom: 80px;
  }

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

  .case-study-grid::after {
    content: none;
  }

  .case-study-card:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .case-study-grid {
    width: min(100% - 28px, 1160px);
  }

  .case-study-lead {
    padding: 58px 0 62px;
  }

  .case-study-lead h2 {
    margin-bottom: 28px;
    font-size: 25px;
  }

  .case-study-lead p {
    font-size: 14px;
    line-height: 1.85;
  }

  .page-title-banner--case-study .page-title-banner__visual-en {
    right: auto;
    width: min(100% - 28px, 1160px);
    max-width: calc(100% - 28px);
    bottom: 0;
  }

  .case-study-card {
    min-height: auto;
    padding: 46px 26px 42px;
  }

  .case-study-card h3 {
    min-height: auto;
    margin-bottom: 34px;
    font-size: 23px;
  }

  .page-article--case-study .page-content .case-study-card h3 {
    min-height: auto;
    font-size: 23px;
  }

  .case-study-card__image {
    width: min(100%, 356px);
    height: auto;
    aspect-ratio: 356 / 250;
    margin-bottom: 34px;
  }

  .case-study-card__image span {
    width: 100%;
    height: 100%;
  }
}

/* Header menu hero baseline: match /products/. */
.page-article--with-title-banner .page-title-banner--case-study {
  width: calc(100vw - var(--sbw, 0px)) !important;
  height: 385px !important;
  min-height: 385px !important;
  margin-top: var(--header-h, 110px) !important;
  margin-left: calc(50% - (50vw - (var(--sbw, 0px) / 2))) !important;
  margin-right: calc(50% - (50vw - (var(--sbw, 0px) / 2))) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.page-article--with-title-banner .page-title-banner--case-study .page-title-banner__inner,
.page-article--with-title-banner .page-title-banner--case-study .page-title-banner__title {
  height: 385px !important;
  min-height: 385px !important;
}

.page-title-banner--case-study .page-title-banner__visual-label {
  top: 45.5% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-size: 36px !important;
  line-height: 1.2 !important;
}

.page-title-banner--case-study .page-title-banner__visual-en {
  left: auto !important;
  right: max(40px, calc(((100vw - var(--sbw, 0px)) - 1160px) / 2)) !important;
  bottom: 0 !important;
  transform: translateY(25%) !important;
  width: auto !important;
  max-width: calc(100% - 80px) !important;
  text-align: right !important;
}

@media (max-width: 1023px) {
  .page-article--with-title-banner .page-title-banner--case-study,
  .page-article--with-title-banner .page-title-banner--case-study .page-title-banner__inner,
  .page-article--with-title-banner .page-title-banner--case-study .page-title-banner__title {
    height: 170px !important;
    min-height: 170px !important;
  }

  .page-title-banner--case-study .page-title-banner__visual-label {
    font-size: 26px !important;
  }

  .page-title-banner--case-study .page-title-banner__visual-en {
    right: 20px !important;
    max-width: calc(100% - 40px) !important;
  }
}

/* Case study hero title: match company overview typography. */
.page-title-banner--case-study .page-title-banner__visual-label {
  color: #fff !important;
  font-family: "Noto Sans CJK JP", "Noto Sans JP", sans-serif !important;
  font-size: 35px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.06em !important;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.75));
}

/* Case study hero title: strictly match /aboutus/ title style and center. */
.page-title-banner--case-study .page-title-banner__visual-label {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 2 !important;
  display: block !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  color: #fff !important;
  font-family: "Noto Sans CJK JP", "Noto Sans JP", sans-serif !important;
  font-size: 35px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.06em !important;
  text-align: center !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.75)) !important;
  white-space: nowrap !important;
  pointer-events: none;
}

/* Case study hero title: final lock to the /aboutus/ title appearance. */
.page-article--with-title-banner .page-title-banner--case-study .page-title-banner__visual-label {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 2 !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) !important;
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  font-family: "Noto Sans CJK JP", "Noto Sans JP", sans-serif !important;
  font-size: 35px !important;
  font-weight: 800 !important;
  font-style: normal !important;
  font-variation-settings: "wght" 800 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.06em !important;
  text-align: center !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.75)) !important;
  white-space: nowrap !important;
  pointer-events: none;
}

/* Case study body typography. */
.page-article--case-study .page-content .case-study-lead h2 {
  margin: 0 0 38px !important;
  color: #000000 !important;
  font-family: "Noto Sans CJK JP", "Noto Sans JP", sans-serif !important;
  font-size: 30px !important;
  font-weight: 800 !important;
  font-variation-settings: "wght" 800 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.06em !important;
  text-align: center !important;
}

.page-article--case-study .page-content .case-study-lead p {
  max-width: 960px !important;
  margin: 0 auto !important;
  color: #000000 !important;
  font-family: "Noto Sans CJK JP", "Noto Sans JP", sans-serif !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  font-variation-settings: "wght" 400 !important;
  line-height: 37px !important;
  letter-spacing: 0.06em !important;
  text-align: center !important;
}

.page-article--case-study .page-content .case-study-card h3 {
  max-width: 100% !important;
  min-height: 76px !important;
  margin: 0 0 40px !important;
  color: #0079c4 !important;
  -webkit-text-fill-color: #0079c4 !important;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  font-variation-settings: "wght" 900 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: keep-all !important;
}

.page-article--case-study .page-content .case-study-card .exhibition-blue-button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 134px !important;
  min-width: 134px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #0079c4 !important;
  color: #ffffff !important;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  font-variation-settings: "wght" 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  text-align: center !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .page-article--case-study .page-content .case-study-lead h2 {
    font-size: 26px !important;
  }

  .page-article--case-study .page-content .case-study-lead p {
    padding: 0 16px !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

  .page-article--case-study .page-content .case-study-card h3 {
    min-height: auto !important;
    font-size: 21px !important;
    line-height: 1.5 !important;
  }

  .page-article--case-study .page-content .case-study-card .exhibition-blue-button {
    width: 128px !important;
    min-width: 128px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 15px !important;
  }
}

/* SP case study lead refinements. */
@media (max-width: 880px) {
  .page-article--case-study .page-content .case-study-lead p {
    max-width: min(calc(100% - 32px), 680px) !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.82 !important;
  }
}

/* JP SP only: alternate case-study plant card backgrounds on the mobile stack. */
@media (max-width: 880px) {
  body.page-id-381:not(.language-page-body--en):not(.language-page-body--zh) .page-article--case-study .page-content .case-study-grid .case-study-card:nth-child(3) {
    background: #ffffff !important;
  }

  body.page-id-381:not(.language-page-body--en):not(.language-page-body--zh) .page-article--case-study .page-content .case-study-grid .case-study-card:nth-child(4) {
    background: #dbebf1 !important;
  }
}

/* Page 2 redline: cut the empty right column on the last desktop row. */
@media (min-width: 1024px) {
  .page-article--case-study .page-content .case-study-grid {
    border-right: 0 !important;
  }

  .page-article--case-study .page-content .case-study-grid::after {
    bottom: 549px !important;
  }

  .page-article--case-study .page-content .case-study-card:nth-child(even),
  .page-article--case-study .page-content .case-study-card:last-child {
    border-right: 3px solid #0079c4;
  }
}

/* EN SP: keep the visual title inside the hero. */
@media (max-width: 880px) {
  body.language-page-body--en .page-article--case-study .page-title-banner--case-study .page-title-banner__visual-label {
    width: min(calc(100% - 32px), 360px) !important;
    max-width: calc(100% - 32px) !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-size: clamp(24px, 7vw, 28px) !important;
    line-height: 1.2 !important;
    letter-spacing: 0.03em !important;
  }
}

/* JP SP only: replace the case study hero image. */
@media (max-width: 880px) {
  body.page-id-381:not(.language-page-body--en):not(.language-page-body--zh) .page-title-banner--case-study {
    background-image: url("../../img/exhibition-260618/case-study-hero-sp-20260623.jpg") !important;
    background-position: center center !important;
    background-size: cover !important;
  }
}

/* SP only: align hero height to /products/ and use the JP hero image across languages. */
@media (max-width: 880px) {
  body.page-id-381 .page-article--with-title-banner .page-title-banner--case-study,
  body.page-id-381 .page-article--with-title-banner .page-title-banner--case-study .page-title-banner__inner,
  body.page-id-381 .page-article--with-title-banner .page-title-banner--case-study .page-title-banner__title {
    height: 170px !important;
    min-height: 170px !important;
  }

  body.page-id-381 .page-title-banner--case-study {
    background-image: url("../../img/exhibition-260618/case-study-hero-sp-20260623.jpg") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }
}

/* SP all languages: unify the post-hero block background. */
@media (max-width: 880px) {
  body.page-id-381 .page-article--case-study .page-content .case-study-lead {
    background: #d9ebf4 !important;
    background-color: #d9ebf4 !important;
  }
}

/* SP all languages: match the post-hero lead font sizes to /projects/. */
@media (max-width: 880px) {
  body.page-id-381 .page-article--case-study .page-content .case-study-lead h2 {
    font-size: 30px !important;
  }

  body.page-id-381 .page-article--case-study .page-content .case-study-lead p {
    font-size: 17px !important;
  }
}

/* JP SP only: match the case study hero title size to the company overview hero. */
@media (max-width: 880px) {
  body:not(.language-page-body):not(.language-page-body--en):not(.language-page-body--zh).page-id-381 .page-title-banner--case-study .page-title-banner__visual-label {
    font-size: clamp(24px, 6vw, 35px) !important;
  }
}

/* JP SP only: split the case study lead heading into the requested two lines. */
@media (max-width: 880px) {
  body:not(.language-page-body):not(.language-page-body--en):not(.language-page-body--zh).page-id-381 .page-article--case-study .page-content .case-study-lead h2#case-study-lead-title {
    font-size: 0 !important;
    line-height: 0 !important;
    letter-spacing: 0 !important;
  }

  body:not(.language-page-body):not(.language-page-body--en):not(.language-page-body--zh).page-id-381 .page-article--case-study .page-content .case-study-lead h2#case-study-lead-title::before {
    content: "導入事例を\Aごらんいただけます";
    display: block !important;
    color: #000000 !important;
    font-family: "Noto Sans CJK JP", "Noto Sans JP", sans-serif !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.04em !important;
    text-align: center !important;
    white-space: pre-line !important;
  }
}

/* JP SP only: reduce the side blue vertical rules by 10%. */
@media (max-width: 880px) {
  body:not(.language-page-body):not(.language-page-body--en):not(.language-page-body--zh).page-id-381 .page-article--case-study .page-content .case-study-grid {
    border-left-width: 2.7px !important;
    border-right-width: 2.7px !important;
  }
}

/* JP SP only: reduce the post-hero h2 heading size by 30%. */
@media (max-width: 880px) {
  body:not(.language-page-body):not(.language-page-body--en):not(.language-page-body--zh).page-id-381 .page-article--case-study .page-content .case-study-lead h2#case-study-lead-title::before {
    font-size: 21px !important;
  }
}

/* JP SP only: set the case study lead copy to the requested body size and weight. */
@media (max-width: 880px) {
  body:not(.language-page-body):not(.language-page-body--en):not(.language-page-body--zh).page-id-381 .page-article--case-study .page-content .case-study-lead p {
    font-size: 15px !important;
    font-weight: 400 !important;
    font-variation-settings: "wght" 400 !important;
  }
}
