/* --- ヘッダー --- */
.site-header-top {
    position: relative;
    border-bottom: 1px solid #eee;
    /* color: #fff; */
    height: 900px;
    transition: height 0.3s ease-in-out;
    /* 高さが変わる際にアニメーションを追加 */
}

/* --- メディアクエリによる高さの切り替え --- */
/* 画面の高さが1024px以下の場合（タブレット縦向きなど） */
@media (max-height: 1024px) {
    .site-header-top {
        height: 700px;
    }
}

/* 画面の高さが850px以下の場合（一般的なスマートフォンなど） */
@media (max-height: 850px) {
    .site-header-top {
        height: 600px;
    }
}

/* 画面の高さが700px以下の場合（小さめのスマートフォンなど） */
@media (max-height: 700px) {
    .site-header-top {
        height: 500px;
    }
}

/* ▼▼▼ [MODIFIED] Slick -> Swiper ▼▼▼ */
.site-header-top .swiper-instance {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ▼▼▼ [MODIFIED] Slick -> Swiper ▼▼▼ */
.site-header-top .swiper-instance .swiper,
.site-header-top .swiper-instance .swiper-wrapper,
.site-header-top .swiper-instance .swiper-slide {
    height: 100%;
}

/* ▼▼▼ [MODIFIED] Slick -> Swiper ▼▼▼ */
.site-header-top .swiper-instance .swiper-slide {
    margin: 0;
}

/* ▼▼▼ [MODIFIED] Slick -> Swiper ▼▼▼ */
.site-header-top .swiper-instance .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ▼▼▼ 変更箇所 ▼▼▼ */
.site-header-top .header-content {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* 上下の要素を両端に配置 */
    pointer-events: none;
    /* 子要素でクリックを有効にするため一旦無効化 */
}

/* ロゴとナビゲーションのコンテナ */
.site-header-top .headerLeft {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: auto;
    /* このコンテナ内のリンクをクリック可能にする */
}

/* 検索コンテナ */
.site-header-top .searchContainer {
    align-self: flex-end;
    pointer-events: auto;
    background-color: #fffffff0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin: 0 10px 10px 0;
    width: 450px;
}

/* --- 「キーワードでさがす」の見出し --- */
.site-header-top .searchContainer h2 {
    font-size: 1.3rem;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 25px;
    margin-top: 15px;
}

.site-logo h1 {
    margin: 0;
}

.site-header-top .site-logo a,
.site-header-top .main-nav a {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.main-nav ul {
    display: flex;
    gap: 1.5em;
    /* ナビゲーション項目の間隔 */
}

.main-nav a:hover {
    text-decoration: underline;
}

/* いざというとき セクション */
.site-header-top .izaSection {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
    /* izaSectionの領域全体ではクリックを無効化 */
}

/* いざというとき メニューコンテナ */
.site-header-top .iza-menu {
    width: 280px;
    background: #FDEDEF;
    background: linear-gradient(25deg, rgba(253, 237, 239, 1) 0%, rgba(253, 237, 239, 1) 50%, rgba(254, 255, 253, 1) 50%, rgba(255, 255, 255, 1) 100%);
    border: solid 2px #D1384C;
    border-radius: 0 6px 6px 0;
    padding: 0 20px 20px;
    box-sizing: border-box;
    /* 初期状態は非表示 */
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out, visibility 0s 0.3s;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    /* クリックを有効化 */
}

/* メニューが開いた時のスタイル */
.site-header-top .iza-menu.is-open {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
}

.site-header-top .iza-menu h2 {
    display: flex;
    margin: 0;
    flex-direction: column;
    align-items: center;
    margin-top: -33px;
    margin-bottom: 20px;
    pointer-events: none;
    font-weight: 600;
    font-size: 1.5rem;
}

.site-header-top .iza-menu h2::before {
    content: "";
    display: block;
    width: 64px;
    height: 70px;
    background-image: url(/img/top/icon-iza.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* 開閉ボタンのスタイル */
.site-header-top .iza-toggle {
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    cursor: pointer;
    background-color: #D1384C;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 10px 5px 10px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.site-header-top .iza-toggle:hover {
    transform: translateY(-50%) translateX(5px);
}

/* メニューが開いている時のボタンのスタイル */
.site-header-top .iza-toggle.is-open {
    transform: translateY(-50%) translateX(284px);
    padding-left: 5px;
}

.site-header-top .iza-toggle .arrow {
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(45deg);
    transition: transform 0.3s ease-in-out;
}

.site-header-top .iza-toggle[aria-expanded="true"] .arrow {
    transform: rotate(225deg);
}

/* ▼▼▼ [MODIFIED] Slick -> Swiper ▼▼▼ */
/* ヘッダーのスライダーコントロールを左下に配置 */
.site-header-top .swiper-controls-wrapper {
    position: absolute;
    bottom: 20px;
    /* 下からの位置 */
    left: 20px;
    /* 左からの位置 */
    z-index: 1;
    /* スライダー画像より手前であればOK */
    padding: 0px;
}

/* レスポンシブ対応 (モバイル向け) */
@media (max-width: 992px) {

    /* ヘッダーのレイアウト調整 */
    .site-header-top .headerLeft {
        flex-direction: column;
        /* align-items: center; */
    }

    /* .site-header-top .supportNav { margin-top: 10px; } は削除（style-footer.cssで制御） */

    .site-header-top .searchContainer {
        width: 100%;
        margin: 20px 0;
        box-sizing: border-box;
    }

    .site-header-top .searchContainer form {
        flex-direction: column;
    }

    /* 開閉ボタンとメニューの配置調整 */
    .site-header-top .izaSection {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        display: flex;
        align-items: center;
        z-index: 999;
        /* 他の要素より前面に */
    }

    .site-header-top .iza-menu {
        width: 80vw;
        border-radius: 0;
        height: 100%;
        overflow-y: auto;
    }

    .site-header-top .iza-toggle {
        display: none;
    }

    /* メニューが開いている時のボタンのスタイル（モバイル） */
    .site-header-top .iza-toggle.is-open {
        transform: translateY(-50%) translateX(80vw);
        /* メニューの幅に合わせて移動 */
        border-radius: 6px 0 0 6px;
    }
}

/* レスポンシブ対応 (画面幅が768px以下の場合) */
@media (max-width: 768px) {

    /* ヘッダーの高さをスライダー画像の比率に合わせる */
    .site-header-top {
        height: auto;
        /* 固定高さを解除 */
    }

    .site-logo {
        margin-top: -65px;
        width: calc(100% - 90px);
        margin-left: 10px;
    }

    /* ▼▼▼ [MODIFIED] Slick -> Swiper ▼▼▼ */
    .site-header-top .swiper-instance {
        position: relative;
        height: auto;
        aspect-ratio: 16 / 9;
        margin-top: 80px;
        margin-bottom: 0px;
    }

    .site-header-top .header-content {
        /* スライダーの上にコンテンツを重ねるため、position: absolute を指定 */
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}



/* --- ▼▼▼【新規追加】シンプルな検索開閉機能（クローン対応・修正版） ▼▼▼ --- */

/* 見出しとボタンを横並びにする設定 (共通) */
.searchContainer .search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.searchContainer .search-header h2 {
    margin: 0;
}

/* トグルボタンの基本スタイル (共通) */
.searchContainer .search-toggle-btn {
    background-color: #333;
    cursor: pointer;
    padding: 2px 12px;
    border-radius: 4px;
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

/* 検索エリアが閉じている時のボタンスタイル (共通) */
.searchContainer.is-closed .search-toggle-btn {
    font-size: 1rem;
    background-color: #333;
    color: white;
    border-color: #333;
}

/* ヘッダー内とフローティング内の両方でコンテンツを非表示にする */
.site-header-top .search-content.is-hidden,
.floating-search-panel .search-content.is-hidden {
    display: none;
}

div#floating-search-panel.floating-search-panel div.searchContainer div.search-header button#search-toggle-btn.search-toggle-btn {
    display: none;
}