/* ============================================
   articles.css - 記事一覧ページ専用スタイル
   ============================================
   
   目次 (Table of Contents)
   --------------------------------------------
   01. 基本レイアウト
   02. フィーチャー記事セクション
   03. 記事リストセクション
       3-1. フィルターコンテナ
       3-2. デスクトップ用フィルター（1024px以上）
       3-3. タブレット用フィルター（768px-1023px）
       3-4. モバイル用フィルター（767px以下）
   04. 記事カード
   05. 管理者エリア
   06. アニメーション定義
   99. メディアクエリ（レスポンシブ対応）
   
   ============================================ */

/* ============================================
   01. 基本レイアウト
   ============================================ */

.inner-hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("../images/IMG_4478.webp");
}

.inner-hero .hero-overlay {
    justify-content: space-between;
}

/* ============================================
   02. フィーチャー記事セクション
   ============================================ */
.articles-featured {
    width: 43%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 2%;
    margin-left: 5%;
    pointer-events: auto;
}
.featured-article {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-article a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-article a:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.featured-article img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, filter 0.3s ease;
}
.featured-article a:hover img {
    transform: scale(1.01);
    filter: brightness(1.05);
}
.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.articles-featured .featured-content h3 {
    position: relative;
    font-size: 1.25rem;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.9);
    margin: 0 0 8px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}
.articles-featured .featured-content h3::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 10%;
    height: 2px;
    background-color: rgba(0, 123, 255, 1);
    transition: width 0.3s ease;
}
.articles-featured a:hover .featured-content h3 {
    color: rgba(0, 0, 0, 1);
    transform: translateY(-2px);
}
.articles-featured a:hover .featured-content h3::after {
    width: 70%;
}

/* フィーチャー記事の概要 */
.featured-content p {
    font-size: 0.95rem;
    color: rgba(80, 80, 80, 1);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   03. 記事リストセクション
   ============================================ */
.articles-1st {
    display: flex;
    flex-direction: column;
    padding: 2vh 0;   /* フォールバック */
    padding: 2dvh 0;  /* モダンブラウザ */
    margin: 0 2vh;    /* フォールバック */
    margin: 0 2dvh;   /* モダンブラウザ */
    background-color: rgba(255, 255, 255, 1);
    border-radius: 15px;
    text-align: center;
    align-items: center;
    width: 100%;
}
.articles-1st .section-header h1::after {
    display: none;
}

/* --- 3-1. フィルターコンテナ --- */
.filter-container {
    padding: 20px 0;
    margin-bottom: 20px;
    position: relative;
    z-index: 100;
    width: 100%;
}

/* --- 3-2. デスクトップ用フィルター（1024px以上） --- */
.filter-desktop {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    position: relative;
    z-index: 101;
}
.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}
.filter-label i {
    color: #0066cc;
}
.filter-buttons-desktop {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12.8px;
    border: 2px solid transparent;
    border-radius: 25px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}
.filter-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}
.filter-btn span {
    transition: transform 0.3s ease;
}
.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.filter-btn:hover i {
    transform: scale(1.1);
}

/* カテゴリ別カラー（デスクトップ） */
.filter-btn.all:hover,
.filter-btn.all.active {
    background: linear-gradient(135deg, #00bfff, #0099cc);
    color: white;
    border-color: #00bfff;
}
.filter-btn.classroom:hover,
.filter-btn.classroom.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
}
.filter-btn.exam:hover,
.filter-btn.exam.active {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border-color: #28a745;
}
.filter-btn.event:hover,
.filter-btn.event.active {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: white;
    border-color: #ffc107;
}
.filter-btn.competition:hover,
.filter-btn.competition.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-color: #dc3545;
}
.filter-btn.campaign:hover,
.filter-btn.campaign.active {
    background: linear-gradient(135deg, #9602ff, #8302e0);
    color: white;
    border-color: #9602ff;
}

/* デフォルトでタブレット・モバイルフィルターを非表示 */
.filter-tablet,
.filter-mobile {
    display: none;
}

/* --- 3-3. タブレット用フィルター（768px-1023px） --- */
.filter-tablet {
    padding: 0 20px;
    position: relative;
    z-index: 101;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}
.filter-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    min-height: 80px;
}
.filter-tile i {
    font-size: 1.5rem;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
}
.filter-tile span {
    text-align: center;
    line-height: 1.2;
}
.filter-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.filter-tile:hover i {
    transform: scale(1.2);
}
.tile-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: transparent;
    transition: background 0.3s ease;
}

/* タブレット用カテゴリ別カラー */
.filter-tile.all:hover,
.filter-tile.all.active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #00bfff;
    color: #0066cc;
}
.filter-tile.all:hover .tile-indicator,
.filter-tile.all.active .tile-indicator {
    background: #00bfff;
}
.filter-tile.classroom:hover,
.filter-tile.classroom.active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #007bff;
    color: #0056b3;
}
.filter-tile.classroom:hover .tile-indicator,
.filter-tile.classroom.active .tile-indicator {
    background: #007bff;
}
.filter-tile.exam:hover,
.filter-tile.exam.active {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border-color: #28a745;
    color: #1e7e34;
}
.filter-tile.exam:hover .tile-indicator,
.filter-tile.exam.active .tile-indicator {
    background: #28a745;
}
.filter-tile.event:hover,
.filter-tile.event.active {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-color: #ffc107;
    color: #e0a800;
}
.filter-tile.event:hover .tile-indicator,
.filter-tile.event.active .tile-indicator {
    background: #ffc107;
}
.filter-tile.competition:hover,
.filter-tile.competition.active {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-color: #dc3545;
    color: #c82333;
}
.filter-tile.competition:hover .tile-indicator,
.filter-tile.competition.active .tile-indicator {
    background: #dc3545;
}
.filter-tile.campaign:hover,
.filter-tile.campaign.active {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-color: #9602ff;
    color: #8302e0;
}
.filter-tile.campaign:hover .tile-indicator,
.filter-tile.campaign.active .tile-indicator {
    background: #9602ff;
}

/* --- 3-4. モバイル用フィルター（767px以下） --- */
.filter-mobile {
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    z-index: 102;
}
.filter-mobile-header {
    cursor: pointer;
}
.current-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.current-filter:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}
.current-filter i.current-icon {
    font-size: 1.2rem;
    color: #007bff;
}
.current-filter .current-text {
    flex-grow: 1;
    margin-left: 12px;
    text-align: left;
}
.current-filter i.fa-chevron-down {
    font-size: 0.8rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}
.filter-mobile.open .current-filter i.fa-chevron-down {
    transform: rotate(180deg);
}
.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 103;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.filter-mobile.open .filter-dropdown {
    max-height: 300px;
}
.filter-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 18px;
    border: none;
    background: transparent;
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}
.filter-option:last-child {
    border-bottom: none;
}
.filter-option:hover {
    background: #f8f9fa;
}
.filter-option i:first-child {
    font-size: 1.1rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}
.filter-option span {
    flex-grow: 1;
    text-align: left;
}
.filter-option i.fa-check {
    font-size: 0.9rem;
    color: #28a745;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.filter-option.active i.fa-check {
    opacity: 1;
}

/* モバイル用カテゴリ別カラー */
.filter-option.all.active {
    background: rgba(0, 191, 255, 0.1);
    color: #0066cc;
}
.filter-option.classroom.active {
    background: rgba(0, 123, 255, 0.1);
    color: #0056b3;
}
.filter-option.exam.active {
    background: rgba(40, 167, 69, 0.1);
    color: #1e7e34;
}
.filter-option.event.active {
    background: rgba(255, 193, 7, 0.1);
    color: #e0a800;
}
.filter-option.competition.active {
    background: rgba(220, 53, 69, 0.1);
    color: #c82333;
}
.filter-option.campaign.active {
    background: rgba(150, 2, 255, 0.1);
    color: #8302e0;
}

/* ============================================
   04. 記事カード
   ============================================ */
.articles-1st .articles-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 800px;
}
.articles-1st .articles-list a {
    text-decoration: none;
    color: inherit;
}

/* 記事カード全体のレイアウト */
.article-card {
    display: flex;
    width: 100%;
    max-width: 880px;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

/* サムネイル部分 */
.article-thumbnail {
    width: 60%;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}
.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

/* カテゴリバッジ */
.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.category-badge.classroom {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.9), rgba(0, 86, 179, 0.9));
}
.category-badge.exam {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9), rgba(28, 116, 48, 0.9));
}
.category-badge.event {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.9), rgba(224, 170, 6, 0.9));
}
.category-badge.competition {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9), rgba(193, 47, 61, 0.9));
}
.category-badge.campaign {
    background: linear-gradient(135deg, rgba(150, 2, 255, 0.9), rgba(131, 2, 224, 0.9));
}

/* 記事コンテンツ部分 */
.article-content {
    padding: 20px;
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 記事タイトル */
.article-content h2 {
    font-size: 1.08rem;
    margin-bottom: 12px;
    color: #222;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card:hover .article-content h2 {
    color: #0066cc;
}

/* 記事概要 */
.article-content .excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.article-card:hover .excerpt {
    color: #333;
}

/* 更新日時 */
.article-content .updated-at {
    font-size: 0.85rem;
    color: #888;
    text-align: right;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.article-card:hover .updated-at {
    color: #555;
}

/* ============================================
   05. 管理者エリア
   ============================================ */
.articles-2nd .admin-area {
    position: absolute;
    top: 12vh;    /* フォールバック */
    top: 12dvh;   /* モダンブラウザ */
    right: 1vw;   /* フォールバック */
    right: 1dvw;  /* モダンブラウザ */
    display: flex;
    flex-direction: row;
    gap: 1vw;     /* フォールバック */
    gap: 1dvw;    /* モダンブラウザ */
    z-index: var(--z-header);
}
.articles-2nd .hidden {
    display: none;
}
.articles-2nd .admin-area .admin-btn {
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 1);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}
.articles-2nd #login-section .admin-btn:hover {
    background-color: rgba(0, 123, 255, 1);
    transition: background-color 0.3s, color 0.3s;
}
.articles-2nd .admin-buttons .admin-btn.new:hover {
    background-color: rgba(0, 123, 255, 1);
}
.articles-2nd .admin-buttons .admin-btn.edit:hover {
    background-color: rgba(0, 255, 55, 1);
}
.articles-2nd .admin-buttons .admin-btn.delete:hover {
    background-color: rgba(255, 225, 0, 1);
}
.articles-2nd .admin-buttons .admin-btn.logout:hover {
    background-color: rgba(255, 0, 25, 1);
}

/* 現在の透明なスタイルを修正 */
.articles-2nd .loginbtn {
    position: absolute;
    top: 8vh;
    right: 20px;
    background-color: rgba(0, 0, 0, 0);
    /* 透明から青色に変更 */
    
    color: rgba(255, 255, 255, 1);
    padding: 10px 20px;
    border: none;
    /* 境界線追加 */
    
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    /* 影追加 */
}
.articles-2nd .loginbtn:hover {
    background-color: rgba(255, 255, 255, .5);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.filter-results-message {
    margin: 1rem auto;
    padding: 0.75rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}
.articles-list-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #666;
}
.articles-list-loading .spinner-border {
    margin-right: 10px;
}

/* 最新記事リンクの z-index 対策 */
#featured-article-link {
    position: relative;
    z-index: 101;
    display: flex;
    /* 確実にクリック領域を確保 */
}

/* ============================================
   06. アニメーション定義
   ============================================ */
/* fadeInキーフレームはbase.cssで定義 */

/* ============================================
   99. メディアクエリ（レスポンシブ対応）
   ============================================ */

/* タブレット大 (1025px-1200px) */
@media screen and (max-width: 1200px) and (min-width: 1025px) {
    .filter-desktop {
        justify-content: center;
    }
    
    .filter-buttons-desktop {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* タブレット (769px-1024px) */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .filter-desktop {
        display: none;
    }
    
    .filter-tablet {
        display: block;
    }
    
    .inner-hero .hero-overlay {
        justify-content: center;
    }
    
    .articles-1st {
        margin: 0 1vh;  /* フォールバック */
        margin: 0 1dvh; /* モダンブラウザ */
    }
    
    .article-card {
        max-width: 700px;
    }
    
    .articles-featured {
        display: none;
    }
}

/* モバイル (768px以下) */
@media screen and (max-width: 768px) {
    .filter-desktop,
    .filter-tablet {
        display: none;
    }
    
    .filter-mobile {
        display: block;
    }
    
    .inner-hero .articles-featured {
        display: none;
    }
    
    .articles-1st {
        margin: 0;
        padding: 1vh 0;  /* フォールバック */
        padding: 1dvh 0; /* モダンブラウザ */
    }
    
    .filter-container {
        padding: 15px 0;
    }
    /* 記事カードのレスポンシブ対応 */
    
    .article-card {
        flex-direction: column;
        max-width: 100%;
        margin: 0 10px 20px;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 200px;
        min-width: auto;
    }
    
    .article-content {
        width: 100%;
        padding: 15px;
    }
    
    .article-content h2 {
        font-size: 1.2rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .article-content .excerpt {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        font-size: 0.85rem;
    }
    
    .articles-2nd .admin-buttons {
        flex-direction: column;
        gap: 10px;
        top: 10vh;   /* フォールバック */
        top: 10dvh;  /* モダンブラウザ */
        right: 10px;
    }
    
    .articles-2nd .loginbtn {
        top: 7vh;    /* フォールバック */
        top: 7dvh;   /* モダンブラウザ */
        right: 10px;
    }
}

/* 小型モバイル (480px以下) */
@media screen and (max-width: 480px) {
    .article-card {
        margin: 0 5px 15px;
    }
    
    .article-content {
        padding: 12px;
    }
    
    .article-thumbnail {
        height: 160px;
    }
    
    .category-badge {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .article-content .excerpt {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .filter-mobile {
        margin: 0 15px;
    }
    
    .current-filter {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .filter-option {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ========== ブラウザ互換性フォールバック ========== */
@supports not (-webkit-line-clamp: 1) {
    .article-content .excerpt {
        max-height: 6em;
        overflow: hidden;
        position: relative;
    }
    
    .article-content .excerpt::after {
        content: "...";
        position: absolute;
        bottom: 0;
        right: 0;
        background: white;
        padding-left: 1em;
    }
    
    .article-content h2 {
        max-height: 4.2em;
        overflow: hidden;
    }
    
    .featured-content p {
        max-height: 2.8em;
        overflow: hidden;
    }
}

/* ====================================================
   07. シャイニングアニメーション（記事一覧ページ）
   ====================================================
   美術的効果：記事カードのプレミアム感演出
   心理学効果：新着・更新情報への注目誘導
   ==================================================== */

/* --- 記事カード シャイニング効果 --- */
.article-card {
    position: relative;
    overflow: hidden;
}

.article-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: cardShine 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* 各カードで異なるタイミング */
.article-card:nth-child(1)::after { animation-delay: 0s; }
.article-card:nth-child(2)::after { animation-delay: 1s; }
.article-card:nth-child(3)::after { animation-delay: 2s; }
.article-card:nth-child(4)::after { animation-delay: 3s; }
.article-card:nth-child(5)::after { animation-delay: 4s; }

/* ホバー時は一時停止 */
.article-card:hover::after {
    animation-play-state: paused;
    opacity: 0;
}

/* --- フィーチャー記事カード シャイニング --- */
.featured-article {
    position: relative;
    overflow: hidden;
}

.featured-article::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 80%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: imageShine 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

.featured-article:hover::after {
    animation-play-state: paused;
    opacity: 0;
}

/* キーフレーム（cardShine, imageShine）はbase.cssで定義 */

/* --- モバイルでの最適化 --- */
@media screen and (max-width: 768px) {
    .article-card::after,
    .featured-article::after {
        animation-duration: 6s;
    }
}

/* --- アクセシビリティ --- */
@media (prefers-reduced-motion: reduce) {
    .article-card::after,
    .featured-article::after {
        animation: none;
        display: none;
    }
}

/* --- フォーカス状態（キーボードアクセシビリティ） --- */
.article-card:focus-within,
.featured-article:focus-within {
    outline: 3px solid #4dabf7;
    outline-offset: 2px;
}

.filter-btn:focus {
    outline: 3px solid #4dabf7;
    outline-offset: 2px;
}

.article-card a:focus,
.featured-article a:focus {
    outline: none;
}

.article-card:focus-within {
    box-shadow: 0 4px 20px rgba(0, 86, 179, 0.25);
}