/* ========================================
   関連施工事例セクション（新デザイン）
   Figmaデザイン準拠
   ======================================== */

.related-works-section {
    display: flex;
    flex-direction: column;
    gap: 60px;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-block: 60px;
    box-sizing: border-box;
    overflow: hidden;
}

/* タイトル部分 */
.related-works-title-wrap {
    position: relative;
    height: 40px;
    overflow: visible;
}

.related-works-title-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: 40px;
}

.title-bg-image {
    display: block;
    height: 40px;
    width: auto;
}

.related-works-title-text {
    position: absolute;
    top: 50%;
    left: 220px;
    transform: translateY(-50%);
    font-family: 'Noto Serif JP', serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 2.16px;
    color: #ffffff;
    white-space: nowrap;
    margin: 0;
    padding: 0 4px;
}

/* コンテンツエリア */
.related-works-content {
    display: flex;
    flex-direction: column;
    gap: 58px;
    align-items: flex-start;
    width: 100%;
}

/* Swiperスライダー */
.related-works-swiper {
    width: 100%;
    overflow: visible;
}

.related-works-swiper .swiper-wrapper {
    align-items: stretch;
}

.related-works-swiper .swiper-slide {
    width: 300px;
    height: auto;
}

/* 個別カード */
.related-works-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.related-works-card:hover {
    opacity: 0.8;
}

/* カード画像 */
.related-works-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 300 / 200;
    overflow: hidden;
    background-color: #d9d9d9;
}

.related-works-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.related-works-card-image.no-image {
    background-color: #e0e0e0;
}

.after-label {
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* カードコンテンツ */
.related-works-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 4px;
}

.related-works-card-shop {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #b5b5b5;
    margin: 0;
}

.related-works-card-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    color: #4a4a4a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-works-card-desc {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #4a4a4a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 実績・満足度カード */
.related-works-card-stats {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #f3f3f3;
    justify-content: space-between;
    padding: 0;
}

.stats-content {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.28px;
    color: #303030;
}

.stat-value {
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.stat-number {
    font-family: 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: 76px;
    font-weight: 700;
    line-height: 1;
    color: #e7141a;
}

.stat-unit {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #e7141a;
    padding-block-end: 14px;
}

.stat-suffix {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: #303030;
    margin-inline-start: 4px;
}

.stats-note {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #4a4a4a;
    margin: 0;
}

/* カード内Moreリンク */
.more-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 12px;
}

/* ページネーションエリア */
.related-works-pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    width: 100%;
    max-width: 1000px;
    margin-inline: auto;
    padding-inline: 24px;
    box-sizing: border-box;
}

/* スクロールバー */
.related-works-scrollbar {
    width: 100%;
}

.related-works-scrollbar-drag.swiper-scrollbar {
    position: relative;
    width: 100%;
    height: 7px;
    background-color: #f1f1f1;
    border-radius: 0;
}

.related-works-scrollbar-drag .swiper-scrollbar-drag {
    background-color: #616161;
    border-radius: 0;
    cursor: grab;
}

.related-works-scrollbar-drag .swiper-scrollbar-drag:active {
    cursor: grabbing;
}

/* Moreリンク */
.related-works-more {
}

.more-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    text-decoration: none;
    width: 100%;
}

.more-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 17.6px;
    color: #e7141a;
}

.more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e7141a;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.more-link:hover .more-btn {
    background-color: #e7141a;
}

.more-link:hover .more-btn svg path {
    stroke: #ffffff;
}

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

/* タブレット */
@media only screen and (max-width: 1280px) {
    .related-works-section {
        gap: 40px;
        padding-block: 40px;
    }

    .related-works-title-text {
        left: 180px;
    }

    .related-works-cards-wrapper {
        padding-inline-start: 180px;
    }

    .related-works-progress-wrapper {
        padding-inline: 40px;
    }
}

/* スマホ */
@media only screen and (max-width: 767px) {
    .related-works-section {
        gap: 30px;
        padding-block: 40px 30px;
    }

    .related-works-title-wrap {
        height: 32px;
    }

    .title-bg-image {
        height: 32px;
    }

    .related-works-title-text {
        left: 20px;
        font-size: 14px;
        letter-spacing: 1.68px;
    }

    .related-works-content {
        gap: 30px;
    }

    .related-works-cards-wrapper {
        padding-inline-start: 20px;
    }

    .related-works-cards {
        gap: 12px;
    }

    .related-works-card-image {
        aspect-ratio: 240 / 160;
    }

    .after-label {
        font-size: 18px;
        top: 6px;
        left: 6px;
    }

    .related-works-card-content {
        gap: 6px;
        padding: 8px 4px;
    }

    .related-works-card-shop {
        font-size: 12px;
    }

    .related-works-card-title {
        font-size: 15px;
    }

    .related-works-card-desc {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }

    .stat-number {
        font-size: 56px;
    }

    .stat-unit {
        font-size: 18px;
        padding-block-end: 10px;
    }

    .related-works-pagination-wrapper {
        padding-inline: 20px;
    }

    .more-btn {
        width: 36px;
        height: 36px;
    }
}
