/* ==============================================
   下層ページ共通
   ============================================== */

/* ヘッダーをKVの上に重ねる（トップページと同様）
--------------------------------------------- */
body:not(.home) #masthead {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    top: 25px;
}

body:not(.admin-bar):not(.home) #masthead {
    top: 0;
}
@media (min-width: 1201px) {
    body:not(.admin-bar):not(.home) #masthead {
        top: 10px;
    }
}

/* Page Header (Key Visual)
--------------------------------------------- */
.page-header {
    position: relative;
    width: 100%;
    height: 540px;
    max-height: 540px;
    background-color: #1B2A4A;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.20);
}

.page-header-inner {
    position: relative;
    z-index: 1;
    max-width: var(--content-max-width);
    width: 100%;
    margin-inline: auto;
    padding-inline: 0;
    padding-top: 140px; /* ヘッダー分オフセット */
    padding-inline: 20px;
}

.page-header-en {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem; /* 16px */
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-white);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.page-header-en::before {
    content: '';
    display: block;
    width: 26px;
    height: 2px;
    background: var(--color-secondary);
    flex-shrink: 0;
}

.page-header-ja {
    font-size: clamp(2rem, calc(1.648rem + 1.502vw), 3rem); /* min:32px max:48px */
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.3;
}


/* Breadcrumb
--------------------------------------------- */
.breadcrumb {
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding: 16px 20px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.80rem;
    color: var(--color-text);
}

.breadcrumb li + li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 5px;
    background: url('../images/pankuzu_arrow.svg') no-repeat center / contain;
    margin-inline: 4px;
    flex-shrink: 0;
}

.breadcrumb a {
    color: var(--color-text);
    text-decoration: underline;
    transition: text-decoration 0.2s;
}

.breadcrumb a:hover {
    text-decoration: none;
}

.breadcrumb [aria-current="page"] {
    color: var(--color-text);
}

.breadcrumb ol + ol {
    margin-top: 6px;
}


/* 下層ページ コンテンツ共通ラッパー
--------------------------------------------- */
.sub-content {
    max-width: var(--content-max-width);
    margin-inline: auto;
    /* padding: 60px var(--content-padding-inline) 120px; */
    padding: 60px 0 120px;
    padding-inline: 20px;
}


/* フッター上余白の制御
--------------------------------------------- */
/* デフォルト: site-footer に margin-top あり（style.css側で設定）*/

/* フッター直前に全幅セクションがあるページは余白なし */
/* 該当ページのCSSファイルに以下を追記する:
   .page-template-page-xxx-php .site-footer { margin-top: 0; }  */



/* ==============================================
   KV なしページ共通ヘッダースタイル（body.no-kv）
   ※ 将来の KV なしページはすべてこのクラスで対応
   ============================================== */

/* KVなし：ヘッダー下スペーサー（ヘッダーが absolute のため押し下げ用）
--------------------------------------------- */
.no-kv-header-spacer {
    height: 120px;
}

/* ヘッダーに背景・影を付与（白背景コンテンツ上に浮かせる） */
.no-kv #masthead {
    background: var(--color-white);
}

/* ロゴ切り替え */
.no-kv-logo-link {
    display: none;
}

.no-kv .no-kv-logo-link {
    display: block;
}

.no-kv .custom-logo-link,
.no-kv .site-title-link {
    display: none;
}

.no-kv-logo {
    height: 30px;
    width: auto;
    display: block;
}

/* ナビバー背景：不透過グレー・blur なし・シャドウなし */
.no-kv .site-navigation-wrapper {
    background: #F2F2F2;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

/* header-contact：シャドウなし */
.no-kv .header-contact {
    box-shadow: none;
}

/* パンくず：KVなしページ用padding */
.no-kv .breadcrumb {
    padding: 16px 20px;
}

/* ナビリンク：デフォルトテキストカラー */
.no-kv .main-navigation a {
    color: var(--color-text);
}

/* スティッキー時もテキストカラーを維持 */
.no-kv .site-navigation-wrapper.is-sticky .main-navigation a {
    color: var(--color-text);
}


/* ==============================================
   プライバシーポリシー (page-privacy-policy.php)
   ============================================== */

/* 下層ページ section-header h1 サイズ統一（max:40px）
   ※ サイトマップ・プライバシーポリシー・今後追加予定のお問い合わせページ等に適用
   ※ セレクタは functions.php の impack_no_kv_body_class で付与する固有 body クラスを使用
--------------------------------------------- */
.is-privacy-policy .section-header h1,
.is-sitemap .section-header h1 {
    font-size: clamp(1.75rem, calc(1.266rem + 2.066vw), 2.5rem); /* min:28px max:40px */
}

/* 2カラムレイアウト：左=section-header / 右=本文
--------------------------------------------- */
.pv-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 960px);
    gap: 60px 80px;
    align-items: start;
}

.pv-body {
    max-width: 960px;
}

/* イントロ文
--------------------------------------------- */
.pv-intro {
    font-size: clamp(0.9375rem, calc(0.894rem + 0.188vw), 1.0625rem);
    line-height: 1.8;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-border);
}

/* 各ポリシーセクション
--------------------------------------------- */
.pv-section {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.pv-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pv-section-title {
    font-size: clamp(1.125rem, calc(0.982rem + 0.714vw), 1.375rem);
  font-weight: 700;
  color: var(--color-primary);
  padding-left: 20px;
  border-left: 5px solid #B2C1DB;
  margin-bottom: 40px;
}



.pv-section p {
    font-size: clamp(0.9375rem, calc(0.894rem + 0.188vw), 1.0625rem);
    line-height: 1.8;
    margin-bottom: 12px;
}

.pv-section p:last-child {
    margin-bottom: 0;
}

.pv-section ul {
    margin: 12px 0 0 0;
    padding: 0;
    list-style: none;
}

.pv-section ul li {
    font-size: clamp(0.9375rem, calc(0.894rem + 0.188vw), 1.0625rem);
    line-height: 1.8;
    margin-bottom: 4px;
    padding-left: 1em;
    position: relative;
}

.pv-section ul li::before {
    content: '●';
    color: #B2C1DB;
    font-size: 1.25rem;
    position: absolute;
    left: 0;
    top: -0.25em;
}

/* お問い合わせ先ボックス
--------------------------------------------- */
.pv-contact-box {
    margin-top: 20px;
    padding: 24px 28px;
    border: 5px solid #EBEBEB;
}

.pv-contact-name {
    font-size: clamp(1rem, calc(0.909rem + 0.39vw), 1.25rem); /* min:16px max:20px */
    font-weight: 700;
    margin-bottom: 8px !important;
    color: var(--color-primary);
}

.pv-contact-box p {
    margin-bottom: 6px !important;
}

/* iOS Safari 電話番号自動リンク化の下線・色をリセット */
.pv-contact-box a {
    text-decoration: none;
    color: inherit;
}


/* ==============================================
   サイトマップ (page-sitemap.php)
   ============================================== */

/* 2カラムレイアウト：左=section-header / 右=コンテンツ
--------------------------------------------- */
.is-sitemap .sub-content {
    padding: 60px 0;
    padding-inline: 20px;
}

.sitemap-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 960px);
    gap: 60px 80px;
    align-items: start;
}

.sitemap-body {
    max-width: 960px;
}

/* サイトマップ本体
--------------------------------------------- */
.my-sitemap {
    max-width: 800px;
}

.sitemap-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.sitemap-section:last-child {
    border-bottom: none;
}

.sitemap-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--color-secondary);
}

.sitemap-section-title a {
    color: inherit;
    text-decoration: none;
}

.sitemap-section-title a:hover {
    text-decoration: underline;
}

.sitemap-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
}

.sitemap-list li {
    padding: 0.3rem 0 0.3rem 1rem;
    position: relative;
}

.sitemap-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
}

.sitemap-list a {
    color: var(--color-text);
    text-decoration: none;
}

.sitemap-list a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.sitemap-list--cpt {
    margin-top: 0.5rem;
}


/* 404 Error Page
--------------------------------------------- */
.error-404-body {
    text-align: center;
    padding: 80px 20px 120px;
}

.error-404-body h2 {
    font-size: clamp(1.5rem, calc(1.25rem + 1vw), 2rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.error-404-body p {
    margin-bottom: 48px;
}


/* ==============================================
   Responsive - Tablet (〜1024px)
   ============================================== */
@media (max-width: 1024px) {

    .page-header {
        height: 380px;
        max-height: 380px;
    }

    .page-header-inner {
        padding-top: 100px;
    }

    .no-kv-header-spacer {
        height: 100px;
    }

    .pv-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .is-privacy-policy .section-header h1 br {
        display: none;
    }

    .sitemap-layout {
        grid-template-columns: 280px 1fr;
        gap: 40px 60px;
    }
}


/* ==============================================
   Responsive - Hamburger header (〜1200px)
   ============================================== */
@media (max-width: 1200px) {

    /* style.css の position:fixed を sub.css の absolute が上書きしないよう明示 */
    body:not(.home) #masthead {
        position: fixed;
        top: 0;
        z-index: 201;
    }

    .no-kv-header-spacer {
        height: 80px;
    }
}


/* ==============================================
   Responsive - Mobile (〜768px)
   ============================================== */
@media (max-width: 768px) {

    .page-header {
        height: 280px;
        max-height: 280px;
    }

    .page-header-inner {
        padding-top: 80px;
    }

    .sub-content {
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .is-sitemap .sub-content {
        padding-bottom: 0;
        padding-inline: 20px;
    }

    .no-kv-header-spacer {
        height: 70px;
    }

    /* 1カラムに切り替え */
    .pv-layout,
    .sitemap-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .is-privacy-policy .section-header h1,
    .is-sitemap .section-header h1 {
        font-size: 1.75rem;
    }

    .is-privacy-policy .section-header h1::after,
    .is-sitemap .section-header h1::after {
        margin-top: 24px;
    }
}
