/**
 * IDOL TOKYO NEO
 * News Page (page-news.php) Styles
 * (Inspired by Anime/Game Portal Style - 3-Col PC / 2-Col SP Grid Layout)
 */

/* ==========================================================================
   0. PAGE SPECIFIC OVERRIDES & UTILITIES
   ========================================================================== */
.d-none {
    display: none !important;
}

/* ==========================================================================
   1. NEWS PAGE CONTAINER & SECTION LAYOUT
   ========================================================================== */
.news-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-32) var(--space-20) 120px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.news-section-inner {
    padding-top: var(--space-24);
    padding-bottom: var(--space-64);
    position: relative;
    box-sizing: border-box;
}

/* ==========================================================================
   2. CATEGORY TABS (参考画像準拠：アンダーライン＆洗練タブ)
   ========================================================================== */
.news-category-tabs-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: var(--space-48);
    box-sizing: border-box;
}

.news-category-tabs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-32);
    padding: 0 var(--space-16);
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.news-category-tabs::-webkit-scrollbar {
    display: none;
}

.news-cat-tab {
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted, #537593);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: var(--space-8) var(--space-4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
    text-transform: uppercase;
}

.news-cat-tab:hover {
    color: var(--accent-cyan-deep, #0284C7);
}

.news-cat-tab.active {
    color: var(--accent-cyan-deep, #0284C7);
    border-bottom-color: var(--accent-cyan-deep, #0284C7);
}

/* ==========================================================================
   3. NEWS CARDS GRID (PC: 3列 / スマホ: 2列グリッド)
   ========================================================================== */
.news-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--space-32);
    row-gap: var(--space-48);
    width: 100%;
    box-sizing: border-box;
}

.news-card-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   サムネイル画像枠 (横長バナー＆縦長キャスト写真 両対応 4:3 黄金比率)
   -------------------------------------------------------------------------- */
.news-card-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm, 4px);
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.6) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(254, 235, 237, 0.6) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 6px 18px rgba(4, 49, 86, 0.06);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.news-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center 12% !important;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: contrast(0.98) saturate(0.98);
}

/* 画像未設定（プレースホルダー）時の全面フィット＆クリスタル背景 */
.news-card-thumb[src*="placeholder.svg"],
.news-card-thumb:not([src]) {
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #E0F2FE 0%, #FFFFFF 50%, #FDEBED 100%);
    opacity: 0.85;
}

.news-card-link:hover .news-card-thumb-wrap {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.18);
}

.news-card-link:hover .news-card-thumb {
    transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   カード本文 (日付 + カテゴリ + ハイフン線 + タイトル)
   -------------------------------------------------------------------------- */
.news-card-body {
    padding-top: var(--space-12);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    font-size: 13px;
    line-height: 1.2;
}

.news-card-date {
    font-family: var(--font-num);
    font-weight: 700;
    color: var(--text-navy, #064070);
    letter-spacing: 0.5px;
}

.news-card-cat {
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-cyan-deep, #0284C7);
}

.news-card-cat.badge-campaign {
    color: #059669;
}

.news-card-cat.badge-important {
    color: var(--accent-pink, #FF4B82);
}

.news-card-cat.badge-schedule {
    color: #0284C7;
}

/* 日付とタイトルの間のアクセントハイフン線 */
.news-card-line {
    width: 24px;
    height: 1.5px;
    background-color: var(--accent-cyan-deep, #0284C7);
    margin: 8px 0 10px 0;
    opacity: 0.6;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.news-card-link:hover .news-card-line {
    width: 36px;
    opacity: 1;
}

.news-card-title {
    font-family: var(--font-jp);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main, #043156);
    line-height: 24px;
    letter-spacing: 0.4px;
    margin: 0;
    display: -webkit-box;
    display: box;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    transition: color 0.3s ease;
}

.news-card-link:hover .news-card-title {
    color: var(--accent-cyan-deep, #0284C7);
}

.empty-news-box {
    grid-column: 1 / -1;
    background-color: #FFFFFF;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card, 0 10px 30px rgba(4, 49, 86, 0.08));
    box-sizing: border-box;
}

/* ==========================================================================
   4. PAGINATION NAVIGATION (参考画像準拠：数字＆矢印ナビ)
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-16);
    margin-top: var(--space-48);
}

.pagination-container .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-num);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-navy, #064070);
    text-decoration: none;
    padding: var(--space-4) var(--space-8);
    position: relative;
    transition: all 0.3s ease;
}

.pagination-container .page-numbers:hover,
.pagination-container .page-numbers.current {
    color: var(--accent-cyan-deep, #0284C7);
}

.pagination-container .page-numbers.current::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background-color: var(--accent-cyan-deep, #0284C7);
}

.pagination-container .page-numbers.dots {
    border: none;
    background: transparent;
    color: var(--text-muted, #537593);
}

.pagination-container .prev,
.pagination-container .next {
    font-size: 16px;
    padding: 0 var(--space-8);
}

/* ==========================================================================
   5. RESPONSIVE REFINEMENTS (タブレット: 3列 / スマホ: 2列表示完全保証)
   ========================================================================== */
@media (max-width: 1023px) {
    .news-card-grid {
        column-gap: var(--space-20);
        row-gap: var(--space-36);
    }

    .news-category-tabs {
        gap: var(--space-24);
    }

    .news-cat-tab {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .news-page-container {
        padding-top: var(--space-20);
        padding-bottom: 90px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .news-category-tabs-wrapper {
        margin-bottom: var(--space-28);
    }

    .news-category-tabs {
        gap: var(--space-16);
        padding: 0 8px;
        justify-content: flex-start;
        width: 100%;
    }

    .news-cat-tab {
        font-size: 13px;
        letter-spacing: 1px;
        padding: 6px 2px;
    }

    /* 📱 スマホ表示時：参考画像と同じく【2列グリッド】を完全保証 */
    .news-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        column-gap: 12px;
        row-gap: 24px;
    }

    .news-card-thumb-wrap {
        aspect-ratio: 4 / 3;
    }

    .news-card-body {
        padding-top: 8px;
    }

    .news-card-meta {
        gap: 6px;
        font-size: 11px;
    }

    .news-card-date {
        font-size: 11px;
    }

    .news-card-cat {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .news-card-line {
        width: 16px;
        margin: 4px 0 6px 0;
    }

    .news-card-title {
        font-size: 12px;
        line-height: 18px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .pagination-container {
        gap: var(--space-10);
        margin-top: var(--space-32);
    }

    .pagination-container .page-numbers {
        font-size: 13px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .news-card-grid {
        column-gap: 8px;
        row-gap: 20px;
    }

    .news-card-title {
        font-size: 11.5px;
        line-height: 16px;
    }
}