/* ============================================
   Works Archive Style (絞り込み対応版)
============================================ */

/* --- 全体レイアウト --- */
.works-archive-wrapper { padding-bottom: 80px; }
.section-page-header, .breadSection { display: none !important; } /* 親テーマの装飾消し */

/* --- ヘッダー --- */
.works-hero {
    background: #f5f9fa;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}
.works-hero-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--color-main, #004BB1);
    margin-bottom: 10px;
}
.page-sub { color: #666; }

/* --- タブ切り替え --- */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-bottom: 2px solid #eee;
    margin-bottom: 40px;
    list-style: none;
    padding: 0;
}
.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #888;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}
.tab-item:hover, .tab-item.is-active {
    color: var(--color-main, #004BB1);
    border-bottom-color: var(--color-main, #004BB1);
}

/* --- ボタンエリア --- */
.filter-group { display: none; margin-bottom: 60px; }
.filter-group.is-active { display: block; animation: fadeIn 0.5s; }

.term-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
}

/* --- 絞り込みボタン --- */
.term-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    padding: 8px 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    color: #333;
    font-size: 0.9rem;
    transition: 0.3s;
    font-family: inherit;
}
.term-btn:hover, .term-btn.is-active {
    background: var(--color-main, #004BB1);
    color: #fff;
    border-color: var(--color-main, #004BB1);
}

/* --- 実績カードグリッド --- */
.works-list-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.work-card {
    display: block; /* 初期表示 */
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
}
.work-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.work-thumb { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #eee; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.work-card:hover .work-thumb img { transform: scale(1.05); }

.work-body { padding: 25px; }
.work-label {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--color-main, #004BB1);
    font-weight: bold;
    border: 1px solid var(--color-main, #004BB1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.work-title { font-size: 1.15rem; margin: 5px 0 10px; font-weight: bold; line-height: 1.4; }
.meta-area { font-size: 0.85rem; color: #888; }

/* アニメーション用キーフレーム */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ============================================
   Single Works Style (実績詳細ページ)
============================================ */

.works-single-wrapper {
    padding-bottom: 80px;
    background: #fff;
}

/* 1. ヒーローエリア */
.work-single-hero {
    padding: 60px 0 80px;
    background: linear-gradient(to bottom, #f5f9fa 0%, #fff 100%); /* ふんわりグラデ */
    text-align: center;
}

.work-hero-meta {
    margin-bottom: 20px;
    color: #888;
    font-size: 0.9rem;
}

.work-cats {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-label {
    background: #fff;
    border: 1px solid var(--color-main, #004BB1);
    color: var(--color-main, #004BB1);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.work-main-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
}

.client-name {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.work-main-thumb {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 50px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* リッチな影 */
}

.work-main-thumb img {
    width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* 情報テーブル */
.work-info-table {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.work-info-table dl {
    display: flex;
    align-items: baseline;
    width: 50%; /* 2列表示 */
    padding: 20px;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
}

.work-info-table dt {
    width: 80px;
    font-weight: bold;
    color: var(--color-main, #004BB1);
    font-size: 0.8rem;
    font-family: sans-serif;
    letter-spacing: 1px;
}

.work-info-table dd {
    width: calc(100% - 80px);
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .work-info-table dl { width: 100%; }
    .work-main-title { font-size: 1.5rem; }
}

/* 2-4. 各セクション共通（課題・施策・成果） */
.work-section {
    padding: 80px 0;
}

/* 背景色を交互に変える */
.section-issue { background: #fff; }
.section-point { background: #f9f9f9; } /* 少しグレー */
.section-result { background: #fff; }

.container-sm {
    max-width: 800px; /* 読みやすい幅に狭める */
}

.section-title-area {
    text-align: center;
    margin-bottom: 40px;
}

.section-title-area .en {
    display: block;
    color: var(--color-main, #004BB1);
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.section-title-area .ja {
    font-size: 1.6rem;
    font-weight: bold;
}

/* 本文エリア（WordPressのエディタスタイル） */
.entry-body p { margin-bottom: 1.5em; line-height: 1.8; }
.entry-body h3 { 
    font-size: 1.3rem; 
    border-left: 5px solid var(--color-main, #004BB1); 
    padding-left: 15px; 
    margin: 40px 0 20px; 
}
.entry-body img { max-width: 100%; height: auto; border-radius: 5px; }

/* 5. ギャラリー */
.section-gallery {
    padding-top: 50px;
    border-top: 1px solid #eee;
}
.gallery-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #333;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.gallery-item img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
}

/* 7. ナビゲーション */
.work-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}
.nav-archive a {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid #ddd;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}
.nav-archive a:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}
.nav-prev a, .nav-next a {
    text-decoration: none;
    color: var(--color-main, #004BB1);
    font-weight: bold;
}