/* ============================================================
   貴創エステート 下層ページ共通スタイル
   記法：FLOCSS（p- 接頭辞）＋ BEM。デザインシステム（navy×gold・Cormorant）準拠。
   body に .p-subpage（下層共通）/ .p-legalPage（規約・ポリシー）を付与して適用。
   ============================================================ */

/* ===== 下層ページタイトル：英字ラベル（Cormorant・金）＋ 和文タイトル（紺）＋ 金アクセント ===== */
/* SWELL標準のタイトル装飾（data-style）を打ち消す */
.p-subpage .c-pageTitle[data-style]::after,
.p-subpage .c-pageTitle[data-style]::before{ content:none !important; border:0 !important; background:none !important; }
.p-subpage .c-pageTitle{
  text-align:left;
  padding-block:3rem 0;
  border:0;
  background:none;
  margin-bottom:2.6rem;
}
/* __inner は英字＋和文を縦に重ねるラッパ */
.p-subpage .c-pageTitle__inner{ display:block; }
/* EN（英字）＝大・主タイトル：1語目=紺／2語目=金 */
.p-subpage .c-pageTitle__en{
  display:block;
  font-family:var(--font-en-serif);
  font-size:clamp(2.2rem,4.6vw,3.4rem);
  font-weight:600;
  letter-spacing:.02em;
  line-height:1.1;
}
.p-subpage .c-pageTitle__en1{ color:var(--color-brand); }
.p-subpage .c-pageTitle__en2{ color:var(--color-accent); }
/* JA（和文）＝小・金ダッシュ付き */
.p-subpage .c-pageTitle__ja{
  display:block;
  position:relative;
  padding-left:3.2em;
  font-family:var(--font-jp-sans);
  font-size:var(--fs-sm);
  font-weight:700;
  color:var(--color-brand);
  letter-spacing:.1em;
  line-height:1.4;
  margin-top:.95rem;
}
.p-subpage .c-pageTitle__ja::before{
  content:"";
  position:absolute;
  left:0;
  top:.62em;
  width:2.4em;
  height:1px;
  background:var(--color-accent);
}

/* ===== 規約・ポリシー本文 ===== */
.p-legalPage .post_content{ max-width:880px; margin-inline:auto; }
.p-legalPage .post_content > p,
.p-legalPage .post_content li{
  color:var(--color-text);
  line-height:1.95;
  font-size:var(--fs-base);
}
.p-legalPage .post_content > p{ margin:0 0 1.4em; }

/* 見出し：SWELL既定の塗りバーを解除し、金の縦アクセント＋紺文字に（全下層共通） */
.p-subpage .post_content h2{
  background:transparent !important;
  color:var(--color-brand) !important;
  font-family:var(--font-jp-sans);
  font-size:var(--fs-h4);
  font-weight:700;
  letter-spacing:.02em;
  border:0 !important;
  padding:0 0 0 18px !important;
  margin:2.8em 0 1em;
  position:relative;
}
.p-subpage .post_content h2:not(.p-bizRow__ttl)::before{
  content:"";
  position:absolute;
  left:0; top:.18em; bottom:.18em;
  width:4px;
  background:var(--color-accent);
}
.p-legalPage .post_content h2:first-of-type{ margin-top:.4em; }
/* 規約・ポリシーの見出しは金縦バー装飾を除去（クリーンな紺見出し） */
.p-legalPage .post_content h2{ padding-left:0 !important; }
.p-legalPage .post_content h2::before{ content:none !important; display:none !important; }

.p-legalPage .post_content ul{ padding-left:1.3em; margin:0 0 1.6em; }
.p-legalPage .post_content li{ margin-bottom:.5em; }
.p-legalPage .post_content li::marker{ color:var(--color-accent); }
.p-legalPage .post_content a{ color:var(--color-accent); text-decoration:underline; text-underline-offset:2px; }

/* ============================================================
   事業内容ページ：5構成の左右交互レイアウト（core/media-text ベース）
   ============================================================ */
/* 事業内容ページはセクションを広く使う（SWELL既定の本文幅900pxを拡張） */
.p-businessPage .l-content.l-container{ max-width:1360px !important; }
.p-businessPage .l-mainContent.l-article{ max-width:none !important; width:100% !important; }
.p-businessPage .post_content{ max-width:none; margin-inline:auto; }

/* リード文 */
.p-bizLead{ font-size:var(--fs-h5); color:var(--color-text-muted); line-height:1.9; max-width:760px; margin:0 0 1rem !important; }

/* 各サービス行 */
.p-bizRow{ align-items:center !important; gap:clamp(2rem,5vw,4.5rem) !important; margin-block:clamp(3.5rem,7vw,6rem) !important; grid-template-columns:1fr 1fr !important; scroll-margin-top:100px; }
.p-bizRow .wp-block-media-text__media{ align-self:center; }
.p-bizRow .wp-block-media-text__media img{ width:100%; height:auto; object-fit:cover; aspect-ratio:4/3; object-position:right center; border-radius:0; }
.p-bizRow .wp-block-media-text__content{ padding:0 !important; }

.p-bizRow__num{ font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif; font-size:clamp(2.4rem,4vw,3.2rem); font-weight:700; color:var(--color-accent); line-height:1; margin:0 0 .4rem !important; }
.p-bizRow__en{ display:block; font-family:var(--font-en-serif); font-size:.8rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase; color:var(--color-text-muted); margin-top:.5rem; }
.p-subpage .post_content .p-bizRow__ttl{ background:transparent !important; border:0 !important; padding:0 !important; font-size:var(--fs-h3); color:var(--color-brand) !important; font-weight:700; margin:.1em 0 1em !important; }
/* サービスタイトルの上下ライン（SWELL既定h2装飾）を完全除去 */
.p-subpage .post_content .p-bizRow__ttl::before,
.p-subpage .post_content .p-bizRow__ttl::after{ content:none !important; display:none !important; border:0 !important; background:none !important; }
.p-bizRow .wp-block-media-text__content p:not(.p-bizRow__num){ color:var(--color-text-muted); line-height:1.95; margin:0 0 1.4em; }
.p-bizRow__btn .wp-block-button__link{ background:var(--color-brand); color:#fff; border-radius:4px; padding:.7em 1.7em; font-size:var(--fs-sm); font-weight:500; transition:background .3s var(--ease-soft,ease), transform .3s var(--ease-soft,ease); }
.p-bizRow__btn .wp-block-button__link:hover{ background:var(--color-brand-sub); transform:translateY(-2px); }

@media(max-width:767px){
  .p-bizRow{ grid-template-columns:1fr !important; gap:1.4rem !important; }
}

/* ============================================================
   会社概要ページ：会社情報テーブル／アクセス
   ============================================================ */
/* セクション幅を拡張（SWELL既定の本文幅900px → コンテナいっぱい） */
.p-companyPage .l-content.l-container{ max-width:1240px !important; }
.p-companyPage .l-mainContent.l-article{ max-width:none !important; width:100% !important; }
.p-companyPage .post_content{ max-width:none; margin-inline:auto; }

/* セクション見出し（共通）：金ダッシュ＋英字ラベル＋和文タイトル（和文タイトルの左には装飾なし） */
.p-companyPage .post_content h2.p-secHd{ border:0 !important; background:none !important; padding:0 !important; margin:2.8em 0 1.6em; }
.p-companyPage .post_content h2.p-secHd::before{ content:none !important; display:none !important; }
.p-companyPage .post_content h2.p-secHd:first-of-type{ margin-top:0; }
.p-secHd__en{ display:block; font-family:var(--font-en-serif); font-size:var(--fs-sm); letter-spacing:.22em; text-transform:uppercase; color:var(--color-accent); font-weight:600; position:relative; padding-left:2.8em; margin-bottom:.7em; }
.p-secHd__en::before{ content:""; position:absolute; left:0; top:.55em; width:2em; height:1px; background:var(--color-accent); }
.p-secHd__ja{ display:block; font-family:var(--font-jp-sans); font-size:clamp(1.6rem,3vw,2.2rem); font-weight:700; color:var(--color-brand); letter-spacing:.04em; line-height:1.2; }

/* 会社情報テーブル（左カラム）＋ 画像（右カラム） */
.p-companyInfo.wp-block-columns{ align-items:stretch !important; gap:clamp(1.5rem,4vw,3.2rem) !important; }
.p-companyTable table{ width:100%; border-collapse:collapse; }
.p-companyTable td{ border:0 !important; border-bottom:1px solid var(--color-border) !important; padding:16px 0 !important; vertical-align:top; text-align:left; color:var(--color-text); line-height:1.9; }
.p-companyTable tr:first-child td{ border-top:1px solid var(--color-border) !important; }
.p-companyTable tr td:first-child{ width:30%; min-width:7em; color:var(--color-text-muted); font-weight:500; white-space:nowrap; padding-right:24px !important; }
.p-companyInfo > .wp-block-column:last-child{ display:flex; }
.p-companyInfo > .wp-block-column:last-child .wp-block-image{ width:100%; }
.p-companyPage .p-companyInfo figure.wp-block-image img{ width:100%; height:100%; object-fit:cover; aspect-ratio:auto; min-height:100%; }

/* 沿革：薄グレーの全幅帯＋「見出し左／年表右」（デザインカンプ準拠） */
.p-historySec{
  background:var(--color-bg-alt);
  margin-inline:calc(50% - 50vw);
  padding-block:clamp(3.5rem,6vw,5.5rem);
  margin-block:clamp(3rem,6vw,5rem);
}
.p-historyCols.wp-block-columns{
  max-width:1160px; margin-inline:auto; padding-inline:var(--gutter-pc);
  align-items:flex-start !important; gap:clamp(1.6rem,4vw,3.2rem) !important;
}
@media(max-width:767px){ .p-historyCols.wp-block-columns{ display:flex; flex-direction:column; } }
/* 見出し（共通 .p-secHd）はカラム内なので上下マージンを詰める */
.p-historyCols .p-secHd{ margin:0 !important; }
/* 年表：各行が1エントリ（日付の下に内容）＋金ドット＋接続線 */
.p-historyTable{ max-width:none; margin:0; }
.p-historyTable table{ width:100%; border-collapse:collapse; }
.p-historyTable tbody, .p-historyTable tr{ display:block; }
.p-historyTable tr{ position:relative; padding:0 0 2.4em 2.1em; }
.p-historyTable tr:last-child{ padding-bottom:0; }
.p-historyTable td{ display:block; border:0 !important; padding:0 !important; }
.p-historyTable td:first-child{ color:var(--color-brand); font-weight:700; font-size:var(--fs-base); letter-spacing:.06em; margin-bottom:.35em; font-family:var(--font-en-serif); }
.p-historyTable td:last-child{ color:var(--color-text-muted); line-height:1.85; }
.p-historyTable tr::before{ content:""; position:absolute; left:0; top:.4em; width:11px; height:11px; border-radius:50%; background:var(--color-accent); z-index:1; }
.p-historyTable tr::after{ content:""; position:absolute; left:5px; top:.4em; height:100%; width:1px; background:rgba(27,42,74,.18); }
.p-historyTable tr:last-child::after{ display:none; }

/* アクセス：「左=地図／右=情報テーブル」の2カラム（添付準拠） */
.p-accessCols.wp-block-columns{ align-items:flex-start !important; gap:clamp(1.8rem,4vw,3.4rem) !important; }
.p-accessCols > .wp-block-column:first-child{ flex:0 0 54% !important; }
.p-accessCols > .wp-block-column:last-child{ flex:1 1 auto !important; }
.p-accessTable table{ width:100%; border-collapse:collapse; }
.p-accessTable td{ border:0 !important; border-bottom:1px solid var(--color-border) !important; padding:16px 0 !important; vertical-align:top; color:var(--color-text); line-height:1.8; }
.p-accessTable tr:first-child td{ border-top:1px solid var(--color-border) !important; }
.p-accessTable tr td:first-child{ width:35%; min-width:5em; color:var(--color-brand); font-weight:700; white-space:nowrap; }
.p-access__map{ aspect-ratio:3/2; width:100%; min-height:300px; background:var(--color-bg-alt); border:1px dashed var(--color-border); display:grid; place-items:center; color:var(--color-text-muted); font-size:var(--fs-sm); text-align:center; padding:1em; overflow:hidden; }
/* 地図埋め込み時はプレースホルダー装飾を解除 */
.p-access__map:has(iframe){ border:0; padding:0; background:none; }
.p-access__map iframe{ width:100%; height:100%; border:0; display:block; }
@media(max-width:767px){
  .p-companyInfo.wp-block-columns,
  .p-accessCols.wp-block-columns{ display:flex; flex-direction:column; }
  /* アクセス：縦積み時は各カラムを全幅・高さ自動に戻す */
  .p-accessCols > .wp-block-column:first-child,
  .p-accessCols > .wp-block-column:last-child{ flex:1 1 auto !important; width:100% !important; }
  /* 地図：3:2比率を解除（aspect-ratio:3/2 を無効化／min-heightで高さ確保） */
  .p-access__map{ aspect-ratio:auto; }
  /* 情報テーブル：セクション幅いっぱい */
  .p-accessTable table{ width:100% !important; }
}

/* ============================================================
   代表挨拶ページ：メッセージ
   ============================================================ */
.p-messagePage .post_content{ max-width:960px; margin-inline:auto; }
/* 冒頭リード（小・グレー）：ページタイトル直下のご挨拶導入 */
.p-msgGreet{ color:var(--color-text-muted); font-size:var(--fs-base); line-height:2; letter-spacing:.02em; margin:0 0 clamp(2.6rem,6vw,4.5rem) !important; }
/* リード見出し（大・紺） */
.p-msgLead{ font-size:clamp(1.55rem,3.2vw,2.05rem); color:var(--color-brand) !important; font-weight:700; line-height:1.6; letter-spacing:.02em; margin:0 0 1.7em !important; }
/* 本文（ゆったり行間・段落間） */
.p-messagePage .post_content p{ line-height:2; color:var(--color-text); margin:0 0 1.9em; }
.p-msgSign{ text-align:right; margin-top:3em !important; }
.p-msgSign small{ display:block; color:var(--color-text-muted); font-size:var(--fs-sm); margin-bottom:.4em; }
.p-msgSign strong{ font-size:var(--fs-h4); color:var(--color-brand); font-weight:700; letter-spacing:.05em; }

/* ============================================================
   お問い合わせページ：Snow Monkey Forms
   ============================================================ */
/* セクション幅を拡張（SWELL既定の本文幅900px → 広め） */
.p-contactPage .l-content.l-container{ max-width:1200px !important; }
.p-contactPage .l-mainContent.l-article{ max-width:none !important; width:100% !important; }
.p-contactPage .post_content{ max-width:none; margin-inline:auto; }
.p-contactLead{ font-size:var(--fs-base); line-height:1.95; color:var(--color-text-muted); margin:0 0 2rem !important; }
/* 連絡先情報（TEL／RESPONSE：英字ラベル＋値） */
.p-contactInfo__block{ margin:0 0 2.4rem !important; }
.p-contactInfo__en{ display:block; font-family:var(--font-en-serif); font-size:var(--fs-xs); letter-spacing:.22em; text-transform:uppercase; color:var(--color-accent); font-weight:600; margin-bottom:.55em; }
/* 電話番号リンク：ホバーでゴールド（ヘッダーと同じく即時切替・下線なし・背景そのまま） */
.p-contactInfo__tel{ display:block; font-size:1.7rem; color:var(--color-brand) !important; letter-spacing:.04em; line-height:1.15; text-decoration:none !important; width:fit-content; }
.p-contactInfo__tel:hover{ color:var(--color-accent) !important; }
.p-contactInfo__note{ display:block; font-size:var(--fs-xs); color:var(--color-text-muted); margin-top:.55em; }
.p-contactInfo__txt{ display:block; font-size:var(--fs-sm); color:var(--color-text); line-height:1.7; }
/* お問い合わせ：左=連絡先情報／右=フォームの2カラム（添付準拠） */
.p-contactCols.wp-block-columns{ align-items:flex-start !important; gap:clamp(2.5rem,5vw,5rem) !important; margin-top:2.4rem; }
.p-contactCols > .wp-block-column:first-child{ flex:0 0 26% !important; }
.p-contactCols > .wp-block-column:last-child{ flex:1 1 auto !important; }
.p-contactCols .smf-form, .p-contactCols .snow-monkey-form, .p-contactCols [class*="snow-monkey"]{ max-width:none; width:100%; }
.p-contactCols .p-contactInfo{ padding:0; border:0; margin:0 !important; }
/* 必須／任意バッジ */
.p-req{ display:inline-block; font-size:.62rem; font-weight:700; line-height:1; padding:.34em .62em; border-radius:3px; margin-left:.5em; vertical-align:middle; letter-spacing:.06em; }
.p-req--must{ background:var(--color-accent); color:#fff; }
.p-req--opt{ background:#e7eaf0; color:var(--color-text-muted); }
@media(max-width:900px){ .p-contactCols.wp-block-columns{ display:flex; flex-direction:column; } }

/* フォーム本体 */
.p-contactPage .smf-item{ margin-bottom:1.7rem; }
.p-contactPage .smf-item__label__text{ display:inline-block; font-weight:700; color:var(--color-brand); font-size:var(--fs-sm); margin-bottom:.5rem; }
.p-contactPage .snow-monkey-form input[type="text"],
.p-contactPage .snow-monkey-form input[type="email"],
.p-contactPage .snow-monkey-form input[type="tel"],
.p-contactPage .snow-monkey-form textarea{
  width:100%; border:1px solid var(--color-border); border-radius:4px;
  padding:.7em .9em; font-size:var(--fs-base); font-family:inherit; color:var(--color-text);
  background:#fff; transition:border-color .25s;
}
.p-contactPage .snow-monkey-form input:focus,
.p-contactPage .snow-monkey-form textarea:focus{ outline:0; border-color:var(--color-accent); }
.p-contactPage .snow-monkey-form textarea{ min-height:170px; resize:vertical; }
.p-contactPage .smf-checkboxes-control__label,
.p-contactPage .smf-checkbox-control__label{ display:inline-flex; align-items:center; gap:.5em; }

/* 送信ボタン：金色（ラベルはJSで「この内容で送信する →」に変更） */
.p-contactPage .snow-monkey-form button[type="submit"],
.p-contactPage .smf-button__btn,
.p-contactPage .smf-button-control__control{
  background:var(--color-accent) !important; color:#fff !important; border:0 !important;
  border-radius:4px; padding:1em 2.6em !important; font-size:var(--fs-sm); font-weight:700;
  letter-spacing:.05em; cursor:pointer; transition:background .3s var(--ease-soft,ease), transform .3s var(--ease-soft,ease);
}
.p-contactPage .snow-monkey-form button[type="submit"]:hover,
.p-contactPage .smf-button__btn:hover,
.p-contactPage .smf-button-control__control:hover{ background:var(--color-accent) !important; transform:translateY(-2px); }
.p-contactPage .smf-button, .p-contactPage .smf-button-control{ text-align:center; margin-top:2.4rem; }
@media(max-width:599px){
  .p-contactInfo{ flex-direction:column; gap:1.1rem !important; }
}

/* ============================================================
   レスポンシブ：画像・ボックス（ボタン等）を中央寄せ
   ※テキスト（見出し・リード・本文・表）は左＝元のまま
   ============================================================ */
@media(max-width:900px){
  /* 事業内容：行を縦積み（画像→文章）に。テキストは左のまま */
  .p-bizRow.wp-block-media-text{ grid-template-columns:1fr !important; }
  .p-bizRow .wp-block-media-text__media{ grid-column:1 !important; grid-row:1 !important; }
  .p-bizRow .wp-block-media-text__content{ grid-column:1 !important; grid-row:2 !important; }
  /* 画像を中央寄せ */
  .p-subpage .post_content figure.wp-block-image{ margin-inline:auto; text-align:center; }
  .p-subpage .post_content figure.wp-block-image img{ margin-inline:auto; }
  /* ボタン（ボックス）を中央寄せ */
  .p-subpage .post_content .wp-block-buttons{ justify-content:center; }
}

/* ============================================================
   スクロールリビール（控えめ／下層ページ）
   .has-reveal は <head> のインラインJSで付与、estate-anim.js が .is-in を付与
   ============================================================ */
.has-reveal .p-subpage .c-pageTitle__inner,
.has-reveal .p-secHd,
.has-reveal .p-bizLead,
.has-reveal .p-bizRow,
.has-reveal .p-companyInfo,
.has-reveal .p-historyCols,
.has-reveal .p-accessCols,
.has-reveal .p-contactInfo__block,
.has-reveal .p-contactCols > .wp-block-column:last-child,
.has-reveal .p-messagePage .post_content p,
.has-reveal .p-msgSign,
.has-reveal .p-legalPage .post_content > *{
  opacity:0; transform:translateY(18px);
  transition:opacity 1.4s var(--ease-soft), transform 1.4s var(--ease-soft);
  will-change:opacity, transform;
}
.has-reveal .is-in{ opacity:1 !important; transform:none !important; }
@media (prefers-reduced-motion: reduce){
  .has-reveal .p-subpage .c-pageTitle__inner,
  .has-reveal .p-secHd,
  .has-reveal .p-bizLead,
  .has-reveal .p-bizRow,
  .has-reveal .p-companyInfo,
  .has-reveal .p-historyCols,
  .has-reveal .p-accessCols,
  .has-reveal .p-contactInfo__block,
  .has-reveal .p-contactCols > .wp-block-column:last-child,
  .has-reveal .p-messagePage .post_content p,
  .has-reveal .p-msgSign,
  .has-reveal .p-legalPage .post_content > *{ transform:none !important; transition:opacity .8s var(--ease-soft) !important; }
}
