.case-container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.case-hero {
    padding: 170px 20px 90px;
    background: #f4f1eb;
    text-align: center;
}

.case-eyebrow {
    margin: 0 0 12px;
    color: #0f6673;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.case-hero h1 {
    margin: 0;
    color: #222;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.5;
}

.case-hero-text {
    margin: 25px auto 0;
    color: #555;
    font-size: 17px;
    line-height: 2;
}

.case-index-section {
    padding: 80px 0;
    background: #fff;
}

.case-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.case-filter-button {
    min-width: 130px;
    padding: 12px 20px;
    border: 1px solid #0f6673;
    border-radius: 999px;
    color: #0f6673;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    transition: 0.25s;
}

.case-filter-button:hover,
.case-filter-button.active {
    background: #0f6673;
    color: #fff;
}

.case-search-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto 45px;
}

.case-search-form input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 13px 15px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 16px;
}

.case-search-form button,
.case-search-form a {
    padding: 13px 22px;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.case-search-form button {
    background: #333;
    color: #fff;
}

.case-search-form a {
    background: #eee;
    color: #333;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.case-card {
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 13px 32px rgba(0, 0, 0, 0.1);
}

.case-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.case-before-after {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-image-box {
    position: relative;
    min-width: 0;
    background: #eee;
}

.case-image-box img,
.case-no-image {
    display: block;
    width: 100%;
    height: 230px;
}

.case-image-box img {
    object-fit: cover;
}

.case-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 14px;
}

.case-image-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.case-image-label.before {
    background: rgba(60, 60, 60, 0.85);
}

.case-image-label.after {
    background: rgba(15, 102, 115, 0.9);
}

.case-card-body {
    padding: 25px;
}

.case-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.case-service {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #0f6673;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.case-area {
    color: #666;
    font-size: 14px;
}

.case-card h2 {
    margin: 0 0 15px;
    color: #222;
    font-size: 22px;
    line-height: 1.6;
}

.case-work-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.case-summary {
    margin: 0 0 18px;
    color: #555;
    line-height: 1.9;
}

.case-detail-link {
    color: #0f6673;
    font-weight: 700;
}

.case-empty {
    padding: 60px 20px;
    border-radius: 12px;
    background: #f5f5f5;
    text-align: center;
}

.case-empty h2 {
    margin: 0 0 15px;
}

.case-empty p {
    margin: 0 0 25px;
    color: #666;
}

.case-empty a {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 7px;
    background: #0f6673;
    color: #fff;
    text-decoration: none;
}

.case-pagination {
    margin-top: 40px;
}

.case-contact-section {
    padding: 80px 0;
    background: #f4f1eb;
}

.case-contact-box {
    padding: 55px 30px;
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.case-contact-box h2 {
    margin: 0 0 20px;
    font-size: clamp(27px, 4vw, 39px);
    line-height: 1.55;
}

.case-contact-box > p:not(.case-eyebrow) {
    margin: 0 0 30px;
    color: #555;
    line-height: 1.9;
}

.case-contact-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    background: #0f6673;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 768px) {
    .case-container {
        width: min(100% - 28px, 1120px);
    }

    .case-hero {
        padding: 130px 0 65px;
    }

    .case-hero h1 {
        font-size: 29px;
    }

    .case-hero h1 br,
    .case-hero-text br,
    .case-contact-box h2 br {
        display: none;
    }

    .case-hero-text {
        font-size: 15px;
        line-height: 1.9;
    }

    .case-index-section,
    .case-contact-section {
        padding: 55px 0;
    }

    .case-filter-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .case-filter-button {
        min-width: 0;
        padding: 10px 12px;
        font-size: 14px;
    }

    .case-search-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .case-search-form input[type="text"] {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .case-search-form button,
    .case-search-form a {
        text-align: center;
    }

    .case-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .case-image-box img,
    .case-no-image {
        height: 180px;
    }

    .case-card-body {
        padding: 21px;
    }

    .case-card h2 {
        font-size: 20px;
    }

    .case-contact-box {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .case-before-after {
        grid-template-columns: 1fr;
    }

    .case-image-box img,
    .case-no-image {
        height: 230px;
    }
}

/* ========================================
   施工事例 詳細ページ
======================================== */

.case-detail-hero {
    padding: 145px 0 60px;
    background: #f4f1eb;
}

.case-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    color: #777;
    font-size: 14px;
}

.case-breadcrumb a {
    color: #0f6673;
    text-decoration: none;
}

.case-detail-heading {
    max-width: 900px;
}

.case-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.case-detail-heading h1 {
    margin: 0;
    color: #222;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.55;
}

.case-detail-work-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin-top: 25px;
    color: #666;
}

.case-detail-section {
    padding: 80px 0;
    background: #fff;
}

.case-detail-images {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 55px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-bottom: 80px;
}

.case-detail-image-box {
    min-width: 0;
}

.case-detail-image-title {
    display: inline-block;
    margin: 0 0 13px;
    padding: 7px 17px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
}

.case-detail-image-title.before {
    background: #444;
}

.case-detail-image-title.after {
    background: #0f6673;
}

.case-detail-image-box img,
.case-detail-no-image {
    display: block;
    width: 100%;
    height: 430px;
    border-radius: 14px;
    background: #eee;
}

.case-detail-image-box img {
    object-fit: contain;
}

.case-detail-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.case-detail-arrow {
    color: #0f6673;
    font-size: 42px;
    font-weight: 700;
    text-align: center;
}

.case-detail-content {
    max-width: 900px;
    margin: 0 auto;
}

.case-detail-block {
    padding: 0 0 55px;
    margin-bottom: 55px;
    border-bottom: 1px solid #ddd;
}

.case-detail-number {
    margin: 0 0 8px;
    color: #0f6673;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.case-detail-block h2 {
    margin: 0 0 24px;
    color: #222;
    font-size: 30px;
}

.case-detail-text,
.case-staff-comment {
    color: #444;
    font-size: 17px;
    line-height: 2.1;
}

.case-customer-voice {
    position: relative;
    padding: 35px 40px;
    border-left: 5px solid #0f6673;
    border-radius: 8px;
    background: #f4f7f7;
}

.case-customer-voice p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #333;
    font-size: 18px;
    line-height: 2;
}

.case-quote-mark {
    position: absolute;
    top: 4px;
    left: 18px;
    color: rgba(15, 102, 115, 0.15);
    font-size: 80px;
    line-height: 1;
}

.case-staff-comment {
    padding: 30px;
    border-radius: 10px;
    background: #f7f4ee;
}

.case-detail-back {
    margin-top: 55px;
    text-align: center;
}

.case-detail-back a {
    display: inline-block;
    padding: 13px 24px;
    border: 1px solid #0f6673;
    border-radius: 8px;
    color: #0f6673;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 768px) {
    .case-detail-hero {
        padding: 120px 0 45px;
    }

    .case-breadcrumb {
        margin-bottom: 28px;
    }

    .case-detail-section {
        padding: 55px 0;
    }

    .case-detail-images {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 60px;
    }

    .case-detail-arrow {
        transform: rotate(90deg);
        font-size: 34px;
    }

    .case-detail-image-box img,
    .case-detail-no-image {
        height: 310px;
    }

    .case-detail-block {
        padding-bottom: 40px;
        margin-bottom: 40px;
    }

    .case-detail-block h2 {
        font-size: 25px;
    }

    .case-detail-text,
    .case-staff-comment {
        font-size: 16px;
        line-height: 2;
    }

    .case-customer-voice {
        padding: 30px 23px;
    }

    .case-customer-voice p {
        font-size: 16px;
    }
}

/* ========================================
   パンくずリスト
======================================== */

.breadcrumb {
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 20px;
    font-size: 14px;
}

.breadcrumb .case-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb a {
    color: #0f6673;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
}

@media (max-width:768px){

    .breadcrumb{
        font-size:13px;
        padding:10px 15px;
    }

}

/* ========================================
   関連する施工事例
======================================== */

.related-case-section {
    padding: 80px 20px;
    background: #f7f5f0;
}

.related-case-section .case-container {
    max-width: 1120px;
    margin: 0 auto;
}

.related-case-heading {
    margin-bottom: 40px;
    text-align: center;
}

.related-case-heading .case-eyebrow {
    margin-bottom: 10px;
    color: #0f6673;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.related-case-heading h2 {
    margin: 0 0 15px;
    color: #222;
    font-size: 32px;
    line-height: 1.5;
}

.related-case-heading > p:last-child {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.8;
}

.related-case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.related-case-card {
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.related-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.13);
}

.related-case-card > a {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.related-case-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-case-image-box {
    position: relative;
    min-width: 0;
    background: #ececec;
}

.related-case-image-box img,
.related-case-no-image {
    display: block;
    width: 100%;
    height: 170px;
}

.related-case-image-box img {
    object-fit: cover;
}

.related-case-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #777;
    font-size: 12px;
    text-align: center;
}

.related-case-label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.related-case-label.before {
    background: rgba(55, 55, 55, 0.88);
}

.related-case-label.after {
    background: rgba(15, 102, 115, 0.9);
}

.related-case-body {
    padding: 22px;
}

.related-case-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
}

.related-case-service {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 999px;
    background: #0f6673;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.related-case-area {
    color: #666;
    font-size: 13px;
}

.related-case-body h3 {
    margin: 0 0 12px;
    color: #222;
    font-size: 19px;
    line-height: 1.6;
}

.related-case-body p {
    margin: 0 0 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.8;
}

.related-case-link {
    color: #0f6673;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .related-case-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .related-case-section {
        padding: 60px 15px;
    }

    .related-case-heading {
        margin-bottom: 30px;
    }

    .related-case-heading h2 {
        font-size: 26px;
    }

    .related-case-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .related-case-image-box img,
    .related-case-no-image {
        height: 210px;
    }
}

@media (max-width: 480px) {
    .related-case-images {
        grid-template-columns: 1fr;
    }

    .related-case-image-box img,
    .related-case-no-image {
        height: 220px;
    }

    .related-case-body {
        padding: 20px;
    }
}