/* 工事実績 詳細ページ (single-works.php用) */

/* レイアウト */
.work-record-content-wrapper {
    margin-bottom: 40px;
}

.work-record-two-column-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* カラム間の隙間 */
}

.work-record-image-column {
    flex: 1;
    min-width: 300px; /* 画像カラムの最小幅 */
}

.work-record-text-column {
    flex: 2;
    min-width: 300px; /* テキストカラムの最小幅 */
}

/* アイキャッチ画像 */
.work-record-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.work-record-featured-image.placeholder {
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px; /* プレースホルダーの最小高さ */
    border-radius: 8px;
    color: #777;
}

/* 詳細情報リスト */
.work-record-details-list {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
}

.work-record-details-list .detail-item {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
}
.work-record-details-list .detail-item:last-child {
    border-bottom: none;
}

.work-record-details-list dt {
    font-weight: bold;
    width: 120px; /* ラベルの幅 */
    padding-right: 10px;
    color: #333;
}

.work-record-details-list dd {
    flex: 1;
    margin-left: 0;
    color: #555;
}

/* 本文コンテンツ */
.work-record-main-text-content {
    margin-top: 20px;
    line-height: 1.7;
}
.work-record-main-text-content h2,
.work-record-main-text-content h3,
.work-record-main-text-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.work-record-main-text-content p {
    margin-bottom: 1em;
}
.work-record-main-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* カテゴリー */
.page-main__header .post-categories {
    margin-bottom: 15px;
}

.post-category-badge {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-right: 5px;
    text-decoration: none;
}
.post-category-badge:hover {
    background-color: #0056b3;
}


/* タグ (single-customer_voice.php と共通) */
.post-tags {
    margin-top: 30px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tags__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags__item a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.post-tags__item a:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.post-tags__item a .fa-tag {
    margin-right: 5px;
}

/* 投稿ナビゲーション (single-customer_voice.php と共通) */
.post-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-navigation__links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-navigation__prev a,
.post-navigation__next a,
.post-navigation__archive a {
    padding: 8px 15px;
    border: 1px solid #007bff;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-navigation__prev a:hover,
.post-navigation__next a:hover,
.post-navigation__archive a:hover {
    background-color: #007bff;
    color: #fff;
}

.post-navigation__archive a {
    border-color: #6c757d;
    color: #6c757d;
}
.post-navigation__archive a:hover {
    background-color: #6c757d;
    color: #fff;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .work-record-two-column-layout {
        flex-direction: column;
    }
    .work-record-details-list dt {
        width: 100%;
        margin-bottom: 5px;
    }
    .post-navigation__links {
        flex-direction: column;
        gap: 15px;
    }
    .post-navigation__prev,
    .post-navigation__next,
    .post-navigation__archive {
        width: 100%;
        text-align: center;
    }
    .post-navigation__prev a,
    .post-navigation__next a,
    .post-navigation__archive a {
        display: block;
    }
}

        /* Sidebar */
        .sidebar {
            width: 300px;
            flex-shrink: 0;
        }

        .sidebar-widget {
            background: white;
            border-radius: 12px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        }

        .sidebar-widget h3 {
            color: #1e293b;
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #3b82f6;
        }

        /* Related Works Styles */
        .related-works {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .related-work-item {
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .related-work-item:hover {
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }

        .related-work-link {
            display: flex;
            text-decoration: none;
            color: inherit;
        }

        .related-work-thumb {
            width: 80px;
            height: 60px;
            flex-shrink: 0;
        }

        .related-work-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .related-work-info {
            padding: 10px 15px;
            flex: 1;
        }

        .related-work-info h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 5px;
            line-height: 1.3;
        }

        .related-work-meta {
            font-size: 0.8rem;
            color: #64748b;
            margin: 0;
        }

        /* Category List Styles */
        .category-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .category-item {
            margin-bottom: 12px;
        }

        .category-link {
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-decoration: none;
            color: #475569;
            padding: 8px 12px;
            border-radius: 6px;
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
        }

        .category-link:hover {
            background: #f1f5f9;
            color: #3b82f6;
            border-color: #3b82f6;
        }

        .category-name {
            font-weight: 500;
        }

        .category-count {
            font-size: 0.85rem;
            color: #64748b;
            background: #f1f5f9;
            padding: 2px 8px;
            border-radius: 10px;
        }

        .category-link:hover .category-count {
            background: #3b82f6;
            color: white;
        }

        /* Tag Cloud Styles */
        /* wp_tag_cloud() の出力はデフォルトで a タグの羅列なので、
           クラス .tag-item を各 a タグに直接付与するのは難しいです。
           そのため、親要素 .tag-cloud の中の a タグに対してスタイルを適用します。 */
        .tag-cloud {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .tag-cloud a { /* ここを変更 */
            display: inline-block;
            background: #f1f5f9;
            color: #475569;
            padding: 6px 12px;
            border-radius: 15px;
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 500;
            border: 1px solid #e2e8f0;
            transition: all 0.3s ease;
        }

        .tag-cloud a:hover { /* ここを変更 */
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
            transform: translateY(-1px);
        }

        .sidebar-cta {
            background: linear-gradient(135deg, #ff6b35 0%, #f093fb 100%);
            color: white;
            text-align: center;
        }

        .sidebar-cta h3 {
            border-bottom-color: rgba(255,255,255,0.3);
            color: white;
        }

        .cta-btn {
            display: block;
            background: white;
            color: #ff6b35;
            padding: 15px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            margin-top: 15px;
            transition: all 0.3s ease;
        }

        .cta-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
    }
}

/* スライダーコンテナ */
.works-slider-container {
    margin-bottom: 20px; /* 他の要素との間隔 */
}

/* メインスライダー */
.works-main-slider .slick-slide {
    text-align: center; /* 画像を中央揃えにする場合 */
    height: auto !important; /* Slickのデフォルトheightを上書き */
}

.works-main-slider .slick-slide img {
    width: 100%;
    height: auto;
    max-height: 500px; /* メイン画像の最大の高さを指定 */
    object-fit: cover; /* 画像がコンテナに収まるように調整 */
    border-radius: 8px; /* 角丸 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* 影 */
}

/* メインスライダーの矢印 */
.works-main-slider .slick-prev,
.works-main-slider .slick-next {
    z-index: 10;
    width: 40px;
    height: 40px;
}
.works-main-slider .slick-prev:before,
.works-main-slider .slick-next:before {
    font-size: 40px; /* 矢印のサイズ */
    color: #333; /* 矢印の色 */
    opacity: 0.75;
}
.works-main-slider .slick-prev {
    left: 15px; /* 左矢印の位置 */
}
.works-main-slider .slick-next {
    right: 15px; /* 右矢印の位置 */
}

/* サムネイルスライダー */
.works-thumbnail-slider {
    margin-top: 15px;
}

.works-thumbnail-slider .slick-slide {
    padding: 0 5px; /* サムネイル間の隙間 */
    cursor: pointer;
    height: auto !important; /* Slickのデフォルトheightを上書き */
}

.works-thumbnail-slider .slick-slide img {
    width: 100%;
    height: auto;
    max-height: 80px; /* サムネイルの最大の高さ */
    object-fit: cover;
    border: 2px solid transparent; /* 通常時のボーダーは透明 */
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.works-thumbnail-slider .slick-slide.slick-current img {
    border-color: #007bff; /* アクティブなサムネイルのボーダー色 */
}

/* 工事実績一覧ページ (archive-works.php) */
.archive-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.archive-header__title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

.archive-header__description {
    font-size: 1.5rem;
    color: #666;
    line-height: 1.6;
}

.works-archive-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3カラム */
    gap: 20px; /* カード間の余白 */
}

/* スマートフォンなど画面幅が狭い場合の調整 */
@media (max-width: 768px) {
    .works-archive-list {
        grid-template-columns: repeat(2, 1fr); /* 2カラム */
    }
}
@media (max-width: 480px) {
    .works-archive-list {
        grid-template-columns: 1fr; /* 1カラム */
    }
}


.work-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; /* ボタンの位置調整のため */
}

.work-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-5px);
}

.work-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%; /* カードの高さを揃える */
}

.work-card__thumbnail {
    width: 100%;
    padding-top: 75%; /* アスペクト比 4:3 に変更 (参考サイトに近い比率) */
    position: relative;
    overflow: hidden;
}

.work-card__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-card__body {
    padding: 25px;
    flex-grow: 1; /* 内容が少なくてもフッターが下に来るように */
    display: flex;
    flex-direction: column;
}

.work-card__title {
    font-size: 1.35rem; /* 少し大きく */
    margin-top: 0;
    color: #333;
    line-height: 1.3;
    font-weight: 600;
}

.work-card__meta-list {
    margin: 15px;
}

.work-card__meta-item {
    display: flex;
    margin-bottom: 8px;
    padding-left: 10px; /* 施工場所などの左側に余白を追加 */
    font-size: 1.0rem;
    color: #666;
}

.work-card__meta-item:last-child {
    margin-bottom: 0;
}

.work-card__meta-term {
    font-weight: bold;
    min-width: 80px; /* ラベルの最小幅 */
    color: #555;
    margin-right: 10px;
}

.work-card__meta-desc {
    color: #777;
}

.work-card__tags {
    list-style: none;
    padding: 0;
    margin: 10px 0 15px; /* 上下の間隔調整 */
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.work-card__tag-item {
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}


.work-card__excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px; /* ボタンとの間隔 */
    flex-grow: 1; /* 抜粋文エリアを可変に */
}

.work-card__footer {
    margin-top: auto; /* フッター（ボタン）をカード下部に固定 */
	margin-bottom: 10px; /* ボタンとの間隔 */
	text-align: center; /* ボタンを中央寄せに変更 */
}

.work-card__button {
    display: inline-block;
    background-color: #007bff; /* ボタンの背景色 (テーマカラーに合わせて調整) */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.work-card__button:hover {
    background-color: #0056b3; /* ボタンのホバー色を青系に */
}

/* ページネーションのスタイルは cmn.css や layout.css にあるものを流用、または必要に応じて追加 */
