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

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

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

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

/* カード画像の統一高さ */
.base__content .service-cards .wp-block-image {
  position: relative;
  z-index: 10;
  margin-top: 0;
  margin-bottom: 40px;
  width: 550px;
}

.base__content .service-cards .wp-block-image::after {
  content: "";
  position: absolute;
  display: block;
  top: 24px;
  left: 16px;
  z-index: -1;
  width: 530px;
  height: 374px;
  background-color: #e1e1e1;
}

.base__content .service-cards .wp-block-image img {
  width: 530px;
  height: 380px;
  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;
}


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

.base__content .facility-cards {
  gap: 0;
  margin-top: 40px;
  margin-bottom: 0;
  align-items: stretch;
}

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

/* 2列施設カード（病院・工場）：幅固定 */
.base__content .facility-cards--2col .wp-block-column {
  width: 500px;
}

/* 3列施設カード（教育・公共・官公庁）：幅固定 */
.base__content .facility-cards--3col .wp-block-column {
  width: 333.3px;
}

/* 施設カード内の画像統一高さ（共通） */
.base__content .facility-cards .wp-block-image img {
  width: 100%;
  object-fit: cover;
  display: block;
}

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

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

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

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

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




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

.base__content .solution-cards {
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

/* 行間マージン */
.base__content .solution-cards+.solution-cards {
  margin-top: 20px;
}

/* 各カードにボーダー・背景・パディング */
.base__content .solution-cards .wp-block-column {
  border: 1px solid #cfcccd;
  padding: 40px 24px;
  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: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

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

/* ソリューションカード内テキスト */
.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 {
  border: none;
  background-color: transparent;
  padding: 0;
}


/*------------------------------------------------------------------
  #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 .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;
  }

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

}


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

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

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

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

  /* facility-cards: SP は縦積み */
  .base__content .facility-cards {
    gap: 30px;
  }

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

  /* solution-cards: SP は縦積み */
  .base__content .solution-cards {
    gap: 16px;
  }

  .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;
  }

}