/* ========================
   カテゴリーハブページ (Swiper UI)
   ======================== */

.category-hub {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0 6rem; /* 左右のpaddingは個別に設定 */
}

/* ページヘッダー */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 1rem 0;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    margin: 0 0 0.5rem;
    letter-spacing: 0.05em;
}

.page-subtitle {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

/* ========================
   1. ナビゲーション Swiper
   ======================== */
.nav-container {
    position: sticky;
    top: 0; /* 画面の一番上にピッタリ固定 */
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    padding: 0.8rem 0;
    margin-bottom: 2rem;
}

.nav-swiper {
    width: 100%;
    padding: 0 1rem; /* 左右に余白を持たせる */
    box-sizing: border-box;
}

.nav-slide {
    width: auto; /* コンテンツ幅に合わせる */
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

/* アクティブなスライドのスタイル (Swiperが付与するクラス) */
.nav-slide.swiper-slide-thumb-active {
    background: #1f2937;
    color: #fff;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.2);
}

.nav-slide:not(.swiper-slide-thumb-active):hover {
    background: #e5e7eb;
    color: #374151;
}

/* ========================
   2. コンテンツ Swiper
   ======================== */
.content-container {
    width: 100%;
    overflow: hidden; /* 横スクロールバーを出さない */
    touch-action: pan-y; /* 縦スクロールは許可し、横スワイプはJS(Swiper)に任せる */
}

/* 各スライド内のコンテナ */
.content-slide {
    width: 85%; /* 左右が見えるように幅を少し狭くする */
    max-width: 600px; /* PCなどで広がりすぎないように */
    transition: all 0.3s ease;
    opacity: 0.4; /* デフォルトは薄く */
    transform: scale(0.9); /* 少し小さく */
}

.content-slide.swiper-slide-active,
.content-slide.swiper-slide-duplicate-active {
    opacity: 1; /* アクティブなときはくっきり */
    transform: scale(1); /* 等倍 */
}

.category-section-content {
    padding: 0 0.5rem; /* 端の余白を少し減らす */
    width: 100%;
}

/* セクション見出し (タブ切り替え後もわかりやすいように残す) */
.section-label {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.section-slug {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
}

/* 記事グリッド (前のものと同様) */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.5rem;
    padding-bottom: 1rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    border: 1px solid #eee;
    user-select: none; /* テキスト選択防止（スワイプしやすくする） */
    -webkit-user-drag: none; /* 画像ドラッグ防止(Webkit) */
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: #e5e7eb;
}

.img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-thumb {
    transform: scale(1.05);
}

.article-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
}

.article-date {
    font-size: 0.8rem;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
}

/* レスポンシブ (タブレット・スマホ) */
@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .category-hub {
        padding: 1.5rem 0 4rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .nav-container {
        top: 0; /* スマホでも一番上にピッタリ固定 */
        padding: 0.6rem 0;
    }

    .nav-slide {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* スマホではサムネイル付きリストレイアウトに変更 */
    .article-card {
        flex-direction: row;
        align-items: center;
        height: auto;
        border-radius: 8px;
    }

    .img-wrapper {
        width: 110px;
        aspect-ratio: 1 / 1; /* 正方形 */
        flex-shrink: 0;
    }

    .article-content {
        padding: 0.8rem 1rem;
    }

    .article-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
        line-height: 1.5;
    }
}