/* 共通スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#custom-body {
    font-family: Arial, sans-serif;
    padding-bottom: 10px; /* ボタンの表示領域を確保するため、コンテンツに余白を追加 */
    padding-top: 100px; /* 固定ヘッダー分の高さを確保 */
}

/* ヘッダーを固定 */
header {
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ナビゲーションバー */
.hdnavbar {
    display: flex;
    justify-content: space-between; /* ロゴとナビゲーションアイコンを左右に配置 */
    align-items: center;
    margin: 10px 10px 0;
}

/* ロゴエリア */
.hdlogo {
    flex: 1; /* ロゴ部分にスペースを割り当て */
    display: flex; /* ロゴをFlexboxで配置 */
    align-items: center; /* 垂直方向に中央寄せ */
}

/* ロゴエリアの調整 */
.hdlogo img {
    max-width: 140px; /* ロゴ画像の最大幅 */
    height: auto; /* 高さを自動調整 */
    display: block; /* ロゴ画像をブロック要素に */
}

/* ナビゲーションアイコンエリア */
.hdnav-icons {
    display: flex;
    align-items: flex-end; /* 下揃えに設定 */
}

/* 各ナビゲーションアイコンのスタイル */
.hdnav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none; /* 下線を削除 */
    color: #11347b !important;
    font-size: 12px;
    position: relative; /* バッジの位置調整のための設定 */
    margin-left: 10px; /* アイコン同士の間隔 */
}

.hdnav-icon:hover {
    text-decoration: none; /* ホバー時の下線を消す */
    color: inherit; /* テキストの色を変えない */
}

/* 各アイコンのサイズ調整 */
.hdnav-icon i {
    font-size: 25px; /* アイコンのサイズ */
}

/* 各アイコン下のテキスト */
.hdnav-icon p {
    font-size: 9px; /* テキストサイズ */
    margin: 0;
}

/* カートのバッジ */
.hdbadge {
    position: absolute;
    top: -10px; /* カートアイコンの位置に合わせて調整 */
    right: -10px; /* カートアイコンの位置に合わせて調整 */
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 12px;
}

/* 縦の区切り線 */
.hddivider {
    height: 36px;
    width: 1px;
    background-color: #ccc;
    margin-left: 10px;
    margin-bottom: 5px;
}

/* ハンバーガーメニュー */
.hdmenu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center; /* アイコンとテキストを中央揃え */
    justify-content: flex-end; /* 下揃えに設定 */
    cursor: pointer;
    height: 45px; /* ロゴと同じ高さに設定 */
    margin-left: 5px; 
}

.hdmenu-toggle .hdbar {
    height: 3px;
    width: 25px;
    background-color: #11347b; /* ハンバーガーメニューの色 */
    margin: 3px 0; /* 棒同士の間隔を小さく */
}

.hdmenu-toggle p {
    font-size: 9px; /* テキストのサイズを小さく */
    color: #11347b !important; /* テキストの色 */
}

/* 検索バーは固定しない */
.hdsearch-bar {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    background-color: #fff;
}

/* 検索バーの入力フィールド */
.hdsearch-bar input {
    flex: 1; /* 入力フィールドをフレックスで広げる */
    padding: 15px 10px 15px 30px !important; /* 内側の余白を調整 */
    border: 1px solid #ccc; /* 枠線を設定 */
    border-radius: 5px 0 0 5px; /* 左側の角を丸める */
    font-size: 16px; /* フォントサイズ */
    height: 100%; /* 高さをボタンと一致させる */
    box-sizing: border-box; /* ボックスのサイズを枠線を含むように設定 */
}

/* 検索ボタン */
.hdsearch-bar button {
    padding: 14px !important; /* ボタンの余白 */
    border: 1px solid #ccc; /* 枠線を設定 */
    background-color: #11347b !important; /* 背景色 */
    color: #fff; /* テキストの色 */
    border-radius: 0 5px 5px 0; /* 右側の角を丸める */
    cursor: pointer; /* カーソルをポインターに */
    display: flex; /* アイコンを中央に配置 */
    align-items: center;
    justify-content: center;
    min-width: 50px; /* 最小幅を設定 */
    box-sizing: border-box; /* ボックスのサイズを枠線を含むように設定 */
    height: 100%; /* 高さを入力フィールドと一致させる */
}

/* 検索アイコンのスタイル */
.hdsearch-bar button i {
    font-size: 20px; /* アイコンのサイズを設定 */
    color: #fff; /* アイコンの色 */
}

/* メニューのオーバーレイ */
.hdoverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* 背景を半透明にして後ろを隠す */
    z-index: 999;
    display: none;
}

/* スライドメニューのスタイル */
.hdslide-menu {
    position: fixed;
    top: 0;
    right: 0; /* 初期位置を右端に設定 */
    width: 80%; /* ハンバーガーメニューの幅を調整 */
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translateX(100%); /* メニューを初期位置で画面外に隠す */
    transition: transform 0.3s ease; /* スライドのアニメーション */
    overflow-y: auto; /* スライドメニュー自体のスクロールを有効にする */
    -webkit-overflow-scrolling: touch; /* スムーズなスクロールを実現 */
}

/* メニュー表示時 */
.hdslide-menu.hdopen {
    transform: translateX(0); /* メニューが表示された状態 */
    transition: transform 0.3s ease; /* スライドのアニメーション */
}

.hdmenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px; /* 見出し部分の余白を減らす */
    background-color: #11347b;
    color: #fff;
}

.hdmenu-header h2 {
    margin: 0;
    font-size: 18px; /* 見出しの文字サイズを小さく */
    order: 1; /* メニュータイトルを1番目に表示 */
}

.hdclose-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    order: 2; /* ×ボタンを2番目に表示 */
}

/* メニューコンテンツのスタイル */
.hdmenu-content {
    max-height: calc(100vh - 60px); /* メニューコンテンツの高さを画面サイズに応じて調整 */
    overflow-y: auto; /* コンテンツのスクロールを有効化 */
    -webkit-overflow-scrolling: touch; /* スムーズなスクロールを実現 */
}

/* ログインと新規会員登録のボタンを横並びに配置 */
.hdbtn-container {
    display: flex;
    justify-content: space-between; /* ボタンの間にスペースを入れる */
    margin: 10px 5px; /* ボタンの余白 */
}

.hdbtn-link {
    display: inline-block;
    width: 48%; /* ボタンと同じ幅にする */
    text-align: center;
    text-decoration: none; /* 下線を消す */
    margin: 0 5px; /* ボタン間のスペースを調整 */
}

.hdbtn {
    width: 100%; /* ボタンの幅をリンクの幅に合わせる */
    padding: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.hdlogin-btn {
    background-color: #4CAF50;
    color: #fff;
}

.hdregister-btn {
    background-color: #f44336;
    color: #fff;
}

/* アイコンメニューのスタイル */
.hdicon-menu {
    display: flex;
    justify-content: space-between; /* アイテムを横並びに配置 */
    padding: 15px 0;
    margin-bottom: 15px; /* アイコンメニュー下の余白 */
    border-bottom: 1px solid #ccc; /* アイコンメニュー下に区切り線 */
}

.hdicon-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* アイコンとテキストを中央揃え */
    text-align: center; /* テキストを中央揃え */
    flex: 1; /* 各アイコンを均等に表示 */
    padding: 10px;
}

.hdicon-item i {
    font-size: 30px; /* Font Awesomeアイコンのサイズ */
    color: #11347b; /* アイコンの色を統一 */
    margin-bottom: 5px;
}

.hdicon-item p {
    margin: 0;
    font-size: 14px; /* テキストのサイズ */
    color: #333;
}

/* カテゴリメニュー */
.hdcategory-menu {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 影をつけて浮き上がらせる */
    margin-bottom: 15px; /* メニュー間の余白 */
}

.hdcategory-item {
    border-bottom: 1px solid #ccc; /* 各カテゴリを区切る線 */
}

.hdcategory-header {
    padding: 10px 15px;
    font-size: 16px;
    display: flex;
    justify-content: space-between; /* テキストとアイコンを左右に配置 */
    align-items: center;
    cursor: pointer;
    background-color: #f9f9f9; /* 背景色 */
}

.hdplus-icon {
    font-size: 20px;
    font-weight: bold;
    color: #0072bc; /* プラスアイコンの色 */
    transition: all 0.3s ease; /* アイコンの変化にアニメーションを追加 */
}

/* サブメニュー */
.hdsub-menu {
    display: none; /* 初期状態では非表示 */
    max-height: 0;
    overflow: hidden; /* メニューが隠れるようにする */
    transition: max-height 0.3s ease-out; /* アニメーションを追加 */
}

.hdsub-menu.open {
    display: block; /* 開かれた状態 */
    max-height: 500px; /* 開いた状態の高さを設定 */
}

.hdsub-menu a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
}

.hdsub-menu a:hover {
    background-color: #e0e0e0; /* ホバー時の背景色 */
}

/* サービスリンクセクション */
.hdservice-section {
    background-color: #fff; /* 背景色 */
    margin: 15px 0; /* 上下の余白 */
    padding: 10px; /* 内側の余白 */
    border-radius: 5px; /* 角の丸み */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 影のスタイル */
}

.hdservice-link {
    display: block;
    background-color: #0072bc; /* ボタンの背景色 */
    color: #fff !important; /* テキストの色 */
    text-align: center;
    padding: 15px 10px; /* 内側の余白 */
    margin-bottom: 10px; /* 各リンクの下の余白 */
    border-radius: 5px; /* ボタンの角の丸み */
    text-decoration: none; /* リンクの下線を削除 */
}

.hdservice-link:hover {
    background-color: #005a8c; /* ホバー時の背景色 */
}

/* スマホ・タブレット用メニュー調整 */
@media (max-width: 1024px) {
    .hdmenu-toggle {
        display: flex;
    }

    .hdlogo {
        justify-content: flex-start; /* ロゴを左に寄せる */
    }

    .hdnav-icons {
        justify-content: flex-end; /* アイコン群を右に寄せる */
    }

    .hdnavbar {
        justify-content: space-between; /* ロゴとアイコン群を両端に配置 */
    }

    .header .hdsearch-bar {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%; /* タブレットサイズでも100%幅に */
    }

    .hdmenu-content {
        padding: 0 10px 30px 0; /* ハンバーガーメニュー内の余白を調整 */
    }
}

/* メニュー内アコーディオンのスタイル */
.hdsub-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.hdsub-menu.open {
    height: 500px; /* 高さを自動調整 */
}

/* 隠されたカテゴリの初期状態 */
.hdhidden-categories {
    max-height: 0; /* 高さを0に設定して非表示に */
    overflow: hidden; /* オーバーフローを隠す */
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out; /* 高さと不透明度のアニメーション */
    opacity: 0; /* 初期状態では透明に */
}

/* 続きを見るボタン */
.hdview-more-wrapper {
    display: flex;
    justify-content: center; /* 子要素を中央に配置 */
    width: 100%; /* 親要素の幅を100%に設定 */
    padding: 30px 0; /* ボタン上下の余白を追加 */
}

/* 続きを見るボタンのスタイル */
.hdview-more {
    display: inline-block;
    width: 320px; /* 横幅を調整（必要に応じて変更） */
    padding: 10px 25px; /* ボタンの内側余白を調整 */
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #0072bc; /* 背景色を変更 */
    border: 2px solid #fff; /* ボタンの枠線 */
    border-radius: 30px; /* ボタンを丸く */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease; /* 背景色とトランスフォームのアニメーション */
}

/* ホバー時のスタイル */
.hdview-more:hover {
    background-color: #005a8c; /* ホバー時の背景色 */
    transform: scale(1.05); /* ホバー時に少し大きくなる効果 */
}

/* 続きを見るボタンが押されると隠されたカテゴリが表示される */
.hdhidden-categories.open {
    display: block;
    max-height: 1000px; /* 必要に応じて高さを調整（多くのカテゴリを表示する場合は大きく） */
    opacity: 1; /* 表示時は不透明に */
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out; /* 高さと不透明度のアニメーション */
}

/* 隠されたカテゴリ表示時のスタイル */
.hdhidden-categories.open .hdview-more {
    width: 300px; /* 閉じるボタンも同じサイズに調整 */
    background-color: #ff3333; /* 閉じるボタンの背景色を変更（任意） */
}

/* 初期状態で表示するカテゴリ */
.hdinitially-visible {
    display: block;
    max-height: none; /* 初期表示部分は高さ制限なし */
    overflow: hidden;
}

/* タブレット用スタイル */
@media (min-width: 768px) and (max-width: 1024px) {
    /* 隠すカテゴリの高さを設定し、overflowで見えなくする */
    .hdinitially-visible {
        max-height: 350px; /* 表示するカテゴリ部分の高さを調整 */
        overflow: hidden;
    }

    /* 隠れたカテゴリは初期状態で非表示 */
    .hdhidden-categories {
        display: none;
    }

    /* 続きを見るボタンの位置を調整 */
    .hdview-more-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 10px 0; /* ボタン上下の余白を調整 */
    }

    /* ボタンのデザイン調整 */
    .hdview-more {
        display: inline-block;
        width: 320px; /* 横幅を調整（必要に応じて変更） */
        padding: 10px 25px; /* ボタンの内側余白を調整 */
        font-size: 16px;
        font-weight: bold;
        color: #fff;
        background-color: #0072bc; /* 背景色を変更 */
        border: 2px solid #fff; /* ボタンの枠線 */
        border-radius: 30px; /* ボタンを丸く */
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.3s ease; /* 背景色とトランスフォームのアニメーション */
    }

    /* 開閉ボタン押下時のアニメーション */
    .hdview-more:hover {
        background-color: #005a8c; /* ホバー時の背景色 */
        transform: scale(1.05); /* ホバー時に少し大きくなる効果 */
    }

    /* 表示切り替え */
    .hdhidden-categories.open {
        display: block;
    }
}

/* ページトップへ戻るボタンのスタイル修正 */
#back-to-top {
    position: fixed; /* 画面内の固定位置に設定 */
    bottom: 5px; /* 画面下からの位置 */
    right: 20px; /* 画面右からの位置 */
    width: 50px;
    height: 50px;
    background-color: #11347b; /* ボタンの背景色 */
    color: #fff;
    border: none;
    border-radius: 50%; /* 丸くする */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1000; /* 画面の上に表示 */
    opacity: 0; /* 初期状態で非表示に */
    transition: opacity 0.3s ease, transform 0.3s ease; /* 表示と隠れるときのアニメーション */
    display: flex; /* アイコンを中央に配置 */
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 1; /* ボタン表示時 */
    transform: translateY(0); /* ボタンが表示される際の位置調整 */
}

#back-to-top:hover {
    background-color: #005a8c; /* ホバー時の背景色を変更 */
}

/* スライダー部分のスタイル */
@media (max-width: 767px) {
.fixmain-slider {
    margin-top: 50px; /* 固定されたヘッダーの高さ分、スペースを確保 */
    padding-top: 100px; /* 固定ヘッダーと検索バーの高さに合わせた余白 */
    /* スライダー部分をスクロールさせる */
    overflow-y: auto;
}
}