/* ========================================
   施工事例詳細ページ（single-construction_case.php）
   2カラムレイアウトスタイル
======================================== */

/* ========================================
   レイアウト基本
======================================== */

.construction-detail {
    padding: 2rem 0;
}

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

/* ========================================
   メインコンテンツ
======================================== */

.construction-main {
    min-width: 0;
}

/* ページタイトル・カテゴリー */
.case-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.case-title {
    font-size: 2.2rem;
    color: #123a66;
    margin-bottom: 1rem;
    font-weight: 900;
    line-height: 2.2rem !important;
}

.case-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #2882C7, #005a8b);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* セクションタイトル */
.section-title {
    font-size: 1.5rem;
    color: #123a66;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #2882C7;
    font-weight: bold;
}

/* ビフォー・アフター */
.before-after-section {
    margin-bottom: 3rem;
}

.before-after-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.before-image,
.after-image {
    display: flex;
    flex-direction: column;
}

.before-image h3,
.after-image h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.8rem;
    text-align: center;
}

.image-wrapper {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-wrapper img:hover {
    transform: scale(1.02);
}

/* 工事内容 */
.construction-content {
    margin-bottom: 3rem;
    background: #FFF;
    padding: 2rem;
    border-radius: 12px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
}

.content-text {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-text p {
    margin-bottom: 1rem;
}

.content-text ul,
.content-text ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-text li {
    margin-bottom: 0.8rem;
}

img.alignnone.size-medium {
    width: 100%;
}

/* 関連施工事例 */
.related-cases {
    margin-bottom: 3rem;
}

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

.related-case-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.related-case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.related-case-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f0f0f0;
}

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

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

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

.mini-before-after {
    position: relative;
    width: 100%;
    height: 100%;
}

.mini-before-after .before-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    float: left;
}

.mini-before-after .after-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    float: left;
}

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

.related-case-info {
    padding: 1.5rem;
}

.related-case-info h3 {
    font-size: 1rem;
    color: #123a66;
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.related-case-info h3 a {
    text-decoration: none;
    color: #123a66;
    transition: color 0.3s ease;
}

.related-case-info h3 a:hover {
    color: #2882C7;
}

.related-case-info p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}


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

.construction-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

/* サイドバーウィジェット基本 */
.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-bottom: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sidebar-title i {
    color: #2882C7;
    font-size: 1.1rem;
}

/* 工事詳細 */
.sidebar-details {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    padding:0.5rem;
    background: white;
    border-radius: 8px;
}

.detail-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.detail-value {
    color: #2882C7;
    font-weight: bold;
    font-size: 1rem;
}

/* カテゴリーリンク */
.sidebar-categories .category-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.category-link {
    display: inline-block;
    background: #e3f2fd;
    color: #2882C7;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: #2882C7;
    color: white;
}

/* ポストリスト */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.post-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #eee;
}

.post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.post-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.post-item-info {
    min-width: 0;
}

.post-item-info h4 {
    font-size: 0.9rem;
    color: #123a66;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    line-height: 1.3;
	background:none;
}

.post-item-info h4 a {
    text-decoration: none;
    color: #123a66;
    transition: color 0.3s ease;
}

.post-item-info h4 a:hover {
    color: #2882C7;
}

.post-excerpt {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.post-date {
    font-size: 0.85rem;
    color: #999;
    margin: 0.5rem 0 0 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ========================================
   モーダル
======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90vh;
    top: 50%;
    transform: translateY(-50%);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.close-button {
    position: absolute;
    top: -35px;
    right: 0;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #ccc;
}

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

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

    .before-after-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

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

    .section-title {
        font-size: 1.3rem;
        margin: 2rem 0 1rem 0;
    }
}

/* 768px以下：スマートフォン対応 */
@media (max-width: 768px) {
    .construction-layout {
        padding: 0 0.8rem;
        gap: 1.5rem;
    }

    .construction-main {
        margin-bottom: 1rem;
    }

    .case-title {
        font-size: 1.5rem;
    }

    .case-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
	}

    .case-categories {
        gap: 0.5rem;
    }

    .category-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin: 1.5rem 0 0.8rem 0;
    }

    .before-after-container {
        gap: 1rem;
    }

    .before-image h3,
    .after-image h3 {
        font-size: 1rem;
    }

    .construction-content {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .content-text {
        font-size: 1rem;
    }

    .related-cases-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

    .related-case-info h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

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

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

    .detail-row {
        grid-template-columns: 1fr 2fr;
        gap: 0.5rem;
        padding: 0.8rem 0;
    }

    .post-item {
        grid-template-columns: 60px 1fr;
        gap: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .post-item-image {
        width: 60px;
        height: 60px;
    }

    .post-item-info h4 {
        font-size: 0.85rem;
    }

    .post-excerpt {
        font-size: 0.8rem;
    }

    .modal-content {
        max-width: 95%;
    }

    .close-button {
        top: -30px;
        font-size: 30px;
    }
}

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

    .section-title {
        font-size: 1rem;
    }

    .before-after-container {
        gap: 0.8rem;
    }

    .before-image h3,
    .after-image h3 {
        font-size: 0.9rem;
    }

    .related-cases-grid {
        gap: 0.8rem;
    }

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

    .sidebar-widget {
        padding: 1rem;
    }

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

    .post-item {
        grid-template-columns: 50px 1fr;
    }

    .post-item-image {
        width: 50px;
        height: 50px;
    }

    .detail-row {
        padding: 0.3rem 0.5rem;
    }
	
	.construction-sidebar {
		height:600px;
	}
}

/* ========================================
   スマホ時のおすすめ施工事例（フッター下）
======================================== */

@media (max-width: 1024px) {
    /* 1024px以下では非表示 */
    .related-cases-desktop {
        display: none;
    }
}

/* スマホ用：サイドバーの最新施工事例の下に配置 */
.related-cases-mobile {
    display: none;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .related-cases-mobile {
        display: block;
    }
}