/* =========================================
   TIALA Header
   ========================================= */

body {
    font-family: "Zen Kurenaido", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* 全体コンテナ */
.site-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 内部配置（横並び） */
.nav-container {
    max-width: 1900px;
    margin: 0 auto;
    padding: 1rem 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    box-sizing: border-box;
}

/* ロゴ */
.header_logo {
    display: flex;
    align-items: center;
    margin-left: -3rem;
}

.header_logo img {
    height: 54px;
    width: auto;
    display: block;
}

/* ページ全体の余白調整 */
main,
section {
    margin-top: 0;
    padding-top: 0;
}

/* 固定ヘッダーによるズレ対策 */
body {
    scroll-padding-top: 60px;
}

/* ロゴ配置 */
.logo {
    display: flex;
    align-items: center;
    margin-right: auto;
}

/* ナビゲーション */
.primary-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    z-index: 1001;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.2rem;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    text-decoration: none;
    color: #111;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

.primary-nav a:hover {
    color: #cb896f;
}

/* アクティブリンク */
.primary-nav a.is-active {
    color: #cb896f;
    font-weight: 600;
}

/* ドロップダウン */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    min-width: 200px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* 開いた時のみ表示 */
.dropdown.open>.dropdown-menu {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* メニュー内リンク */
.dropdown-menu a {
    padding: 0.5rem 0;
    color: #333;
    font-size: 0.9rem;
    text-decoration: none;
}

.dropdown-menu a:hover {
    color: #cb896f;
}

/* ハンバーガー（PCでは非表示） */
.hamburger {
    display: none;
}

/* ===============================
   PC用（941px以上）
   =============================== */
@media (min-width: 941px) {
    .dropdown:hover>.dropdown-menu {
        display: flex;
        opacity: 1;
        pointer-events: auto;
        padding: 20px;
    }
}

/* ===============================
   モバイル用（940px以下）
   =============================== */
@media (max-width: 940px) {

    /* コンテナ */
    .nav-container {
        padding: 0.5rem -1rem;
        justify-content: space-between;
    }

    /* ロゴ */
    .site-logo {
        margin-left: 0.5rem;
    }

    .logo {
        margin-left: 0;
    }

    /* ナビ本体 */
    #nav-menu {
        display: none;
        flex-direction: column;
        align-items: center;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
        padding: 1.5rem 0;
        z-index: 999;
    }

    #nav-menu.is-open {
        display: flex;
    }

    /* ナビ内リンク */
    .primary-nav ul {
        flex-direction: column;
        gap: 1.2rem;
    }

    .primary-nav a {
        font-size: 1rem;
        color: #222;
    }

    .primary-nav a:hover {
        color: #cb896f;
    }

    /* ドロップダウン */
    .dropdown {
        width: 100%;
        text-align: center;
    }

    .has-dropdown {
        display: block;
        padding: 0.7rem 0;
        border-top: 1px solid #ddd;
    }

    .dropdown-menu {
        display: none;
        flex-direction: column;
        background: #fafafa;
        border-top: 1px solid #eee;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .dropdown.open>.dropdown-menu {
        display: flex;
        max-height: 500px;
        opacity: 1;
    }

    /* ハンバーガー */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-right: -1.5rem;
        width: 28px;
        height: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #111;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* 開閉アニメーション */
    .hamburger.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}