.mh-ai-case-intro {
  margin-bottom: 2rem;
}

.mh-ai-main-image {
  width: 100%;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.mh-ai-main-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.mh-ai-main-image .wp-element-caption {
  margin-top: 0.55rem;
  text-align: center;
}

.mh-ai-gallery {
  margin-top: 1.25rem;
  margin-bottom: 2rem;
}

.mh-ai-gallery-row {
  gap: 14px !important;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

.mh-ai-gallery-row > .wp-block-column {
  min-width: 0;
}

.mh-ai-gallery-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.mh-ai-gallery-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}

.mh-ai-gallery-image .wp-element-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.5em 0.8em 0.65em;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.76));
  color: #fff;
  font-size: 0.9em;
  line-height: 1.45;
}

.mh-ai-gallery-last {
  width: calc(50% - 7px);
  margin: 0 auto 14px !important;
}

.mh-ai-spec-table {
  margin: 2rem 0;
}

.mh-ai-spec-table td:first-child {
  width: 28%;
  font-weight: 600;
}

.mh-ai-points {
  margin-top: 2rem;
  padding: clamp(24px, 4vw, 48px);
  background: #f4f3ec;
}

.mh-ai-points-title {
  margin-top: 0;
}

.mh-ai-point {
  align-items: center;
  margin-top: 1.75rem;
  margin-bottom: 0;
}

.mh-ai-point .wp-block-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 0;
}

.mh-ai-point .wp-block-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}

.mh-ai-point h3 {
  margin-top: 0;
}

@media (max-width: 781px) {
  .mh-ai-points {
    padding: 24px 18px;
  }

  .mh-ai-point {
    gap: 18px;
  }

  .mh-ai-spec-table td:first-child {
    width: 34%;
  }

  .mh-ai-main-image img {
    aspect-ratio: 4 / 3;
  }

  .mh-ai-gallery-last {
    width: 100%;
  }
}


/* リフォーム専用レイアウト */
.mh-ai-renovation-intro {
  margin-bottom: 2rem;
}

.mh-ai-renovation-pair {
  margin: 1.5rem 0 2.25rem;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid #e1e1df;
  background: #fafaf8;
}

.mh-ai-before-after-columns {
  gap: 18px !important;
  align-items: flex-start;
}

.mh-ai-before-after-label {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid currentColor;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.mh-ai-renovation-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0 !important;
}

.mh-ai-renovation-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}

.mh-ai-renovation-summary {
  margin: 1rem 0 0;
}

.mh-ai-renovation-details {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mh-ai-renovation-text {
  padding: 1.2rem 1.35rem;
  border-left: 4px solid #164d5d;
  background: #f7f7f5;
}

.mh-ai-renovation-text h3 {
  margin-top: 0;
}

.mh-ai-renovation-table {
  margin-top: 2rem;
}

@media (max-width: 781px) {
  .mh-ai-renovation-pair {
    padding: 18px;
  }

  .mh-ai-before-after-columns {
    gap: 16px !important;
  }
}
