/* 
 * Video List Page Styles
 * 動画一覧ページ専用CSS
 */

/* フォント設定 */
.video-list-container,
.video-list-container * {
    font-family: 游明朝, YuMincho, 'ヒラギノ明朝 Pro W3', 'Hiragino Mincho Pro', 'ＭＳ Ｐ明朝', 'MS PMincho', serif;
}

/* コンテナスタイル */
.video-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 0;
}

/* パンくずリスト */
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #171c60;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ページヘッダー */
.video-title-box {
    text-align: center;
}

.video-title-box .ja {
    color: #888888;
    font-size: 0.84rem;
    margin-bottom: 5px;
    display: block;
    line-height: 1;
}

.video-title-box .title {
    font-size: 3.5rem;
    letter-spacing: 3px;
    line-height: 1;
    font-weight: 700;
    font-family: 'Century Gothic', Avenir, Arial, sans-serif;
}

/* フィルタリングタグ */
.video-filter-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 1140px;
    margin: 0 auto;
    margin-bottom: 40px;
    padding: 20px 0;
}

.filter-tag {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-tag:hover {
    background: #e8f4fd;
    border-color: #171c60;
    color: #171c60;
}

.filter-tag.active {
    background: #171c60;
    border-color: #171c60;
    color: white;
}

/* アコーディオン */
.tag-accordion {
    width: 100%;
    max-width: 1140px;
    margin-top: 10px;
}

.tag-accordion-toggle {
    border: 1px solid #ddd;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.accordion-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.tag-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 10px 0;
    margin-top: 0;
    opacity: 0;
}

.tag-accordion-content.expanded {
    max-height: 300px;
    padding: 15px 10px 5px;
    margin-top: 10px;
    opacity: 1;
}

/* 動画グリッド */
.video-list-grid {
    display: grid;
    grid-template-columns: 1fr;  /* 1カラム表示 */
    gap: 30px;
    margin-bottom: 50px;
}

/* 動画アイテム */
.video-item {
    background: white;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 1140px;  /* 1カラム表示時の最大幅を制限 */
    margin: 0 auto;    /* 中央揃え */
    width: 100%;
}

/* 横並びレイアウト */
.video-item-inner {
    display: flex;
    align-items: center;
    gap: 20px;

}

/* 動画サムネイル */
.video-thumbnail {
    position: relative;
    width: 50%;  /* 固定幅 */
    height: auto;
    aspect-ratio: 16/9;
    flex-shrink: 0; /* 縮小を防ぐ */
    overflow: hidden;
}

.video-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.video-thumbnail a:hover {
    opacity: 0.8;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 再生ボタン */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 動画コンテンツ */
.video-content {
    flex: 1; /* 残りのスペースを使用 */
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 50%;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.video-tag {
    font-size: 13px;
    padding: 2px 6px 2px 6px;
    font-weight: 500;
    color: #333;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    position: relative;
    display: inline-block;
}


.video-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    color: #0042cc;
    font-weight: 600;
    order: 1; /* タイトルを最初に表示 */
}

.video-title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-title a:hover {
    opacity: 0.8;
}

/* ページネーション */
.video-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-number,
.next-page {
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    letter-spacing: normal;
    font-family: 游明朝, YuMincho, 'ヒラギノ明朝 Pro W3', 'Hiragino Mincho Pro', 'ＭＳ Ｐ明朝', 'MS PMincho', serif;
}

.page-number:hover,
.next-page:hover {
    background: #171c60;
    color: white;
    border-color: #171c60;
    opacity: 1;
}

.page-number.current {
    background: #171c60;
    color: white;
    border-color: #171c60;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .video-list-container {
        padding: 15px;
    }
    
    .video-list-header .page-title {
        font-size: 28px;
    }
    
    .video-filter-tags {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .filter-tag {
        font-size: 13px;
        padding: 6px 16px;
    }
    
    .tag-accordion-toggle {
        font-size: 13px;
        padding: 6px 16px;
    }
    
    .video-list-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .video-item {
        max-width: 100%;  /* モバイルでは最大幅を100%に */
    }
    
    /* モバイルでは縦並びに変更 */
    .video-item-inner {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }
    
    .video-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .video-content {
        width: 100%;
        padding: 0;
    }
    
    .video-title {
        font-size: 15px;
    }
    
    .pagination-nav {
        gap: 8px;
    }
    
    .page-number,
    .next-page {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-list-container {
        margin-top: 100px;
        padding: 10px;
    }
    
    .video-list-header .page-title {
        font-size: 24px;
    }
    
    .video-filter-tags {
        justify-content: flex-start;
        margin-bottom: 20px;
        gap: 6px;
    }
    
    .filter-tag {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .tag-accordion-toggle {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .tag-accordion-content.expanded {
        padding: 10px 0px 0;
        justify-content: flex-start;
        gap: 6px;
    }
    
    .video-list-grid {
        gap: 20px;
    }
    
    /* 480px以下では更にコンパクトに */
    .video-item-inner {
        padding: 0;
        gap: 12px;
    }
    
    .video-content {
        gap: 8px;
    }
    
    .video-tags {
        order: 2;
        gap: 5px;
    }
    
    .video-tag {
        font-size: 11px;
        padding: 3px 6px 3px 6px; 
    }
    
    .video-title {
        font-size: 14px;
        font-weight: 400;
    }
    
    .pagination-nav {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .page-number,
    .next-page {
        padding: 6px 10px;
        font-size: 13px;
    }
} 

/* AJAXローディング・エラー表示 */
.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-message p {
    font-size: 16px;
    margin: 0;
    position: relative;
}

.loading-message p::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #171c60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #d32f2f;
    font-size: 16px;
    background-color: #ffeaa7;
    border: 1px solid #fdcb6e;
    border-radius: 5px;
    margin: 20px 0;
}

.no-videos-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin: 20px 0;
}

/* 動画リストのトランジション効果 */
.video-list-grid {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.video-list-grid.loading {
    opacity: 0.7;
}

/* フィルタータグのアクティブ状態強化 */
.filter-tag.active {
    background-color: #171c60;
    color: white;
    border-color: #171c60;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 28, 96, 0.2);
}

/* モバイル対応 - ローディング・エラー表示 */
@media (max-width: 768px) {
    .loading-message,
    .error-message,
    .no-videos-message {
        padding: 40px 15px;
        font-size: 14px;
    }
    
    .loading-message p::after {
        width: 16px;
        height: 16px;
        margin-left: 8px;
    }
} 