/* ========================================
   施工事例カテゴリーページ
   2カラムレイアウトスタイル
======================================== */

.construction-category-page {
    padding: 8rem 0;
    background: #fff;
}

.construction-category-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0auto ;
    padding: 0 1rem;
}

.container.construction-category-layout {
    margin: 5rem auto;
}

/* ========================================
   ページタイトル・説明
======================================== */

.category-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
	text-align:center;
}

.category-title {
    font-size: 2.2rem;
    color: #123a66;
    margin: 2.5rem 0 1rem 0;
    font-weight: 900;
    line-height: 1.3;
}

.category-description {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   施工事例グリッド
======================================== */

.category-cases {
    margin-bottom: 3rem;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ========================================
   カード（施工事例）
======================================== */

.case-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* カード画像 */
.case-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f0f0f0;
}

.case-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.case-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-card:hover .case-card-image img {
    transform: scale(1.08);
}

.before-after-thumb {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.before-after-thumb .before-thumb {
    width: 50%;
    height: 100%;
    object-fit: cover;
}

.before-after-thumb .after-thumb {
    width: 50%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #ddd;
    color: #999;
    font-weight: bold;
}

/* カード情報 */
.case-card-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* タイトル */
.case-card-title {
    font-size: 1.05rem;
    color: #123a66;
    margin: 0 0 0.8rem 0;
    font-weight: bold;
    line-height: 1.4;
}

.case-card-title a {
    text-decoration: none;
    color: #123a66;
    transition: color 0.3s ease;
}

.case-card-title a:hover {
    color: #2882C7;
}

/* カテゴリータグ */
.case-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.card-category-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #2882C7;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 詳細情報 */
.case-card-details {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #666;
}

.detail-icon {
    color: #2882C7;
    font-size: 0.9rem;
    min-width: 16px;
}

.detail-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 説明文 */
.case-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

/* 詳細ボタン */
.case-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #2882C7, #005a8b);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.case-card-link:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(40, 130, 199, 0.3);
}

.case-card-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.case-card-link:hover i {
    transform: translateX(2px);
}

/* ========================================
   ページネーション
======================================== */

.pagination-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.pagination-nav .page-numbers {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-nav .page-numbers a,
.pagination-nav .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-nav .page-numbers a {
    background: white;
    color: #2882C7;
    border: 1px solid #2882C7;
}

.pagination-nav .page-numbers a:hover {
    background: #2882C7;
    color: white;
}

.pagination-nav .page-numbers .current {
    background: #2882C7;
    color: white;
}

.pagination-nav .page-numbers .prev,
.pagination-nav .page-numbers .next {
    gap: 0.6rem;
    padding: 0 1.2rem;
}

/* メッセージ */
.no-posts-message {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: #999;
    font-size: 1.05rem;
}

.no-posts-message p {
    margin: 0;
}

/* ========================================
   サイドバー
======================================== */

.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
	padding-bottom:6rem;
}

/* ウィジェット基本 */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #2882C7;
}

.sidebar-title {
    font-size: 1.2rem;
    color: #123a66;
    margin: 0 0 1rem 0;
    font-weight: bold;
}

/* カテゴリーリスト */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-item {
    border-bottom: 1px solid #eee;
}

.category-item:last-child {
    border-bottom: none;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.9rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background: #f8f9fa;
    color: #2882C7;
    padding-left: 1.3rem;
}

.category-item.active .category-link {
    background: #e3f2fd;
    color: #2882C7;
    font-weight: 600;
    border-left: 3px solid #2882C7;
    padding-left: calc(1rem - 3px);
}

.category-count {
    background: #f0f0f0;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: normal;
}

.category-item.active .category-link .category-count {
    background: #2882C7;
    color: white;
}

/* ========================================
   レスポンシブ対応
======================================== */

/* 1024px以下：2カラムから1カラムに */
@media (max-width: 1024px) {
    .construction-category-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .category-title {
        font-size: 1.8rem;
    }
}

/* 768px以下：スマートフォン対応 */
@media (max-width: 768px) {
	
	.container.construction-category-layout {
    margin-top: 5rem;
}
	
    .construction-category-page {
        padding: 1rem 0;
    }

    .construction-category-layout {
        padding: 0 0.8rem;
        gap: 1.5rem;
    }

    .breadcrumb {
        margin-bottom: 1.5rem;
    }

    .breadcrumb-list {
        gap: 0.4rem;
        font-size: 0.9rem;
    }

    .category-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .category-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .category-description {
        font-size: 0.95rem;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        margin-bottom: 2rem;
    }

    .case-card-image {
        height: 150px;
    }

    .case-card-info {
        padding: 1.2rem;
    }

    .case-card-title {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .case-card-excerpt {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .case-card-link {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .sidebar-widget {
        padding: 1.2rem;
        border-radius: 8px;
    }

    .sidebar-title {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    .category-link {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .category-count {
        font-size: 0.8rem;
    }

    .pagination-nav .page-numbers {
        gap: 0.3rem;
    }

    .pagination-nav .page-numbers a,
    .pagination-nav .page-numbers span {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* 480px以下：超小型スマートフォン */
@media (max-width: 480px) {
    .category-title {
        font-size: 1.6rem;
    }

    .breadcrumb-list {
        font-size: 0.85rem;
    }

    .cases-grid {
        gap: 1rem;
    }

    .case-card-image {
        height: 120px;
    }

    .case-card-info {
        padding: 1rem;
    }

    .detail-item {
        font-size: 0.85rem;
    }

    .case-card-excerpt {
        font-size: 0.8rem;
    }

    .case-card-link {
		padding: 0.5rem 0.8rem;
        font-size: 0.95rem;
    }

    .pagination-nav .page-numbers a,
    .pagination-nav .page-numbers span {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}