/*------------------------------------------------------------------
  service-page.css
  事業案内ページ専用スタイル（新規クラスのみ定義）
  ※ style.css にマージする際はセクションコメントを参考に差し込み位置を判断してください
  ※ このファイルを読み込む場合は functions.php に wp_enqueue_style() を追加してください
-------------------------------------------------------------------*/

/*------------------------------------------------------------------
  #h2-center（サービスページ限定：H2 span の display を上書き）
  style.css の inline-flex では <br> が改行として機能しないため、
  このページのみ inline-block に変更してアイコンをインライン配置する
-------------------------------------------------------------------*/

/* service-page.css はサービスページ限定で読み込まれるため、
   同じセレクターで上書きすれば他ページに影響しない */
.page .base__content h2.h2-center span {
  display: block;
  justify-content: unset;
  align-items: unset;
  text-align: center;
}

.page .base__content h2.h2-center~h2.h2-center span {
  margin-top: 160px;
}

.page .base__content h2.h2-center span::before {
  display: inline-block;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}


/*------------------------------------------------------------------
  #service-cards（主要事業カード 2列グリッド）
  対象: .service-cards（wp:columns に付与したカスタムクラス）
-------------------------------------------------------------------*/

.base__content .service-cards {
  gap: 40px;
  margin-top: 60px;
  align-items: stretch;
  /* 左右カードの高さを揃える */
}

/* 行間マージン（同クラスの2つ目以降 = 2行目カード） */
.base__content .service-cards+.service-cards {
  margin-top: 60px;
}

/* カード画像の統一幅 */
.base__content .service-cards .wp-block-image {
  position: relative;
  margin: 0 auto;
  max-width: 550px;
  max-height: 400px;
}

.base__content .service-cards .wp-block-image::after {
  content: "";
  position: absolute;
  display: block;
  top: 24px;
  left: 14px;
  z-index: -1;
  width: calc(100% - 20px);
  height: calc(100% - 8px);
  background-color: #e1e1e1;
}

.base__content .service-cards .wp-block-image img {
  max-width: 530px;
  width: calc(100% - 20px);
  object-fit: cover;
  display: block;
}

/* 画像より下のコンテンツエリアにパディング */
.base__content .service-cards .wp-block-column> :not(.wp-block-image) {
  padding-inline: 10px;
}

.base__content .service-cards .wp-block-buttons {
  margin-top: 20px;
  padding-bottom: 10px;
}

.base__content .service-cards h4 {
  font-size: 24px;
  margin-top: 50px;
  line-height: 1.6;
}


/*------------------------------------------------------------------
  #facility-cards（施設カードグリッド）
  対象: .facility-cards（wp:columns に付与したカスタムクラス）
-------------------------------------------------------------------*/

.base__content .facility-cards {
  margin: 40px auto 0;
  padding: 1px;
  max-width: 1000px;
  /* background-color: #cfcccd; */
  gap: 1px;
}

/* 隣接する行: 上のパディングを省略して境界線を1本に保つ */
.base__content .facility-cards+.facility-cards {
  padding-top: 0;
  margin-top: 0;
}

/* 各施設カードにボーダー・背景・下部余白（ソリューションカードと統一） */
.base__content .facility-cards .wp-block-column {
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px #cfcccd;
  background-color: #ffffff;
  padding-bottom: 24px;
}

/* 施設カード内の画像統一高さ（共通） */
.base__content .facility-cards .wp-block-image {
  margin-top: 0;
  margin-bottom: 0;
  padding: 16px;
  overflow: hidden;
}

.base__content .facility-cards .wp-block-image img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* 2列施設カード（病院・工場）：全体の高さ */
.base__content .facility-cards--2col .wp-block-column {
  min-height: 765px;
}

/* 3列施設カード（教育・公共・官公庁）：全体の高さ */
.base__content .facility-cards--3col .wp-block-column {
  min-height: 425px;
}

/* 2列施設カード（病院・工場）：画像を高めに */
.base__content .facility-cards--2col .wp-block-image img {
  max-height: 330px;
}

/* 3列施設カード（教育・公共・官公庁）：やや低めに */
.base__content .facility-cards--3col .wp-block-image img {
  max-height: 215px;
}

/* 施設カード内コンテンツのパディング（10px → 20px に増加） */
.base__content .facility-cards .wp-block-column> :not(.wp-block-image) {
  padding-inline: 20px;
}

/* 施設カード h4 のマージン調整 */
.base__content .facility-cards h4 {
  margin-top: 0;
  line-height: 1.5;
}

/* h4 の2行目テキスト（brの代替: wp:html内で <span class="h4-note"> を使用） */
.base__content h4 .h4-note {
  display: block;
}

/* 行と行の間のマージン（3列カードの上マージン） */
.base__content .facility-cards--3col {
  margin-top: 0;
}

/* リンクボタンの幅調整 */
.base__content .facility-cards .button-arrow .wp-block-button__link {
  width: 340px;
}

.base__content .facility-cards--2col .wp-block-buttons {
  flex: 1;
  align-items: flex-end;
  margin-bottom: 32px;
}


/*------------------------------------------------------------------
  #solution-cards（課題・ソリューション カードグリッド）
  対象: .solution-cards（wp:columns に付与したカスタムクラス）
-------------------------------------------------------------------*/

.base__content .solution-cards {
  gap: 1px;
  margin: 40px auto 0;
  max-width: 1000px;
  align-items: stretch;
  /* background-color: #cfcccd; */
  padding: 1px;
}

/* 隣接する行: 上のパディングを省略して境界線を1本に保つ */
.base__content .solution-cards+.solution-cards {
  padding-top: 0;
  margin-top: 0;
}

/* 各カードにボーダー・背景・パディング */
.base__content .solution-cards .wp-block-column {
  box-shadow: 0 0 0 1px #cfcccd;
  padding: 32px 24px;
  max-width: 333.3px;
  max-height: 400px;
  background-color: #ffffff;
}

/* アイコン画像サイズ統一 */
.base__content .solution-cards .wp-block-image {
  margin-top: 0;
  margin-bottom: 0;
}

.base__content .solution-cards .wp-block-image img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

/* ソリューションカード内 h4 */
.page .base__content .solution-cards h4 {
  font-size: 21px;
  margin-top: 20px;
  line-height: 1.6;
  text-align: center;
}

/* ソリューションカード内テキスト */
.base__content .solution-cards p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
}

/* 3行目の空プレースホルダー列は非表示 */
.base__content .solution-cards .wp-block-column:empty,
.base__content .solution-cards .solution-cards__placeholder {
  position: relative;
  background-color: #ffffff;
  border: none;
  padding: 0;
}

/* 右・下のcontainer padding（cfcccd）を白で隠す
   左（隣接カードの右ボーダーとなるgap）は隠さない */
.base__content .solution-cards .wp-block-column:empty::after,
.base__content .solution-cards .solution-cards__placeholder::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: -1px;
  left: 0;
  background: #ffffff;
  pointer-events: none;
}


/*------------------------------------------------------------------
  #contact-cta（ContactボックスCTA）
  対象: .contact-cta（wp:group に付与したカスタムクラス）
  ※ ボーダー・角丸・パディングはブロックのインラインスタイルで定義済み
-------------------------------------------------------------------*/

/* Contact見出しの下マージン */
.base__content .contact-cta .h2-center {
  margin-top: 0;
}

/* サブテキストのマージン */
.base__content .contact-cta>p {
  margin-top: 8px;
}

/* ボタン行のギャップと中央揃え */
.base__content .contact-cta .wp-block-buttons {
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.base__content .section-cta {
  margin-top: 100px;
}

.base__content .section-cta .wp-block-button {
  width: 100%;
}

.base__content .section-cta .wp-block-button .wp-block-button__link {
  width: 100%;
}

/* 受付時間テキスト */
.base__content .contact-cta .wp-block-buttons+p {
  margin-top: 16px;
  font-size: 14px;
  color: #666666;
  text-align: center;
}


/*------------------------------------------------------------------
  レスポンシブ（1023px以下）
-------------------------------------------------------------------*/

@media screen and (max-width: 1023px) {

  /* .base__content .service-cards .wp-block-image img {
    height: 210px;
  }

  .base__content .facility-cards--2col .wp-block-image img {
    height: 220px;
  }

  .base__content .facility-cards--3col .wp-block-image img {
    height: 170px;
  } */

  .base__content .solution-cards .wp-block-column {
    padding: 30px 20px;
    max-width: 100%;
    max-height: 500px;
  }

  .page .base__content .solution-cards h4 {
    font-size: 18px;
  }

}


/*------------------------------------------------------------------
  レスポンシブ（767px以下）
-------------------------------------------------------------------*/

@media screen and (max-width: 767px) {


  .page .base__content h2.h2-center span {
    font-size: 34px;
  }

  .page .base__content h2.h2-center span::before {
    width: 28px;
    height: 32px;
  }

  /* service-cards: SP は縦積み（Gutenberg デフォルト挙動） */
  /* facility-cards: SP は縦積み */
  /* solution-cards: SP は縦積み */
  .base__content .facility-cards,
  .base__content .service-cards,
  .base__content .solution-cards {
    gap: 32px;
    margin-bottom: 32px;
  }

  /* .base__content .service-cards .wp-block-image img {
    height: 200px;
  } */

  /* .base__content .facility-cards--2col .wp-block-image img,
  .base__content .facility-cards--3col .wp-block-image img {
    height: 200px;
  } */

  .base__content .solution-cards .wp-block-column {
    padding: 30px 16px;
  }

  .page .base__content .solution-cards h4 {
    font-size: 18px;
  }

  /* contact-cta: ボタン縦積み */
  .base__content .contact-cta .wp-block-buttons {
    flex-direction: column;
    align-items: center;
  }

  .base__content .solution-cards .solution-cards__placeholder {
    box-shadow: none;
  }

}