/* Consistent case-photo frames and a complete CTA alignment override.
   Reference: Money Forward AI uses one photo ratio per card grid and a
   shared text axis for its copy and 56 px CTA. Existing case photos remain. */
.offline-page .sf-cases-v54 .sf-case-grid {
  align-items: stretch;
}

.offline-page .sf-cases-v54 .sf-case-photo,
.offline-page #case-takasago .sf-case-photo-v58 {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 2.1;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 8px;
}

.offline-page .sf-cases-v54 .sf-case-photo > img,
.offline-page #case-takasago .sf-case-photo-v58 > img {
  display: block;
  position: static;
  width: 100%;
  max-width: 100%;
  height: 100%;
  left: auto;
  top: auto;
  object-fit: cover;
  object-position: center;
}

/* Crop the original lower caption strips; keep the documentary photos intact.
   Caption strips begin at 93% (Onomichi) and 88% (Nagata) of source height. */
.offline-page #case-onomichi .sf-case-photo > img {
  height: 109%;
  object-position: center top;
}

.offline-page #case-suita .sf-case-photo > img {
  height: 102%;
  object-position: center top;
}

.offline-page #case-nagata .sf-case-photo > img {
  height: 116%;
  object-position: center top;
}

.offline-page .sf-cases-v54 .sf-case h3 {
  text-align: center;
  margin: 18px 0 14px;
}

.offline-page .sf-cases-v54 .sf-case h3::after {
  left: 50%;
  transform: translateX(-50%);
}

@media (min-width: 901px) {
  .offline-page .sf-contact-v44 {
    padding: 56px 40px;
    border-radius: 0;
  }

  .offline-page .sf-contact-v44 .sf-contact-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "brand action"
      "title action"
      "description action";
    gap: 12px 56px;
    width: min(1120px, 100%);
    max-width: none;
    margin-inline: auto;
    padding: 0;
    text-align: left;
    align-items: start;
  }

  .offline-page .sf-contact-v44 .sf-contact-brand {
    grid-area: brand;
    margin: 0;
    text-align: left;
    font-size: 20px;
    line-height: 1.3;
  }

  .offline-page .sf-contact-v44 h2 {
    grid-area: title;
    margin: 0;
    text-align: left;
    font-size: 32px;
    line-height: 1.5;
  }

  .offline-page .sf-contact-v44 .sf-contact-description {
    grid-area: description;
    margin: 0;
    text-align: left;
    font-size: 17px;
    line-height: 1.85;
  }

  .offline-page .sf-contact-v44 h2 > span,
  .offline-page .sf-contact-v44 .sf-contact-description > span {
    display: inline;
  }

  .offline-page .sf-contact-v44 .sf-button {
    grid-area: action;
    align-self: center;
    justify-self: end;
    width: 300px;
    max-width: 100%;
    min-height: 60px;
    margin: 0;
    padding: 14px 20px;
    text-align: center;
    font-size: 17px;
    line-height: 1.6;
    white-space: nowrap;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .offline-page .sf-contact-v44 .sf-contact-copy {
    grid-template-columns: minmax(0, 1fr) 276px;
    column-gap: 32px;
  }

  .offline-page .sf-contact-v44 .sf-button {
    width: 276px;
  }
}

@media (max-width: 700px) {
  .offline-page .sf-cases-v54 .sf-case h3 {
    margin-top: 16px;
  }
}

@media (max-width: 900px) {
  .offline-page .sf-contact-v44 {
    width: 100%; margin: 0; min-height: 0; padding: 36px 6% 24px; border-radius: 0;
  }
  .offline-page .sf-contact-v44 .sf-contact-copy {
    display: block; width: 100%; max-width: 560px; margin-inline: auto; padding: 0; text-align: center;
  }
  .offline-page .sf-contact-v44 .sf-contact-brand { margin: 0; line-height: 1.3; }
  .offline-page .sf-contact-v44 h2 {
    margin: 18px 0; font-size: clamp(24px, 6.7vw, 28px); line-height: 1.5; letter-spacing: 0;
  }
  .offline-page .sf-contact-v44 .sf-contact-description {
    max-width: 34em; margin: 0 auto; font-size: 16px; line-height: 1.85;
  }
  .offline-page .sf-contact-v44 .sf-button {
    width: min(280px, 100%); max-width: none; min-width: 0; min-height: 54px;
    margin-top: 24px; padding: 14px 24px; justify-content: center; font-size: 16px; line-height: 1.6;
  }
}
