/**
 * グローバルヘッダーCSS - 全ページ共通
 * デザインコンセプト: Gold × Minimal × Elegant
 */

/* ========================================
   変数定義
   ======================================== */
:root {
    /* カラー */
    --black: #0E0E0E;
    --ivory: #F7F3EC;
    --gold: #C8A45D;
    --warm-gray: #6F6A63;
    --white: #FFFFFF;

    /* タイポグラフィ */
    --font-main: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: 'Playfair Display', "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
}

/* ========================================
   SWELLデフォルトヘッダーを非表示
   ======================================== */
.l-header,
#header,
.swell-header {
    display: none !important;
}

/* ========================================
   カスタムヘッダー（全ページ共通）
   ======================================== */
/* ヘッダー本体 - fixedで画面高さに影響しない */
.front-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: transparent;
    backdrop-filter: blur(10px);
    z-index: 10000;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(200, 164, 93, 0.15);
}

.front-header__inner {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ロゴ */
.front-header__logo {
    display: flex;
    align-items: center;
    z-index: 2;
}

.front-header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.front-header__logo a:hover {
    opacity: 0.7;
}

.front-header__logo img {
    max-height: 40px;
    width: auto;
    transition: filter 0.4s ease;
}

/* 金色セクションでロゴの色調整 */
.front-header.is-gold .front-header__logo img {
    filter: brightness(0.85) sepia(0.3) saturate(1.5);
}

.front-header__logo .site-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--white);
    letter-spacing: 0.1em;
    transition: color 0.4s ease;
}

/* ヘッダー色変更（セクションごと） */
/* デフォルト: 白文字（hero, cta） */
.front-header.is-gold .front-header__logo .site-name {
    color: var(--gold);
}

.front-header.is-gold .front-nav-menu .menu-item > a {
    color: var(--gold);
}

.front-header.is-gold .front-nav-menu .menu-item > a::after {
    background: var(--black);
}

.front-header.is-gold .front-nav-menu .menu-item > a:hover {
    color: var(--black);
}

.front-header.is-gold .menu-btn__line {
    background: var(--gold);
}

/* ナビゲーション（PC） */
.front-header__nav {
    display: flex;
    align-items: center;
}

.front-nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* WordPressメニューアイテム */
.front-nav-menu .menu-item {
    list-style: none;
}

.front-nav-menu .menu-item > a {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.08em;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.front-nav-menu .menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.front-nav-menu .menu-item > a:hover {
    color: var(--gold);
}

.front-nav-menu .menu-item > a:hover::after {
    width: 100%;
}

/* 現在のページ */
.front-nav-menu .menu-item.current-menu-item > a,
.front-nav-menu .menu-item.current_page_item > a {
    color: var(--gold);
}

.front-nav-menu .menu-item.current-menu-item > a::after,
.front-nav-menu .menu-item.current_page_item > a::after {
    width: 100%;
}

/* SPメニューボタン */
.front-header__menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
    position: relative;
}

.menu-btn__line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* SPメニューボタン - アクティブ時 */
.front-header__menu-btn.is-active .menu-btn__line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.front-header__menu-btn.is-active .menu-btn__line:nth-child(2) {
    opacity: 0;
}

.front-header__menu-btn.is-active .menu-btn__line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* SPメニュー */
.front-sp-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(14, 14, 14, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.front-sp-menu.is-open {
    display: block;
    opacity: 1;
}

.front-sp-menu__inner {
    padding: 3rem 2rem;
    height: 100%;
    overflow-y: auto;
}

.front-sp-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* WordPressメニューアイテム（SP） */
.front-sp-nav .menu-item {
    list-style: none;
    border-bottom: 1px solid rgba(200, 164, 93, 0.2);
}

.front-sp-nav .menu-item > a {
    display: block;
    padding: 1.5rem 1rem;
    font-size: 1rem;
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.front-sp-nav .menu-item > a:hover {
    color: var(--gold);
    padding-left: 1.5rem;
    background: rgba(200, 164, 93, 0.05);
}

/* 現在のページ（SP） */
.front-sp-nav .menu-item.current-menu-item > a,
.front-sp-nav .menu-item.current_page_item > a {
    color: var(--gold);
    font-weight: 400;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 768px) {
    .front-header {
        height: 60px;
    }

    .front-header__inner {
        padding: 0 20px;
    }

    .front-header__nav {
        display: none;
    }

    .front-header__menu-btn {
        display: flex;
    }

    .front-sp-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
}

/* ========================================
   他ページでのコンテンツ調整
   ======================================== */
/* トップページ: 上部の隙間を完全に削除 */
body.page-template-template-front,
body.page-template-template-front-php {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* トップページの全要素（ヘッダー以外）の上部スペースを削除 */
body.page-template-template-front *:not(.front-header):not(.front-header *),
body.page-template-template-front-php *:not(.front-header):not(.front-header *) {
    margin-top: 0 !important;
}

body.page-template-template-front .l-content,
body.page-template-template-front-php .l-content,
body.page-template-template-front .l-mainContent,
body.page-template-template-front-php .l-mainContent,
body.page-template-template-front #content,
body.page-template-template-front-php #content,
body.page-template-template-front #body_wrap,
body.page-template-template-front-php #body_wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ヘッダー分のパディングを追加（fullPage.js使用ページ以外） */
body:not(.page-template-template-front):not(.page-template-template-front-php) .l-content,
body:not(.page-template-template-front):not(.page-template-template-front-php) .l-mainContent {
    padding-top: 70px !important;
}

/* パンくずリストがヘッダーの下に隠れないようにする */
body:not(.page-template-template-front):not(.page-template-template-front-php) .p-breadcrumb,
body:not(.page-template-template-front):not(.page-template-template-front-php) .c-breadcrumb,
body:not(.page-template-template-front):not(.page-template-template-front-php) #breadcrumb {
    margin-top: 70px !important;
    padding-top: 20px;
}

/* タイトルエリアもヘッダーの下に隠れないようにする */
body:not(.page-template-template-front):not(.page-template-template-front-php) .p-pageTitle,
body:not(.page-template-template-front):not(.page-template-template-front-php) .c-pageTitle {
    margin-top: 70px !important;
}

@media (max-width: 768px) {
    body:not(.page-template-template-front):not(.page-template-template-front-php) .l-content,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .l-mainContent {
        padding-top: 60px !important;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .p-breadcrumb,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .c-breadcrumb,
    body:not(.page-template-template-front):not(.page-template-template-front-php) #breadcrumb {
        margin-top: 60px !important;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .p-pageTitle,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .c-pageTitle {
        margin-top: 60px !important;
    }
}

/* ========================================
   320px幅対応 - 超小型スマートフォン
   ======================================== */
@media (max-width: 375px) {
    /* ヘッダーの高さをさらに縮小 */
    .front-header {
        height: 55px;
    }

    .front-header__inner {
        padding: 0 15px;
    }

    /* ロゴサイズ調整 */
    .front-header__logo img {
        max-height: 35px;
    }

    .front-header__logo .site-name {
        font-size: 1.2rem;
        letter-spacing: 0.05em;
    }

    /* メニューボタン調整 */
    .front-header__menu-btn {
        width: 36px;
        height: 36px;
    }

    .menu-btn__line {
        width: 22px;
        height: 1.5px;
        margin: 3px 0;
    }

    .front-header__menu-btn.is-active .menu-btn__line:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .front-header__menu-btn.is-active .menu-btn__line:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* SPメニュー調整 */
    .front-sp-menu {
        top: 55px;
        height: calc(100vh - 55px);
    }

    .front-sp-menu__inner {
        padding: 2rem 1rem;
    }

    .front-sp-nav .menu-item > a {
        padding: 1.2rem 0.8rem;
        font-size: 0.9rem;
    }

    .front-sp-nav .menu-item > a:hover {
        padding-left: 1.2rem;
    }

    /* コンテンツの調整 */
    body:not(.page-template-template-front):not(.page-template-template-front-php) .l-content,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .l-mainContent {
        padding-top: 55px !important;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .p-breadcrumb,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .c-breadcrumb,
    body:not(.page-template-template-front):not(.page-template-template-front-php) #breadcrumb {
        margin-top: 55px !important;
        padding-top: 15px;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .p-pageTitle,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .c-pageTitle {
        margin-top: 55px !important;
    }
}

/* 320px幅での特別な調整 */
@media (max-width: 320px) {
    .front-header {
        height: 50px;
    }

    .front-header__inner {
        padding: 0 10px;
    }

    .front-header__logo img {
        max-height: 32px;
    }

    .front-header__logo .site-name {
        font-size: 1.1rem;
    }

    .menu-btn__line {
        width: 20px;
    }

    .front-sp-menu {
        top: 50px;
        height: calc(100vh - 50px);
    }

    .front-sp-menu__inner {
        padding: 1.5rem 0.8rem;
    }

    .front-sp-nav .menu-item > a {
        padding: 1rem 0.6rem;
        font-size: 0.85rem;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .l-content,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .l-mainContent {
        padding-top: 50px !important;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .p-breadcrumb,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .c-breadcrumb,
    body:not(.page-template-template-front):not(.page-template-template-front-php) #breadcrumb {
        margin-top: 50px !important;
    }

    body:not(.page-template-template-front):not(.page-template-template-front-php) .p-pageTitle,
    body:not(.page-template-template-front):not(.page-template-template-front-php) .c-pageTitle {
        margin-top: 50px !important;
    }
}
