/* 共通フッター */

/* ==========================================
 * フッター連絡先ブロック
 * ========================================== */
.senga-footer-contact {
  background-color: #1a2933 !important; /* 画像に基づいた濃紺色 */
  color: #fff !important;
  padding: 60px 5% !important;
  position: relative;
}

/* 左右に分かれる上部レイアウト */
.senga-footer-contact .wp-block-columns {
  align-items: flex-start !important;
  margin-bottom: 50px !important;
}

/* 左カラム（ロゴ側） */
/* 左カラム（ロゴ側）の調整 */
.senga-footer-contact .wp-block-column:nth-child(1) {
  text-align: left !important;
}

/* ロゴ画像自体のマージンを制御 */
.senga-footer-contact .wp-block-column:nth-child(1) .wp-block-image {
  margin-bottom: 5px !important; /* ここで間隔をギュッと狭くします */
}

.senga-footer-contact .wp-block-column:nth-child(1) img {
  max-width: 60px; /* 必要に応じてロゴサイズも調整 */
  height: auto;
}

/* 左カラム内のテキストサイズ設定 */
.senga-footer-contact .wp-block-column:nth-child(1) p,
.senga-footer-contact .wp-block-column:nth-child(1) .wp-block-heading {
  font-size: 13px !important; /* px指定で固定 */
  margin-top: 0 !important;
  line-height: 1.4 !important;
}

/* おくやみ撰雅ロゴ */
.senga-footer-contact .wp-block-column:nth-child(1) .senga-logo {
  font-family:
    "Sawarabi Mincho", "YuMincho", "Yu Mincho", "MS Mincho", serif !important; /* 明朝体指定 */
  font-size: 24px !important; /* 大きさは適宜調整してください */
  font-weight: 500 !important;
  margin-top: 0 !important;
  letter-spacing: 0.1em !important; /* 文字間を少し開けると上品になります */
}

/* 右カラム（会社情報側） */
/* 右カラム（会社情報側）：ブロックを右に寄せ、テキストは左揃え */
.senga-footer-contact .wp-block-column:nth-child(2) {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important; /* ブロック全体を右端に寄せる */
  text-align: left !important; /* ブロック内のテキスト行は左揃えにする */
  font-size: 0.9rem;
  line-height: 1.8;
}

/* 右カラム内のテキスト要素（pタグ等）の幅を自動にして右寄せを確定させる */
.senga-footer-contact .wp-block-column:nth-child(2) > * {
  width: fit-content !important; /* 中身の文字量に合わせた幅にする */
  margin-left: auto !important; /* 左側に余白を作って右に押し出す */
  margin-right: 0 !important;
}

/* スマホ表示の時は中央揃えに戻す */
@media (max-width: 767px) {
  /* 左カラム全体を中央揃えにする */
  /* 1. 左カラム下の余白を狭くする（30px → 10px等へ変更） */
  .senga-footer-contact .wp-block-column:nth-child(1) {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 10px !important; /* ここを小さくしました */
  }

  /* 2. カラムを包む親要素（Columns）自体の隙間もリセット */
  .senga-footer-contact .wp-block-columns {
    gap: 0 !important; /* カラム間の自動余白をゼロに */
    margin-bottom: 20px !important; /* 右カラムからさらに下の要素（ボタン等）への間隔 */
  }

  /* ロゴ画像のマージンをリセットして中央配置を確実にする */
  .senga-footer-contact .wp-block-column:nth-child(1) .wp-block-image {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 5px !important; /* 下のテキストとの間隔 */
  }

  /* キャッチコピーや見出しの横幅を100%にして中央寄せを反映 */
  .senga-footer-contact .wp-block-column:nth-child(1) p,
  .senga-footer-contact .wp-block-column:nth-child(1) h2.wp-block-heading {
    width: 100% !important;
    text-align: center !important;
  }

  /* 3. 右カラム自体のマージンも調整 */
  .senga-footer-contact .wp-block-column:nth-child(2) {
    margin-top: 0 !important; /* 上との隙間を消す */
    align-items: center !important;
    text-align: center !important;
  }
  .senga-footer-contact .wp-block-column:nth-child(2) > * {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ==========================================
 * ボタン設定
 * ========================================== */
/* --- 全ボタン共通：背景白・文字濃紺 --- */
.senga-footer-contact
  .wp-block-snow-monkey-blocks-buttons
  .wp-block-snow-monkey-blocks-btn
  a.smb-btn {
  background-color: #ffffff !important;
  color: #1a2933 !important;
  border: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease !important;
}

/* --- LINEボタン（3つ目）だけ緑色にする --- */
/* buttonsコンテナの中にある 3番目の btn 要素の中の aタグ を指定 */
.senga-footer-contact
  .wp-block-snow-monkey-blocks-buttons
  .wp-block-snow-monkey-blocks-btn:nth-child(3)
  a.smb-btn {
  background-color: #06c755 !important;
  color: #ffffff !important;
}

/* LINEボタンのホバー時 */
.senga-footer-contact
  .wp-block-snow-monkey-blocks-buttons
  .wp-block-snow-monkey-blocks-btn:nth-child(3)
  a.smb-btn:hover {
  background-color: #05b34c !important;
  opacity: 0.9 !important;
}

/* --- 白ボタンのホバー時（1つ目と2つ目） --- */
.senga-footer-contact
  .wp-block-snow-monkey-blocks-buttons
  .wp-block-snow-monkey-blocks-btn:nth-child(-n + 2)
  a.smb-btn:hover {
  background-color: #f0f0f0 !important;
  opacity: 0.9 !important;
}

/* ==========================================
 * 背景の透かし文字装飾（OKUYAMI SENGA）
 * ========================================== */
.senga-footer-contact {
  position: relative; /* 子要素（透かし文字）の基準点 */
  overflow: hidden; /* 文字がはみ出してもスクロールバーを出さない */
}

.senga-footer-contact::after {
  content: "OKUYAMI SENGA"; /* 表示するテキスト */
  position: absolute;
  bottom: -10px; /* 下端からの位置 */
  left: 50%;
  transform: translateX(-50%); /* 中央揃え */

  /* フォント設定 */
  font-family: "Sawarabi Mincho", serif; /* セリフ体で高級感を出す */
  font-size: 150px; /* 画面幅に合わせて巨大に表示 */
  font-weight: bold;
  white-space: nowrap; /* 改行させない */

  /* 色と透過（ここが肝心） */
  color: rgba(255, 255, 255, 0.05); /* 白を5%だけ透過させてうっすら見せる */

  /* 重なり順：一番背後へ */
  z-index: 0;
  pointer-events: none; /* テキストがボタン等のクリックを邪魔しないようにする */
}

/* 文字の上にコンテンツが来るように調整 */
.senga-footer-contact .wp-block-columns,
.senga-footer-contact .wp-block-paragraph,
.senga-footer-contact .wp-block-snow-monkey-blocks-buttons {
  position: relative;
  z-index: 1;
}

/* スマホ表示では文字サイズを調整 */
@media (max-width: 767px) {
  .senga-footer-contact::after {
    font-size: 60px; /* スマホで見ても違和感のないサイズに縮小 */
    bottom: 10px;
  }
}
