@charset "UTF-8";

/* =========================================
   パンくずリスト
   ========================================= */
.breadcrumb {
    padding: 15px 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}
.breadcrumb ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #666;
}
.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.breadcrumb li:not(:last-child)::after {
    content: '>';
    color: #ccc;
    font-size: 12px;
}
.breadcrumb a {
    color: #666;
    display: flex;
    align-items: center;
}
.breadcrumb a:hover {
    color: var(--primary-color);
}

/* =========================================
   レイアウト
   ========================================= */
.archive-page-wrapper {
    padding: 40px 0 80px;
    background-color: #F9F9F9;
}
.archive-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* =========================================
   メインコンテンツ (左側)
   ========================================= */
.archive-main {
    flex-grow: 1;
    min-width: 0;
    max-width: 100%;
}

/* ページヘッダー（タイトル） */
.archive-header {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px 30px;
    margin-bottom: 20px; /* 30pxから少し狭める */
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.archive-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin: 0;
}
.archive-title span {
    font-size: 18px;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* ▼ 新規追加: ツールバー (表示件数など) */
.archive-toolbar {
    display: flex;
    justify-content: flex-end; /* 右寄せに配置 */
    margin-bottom: 25px; /* グリッドとの間隔 */
}

/* 表示件数コントロール */
.archive-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
}
.limit-buttons {
    display: flex;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}
.limit-btn {
    background: none;
    border: none;
    padding: 8px 15px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    border-right: 1px solid #ddd;
}
.limit-btn:last-child {
    border-right: none;
}
.limit-btn:hover {
    background: #e9e9e9;
}
.limit-btn.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

/* =========================================
   記事カード一覧 (グリッド)
   ========================================= */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    transition: opacity 0.3s ease; /* JSでのフェードアニメーション用 */
}

/* 記事カードのデザイン */
.archive-card {
    background: #fff;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}
.archive-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
/* .archive-card__img {
    padding: 10px;
    border-bottom: 1px solid #eee;
} */
.archive-card__img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.archive-card__cat {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
}
.archive-card__body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.archive-card__meta {
    margin-bottom: 10px;
    font-size: 14px;
}
.meta-date {
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 8px;
}
.meta-new {
    color: #d32f2f;
    font-weight: bold;
    font-style: italic;
    font-size: 13px;
}
.archive-card__title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 1.5;
    margin-bottom: 15px;
    /* 3行で三点リーダー */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.archive-card__excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-top: auto; /* 下に寄せる */
    /* 2行で三点リーダー */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* =========================================
   ページネーション
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}
.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-weight: bold;
    text-decoration: none;
    border-radius: 2px;
    transition: 0.2s;
}
.page-numbers:hover:not(.current) {
    background: #f0f0f0;
}
.page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    cursor: default;
}
.page-numbers.next,
.page-numbers.prev {
    width: auto;
    padding: 0 15px;
    font-size: 13px;
}
.page-dots {
    color: #999;
    padding: 0 5px;
}

/* =========================================
   サイドバー (右側)
   ========================================= */
.archive-sidebar {
    width: 260px;
    flex-shrink: 0;
}
.sidebar-menu {
    background: #fff;
    border: 1px solid #ddd;
}
.sidebar-header {
    background-color: var(--primary-color); 
    color: #fff;
    padding: 20px 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}
.sidebar-list li {
    border-bottom: 1px solid #eee;
}
.sidebar-list li:last-child {
    border-bottom: none;
}
.sidebar-list a {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}
.sidebar-arrow {
    margin-right: 12px;
    flex-shrink: 0; 
    color: var(--primary-color); 
}
.sidebar-list a:hover {
    background-color: #f5f5f5;
}

/* =========================================
   レスポンシブ対応 (スマホ用)
   ========================================= */
@media (max-width: 900px) {
    
    /* パンくずの横スクロール対応 */
    .breadcrumb {
        padding: 10px 0;
        overflow: hidden;
    }
    .breadcrumb .container {
        padding-right: 0;
    }
    .breadcrumb ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        margin-bottom: -10px;
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    .breadcrumb ul::-webkit-scrollbar { display: none; }
    .breadcrumb li { white-space: nowrap; flex-shrink: 0; }
    .breadcrumb li:last-child { padding-right: 20px; }

    .archive-page-wrapper {
        padding: 30px 0 60px;
    }
    .archive-layout {
        flex-direction: column;
        gap: 0;
    }
    
    /* メインエリア調整 */
    .archive-main {
        order: 1; 
        width: 100%;
    }
    
    /* ヘッダー周り (縦積みに) */
    .archive-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
        margin-bottom: 25px;
    }
    .archive-title {
        font-size: 18px;
        border-left-width: 4px;
        padding-left: 10px;
    }
    .archive-title span {
        font-size: 14px;
        display: inline-block;
        margin-top: 5px;
    }
    .archive-controls {
        width: 100%;
        justify-content: flex-end;
    }

    /* グリッドを1列に */
    .archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .archive-card__body {
        padding: 20px;
    }
    .archive-card__title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    /* ページネーション縮小 */
    .pagination {
        gap: 5px;
    }
    .page-numbers {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    .page-numbers.next {
        padding: 0 10px;
    }

    /* サイドバー */
    .archive-sidebar {
        width: 100%;
        order: 2; 
        margin-top: 40px;
    }
    .sidebar-header {
        font-size: 15px;
        padding: 15px;
    }
    .sidebar-list a {
        padding: 15px; 
    }
}