/* サイトフッターのスタイル */
.site-footer {
    padding-bottom: 10px!important;
}

/* カスタムヘッダーのスタイル */
.clh-custom-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    /* 背景色は動的設定により上書きされます */
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    min-height: 60px;
}

.clh-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0; /* パディングを削除 */
    margin: 0 auto;
    height: 85px;
    width: 100%; /* 幅を100%に設定 */
}

/* ロゴ */
.clh-logo {
    margin-left: 50px; /* 左側にもう少しスペースを追加（30px→50px） */
}

.clh-logo a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.clh-logo img {
    /* height: 60px; /* 動的設定により上書きされます */
    width: auto;
    max-width: 300px; /* 最大幅を制限 */
    object-fit: contain; /* 比率を保ったまま収める */
    display: block; /* ブロック要素として表示 */
}

.clh-site-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, sans-serif;
}

/* 右側コンテンツ */
.clh-right {
    display: flex;
    align-items: stretch;
    height: inherit;
    gap: 0;
    flex-direction: row; /* 要素を横並びに配置 */
    flex-shrink: 0; /* 縮小を防ぐ */
}

/* SNSアイコン */
.clh-social {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 30px;
    gap: 15px; /* 間隔を増やす（8px→15px） */
    order: 1; /* 左から1番目に配置 */
    flex-shrink: 0; /* 縮小を防ぐ */
}

.clh-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto; /* 幅を自動に変更 */
    height: 32px; /* 高さは維持 */
    text-decoration: none;
    border-radius: 0; /* 丸枠を削除 */
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    transition: opacity 0.3s ease; /* ホバー用のトランジション */
    overflow: visible; /* オーバーフローを表示 */
    background: transparent; /* 背景色を透明に */
    padding: 0; /* パディングを削除 */
}

.clh-social-icon:hover {
    opacity: 0.7; /* ホバー時の透明度エフェクト */
}

.clh-social-icon:active {
    opacity: 0.7; /* アクティブ時も同じ透明度、押し込みエフェクトなし */
}

.clh-social-icon img {
    width: auto; /* 幅を自動に変更 */
    height: 32px; /* 高さを固定 */
    object-fit: contain; /* 画像の比率を維持 */
    border-radius: 0; /* 画像の丸枠も削除 */
}

/* ボタンエリア */
.clh-booking {
    display: flex;
    height: 85px;
    order: 2; /* 左から2番目に配置 */
    flex-shrink: 0; /* 縮小を防ぐ */
}

.clh-booking-btn {
    width: 120px;
    height: 100%; /* 親コンテナの高さに合わせる */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    /* background: rgb(131, 108, 37); コメントアウト - 動的設定を使用 */
    border-right: 1px solid #fff;
    position: relative;
    transition: opacity 0.3s ease !important; /* ホバー用のトランジション、transformを除外 */
    transform: none !important; /* 常に押し込みエフェクトを無効化 */
    padding: 10px 5px;
    text-align: center;
    font-size: 13px;
}

.clh-booking-btn:hover {
    opacity: 0.7 !important; /* ホバー時の透明度エフェクト */
    transform: none !important; /* 押し込みエフェクトを無効化 */
}

.clh-booking-btn:active {
    opacity: 0.7 !important; /* アクティブ時も同じ透明度、押し込みエフェクトなし */
    transform: none !important; /* 押し込みエフェクトを無効化 */
}

.clh-booking-btn:last-child {
    border-right: none;
}

.clh-booking-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* 上揃えに変更 */
    width: 20%;
    height: 100%;
    gap: 5px; /* アイコンとテキストの間隔を広げる */
    justify-content: center;
}

.clh-booking-icon {
    width: 28px; /* アイコンサイズを少し大きく */
    height: 28px; /* アイコンサイズを少し大きく */
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0; /* 縮小を防ぐ */
}

.clh-booking-text {
    line-height: 1.2; /* 行間を調整 */
    text-align: center;
    word-break: keep-all;
    white-space: pre-line; /* brタグに対応 */
    font-size: 12px; /* フォントサイズを調整 */
    min-height: 24px; /* 最小高さを調整 */
    display: flex;
    align-items: flex-start; /* テキストの上揃え */
    justify-content: center;
    margin-top: 0px; /* マージンを削除 */
    align-items: center;
}

.clh-booking-text br {
    content: "";
    display: block;
    margin: 2px 0;
}

/* メニューボタン */
.clh-toggle {
    width: 120px; /* 他のボタンと同じ幅に変更 */
    height: 100%; /* 親コンテナの高さに合わせる */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-left: 1px solid #ddd;
    transition: opacity 0.3s ease !important; /* ホバー用のトランジション、transformを除外 */
    transform: none !important; /* 常に押し込みエフェクトを無効化 */
    background: #f8f8f8;
    gap: 10px;
    order: 3; /* 右端に配置 */
    flex-shrink: 0; /* 縮小を防ぐ */
}

.clh-toggle:hover {
    opacity: 0.7 !important; /* ホバー時の透明度エフェクト */
    transform: none !important; /* 押し込みエフェクトを無効化 */
}

.clh-toggle:active {
    opacity: 0.7 !important; /* アクティブ時も同じ透明度、押し込みエフェクトなし */
    transform: none !important; /* 押し込みエフェクトを無効化 */
}

/* ハンバーガーアイコン */
.clh-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clh-hamburger-line {
    width: 100%;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* アクティブ状態のハンバーガーアニメーション */
.clh-toggle.active .clh-hamburger-line:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.clh-toggle.active .clh-hamburger-line:nth-child(2) {
    opacity: 0;
}

.clh-toggle.active .clh-hamburger-line:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

.clh-toggle.active {
    background: #f0f0f0;
}

.clh-menu-text {
    font-family: serif;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 0; /* パディングを明示的に0に */
    letter-spacing: 1px;
    line-height: 0.9; /* 行高をさらに小さく設定 */
    display: block; /* ブロック要素として明示 */
}

.clh-toggle.active .clh-menu-text {
    color: #B8860B;
}

/* サイドメニュー */
.clh-side-menu {
    position: fixed;
    top: 85px; /* ヘッダーの高さ分下に配置 */
    left: 0;
    width: 100%;
    height: calc(100% - 85px); /* ヘッダー分の高さを除く */
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.clh-side-menu.active {
    visibility: visible;
    opacity: 1;
}

.clh-side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
}

.clh-side-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: #fff !important; /* 背景色を強制設定 */
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: visible; /* オーバーフローを表示 */
    z-index: 100001; /* 高いz-indexを設定 */
}

.clh-side-menu.active .clh-side-menu-content {
    transform: translateX(0);
}

.clh-side-menu-header {
    display: none !important; /* ヘッダーを非表示 */
}

.clh-side-menu-close {
    font-size: 24px;
    cursor: pointer;
    color: #333 !important; /* 色を強制的に設定 */
    transition: color 0.3s ease;
    display: block !important; /* 強制的に表示 */
    width: 30px; /* 幅を設定 */
    height: 30px; /* 高さを設定 */
    line-height: 30px; /* 行の高さで中央配置 */
    text-align: center; /* 水平中央配置 */
    border: 1px solid #ddd; /* デバッグ用の枠線 */
    border-radius: 50%; /* 丸い背景 */
    background: #f8f9fa; /* 背景色 */
}

.clh-side-menu-close:hover {
    color: #B8860B;
}

.clh-side-menu-body {
    padding: 20px;
}

.clh-side-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.clh-side-nav-menu li {
    margin-bottom: 10px;
}

.clh-side-nav-menu a {
    display: block; /* flexからblockに変更 */
    padding: 0; /* パディングをリセット */
    text-decoration: none;
    color: inherit; /* テキスト色を継承 */
    background: transparent; /* 背景色をリセット */
    border-radius: 0; /* 角丸をリセット */
    transition: none; /* トランジションをリセット */
    font-weight: normal; /* フォントウェイトをリセット */
    margin-bottom: 15px; /* 項目間の余白 */
}

.clh-side-nav-menu a:hover {
    background: transparent; /* ホバー時の背景色をリセット */
    color: inherit; /* ホバー時の色も継承 */
}

/* メニュー項目のテキストスタイル（画像がない場合） */
.clh-menu-item-text-only {
    display: block;
    padding: 10px 0; /* パディングを上下のみに変更 */
    background: transparent; /* 背景色を透明に */
    border-radius: 0; /* 角丸を削除 */
    color: #836c25; /* デフォルトのテキスト色 */
    font-weight: normal; /* フォントウェイトを通常に */
    transition: color 0.3s ease; /* 色のみのトランジション */
    text-decoration: none; /* 下線を削除 */
    font-size: 16px; /* 適切なフォントサイズ */
    line-height: 1.4; /* 読みやすい行高 */
}

.clh-menu-item-text-only:hover {
    background: transparent; /* ホバー時も背景透明 */
    color: #836c25; /* ホバー時も同じ色（動的に設定される） */
    text-decoration: none; /* ホバー時も下線なし */
    opacity: 0.7; /* ホバー時は透明度で変化 */
}

/* メニュー項目の画像スタイル（バナー形式） */
.clh-menu-item-image {
    width: 100%; /* 幅を100%に */
    height: auto; /* 高さを自動に */
    object-fit: cover;
    border-radius: 6px; /* 角丸を追加 */
    margin: 0; /* マージンをリセット */
    display: block; /* ブロック要素として表示 */
}

/* 画像とテキストが両方ある場合のコンテナ */
.clh-menu-item-content {
    display: block;
}

/* 画像の下のテキスト */
.clh-menu-item-text {
    display: block;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 0 0 6px 6px; /* 下のみ角丸 */
    color: #333;
    font-weight: bold;
    margin-top: -6px; /* 画像との隙間を詰める */
    transition: all 0.3s ease;
}

.clh-menu-item-content:hover .clh-menu-item-text {
    background: rgb(131, 108, 37);
    color: #fff;
}

/* 管理画面のメニュー画像セクション */
.clh-menu-image-section {
    margin: 10px 0;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.clh-menu-image-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.clh-menu-image-url {
    width: 60%;
    margin-right: 10px;
}

.clh-menu-image-preview {
    margin-top: 10px;
}

.clh-menu-image-preview img {
    max-width: 300px; /* プレビュー画像を大きく */
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.clh-menu-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
}

/* モバイルフッター */
.clh-mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* 背景色は動的に設定 */
    border-top: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 9998;
    min-height: 70px; /* 最小高さに変更 */
    flex-direction: column; /* 縦方向に配置 */
}

.clh-mobile-footer-main {
    display: flex; /* ボタンエリアをflexコンテナに */
    height: 70px;
}

.clh-mobile-footer-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2); /* 区切り線を追加 */
}

.clh-mobile-footer-item:last-child {
    border-right: none; /* 最後の要素は区切り線なし */
}

.clh-mobile-footer-item a,
.clh-mobile-footer-item > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    text-decoration: none;
    /* 色は動的に設定 */
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    font-weight: 600;
    gap: 7px; /* アイコンとテキストの間隔 */
}

.clh-mobile-footer-item a:hover,
.clh-mobile-footer-item:hover {
    background: rgba(255,255,255,0.1) !important; /* ホバー効果を薄い白に */
}

/* モバイルフッターのリンクテキスト */
.clh-mobile-footer-link {
    padding: 8px 20px;
    text-align: center;
    /* 背景色は動的に設定 */
    border-top: 1px solid rgba(255,255,255,0.1);
}

.clh-mobile-footer-link a {
    /* 色は動的に設定 */
    text-decoration: none;
    font-size: 10px;
    transition: opacity 0.3s ease;
}

.clh-mobile-footer-link a:hover {
    opacity: 1 !important;
}

.clh-mobile-footer-icon {
    width: 22px; /* アイコンサイズを調整 */
    height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* 白に変換 */
    flex-shrink: 0;
}

.clh-mobile-footer-text {
    line-height: 1.2;
    text-align: center;
    font-size: 10px; /* フォントサイズを小さく */
}

/* テーマのデフォルトスタイルをオーバーライド - 元の色を維持 */
.clh-booking-btn,
.clh-booking-btn:link,
.clh-booking-btn:visited,
.clh-booking-btn:focus {
    text-decoration: none !important;
    color: #fff !important; /* 元の白色を維持 */
    transition: opacity 0.3s ease !important; /* 押し込みエフェクトのトランジションを上書き */
    transform: none !important; /* 常に押し込みエフェクトを無効化 */
}

.clh-booking-btn:hover {
    text-decoration: none !important;
    color: #fff !important;
    opacity: 0.7 !important; /* ホバー時の透明度エフェクト */
    transform: none !important; /* 押し込みエフェクトを無効化 */
    transition: opacity 0.3s ease !important; /* 押し込みエフェクトのトランジションを上書き */
}

.clh-booking-btn:active,
.clh-booking-btn:focus:active,
.clh-booking-btn.active {
    text-decoration: none !important;
    color: #fff !important;
    opacity: 0.7 !important; /* アクティブ時も同じ透明度 */
    transform: none !important; /* 押し込みエフェクトを無効化 */
    transition: opacity 0.3s ease !important; /* 押し込みエフェクトのトランジションを上書き */
}

/* メニューボタンも同様に処理 */
.clh-toggle,
.clh-toggle:hover,
.clh-toggle:active,
.clh-toggle:focus,
.clh-toggle.active {
    transform: none !important; /* 押し込みエフェクトを無効化 */
    transition: opacity 0.3s ease !important; /* 押し込みエフェクトのトランジションを上書き */
}

.clh-booking-btn .clh-booking-text,
.clh-booking-btn:link .clh-booking-text,
.clh-booking-btn:visited .clh-booking-text,
.clh-booking-btn:hover .clh-booking-text,
.clh-booking-btn:active .clh-booking-text,
.clh-booking-btn:focus .clh-booking-text {
    color: #fff !important; /* 元の白色を維持 */
}

.clh-mobile-footer-item a,
.clh-mobile-footer-item a:link,
.clh-mobile-footer-item a:visited,
.clh-mobile-footer-item a:hover,
.clh-mobile-footer-item a:active,
.clh-mobile-footer-item a:focus {
    text-decoration: none !important;
    color: inherit; /* モバイルフッターは設定された色を使用 */
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
    .clh-custom-header {
        min-height: 70px; /* モバイルでヘッダー高さを調整 */
    }
    
    .clh-header-container {
        padding: 0; /* モバイルでもパディングなし */
        height: 70px; /* モバイルでコンテナ高さを調整 */
    }
    
    .clh-logo {
        margin-left: 25px; /* モバイルでも少しスペースを増やす（15px→25px） */
    }
    
    .clh-right {
        height: 70px; /* モバイルでの右側エリアの高さを調整 */
    }
    
    .clh-booking {
        display: none;
    }
    
    .clh-social {
        gap: 8px; /* モバイルでの間隔 */
        padding: 5px 10px; /* パディングを調整 */
    }
    
    .clh-social-icon {
        width: auto; /* 幅を自動に変更 */
        height: 30px; /* 高さを維持 */
        font-size: 10px;
        border-radius: 0; /* 丸枠を削除 */
        background: transparent; /* 背景色を透明に */
    }
    
    /* スマホでは最大3つのSNSアイコンのみ表示 */
    .clh-social-icon:nth-child(n+4) {
        display: none;
    }
    
    .clh-mobile-footer {
        display: flex;
    }
    
    body {
        padding-bottom: 90px !important; /* フッターの高さ＋リンク部分に合わせて調整 */
    }
    
    .clh-side-menu {
        top: 70px; /* モバイルでのヘッダー高さに調整 */
        height: calc(100% - 70px); /* モバイルヘッダー分の高さを除く */
    }

    .clh-side-menu-content {
        width: 280px;
    }
    
    .clh-toggle {
        width: 80px; /* モバイルでも適切な幅を確保 */
        height: 100%; /* 親コンテナの高さに合わせる */
        gap: 5px; /* 要素間の間隔を縮める */
        justify-content: center; /* 中央配置を明示的に指定 */
        align-items: center; /* 水平中央配置も明示的に指定 */
        padding: 5px 0; /* 上下にパディングを追加 */
        box-sizing: border-box; /* パディングを含めてサイズ計算 */
    }
    
    .clh-menu-text {
        font-size: 13px; /* モバイルでフォントサイズを調整 */
        margin: 0; /* マージンをリセット */
        line-height: 1; /* 行高をリセット */
    }
    
    .clh-hamburger {
        width: 24px; /* ハンバーガーアイコンを少し小さく */
        height: 18px;
    }
    
    /* 768px以下での×マークアニメーション調整 */
    .clh-toggle.active .clh-hamburger-line:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg); /* 中サイズのハンバーガーに合わせて調整 */
    }
    
    .clh-toggle.active .clh-hamburger-line:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg); /* 中サイズのハンバーガーに合わせて調整 */
    }
}

@media screen and (max-width: 480px) {
    .clh-custom-header {
        min-height: 60px; /* 小画面でヘッダー高さを調整 */
    }
    
    .clh-header-container {
        padding: 0; /* 小画面でもパディングなし */
        height: 60px; /* 小画面でコンテナ高さを調整 */
    }
    
    .clh-logo {
        margin-left: 20px; /* 小画面でも少しスペースを増やす（15px→20px） */
    }
    
    .clh-right {
        height: 60px; /* 小画面での右側エリアの高さを調整 */
    }
    
    .clh-side-menu {
        top: 60px; /* 小画面でのヘッダー高さに調整 */
        height: calc(100% - 60px);
    }
    
    .clh-logo img {
        height: 30px;
        max-width: 200px!important; /* 小画面での最大幅制限 */
        object-fit: contain; /* 比率を保つ */
    }
    
    .clh-site-title {
        font-size: 18px;
    }
    
    .clh-social-icon {
        width: auto; /* 幅を自動に変更 */
        height: 28px; /* 高さを維持 */
        font-size: 9px;
        border-radius: 0; /* 丸枠を削除 */
        background: transparent; /* 背景色を透明に */
    }
    
    /* 小画面でも最大3つのSNSアイコンのみ表示 */
    .clh-social-icon:nth-child(n+4) {
        display: none;
    }
    
    .clh-side-menu-content {
        width: 250px;
    }
    
    .clh-toggle {
        width: 70px; /* 小さい画面でも適切な幅を確保 */
        height: 100%; /* 親コンテナの高さに合わせる */
        gap: 7px; /* 要素間の間隔を最小に */
        justify-content: center; /* 中央配置を明示的に指定 */
        align-items: center; /* 水平中央配置も明示的に指定 */
        padding: 6px 0; /* パディングを少し減らす */
        box-sizing: border-box; /* パディングを含めてサイズ計算 */
    }
    
    .clh-menu-text {
        font-size: 10px; /* フォントサイズをさらに小さく */
        margin: 0; /* マージンをリセット */
        line-height: 0.8; /* 行高をさらに小さく */
        padding: 0; /* パディングもリセット */
        display: block; /* ブロック要素として明示 */
    }
    
    .clh-hamburger {
        width: 18px; /* ハンバーガーアイコンをさらに小さく */
        height: 12px;
        flex-shrink: 0; /* アイコンの縮小を防ぐ */
    }
    
    .clh-hamburger-line {
        height: 2px; /* 線を細く */
        flex-shrink: 0; /* 線の縮小を防ぐ */
    }
    
    /* モバイル用の×マークアニメーション調整 */
    .clh-toggle.active .clh-hamburger-line:nth-child(1) {
        transform: translateY(5px) rotate(45deg); /* 小さいハンバーガーに合わせて調整 */
    }
    
    .clh-toggle.active .clh-hamburger-line:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg); /* 小さいハンバーガーに合わせて調整 */
    }
}
