/* ===========================================
   記事一覧ページ専用CSS
   articles.css
=========================================== */

/* ヒーローセクション（トップページ風） */
.articles-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-dark);
    padding-top: 100px;
    padding-bottom: 60px;
}

.articles-hero__background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.articles-hero__banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.articles-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 10, 46, 0.4) 0%,
        rgba(15, 10, 46, 0.6) 50%,
        rgba(15, 10, 46, 0.85) 100%
    );
}

.articles-hero .container {
    position: relative;
    z-index: 10;
}

.articles-hero__content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.articles-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.articles-hero__title {
    font-family: 'Noto Serif JP', serif;
    color: white;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    text-shadow: 
        -2px -2px 0 rgba(0, 0, 0, 0.8),
        2px -2px 0 rgba(0, 0, 0, 0.8),
        -2px 2px 0 rgba(0, 0, 0, 0.8),
        2px 2px 0 rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.5);
}

.articles-hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    font-weight: 400;
}

.articles-hero__subtitle .highlight-gold {
    color: #FFD700;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* 進捗表示（ヒーロー内） */
.articles-hero__progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.progress-circle {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    color: white;
}

.progress-circle__current {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.progress-circle__divider {
    font-size: 2rem;
    opacity: 0.6;
    margin: 0 0.25rem;
}

.progress-circle__goal {
    font-size: 2rem;
    font-weight: 600;
    opacity: 0.7;
}

.progress-circle__label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

.progress-bar-hero {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar-hero__fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 4px;
    transition: width 1.5s ease-out;
}

/* パンくずリスト（ヒーロー用調整） */
.articles-hero .breadcrumb {
    margin-bottom: 1.5rem;
}

.articles-hero .breadcrumb__list {
    justify-content: center;
}

.articles-hero .breadcrumb__item a {
    color: rgba(255, 255, 255, 0.7);
}

.articles-hero .breadcrumb__item a:hover {
    color: white;
}

.articles-hero .breadcrumb__item:not(:last-child)::after {
    color: rgba(255, 255, 255, 0.5);
}

.articles-hero .breadcrumb__item--current {
    color: white;
}

/* 記事グリッド */
.articles-main {
    padding: 3rem 0 4rem;
    background: var(--bg-light);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* 初期読み込み時のちらつき防止 */
.articles-grid:not(.is-ready) .article-card {
    visibility: hidden;
}

/* フィルターで除外されたカード */
.article-card.filtered-out {
    display: none !important;
}

/* ページネーションで非表示のカード */
.article-card.hidden {
    display: none !important;
}

/* フィルターボタン */
.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background-color: #f0f0ff;
}

button.filter-btn.filter-btn--active,
.filter-btn.filter-btn--active {
    background-color: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 700;
}

/* 記事カード */
.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.article-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* サムネイル（16:9） */
.article-card__thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 アスペクト比 */
    background: #e2e8f0;
    overflow: hidden;
}

.article-card__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card__placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Vol番号バッジ - 名前の左に配置 */
.article-card__badge {
    display: none;
}

/* NEWバッジ */
.article-card__new-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    z-index: 2;
}

/* カードコンテンツ */
.article-card__content {
    padding: 1.25rem 1.5rem 1.5rem;
}

/* 名前とVol番号を横並び */
.article-card__name {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card__name::before {
    content: attr(data-vol);
    display: inline-block;
    padding: 0.25rem 0.6rem;
    margin-right: 0.5rem;
    background: #6366f1;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.article-card__category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.article-card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.article-card__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.article-card:hover .article-card__button {
    gap: 0.75rem;
    color: var(--primary-dark);
}

.article-card__button i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card__button i {
    transform: translateX(3px);
}

/* 最新記事カードの特別スタイル */
.article-card--new {
    border: 2px solid var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.article-card--new:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
}

/* フィルター時の非表示アニメーション */
.article-card.hidden {
    display: none;
}

.article-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.article-card.fade-in {
    animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ページネーション */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1.5rem 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pagination.is-ready {
    opacity: 1;
}

.pagination__btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination__btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination__numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination__number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination__number:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination__number--active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination__ellipsis {
    padding: 0 0.5rem;
    color: var(--text-light);
}

/* note誘導ボタン */
.articles-note-cta {
    text-align: center;
    margin-top: 2rem;
}

/* CTAセクション */
.articles-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    text-align: center;
}

.articles-cta__content h2 {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: white;
    margin-bottom: 1rem;
}

.articles-cta__content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* フィルターセクション（guests.cssから継承、追加調整） */
.filter-section {
    padding: 1.5rem 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 80px;
    z-index: 100;
}

/* デスクトップではトグルボタン非表示 */
.filter-toggle {
    display: none;
}

/* レスポンシブ */
@media (max-width: 1400px) {
    .articles-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .articles-hero {
        min-height: 50vh;
    }
    
    .progress-circle__current {
        font-size: 3rem;
    }
    
    .progress-circle__goal {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .articles-hero {
        min-height: 55vh;
        padding-top: 80px;
        padding-bottom: 40px;
    }
    
    .articles-hero__title {
        font-size: 1.75rem;
    }
    
    .articles-hero__subtitle {
        font-size: 1rem;
    }
    
    .progress-circle__current {
        font-size: 2.5rem;
    }
    
    .progress-circle__divider {
        font-size: 1.5rem;
    }
    
    .progress-circle__goal {
        font-size: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    /* フィルター折りたたみ */
    .filter-section {
        top: 70px;
        padding: 0;
    }
    
    .filter-wrapper {
        flex-direction: column;
        gap: 0;
    }
    
    .filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.875rem 1rem;
        background: white;
        border: none;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text-primary);
    }
    
    .filter-toggle__left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-toggle__icon {
        transition: transform 0.3s ease;
    }
    
    .filter-toggle.active .filter-toggle__icon {
        transform: rotate(180deg);
    }
    
    .filter-label {
        display: none;
    }
    
    .filter-buttons {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 1rem;
        background: #f8fafc;
        border-top: 1px solid var(--border-light);
    }
    
    .filter-buttons.active {
        max-height: 300px;
        padding: 1rem;
    }
    
    .filter-btn {
        flex-shrink: 0;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .pagination__btn span {
        display: none;
    }
    
    .pagination__btn {
        padding: 0.75rem;
    }
    
    .pagination__numbers {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .article-card__content {
        padding: 1rem 1.25rem 1.25rem;
    }
    
    .article-card__name {
        font-size: 1.05rem;
    }
    
    .article-card__desc {
        font-size: 0.8rem;
    }
    
    .pagination__number {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* 表示件数コントロール（将来拡張用） */
.articles-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.articles-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.articles-count strong {
    color: var(--text-primary);
}

.articles-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.articles-sort label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.articles-sort select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
}
