/*
 Theme Name: Astra Child
 Template: astra
 Version: 1.0
*/

/* ロゴ準拠の配色 */
:root{
  --bg:#0b0e13;
  --bg-deep:#080a0e;
  --gold:#d4b06a;
}

/* 全ページの背景（黒＋わずかなグラデ） */
html, body{
  background: radial-gradient(1200px 800px at 70% 10%, var(--bg) 0%, var(--bg-deep) 70%);
  color:#fff;
  font-family:"Shippori Mincho B1", serif;
}

/* ===== “きらめき”レイヤー（最背面・非クリック） ===== */
#site-shimmer{
  position:fixed; inset:0; z-index:-1;   /* ← 現状維持 */
  pointer-events:none; display:block;
}
#site-shimmer canvas{
  width:100% !important; height:100% !important; display:block;
  mix-blend-mode:screen; opacity:.95;
}

/* ===== Header / Nav（フルスクラッチ前提） ===== */
.site-header{
  position: sticky; top:0; z-index:10000; /* shimmer(-1) の上 */
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.15));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hdr-inner{ max-width:1200px; margin:0 auto; padding:12px 20px;
  display:flex; align-items:center; gap:16px; }
.brand img{ height:38px; width:auto; display:block }
.brand-text{ font-weight:700; letter-spacing:.08em; color:#fff; }

.nav{ margin-left:auto; display:flex; align-items:center; gap:18px; }
.nav__list{ list-style:none; margin:0; padding:0; display:flex; gap:18px; }
.nav__list a{ color:#fff; text-decoration:none; opacity:.9; }
.nav__list a:hover{ opacity:1; }

.nav__cta{ display:flex; gap:10px; margin-left:8px; }
.cta{ display:inline-flex; align-items:center; padding:10px 14px; border-radius:999px;
  text-decoration:none; font-weight:600; letter-spacing:.03em;
  border:1px solid rgba(255,255,255,.18); color:#fff; background:rgba(255,255,255,.08);
  backdrop-filter: blur(6px); }
.cta--tel{ border:none; color:#111; background:linear-gradient(180deg,#e3c784,#b88b3e); }

/* ハンバーガー */
.nav-toggle{ display:none; margin-left:auto; width:42px; height:36px; border:0; background:transparent; position:relative; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after{
  content:""; position:absolute; left:10px; right:10px; height:2px; background:#fff; border-radius:2px; transition:.25s;
}
.nav-toggle__bar{ top:50%; transform:translateY(-50%); }
.nav-toggle__bar::before{ top:-9px; }
.nav-toggle__bar::after{  top: 9px; }

@media (max-width: 980px){
  .nav-toggle{ display:block; }
  .nav{ position:fixed; inset:60px 12px auto 12px; display:none;
        flex-direction:column; gap:14px; padding:14px; border-radius:16px;
        background: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.55));
        border:1px solid rgba(255,255,255,.1); z-index:10001; }
  .nav.is-open{ display:flex; }
  .nav__list{ flex-direction:column; gap:12px; }
  .nav__cta{ width:100%; justify-content:space-between; }
  .cta{ flex:1; text-align:center; }
}

/* ===== Footer ===== */
/* ===== シンプルフッター ===== */
.site-footer {
  background: var(--bg-deep, #080a0e);
  text-align: center;
  padding: 30px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: "Shippori Mincho B1", serif;
}

.site-footer .copyright {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin: 0;
}

/* モバイル下部メニューと干渉しないように下余白を調整 */
@media (max-width: 767px) {
  .site-footer {
    padding-bottom: 80px;
  }
}

.ftr-inner{ max-width:1200px; margin:0 auto; padding:36px 20px;
  display:grid; grid-template-columns: 1.2fr 1fr 1fr; gap:24px; }
.ftr-brand img{ height:34px; }
.ftr-nav__list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.ftr-nav__list a{ color:#fff; text-decoration:none; opacity:.85; }
.ftr-nav__list a:hover{ opacity:1; }
.ftr-cta{ display:flex; gap:10px; align-items:flex-start; }
.ftr-meta{ opacity:.9; }
.ftr-copy{ text-align:center; padding:14px 10px; opacity:.7; border-top:1px solid rgba(255,255,255,.08); }
@media (max-width: 980px){ .ftr-inner{ grid-template-columns:1fr; } }

/* ===== モバイル下部メニュー ===== */
.fixed-footer-menu{
  position:fixed; left:0; right:0; bottom:0; z-index:9999;
  display:flex; gap:10px; justify-content:space-around;
  padding:12px 14px; background:linear-gradient(180deg,transparent,rgba(0,0,0,.45));
}
.fixed-footer-menu .ffm-btn{
  width:25%; max-width:110px; display:flex; align-items:center; justify-content:center;
  padding:12px; border-radius:14px; border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.07); backdrop-filter:blur(6px); color:#fff; text-decoration:none;
}
.fixed-footer-menu .ffm-btn svg{ width:28px; height:28px; display:block }
@media (min-width:768px){ .fixed-footer-menu{ display:none } }

/* OSの「動きを減らす」を尊重 */
@media (prefers-reduced-motion: reduce){
  #site-shimmer{ display:none; }
}

/* 画面読み上げ用テキストを視覚的に隠す（ハンバーガーの「メニュー」など） */
.sr-only{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* モバイル時：固定フッターメニューが本文に被らないよう下余白を確保 */
@media (max-width: 767px){
  body{ padding-bottom: 92px; } /* 固定ボタンの高さ＋余裕分 */
}

/* ナビの初期状態と開閉の安定化（モバイル） */
@media (max-width: 980px){
  #primary-nav{ display:none; }
  #primary-nav.is-open{ display:flex; }
}

/* もしElementorのセクションに上下の大きなマージンが付く場合のリセット（任意） */
.page-template-page-tod-landing .elementor-section{
  margin-top:0; margin-bottom:0;
}

/* 画像周りの想定外の黒帯・はみ出し予防（任意） */
img{ max-width:100%; height:auto; }

/* ========== ヘッダーの共通サイズを決める（可変） ========== */
:root{ --hdr-h: 64px; }                 /* PCのヘッダー高さ */
@media (max-width: 980px){ :root{ --hdr-h: 56px; } }  /* SPのヘッダー高さ */

.site-header{
  min-height: var(--hdr-h);
  display:flex; align-items:center;
}
.hdr-inner{ min-height: var(--hdr-h); }

/* ロゴの最大高さをヘッダー内に収める（PCで巨大化しない） */
.site-header .custom-logo,
.site-header .brand img{
  max-height: calc(var(--hdr-h) - 18px);
  height: auto; width: auto; display:block;
}

/* Canvas風テンプレでもヘッダー分だけ中身を下げる */
.page-template-page-tod-landing .site-content,
.site-content--landing{
  padding-top: var(--hdr-h);
}

/* ========== ハンバーガー（位置ズレ・縦長化の防止） ========== */
.nav-toggle{
  line-height:0; padding:0; margin-left:auto;
  width:42px; height:36px; position:relative;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after{
  content:""; position:absolute; left:10px; right:10px;
  height:2px; background:#fff; border-radius:2px;
}
.nav-toggle__bar{ top:50%; transform:translateY(-50%); }
.nav-toggle__bar::before{ top:-9px; }
.nav-toggle__bar::after{  top: 9px; }

/* 視覚的に要らない「メニュー」テキストは隠す（読み上げは残す） */
.sr-only{
  position:absolute !important; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* ========== 下部固定アイコンが本文に被らないようSPの下余白を確保 ========== */
@media (max-width: 767px){
  body{ padding-bottom: 92px; } /* 固定ボタンの高さ＋余裕分 */
}

/* ========== ナビ開閉の安定（SP） ========== */
@media (max-width: 980px){
  #primary-nav{ display:none; }
  #primary-nav.is-open{ display:flex; }
}

/* 画像はみ出し防止（念のため） */
img{ max-width:100%; height:auto; }

/* Elementorの不要な外側マージンを抑制（ランディング用） */
.page-template-page-tod-landing .elementor-section{ margin:0; }

/* ===== 1) ヘッダーの三点リーダー(=ハンバーガー)の崩れ修正 ===== */
.nav-toggle{ width:44px; height:44px; position:relative; line-height:0; padding:0; }
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after{
  content:""; position:absolute;
  left:50%; transform:translateX(-50%);
  width:26px; height:2px; border-radius:2px; background:#fff;
}
.nav-toggle__bar{ top:50%; transform:translate(-50%,-50%); }
.nav-toggle__bar::before{ top:-8px; }
.nav-toggle__bar::after { top: 8px; }

/* ===== 2) 「ホーム」などページタイトル/パンくずを非表示（ランディング用） ===== */
.page-template-page-tod-landing .entry-title,
.page-template-page-tod-landing .ast-breadcrumbs{ display:none !important; }

/* Elementor の見出しウィジェットが自動タイトルとして出る場合の保険（任意） */
/* .page-template-page-tod-landing .elementor-page-title{ display:none !important; } */

/* ===== 3) “トップへ戻る”青ボタンが固定アイコン(X等)に被らないよう再配置 ===== */
/* 代表的なプラグイン/テーマのクラスを横断カバー */
.scroll-to-top, .to-top, .go-top, .gotop,
.eael-scroll-to-top, .e-go-to-top, .elementor-go-to-top {
  position:fixed !important;
  right:16px !important;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; /* 固定メニューの上に退避 */
  z-index: 9998 !important;  /* 固定メニュー(9999)より後ろにして重なり順を譲る */
}

/* ===== 4) 最下部で固定アイコンに本文/コピーライトが隠れないよう余白を確保 ===== */
@media (max-width: 767px){
  body{
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));  /* iOSの安全域も考慮 */
  }
}
/* コピーライト行が被る場合の保険（任意） */
.site-footer .ftr-copy{ padding-bottom: 14px; }

/* 画像はみ出し/表示崩れの抑止（念のため） */
img{ max-width:100%; height:auto; }

/* ページタイトル・パンくずを Canvas 風テンプレで完全に非表示 */
.page-template-page-tod-landing h1.entry-title,
.page-template-page-tod-landing .entry-title,
.page-template-page-tod-landing .ast-breadcrumbs,
.page-template-page-tod-landing .breadcrumbs,
.page-template-page-tod-landing .breadcrumb,
.page-template-page-tod-landing .rank-math-breadcrumb,
.page-template-page-tod-landing .yoast-breadcrumbs,
.page-template-page-tod-landing .elementor-page-title,
.page-template-page-tod-landing .elementor-widget-theme-page-title{
  display:none !important;
}
/* ハンバーガーの青ハイライト/フォーカス枠を消す */
.nav-toggle{
  background:transparent !important;
  -webkit-appearance:none; appearance:none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow:none;
}
.nav-toggle:focus,
.nav-toggle:active,
.nav-toggle:focus-visible{
  background:transparent !important;
  outline: none !important;
  box-shadow:none !important;
}

/* 開閉中の見た目（お好みで）—色を少し強くするだけ */
#primary-nav.is-open + .dummy { display:none } /* 安全無視用 */
/* 戻るボタンを固定フッターメニューの上に退避（クラス横断対応） */
.scroll-to-top, .to-top, .go-top, .gotop, .back-to-top,
.eael-scroll-to-top, .e-go-to-top, .elementor-go-to-top,
[id*="to-top"], [class*="to-top"], [class*="go-top"], [class*="back-to-top"]{
  position: fixed !important;
  right: 16px !important;
  bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important; /* iOS安全域考慮 */
  z-index: 9998 !important;  /* 固定メニュー(9999)より後ろ＝重ならない */
}
@media (max-width: 767px){
  body{ padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
}
/* 見た目が崩れない三本線 */
.nav-toggle{ width:44px; height:44px; position:relative; line-height:0; padding:0; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after{
  content:""; position:absolute; left:50%; transform:translateX(-50%);
  width:26px; height:2px; border-radius:2px; background:#fff;
}
.nav-toggle__bar{ top:50%; transform:translate(-50%,-50%); }
.nav-toggle__bar::before{ top:-8px; }
.nav-toggle__bar::after { top: 8px; }

/* 読み上げ用「メニュー」テキストは視覚的に隠す */
.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* --- Canvas風テンプレでタイトル/パンくず/自動見出しを全消し --- */
/* テーマのタイトル */
.page-template-page-tod-landing .entry-title,
.page-template-page-tod-landing h1.entry-title { display:none !important; }

/* パンくず（テーマ/プラグイン各種） */
.page-template-page-tod-landing .ast-breadcrumbs,
.page-template-page-tod-landing .breadcrumbs,
.page-template-page-tod-landing .breadcrumb,
.page-template-page-tod-landing .rank-math-breadcrumb,
.page-template-page-tod-landing .yoast-breadcrumbs { display:none !important; }

/* Elementorの自動タイトル系 */
.page-template-page-tod-landing .elementor-widget-theme-page-title,
.page-template-page-tod-landing .elementor-page-title { display:none !important; }

/* さらに保険：ページ先頭セクション内の見出し（タイトル用に置かれがち）を潰す */
.page-template-page-tod-landing .elementor-section:first-of-type
  .elementor-widget-heading .elementor-heading-title { display:none !important; }

/* ===== ヘッダー基本設定 ===== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  background: rgba(11, 14, 19, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
}

/* ロゴ */
.site-logo img {
  height: 46px;
  width: auto;
  display: block;
}

/* ===== メニュー ===== */
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: #f0e6c2;
  text-decoration: none;
  font-family: "Shippori Mincho B1", serif;
  font-size: 15px;
  transition: color .3s ease;
}
.site-nav a:hover {
  color: #d4b06a;
}

/* ===== ハンバーガー ===== */
#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
}
#menu-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: #f0e6c2;
  border-radius: 2px;
  transition: all .3s ease;
}

/* 開閉アニメ */
#menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
#menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== モバイル表示 ===== */
@media (max-width: 768px) {
  .site-nav ul {
    position: fixed;
    top: 0; right: 0;
    width: 70%;
    height: 100vh;
    background: rgba(11, 14, 19, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transform: translateX(100%);
    transition: transform .4s ease;
  }
  .site-nav.open ul {
    transform: translateX(0);
  }
  #menu-toggle { display: flex; }
}

/* ===== 余白補正 ===== */
body {
  padding-top: 80px; /* ヘッダー分の余白 */
}
/* =========================================================
   Header (Logo + Tod + Nav + Hamburger 右寄せ版)
   ========================================================= */

/* 固定ヘッダー */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  background: rgba(11, 14, 19, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ヘッダー内レイアウト */
#site-header .header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* ← 左右に配置 */
}

/* 左側：ロゴ＋Tod */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ロゴ */
#site-header .site-logo img {
  display: block;
  height: auto;
  width: auto;
  max-height: 48px;
  vertical-align: middle;
}

/* 「Tod」タイトル */
#site-header .tod-title {
  font-family: "Shippori Mincho B1", serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.08em;
  line-height: 1;
  background: linear-gradient(90deg, #e2c47c, #b89145);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #d4b06a;
  text-shadow: 0 0 6px rgba(255, 222, 150, 0.35);
  margin: 0;
  white-space: nowrap;
}

/* ナビメニュー（PC） */
#site-header .site-nav {
  margin-left: 40px;
}

#site-header .site-nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#site-header .site-nav a {
  color: #f0e6c2;
  text-decoration: none;
  font-family: "Shippori Mincho B1", serif;
  font-size: 15px;
  line-height: 1;
  transition: color 0.25s ease;
}

#site-header .site-nav a:hover {
  color: #d4b06a;
}

/* ハンバーガー */
#menu-toggle {
  display: none;
  position: absolute;
  right: 20px; /* ← 右端に固定 */
  top: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 10001;
}

#menu-toggle span {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px auto;
  background: #f0e6c2;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 開閉状態 */
#menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== モバイル対応 ===== */
@media (max-width: 768px) {
  #site-header .site-nav {
    position: fixed;
    inset: 0 0 0 40%;
    background: rgba(11, 14, 19, 0.95);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #site-header .site-nav.open {
    transform: translateX(0);
  }

  #site-header .site-nav ul {
    flex-direction: column;
    gap: 22px;
  }

  /* ハンバーガーは表示 */
  #menu-toggle {
    display: inline-block;
  }

  /* ナビは非表示（右メニュー化） */
  #site-header .site-nav ul {
    margin-left: 0;
  }

  /* ロゴとTodは左寄せのまま */
  .header-left {
    flex: 1;
  }

  /* サイズ調整 */
  #site-header .tod-title {
    font-size: 22px;
  }
}

/* コンテンツ隠れ防止 */
body { scroll-padding-top: 84px; }
@media (min-width: 769px) {
  body { padding-top: 76px; }
}
@media (max-width: 768px) {
  body { padding-top: 68px; }
}