@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

/* シンプルなヘッダー設定 */
header {
    position: fixed !important;
    top: -10px !important;
    left: 0 !important;
    width: 100% !important;
    height: 120px !important;
    background-color: #f1f8ff !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 20px 0 0 0 !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* お知らせページ専用のヘッダー隙間削除 */
body.archive header,
body.category header {
    position: fixed !important;
    top: -25px !important;
    left: 0 !important;
    width: 100% !important;
    height: 125px !important;
    background-color: #f1f8ff !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 25px 0 0 0 !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* TOPページ専用 - headerを適切に下げる */
body.home header {
    top: 30px !important;
    position: fixed !important;
    z-index: 99999 !important;
}

/* ヘッダーの隙間を修正するCSS */
/* bodyとhtmlの余白を完全にリセット */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    overflow-x: hidden;
}

/* WordPress固有の要素をリセット */
#wpadminbar {
    display: none !important;
}

/* 隙間の原因となる可能性のある要素をリセット */
.wp-site-blocks,
.site-header,
.site-branding,
.wp-block-template-part {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    display: none !important;
}

/* 基本スタイル設定 - 重複削除済み */

/* TOPページのheaderを下げる設定 - 最強版 */
html body.home header,
body.home header {
    top: 30px !important;
    height: 110px !important;
    position: fixed !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #f1f8ff !important;
    z-index: 99999 !important;
    padding: 10px 30px 0 30px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* TOPページのメインビジュアルをheaderの下に配置 */
html body.home .first_container,
body.home .first_container {
    margin-top: 140px !important;
    height: calc(100vh - 140px) !important;
    padding-top: 0 !important;
}

/* お知らせ一覧ページのタイトル領域を下に下げる */
html body.archive .news__title,
html body.category .news__title,
html body.archive .news__container,
html body.category .news__container,
html body.archive h1,
html body.category h1 {
    margin-top: 160px !important;
    padding-top: 50px !important;
}

/* お知らせ一覧ページ全体を下げる */
html body.archive,
html body.category,
html body.archive main,
html body.category main,
html body.archive .news-archive,
html body.category .news-archive {
    padding-top: 180px !important;
    margin-top: 0 !important;
}

/* 重複設定削除 - 上記の統一設定を使用 */

.header__inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 90px !important;
    padding: 0 30px !important;
    margin: 0 !important;
    width: 100% !important;
}

/* ロゴエリア（左） */
.header__logo {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    height: 110px !important;
    justify-content: center !important;
    margin-left: 80px !important;
}

.header__logo img {
    height: 60px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: 100px !important;
    object-fit: contain !important;
}

/* ナビゲーションメニュー（中央） */
.header__nav {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 90px !important;
}

.header__nav ul {
    display: flex !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 30px !important;
    align-items: center !important;
}

.header__nav li {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.header__nav a {
    color: #333333 !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    font-family: 'Aileron', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: color 0.3s ease !important;
    position: relative !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 右側エリア（SNSアイコン） */
.header__right {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    height: 90px !important;
    margin-right: 80px !important;
}

.header__sns {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.header__sns-logo {
    display: flex !important;
    align-items: center !important;
    transition: transform 0.3s ease !important;
}

.header__sns-logo:hover {
    transform: scale(1.2);
}

.header__sns-logo img {
    height: 28px;
    width: auto;
    transition: all 0.3s ease;
}

/* Contactボタンのスタイル変更 */
.contact-btn {
    padding: 12px 20px;
    background-color: #d4b799;
    color: #0b0b0b;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    display: flex;
    align-items: center;
}

.contact-btn:hover {
    background-color: #fde7d5;
    color: #000;
}

/* ハンバーガーメニューボタンのスタイル */
.hamburger-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.hamburger-button span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.hamburger-button span:nth-child(1) { top: 0; }
.hamburger-button span:nth-child(2) { top: 11px; }
.hamburger-button span:nth-child(3) { bottom: 0; }

/* ハンバーガーアイコンのアニメーション */
.hamburger-button.open span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-button.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-button.open span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* オープンメニューのスタイル */
.hamburger-nav {
    display: none;
    position: absolute;
    top: 80px;
    right: 0;
    width: 50%;
    height: calc(100vh - 80px);
    background-color: rgba(116, 97, 80, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.hamburger-nav.open {
    display: block;
}

.hamb__menu-list {
    list-style: none;
    padding: 20px;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hamb__menu-list li {
    margin-bottom: 15px;
}

.hamb__menu-list a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    display: block;
    padding: 10px 0;
}

/* オーバーレイのスタイル */
#hamburger-overlay {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#hamburger-overlay.open {
    display: block;
}

/* メディアクエリでレスポンシブ対応 */
@media screen and (max-width: 1024px) {
    .header__nav ul {
        gap: 20px;
    }

    .header__nav a {
        font-size: 14px;
    }

    .header__sns-logo img {
        height: 20px;
    }

    .contact-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media screen and (max-width: 768px) {
    header {
        height: 110px !important;
        padding: 10px 0 !important;
    }
    
    .header__inner {
        height: 70px !important;
    }
    
    .header__logo {
        height: 70px !important;
        margin-left: 40px !important;
    }
    
    .header__logo img {
        height: 50px !important;
    }
    
    .header__nav, .header__right {
        display: none !important;
    }
    
    .hamburger-button {
        display: block !important;
    }
    
    .hamburger-nav {
        top: 110px !important; /* モバイルメニューの位置調整 */
        height: calc(100vh - 110px) !important;
    }
    
    #hamburger-overlay {
        display: none !important;
    }
    
    /* モバイル用TOPページのheaderとメインビジュアル調整 */
    body.home header {
        top: 80px !important;
    }
    
    body.home .first_container {
        margin-top: 190px !important;
        height: calc(100vh - 190px) !important;
    }
}

/* Contactボタンが非表示の場合のレイアウト調整 */
.header__right:not(:has(.contact-btn)) {
    gap: 0;
}

.header__right:not(:has(.contact-btn)) .header__sns {
    margin-right: 0;
}

/* ハンバーガーメニューでContactボタンが非表示の場合 */
.hamb__menu-contact:empty {
    display: none;
}

/* 取り消し線を確実に削除 */
.header__nav a,
.header__nav a:link,
.header__nav a:visited,
.header__nav a:hover,
.header__nav a:active,
.header__nav a:focus {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    border-bottom: none !important;
}

/* すべてのリンクに対する強制的なリセット */
header a,
header a:link,
header a:visited,
header a:hover,
header a:active,
header a:focus {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

/* 重複設定を削除 - 上の統一設定を使用 */

/* 重複したスタイルを削除し、統一されたヘッダーを使用 */