@charset "UTF-8";

/* ===================================================
   ニュースセクション スタイル
   =================================================== */

/* ニュースセクション 外枠 */
.top-news-section {
    background: var(--theme-bg-color, rgba(255, 255, 255, 0.70)) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: clamp(16px, 1.2vw, 28px);
    padding: clamp(16px, 1.5vw, 28px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: background 0.25s ease;
    min-height: 0;
}

/* スマホ用タブ（PCでは非表示） */
.top-news-mobile-tabs {
    display: none;
}

/* ニュース内部コンテナ */
.top-news-container {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: clamp(12px, 0.9vw, 18px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    min-height: 0;
    will-change: height;
}

/* PC: トラック */
.top-news-slider-track {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    box-sizing: border-box;
    min-height: 0;
    overflow: hidden;
    scrollbar-width: none;
}

.top-news-slider-track::-webkit-scrollbar {
    display: none;
}

/* 各グループカード */
.news-group-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
    min-height: 0;
}

/* PC時: 無限ループ用クローンカードは非表示 */
.news-group-card-clone {
    display: none !important;
}

/* ニュースリスト */
.news-group-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 各ニュースアイテム */
.top-news-item {
    border-radius: 0;
    border-left: none !important;
    border-right: none !important;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* 乃木坂46 アイテム配色 */
.top-news-item.group-item-nogizaka46 {
    background-color: rgba(158, 62, 178, 0.07);
    border-top: 1px solid rgba(158, 62, 178, 0.18);
    border-bottom: 1px solid rgba(158, 62, 178, 0.18);
}
.top-news-item.group-item-nogizaka46:hover {
    background-color: rgba(158, 62, 178, 0.14);
    border-top-color: rgba(158, 62, 178, 0.35);
    border-bottom-color: rgba(158, 62, 178, 0.35);
}
.top-news-item.group-item-nogizaka46 .top-news-date {
    color: var(--nogizaka-color, #7e1083);
}

/* 櫻坂46 アイテム配色 */
.top-news-item.group-item-sakurazaka46 {
    background-color: rgba(241, 157, 181, 0.14);
    border-top: 1px solid rgba(241, 157, 181, 0.32);
    border-bottom: 1px solid rgba(241, 157, 181, 0.32);
}
.top-news-item.group-item-sakurazaka46:hover {
    background-color: rgba(241, 157, 181, 0.24);
    border-top-color: rgba(241, 157, 181, 0.50);
    border-bottom-color: rgba(241, 157, 181, 0.50);
}
.top-news-item.group-item-sakurazaka46 .top-news-date {
    color: var(--sakurazaka-color, #d45b7c);
}

/* 日向坂46 アイテム配色 */
.top-news-item.group-item-hinatazaka46 {
    background-color: rgba(91, 190, 229, 0.10);
    border-top: 1px solid rgba(91, 190, 229, 0.24);
    border-bottom: 1px solid rgba(91, 190, 229, 0.24);
}
.top-news-item.group-item-hinatazaka46:hover {
    background-color: rgba(91, 190, 229, 0.18);
    border-top-color: rgba(91, 190, 229, 0.42);
    border-bottom-color: rgba(91, 190, 229, 0.42);
}
.top-news-item.group-item-hinatazaka46 .top-news-date {
    color: var(--hinatazaka-color, #1a8cc4);
}

/* はみ出るアイテムを非表示にする */
.top-news-item.is-hidden {
    display: none !important;
}

/* PCでは展開トグルボタンは非表示 */
.news-expand-toggle-btn {
    display: none !important;
}

.top-news-link {
    display: flex;
    flex-direction: column;
    padding: 8px clamp(12px, 1vw, 18px);
    text-decoration: none !important;
    color: inherit;
    gap: 3px;
}

/* 日時 */
.top-news-meta {
    display: flex;
    align-items: center;
}

.top-news-date {
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* タイトル */
.top-news-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.42;
    white-space: normal;
    word-break: break-word;
    transition: color 0.2s ease;
}

.top-news-item.group-item-nogizaka46:hover .top-news-title {
    color: var(--nogizaka-color, #7e1083);
}
.top-news-item.group-item-sakurazaka46:hover .top-news-title {
    color: var(--sakurazaka-color, #d45b7c);
}
.top-news-item.group-item-hinatazaka46:hover .top-news-title {
    color: var(--hinatazaka-color, #1a8cc4);
}

.news-group-empty {
    margin: 0;
    padding: 8px;
    color: #94a3b8;
    font-size: 0.76rem;
    text-align: center;
}

/* スマホ・タブレット（1024px以下） */
@media screen and (max-width: 1024px) {
    .top-news-section {
        height: auto !important;
        padding: 12px 14px 14px;
    }

    .top-news-section .top-section-header {
        margin-bottom: 8px;
    }

    .top-section-actions {
        display: flex;
        gap: clamp(8px, 0.6vw, 14px);
    }

    .top-news-section .top-section-header .top-section-actions {
        display: none;
    }

    .top-news-section .top-section-actions.mobile-only {
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    .top-news-section .top-section-actions.mobile-only .button {
        width: 100%;
        padding: 8px 14px;
        font-size: 0.84rem;
    }

    /* スマホ用タブバー */
    .top-news-mobile-tabs {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
    }

    .news-mobile-tab-btn {
        flex: 1;
        padding: 5px 8px;
        border-radius: 20px;
        border: 1px solid #e2e8f0;
        background-color: #ffffff;
        color: #64748b;
        font-size: 0.76rem;
        font-weight: 700;
        cursor: pointer;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        text-align: center;
    }

    .news-mobile-tab-btn.active {
        background-color: var(--theme-color) !important;
        border-color: var(--theme-color) !important;
        color: #ffffff !important;
    }

    /* スライダートラック */
    .top-news-slider-track {
        flex-direction: row !important;
        align-items: flex-start !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
        padding: 0 !important;
        gap: 0 !important;
        width: 100% !important;
        scrollbar-width: none !important;
    }

    .top-news-slider-track::-webkit-scrollbar {
        display: none;
    }

    /* 各グループカード */
    .news-group-card {
        display: flex !important;
        flex: 0 0 100% !important;
        min-width: 100% !important;
        width: 100% !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: always !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
    }

    .top-news-link {
        padding: 7px 12px;
        gap: 2px;
    }

    .top-news-date {
        font-size: 0.68rem;
    }

    .top-news-title {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    /* スマホ折畳時: 未展開時は1件目のみ表示 */
    .news-group-card:not(.is-expanded) .top-news-item:not(:first-child) {
        display: none !important;
    }

    /* スマホ展開時: 最大5件までに制限 */
    .news-group-card.is-expanded .top-news-item:nth-child(n+6) {
        display: none !important;
    }

    /* 展開ボタン */
    .news-expand-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 5px 0;
        background: rgba(255, 255, 255, 0.75);
        border: none;
        border-top: 1px dashed rgba(0, 0, 0, 0.08);
        color: var(--theme-color);
        font-size: 0.8rem;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    .news-expand-toggle-btn:active {
        background-color: rgba(255, 255, 255, 0.95);
    }

    .news-expand-toggle-btn i {
        transition: transform 0.25s ease;
    }

    /* 展開時はアイコンを回転 */
    .news-group-card.is-expanded .news-expand-toggle-btn i {
        transform: rotate(180deg);
    }
}