/* ------------------------------------------------

CUSTOM POST: 施工事例ページ - works -

------------------------------------------------ */

.works .page-title1,
.work .page-title1 {
    margin-bottom: var(--space-3xl);
}

/* ----------------------------------------
ARCHIVE: 施工事例一覧
parts:kv,category-grid利用
---------------------------------------- */

/* ボタン上の余白 */
.works .btn-wrap,
.work .btn-wrap {
    margin-top: var(--space-6xl);
}

/* ----------------------------------------

TAXONOMY: 施工事例カテゴリー

---------------------------------------- */
.works-list__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(40px, 5.71vw, 80px) clamp(30px, 4.28vw, 60px);
    list-style: none;
    margin: 0 0 var(--space-5xl);
    padding: 0;
}

.works-list__item a {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.works-list__item a:hover {
    opacity: 0.7;
}

.works-list__img {
    position: relative;
    width: 100%;
    aspect-ratio: 475 / 298;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 1.5em;
    margin-bottom: 1em;
}

.works-list__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    scale: 1;
    transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .works-list__item a:hover .works-list__img img {
        transform: scale(1.05);
    }
}

.works-list__title {
    --font-min: 16;
    --font-max: 18;
    font-size: var(--font-size);
    font-weight: var(--wght-medium);
    line-height: 1.75;
    letter-spacing: 0.21em;
    margin: 0;
}

.works-list__empty {
    text-align: center;
    padding: var(--space-5xl) 0;
    color: #666;
}

.works-list__back {
    text-align: center;
    margin-top: var(--space-5xl);
}

/* ページネーション */
.works-list .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: var(--space-5xl) 0;
}

.works-list .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-main);
    color: var(--color-main);
    text-decoration: none;
    transition: all 0.3s;
}

.works-list .pagination .page-numbers:hover,
.works-list .pagination .page-numbers.current {
    background: var(--color-main);
    color: #fff;
}

/* SP表示 */
@media (width < 768px) {
    .works-list__grid {
        grid-template-columns: 1fr;
        gap: 2em;
    }
}

/* ----------------------------------------
SINGLE: 施工事例詳細
---------------------------------------- */

.work__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 628;
    overflow: hidden;
    border-radius: 20px;
    --space-min: 36;
    --space-max: 72;
    margin-bottom: var(--space);

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.work__desc {
    font-weight: var(--wght-medium);
    letter-spacing: 0.2em;
    line-height: 2;
    width: min(584px, 100%);
    margin-inline: auto;
    margin-bottom: var(--space-6xl);
}


.work__gallery {
    width: min(584px, 100%);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.work__img {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 628;
    overflow: hidden;
    border-radius: 20px;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}


.info__block {
    width: min(584px, 100%);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    line-height: 2;
    margin-bottom: 1em;


    dt {
        letter-spacing: 0.2em;
        width: 7em;
        display: flex;
        justify-content: space-between;
    }

    dt::after {
        content: ':';
        display: inline-block;
        width: 0.5em;
        height: 0.5em;
        margin-right: 0.5em;
    }

    dd {
        letter-spacing: 0.1em;
    }
}

.info__block a{
    text-decoration: underline;
}

/* 空のinfoブロックは消す（データ未入力時の余白対策） */
.info__block:empty {
    display: none;
    margin: 0;
}

@media (width < 768px) {

    .info__block {
        flex-direction: column;
    }

    .info__block dt {
        font-weight: var(--wght-bold);
    }

    .info__block dt::after {
        content: none;
    }

    .info__block dd {
        margin-left: 1em;
    }
}

/* ------------------------------------------------
OTHER WORKS
------------------------------------------------ */

.works-other {
    border-top: 1px solid #cbcbcb;
    margin-top: var(--space-5xl);
    padding-top: var(--space-5xl);
}

.works-other__title {
    text-align: left;
    /* title2は中央寄せなので左に戻す */
    --font-min: 18;
    --font-max: 20;
    font-size: var(--font-size);
    font-weight: var(--wght-bold);
    letter-spacing: 0.1em;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.works-other__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px 20px;
}

.works-other__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 1em;
}

.works-other__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.works-other__name {
    margin: 0;
    font-weight: var(--wght-medium);
    letter-spacing: 0.1em;
}

@media (width < 768px) {

    .works-other__grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px 12px;
    }

}