/* ===================================================================
   会員通信 年別フィルタリング用 カスタムドロップダウン スタイル
=================================================================== */


.custom-select-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    cursor: pointer;
}

/* --- ドロップダウンのトリガー（クリックして開く部分） ---
 * 常に表示されており、選択中の年、または「年選択」が表示される。
 */
.custom-select-trigger {
    position: relative;
    top: 25px;
    padding: 10px 30px 10px 10px;
    background-color: #fff;
    border-radius: 0.66em;
    z-index: 1;
    border: 1px solid #ccc;
}

/* --- トリガーの右端に表示される「▼」の矢印 ---
 * ::after疑似要素で作成。
 */
.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* --- ドロップダウンが開いた時の矢印（上向き「▲」にする） --- */
.custom-select-wrapper.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

/* --- 選択肢のリストを囲むコンテナ（通常は非表示） ---
 * JavaScriptによってbody直下にクローンが作られ、表示される。
 * z-indexを高く設定し、最前面に表示されるようにする。
 */
.custom-options {
    display: none;
    /* 通常時は非表示 */
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    border-radius: 0.66em;
    background-color: #fff;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    z-index: 5;
    font-size: 20px;
    text-align: center;
}

/* --- ドロップダウンが開いた時に選択肢を表示 --- 
 * JavaScriptで .open クラスが付与された際に、クローンされた.custom-optionsを表示する。
*/
.custom-select-wrapper.open .custom-options {}

/* --- 個々の選択肢（年）のスタイル --- */
.custom-option {
    padding: 10px;
}

/* --- 選択肢にマウスカーソルが乗った時のスタイル --- */
.custom-option:hover {
    background-color: #f0f0f0;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* --- ローディングスピナーの回転アニメーション定義 --- */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- 記事リストのスクロール制限 --- */
.legal_press_lists {
    max-height: 400px;
    /* 4記事程度の高さに制限 */
    overflow-y: auto;
    /* 縦方向のスクロールバーを表示 */
    padding: 10px;
    margin: 0;
}

/* --- 記事リストアイテムのスタイル（必要に応じて調整） --- */
.legal_press_lists li {
    list-style: none;
    margin-bottom: 10px;
}

.no_info_center {
    text-align: center;
    font-size: x-large;
    margin-top: 40px;
}

/* --- スマホ対応 --- */
@media screen and (max-width: 768px) {
    .legal-press-header .dropdown-container {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        top: auto !important;
        margin-top: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .archive_category,
    .archive_year {
        width: 100% !important;
        max-width: 350px !important;
    }

    .custom-select-trigger {
        font-size: 20px !important;
        padding: 8px 25px 8px 8px !important;
        margin-bottom: 20px;
    }

    .custom-select-trigger::after {
        content: '';
        position: absolute;
        /* right: 10px;
        top: 50%; */
        transform: translateY(-50%);
        border: 5px solid transparent;
        border-top-color: #333;
    }
}

/* --- クローンされたドロップダウンオプションのz-index調整 --- */
.custom-options-clone {
    position: absolute;
    z-index: 11 !important;
}

.archive_year {
    right: 0;
    transform: translateY(-50%);
    width: 300px;
    font-size: 20px;
}

.branch-tabs-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    gap: 40px;
}

/* カテゴリタブ */
.branch-tabs-layout {
    margin-top: 20px;
}

.branch-cat-area {}

.branch-cat-tabs {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.branch-cat-tabs li {
    padding: 15px 35px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: large;
}

.branch-cat-tabs li.active {
    background: #007b5e;
    color: #fff;
}

/* 年タブ＋投稿リスト 横並び */
.branch-content-layout {
    display: flex;
    align-items: flex-start;
}

/* 年タブ（左） */
.branch-year-area {
    width: 124px;
}

.branch-year-tabs {
    list-style: none;
    gap: 10px;
    padding: 0;
    margin-top: 20px;
}

.branch-year-tabs li {
    padding: 15px 12px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ccc;
    font-size: large;
    text-align: center;
}

.branch-year-tabs li.active {
    background: #007b5e;
    color: #fff;
}

/* 投稿リスト（右） */
.branch-posts-area {
    flex: 1;
}

@media screen and (max-width: 768px) {
    .branch-cat-tabs {
        display: flex;
        gap: 1px;
        list-style: none;
    }

    .branch-cat-tabs li {
        padding: 4px 10px;
        border: 1px solid #ccc;
        background: #fff;
        cursor: pointer;
        font-size: large;
    }

    .branch-year-area {
        width: 40px;
    }

    .branch-year-tabs {
        list-style: none;
        gap: 10px;
        padding: 0;
        margin-top: 20px;
    }

    .branch-year-tabs li {
        padding: 15px 12px;
        cursor: pointer;
        background-color: #fff;
        border: 1px solid #ccc;
        font-size: large;
        text-align: center;
    }
}