/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Theme URI: https://example.com
Description: Child theme for Twenty Twenty-Five
Version: 1.0
*/


/* =========================
   金色の帯：文字が「上にはみ出す」版
   ========================= */

/* 見出し本体 */
.wp-block-heading.gold-title{
  position: relative;
  display: inline-block;
  padding: 0 0.6em;
  line-height: 1.05;
  z-index: 1;
  overflow: visible; /* ← 念のため追加 */
}

/* 金色の帯（下寄りに敷く＝文字が上に出て見える） */
.wp-block-heading.gold-title::before{
  content: "";
  position: absolute;

  left: 50%;
  top: 40%;                    /* ★ここを下げるほど「上にはみ出す」 */
  transform: translateX(-50%); /* Y方向は動かさない */

  width: min(80vw, 1100px);    /* 帯の長さは今のままOK */
  height: 1.4em;

  background: linear-gradient(
    to right,
    #D9BF70 0%,
    #D9BF70 55%,
    rgba(217,191,112,0) 100%
  );

  z-index: -1;
  pointer-events: none;
}




/* ========================================
   ヘッダー下の余白を完全に削除
   ======================================== */

/* メインコンテンツエリアの上部パディングを削除 */
.wp-block-group.alignfull.has-global-padding.is-layout-constrained {
  padding-top: 0 !important;
}

/* すべてのグループブロックの上部余白を削除 */
.wp-site-blocks > .wp-block-group:first-child,
.entry-content > .wp-block-group:first-child {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ヘッダー直後の要素の余白を削除 */
header + * {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* グローバルパディングのリセット */
.has-global-padding {
  padding-top: 0 !important;
}

/* ========================================
   ボタンとメニューの間隔を調整
   ======================================== */

/* ナビゲーションとボタンの間隔 */
header .wp-block-navigation {
  margin-right: 20px !important;
}

/* ボタンの左側に余白 */
header .wp-block-button {
  margin-left: 25px !important;
}

/* ナビゲーション全体の調整 */
header nav,
header .wp-block-navigation__container {
  gap: 25px !important;
}

/* ボタンを確実に分離 */
header .wp-block-button::before {
  content: "";
  display: inline-block;
  width: 15px;
}

/* ========================================
   ボタンのデザインを修正
   ======================================== */

/* 通常時：白背景、グレー文字 */
header .wp-block-button__link {
  padding: 12px 30px !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  background-color: white !important;
  color: #505050 !important;
  border: 2px solid white !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  transition: all 0.3s ease !important;
}

/* ホバー時：透明背景、白枠、白文字 */
header .wp-block-button__link:hover {
  background-color: transparent !important;
  color: white !important;
  border: 2px solid white !important;
}

/* ボタンとナビを垂直方向で揃える */
header .wp-block-navigation,
header .wp-block-button {
  display: inline-flex !important;
  align-items: center !important;
}

/* ボタンの左側に余白 */
header .wp-block-button {
  margin-left: 30px !important;
}


/* =========================
   SP：ヘッダーを安定させる（TT5）
   ========================= */
@media (max-width: 768px){

  /* ヘッダー全体：左右の余白だけ確保 */
  header.wp-block-template-part,
  header.wp-block-template-part .wp-site-blocks,
  header.wp-block-template-part .wp-block-group{

  }

  /* ナビ＋ボタンが横に並ぼうとして崩れるのを止める */
  header .wp-block-navigation__container{
    gap: 12px !important;
  }

  /* 申込ボタン：SPは幅いっぱいにして2段目に置く想定 */
  header .wp-block-button{
    margin-left: 0 !important;
    width: 100%;
  }
  header .wp-block-button__link{
    width: 100%;
    justify-content: center;
    padding: 12px 16px !important;
  }

  /* PC用の “ナビとボタンの間隔調整” をSPでは無効化 */
  header .wp-block-navigation{
    margin-right: 0 !important;
  }
  header nav,
  header .wp-block-navigation__container{
    gap: 12px !important;
  }
  header .wp-block-button::before{
    display: none !important;
  }
}
/* =========================
   SP：ナビ（メニュー）を閉じてる時は表示しない + メニュー全画面
   ========================= */
@media (max-width: 768px){

  /* 閉じてる状態：メニューを隠す */
  .wp-block-navigation__responsive-container:not(.is-menu-open){
    display: none !important;
  }

  /* 開いた状態：全画面メニュー */
  .wp-block-navigation__responsive-container.is-menu-open{
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.92) !important;
    padding: 80px 20px 24px !important;
    z-index: 9999 !important;
    overflow: auto !important;
  }

  /* リンク：縦並び */
  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__container{
    flex-direction: column !important;
    gap: 16px !important;
    align-items: flex-start !important;
  }

  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content{
    font-size: 18px !important;
  }

  /* =========================
     SP：ヘッダーのCTA（ボタン）を消す
     ========================= */
  header.wp-block-template-part .wp-block-buttons,
  header.wp-block-template-part .wp-block-button{
    display: none !important;
  }
}
@media (max-width: 768px){
  .wp-block-navigation__responsive-container.is-menu-open{
    background: #ffffff !important;
  }

  .wp-block-navigation__responsive-container.is-menu-open a{
    color: #505050 !important;
  }
}

/* デフォルト：SP */
.pc-only{ display:none !important; }
.sp-only{ display:block !important; }

/* PC：782px以上（TT系に合わせる） */
@media (min-width: 782px){
  .pc-only{ display:block !important; }
  .sp-only{ display:none !important; }
}
/* =========================
   ご相談の流れ（section-flow）完成版
   ========================= */

/* セクション全体 */
.section-flow{
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* TT5のグローバル余白を無効化（このセクションのみ） */
.section-flow.alignfull.has-global-padding,
.section-flow .has-global-padding{
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.section-flow.alignfull{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 各ステップ */
.section-flow .flow-item{
  width: min(1100px, 100%);
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

/* 最後以外の間隔＋三角 */
.section-flow .flow-item:not(:last-of-type){
  margin-bottom: 64px;
}
.section-flow .flow-item:not(:last-of-type)::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-32px;
  transform:translateX(-50%);
  width:0;
  height:0;
  border-left:48px solid transparent;
  border-right:48px solid transparent;
  border-top:24px solid #505050;
}

/* Media & Text（PC：2カラム） */
.section-flow .flow-item .wp-block-media-text{
  width: 100%;
  max-width: 100%;
  padding: 0;
  gap: 0;
  grid-column-gap: 0;
  align-items: stretch;
  grid-template-columns: 36% minmax(0, 1fr);
  box-sizing: border-box;
}

/* 画像側：親だけに高さを持たせる */
.section-flow .flow-item .wp-block-media-text__media{
  margin: 0;
  padding: 0;
  line-height: 0;
  height: 220px;
  overflow: hidden;
}

/* figureは高さ指定しない（安定） */
.section-flow .flow-item .wp-block-media-text__media figure{
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
}

/* 画像：枠いっぱい cover */
.section-flow .flow-item .wp-block-media-text__media img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

/* 余白は文章側だけ */
.section-flow .flow-item .wp-block-media-text__content{
  padding: 22px;
}

/* =========================
   SP（〜782px）：1カラム化
   ========================= */
@media (max-width: 782px){

  .section-flow{
    padding: 0 16px;
  }

  .section-flow .flow-item:not(:last-of-type){
    margin-bottom: 56px;
  }
  .section-flow .flow-item:not(:last-of-type)::after{
    bottom:-28px;
    border-left:40px solid transparent;
    border-right:40px solid transparent;
    border-top:20px solid #505050;
  }

  .section-flow .flow-item .wp-block-media-text{
    grid-template-columns: 1fr;
  }

  .section-flow .flow-item .wp-block-media-text__media{
    height: 200px;
  }

  .section-flow .flow-item .wp-block-media-text__content{
    padding: 16px;
  }
}
/* section-flow：画像を枠に100%フィットさせる（決定版） */
.section-flow .flow-item .wp-block-media-text__media{
  position: relative;
  overflow: hidden;
}

/* figure / a を枠いっぱいにする */
.section-flow .flow-item .wp-block-media-text__media figure,
.section-flow .flow-item .wp-block-media-text__media a{
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* img を絶対配置で枠に貼り付け */
.section-flow .flow-item .wp-block-media-text__media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* PCだけ：矢印のためのスペースを増やす */
@media (min-width: 783px){
  .section-flow .flow-item:not(:last-of-type){
    margin-bottom: 88px;  /* 64→88 */
  }
  .section-flow .flow-item:not(:last-of-type)::after{
    bottom: -44px;        /* -32→-44 */
  }
}


/* FAQ：Q.質問 三角アイコン */
.faq-question{
  position: relative;
  padding-right: 3em; /* 三角分の余白 */
}

/* 三角 */
.faq-question::after{
  content: "";
  position: absolute;
  right: 1.5em;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #333; /* 三角の色（必要なら白に） */
}

/* ===== サービスカード共通 ===== */
.service-cards{
  display: flex;
  gap: 24px;
}

/* 各カード */
.service-cards > .wp-block-group{
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 画像の高さを揃える */
.service-cards img{
  width: 100%;
  height: 260px;        /* ← 好きな高さに調整 */
  object-fit: cover;   /* トリミングして揃える */
  display: block;
}

/* テキストは下に揃える */
.service-cards p{
  margin-top: 16px;
  text-align: center;
  flex-grow: 1;
}

/* SP */
@media (max-width: 782px){
  .service-cards{
    flex-wrap: wrap;
  }
  .service-cards > .wp-block-group{
    width: 100%;
  }
  .service-cards img{
    height: 200px;
  }
}
/* 画像枠の高さを揃える（imgだけじゃなくfigureも） */
.service-cards figure{
  width: 100%;
  height: 260px;
  margin: 0;
  overflow: hidden;
}

.service-cards figure img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 4枚カード全体：ガタつき防止（gridで固定） */
.service-cards{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

/* SPは2列（好みで1列でもOK） */
@media (max-width: 782px){
  .service-cards{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* 画像の高さを先に確定してズレないようにする */
.service-cards figure{
  margin: 0;
  aspect-ratio: 1 / 1;      /* 正方形にしたいなら */
  overflow: hidden;
}
.service-cards img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;           /* 画像下の謎の余白も消える */
}

/* 文字も中央に揃える（必要なら） */
.service-cards p{
  text-align: center;
  margin: 16px 0 0;
}

/* ===== サービスカード：ホバー ===== */

/* 画像の基本 */
.service-cards figure img{
  transition: transform .4s ease, opacity .4s ease;
}

/* ホバー時：画像 */
.service-cards > *:hover figure img{
  transform: scale(1.05);
  opacity: .85;
}

/* 文字（段落） */
.service-cards p{
  transition: color .3s ease;
}

/* ホバー時：文字 */
.service-cards > *:hover p{
  color: #D9BF70; /* 金色 */
}
.service-cards > *{
  cursor: pointer;
}



/* SPお問い合わせバナー */
/* まず固定バナーはデフォルト非表示（タブレット・PC） */
.sp-fixed-banner{
  display: none !important;
}

/* SPのみ表示（〜767px） */
@media (max-width: 767px){

  /* 固定バー本体：左右ズレ防止（100vw使わない） */
  .sp-fixed-banner{
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    z-index: 9999 !important;
    background: #d9bf70 !important;
    box-sizing: border-box !important;
  }

  .sp-fixed-banner.has-global-padding{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .sp-fixed-banner a{ display:block !important; }

  .sp-fixed-banner figure,
  .sp-fixed-banner .wp-block-image{ margin:0 !important; }

  .sp-fixed-banner img{
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* 下の余白もSPだけ */
  body{
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 767px){
  a.wp-block-button__link[href*="line.me/R/ti/p/@776woyjc"]{
    display: none !important;
  }
  .wp-block-buttons:has(a.wp-block-button__link[href*="line.me/R/ti/p/"]){
    display: none !important;
  }
}

/* =========================
   上へ戻るボタン（PC & SP 共通）
   ========================= */
.sp-back-to-top{
  position: fixed;
  z-index: 10000;
}

/* ボタン共通デザイン */
.sp-back-to-top .wp-block-button__link{
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

/* =========================
   PC表示
   ========================= */
@media (min-width: 769px){
  .sp-back-to-top{
    display: block;
    right: 24px;
    bottom: 24px; /* フッターに被らない */
  }
}
.back-to-top{
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  transition: opacity .3s ease, visibility .3s ease;
}
.hero-area ~ .back-to-top{
  opacity: 1;
  visibility: visible;
}

/* ★ ヒーローより前にいる間は非表示 */
.hero-area + * .back-to-top,
.hero-area .back-to-top{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.back-to-top{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.scrolled .back-to-top{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   SP表示
   ========================= */
@media (max-width: 768px){
  .sp-back-to-top{
    display: block;
    right: 16px;
    bottom: 96px; /* 下固定バナーの上 */
  }
}
/* ===== ボタン3つ横並び（PC）===== */
.button-row{
  display: flex;
  justify-content: center;
  gap: 32px;
}

/* ===== ボタン本体：1行・サイズ完全固定 ===== */
.button-row .wp-block-button__link{
  width: 280px;      /* ← 好きな幅に調整OK */
  height: 72px;      /* ← 高さ固定 */

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 !important;
  box-sizing: border-box;

  white-space: nowrap;   /* ★ 1行固定（改行させない） */
  line-height: 1;
  text-align: center;
}


/* =========================
   ご相談の流れ：画像の謎マージン完全除去（PC・タブレット）
   ========================= */

/* ご相談の流れ：画像をカードの高さに追従させる */
.section-flow .flow-item .wp-block-media-text{
  align-items: stretch; /* 念のため（すでに入ってるけどOK） */
}

.section-flow .flow-item .wp-block-media-text__media{
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;

  height: auto !important;        /* ★固定を解除 */
  min-height: 220px;              /* ★最低限の高さだけ確保 */
  align-self: stretch;            /* ★右の高さに合わせて伸びる */
  overflow: hidden;
  position: relative;
}

/* img は今の絶対配置のままでOK（枠いっぱいcover） */
.section-flow .flow-item .wp-block-media-text__media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* TT5: 余白リセット（上の白帯対策） */
.wp-site-blocks {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* TT5: ヘッダー固定（sticky）＋背景を明示 */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #555 !important; /* ヘッダーのグレーに合わせて調整 */
}

/* 管理バー対策 */
body.admin-bar header.wp-block-template-part {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar header.wp-block-template-part {
    top: 46px;
  }
}

/* ページ内リンクのズレ防止（Aboutなど） */
html {
  scroll-padding-top: 110px;
}

/* 本文側は軽く押し下げ（必要なら 0〜32で調整） */
main {
  padding-top: 24px;
  margin-top: 0 !important;
}

/* =========================
   本番最小修正：矢印の食い込み解消（確定版）
   ・矢印を bottom ではなく top:100% 基準で外に出す
   ・section-flow内のMedia&Textの余計なmargin/paddingを無効化
   ========================= */

/* まず、flow-itemは矢印がはみ出せるようにしてスペース確保 */
.section-flow .flow-item{
  position: relative;
  overflow: visible;
}

.section-flow .flow-item:not(:last-of-type){
  margin-bottom: 86px !important;   /* 矢印の居場所（必要なら 80〜104で調整） */
}

/* 矢印：必ず「このボックスの外（下）」へ */
.section-flow .flow-item:not(:last-of-type)::after{
  bottom: auto !important;          /* 既存bottom指定を殺す */
  top: calc(100% + 18px) !important;/* ←ボックスの外に出す距離（好みで調整） */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ご相談の流れ内だけ：Media&Textが持つ自動余白を無効化（スクショの margin-block-start 対策） */
.section-flow .wp-block-media-text{
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  padding: 0 !important;            /* element.styleのpadding対策もここでまとめて */
}




