.case-detail-back {
    background-color: rgba(243, 244, 246, 1);
    padding-bottom: 60px;
    display: flex;
    justify-content: end;
    align-items: end;
    width: 100%;
    height: 228px;
}

.case-detail-container {
    display: flex;
    justify-content: start;
    align-items: start;
    gap: 20px;
}

.case-detail-container > a :first-child , .case-detail-container > a:nth-child(2) {
    text-decoration: none;                                        
    color: rgba(0, 104, 222, 1) ;
}

.case-detail-container > a:last-child {
    color: black ;
}

/* section 1 */

.case-detail-s1 .container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    width: 100%;
    padding-block: 80px;
}

.case-detail-s1-container {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 60px;
    width: 68%;
    padding: 40px;
    background-color: #fff;
}

.case-detail-s1-title {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 20px;
    width: 100%;
}

.case-detail-s1-title p:first-child {
    font-size: 14px;
    font-weight: 400;
    color: rgba(107, 114, 128, 1);
}

.case-detail-s1-title p:nth-child(2) {
    font-size: 48px;
    font-weight: 400;
    color: rgba(48, 48, 48, 1);
}

.case-detail-s1-title p:last-child {
    font-size: 14px;
    font-weight: 400;
    padding-inline: 10px;
    color: rgba(0, 104, 222, 1);
    border: 1px solid rgba(0, 104, 222, 1);
}

.case-detail-s1-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-detail-s1-article {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 40px;
}

.case-detail-s1-article p:first-child {
    font-size : 32px;
    font-weight: 400;
}

.case-s1-detail-items-link {
    text-decoration: none;
    background-color: rgba(0, 104, 222, 1);
    padding-inline: 50px;
    padding-block: 10px;
    border-radius: 60px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding-top: 20px;
    height: 60px;
}

.case-s1-detail-items-link-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

/* タブレット (768px以下) */
@media (max-width: 768px) {
    .case-detail-back {
        height: 180px;
        padding-bottom: 40px;
    }
    
    .case-detail-container {
        gap: 15px;
        font-size: 14px;
    }
    
    .case-detail-s1 .container {
        gap: 40px;
        padding-block: 60px;
    }
    
    .case-detail-s1-container {
        width: 85%;
        padding: 30px;
        gap: 40px;
    }
    
    .case-detail-s1-title p:nth-child(2) {
        font-size: 36px;
    }
    
    .case-detail-s1-article p:first-child {
        font-size: 28px;
    }
    
    .case-s1-detail-items-link {
        padding-inline: 40px;
        font-size: 15px;
        height: 50px;
        padding-top: 15px;
    }
}

/* スマホ (480px以下) - Figmaデザインに合わせた調整 */
@media (max-width: 480px) {
    .case-detail-back {
        height: 120px;
        padding-bottom: 20px;
        background-color: rgba(243, 244, 246, 0.8);
    }
    
    .case-detail-container {
        gap: 8px;
        font-size: 12px;
        flex-wrap: wrap;
        padding: 0 20px;
    }
    
    .case-detail-container a {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .case-detail-s1 .container {
        gap: 20px;
        padding-block: 30px;
        padding-inline: 20px;
    }
    
    .case-detail-s1-container {
        width: 100%;
        padding: 20px;
        gap: 25px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .case-detail-s1-title {
        gap: 12px;
    }
    
    .case-detail-s1-title p:first-child {
        font-size: 12px;
        color: rgba(107, 114, 128, 1);
        margin-bottom: 5px;
    }
    
    .case-detail-s1-title p:nth-child(2) {
        font-size: 24px;
        line-height: 1.3;
        font-weight: 400;
        color: rgba(48, 48, 48, 1);
    }
    
    .case-detail-s1-title p:last-child {
        font-size: 11px;
        padding: 6px 12px;
        border-radius: 20px;
        background-color: rgba(0, 104, 222, 0.1);
        color: rgba(0, 104, 222, 1);
        border: 1px solid rgba(0, 104, 222, 1);
        display: inline-block;
        width: fit-content;
    }
    
    .case-detail-s1-container img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .case-detail-s1-article {
        gap: 20px;
    }
    
    .case-detail-s1-article p:first-child {
        font-size: 20px;
        line-height: 1.4;
        font-weight: 400;
        color: rgba(48, 48, 48, 1);
        margin-bottom: 10px;
    }
    
    .case-detail-s1-article p:last-child {
        font-size: 14px;
        line-height: 1.6;
        color: rgba(48, 48, 48, 1);
        text-align: justify;
    }
    
    /* 関連記事セクションのモバイル調整 */
    .case-s1 {
        padding: 30px 20px;
        background-color: #fff;
    }
    
    .case-s1-items {
        gap: 25px;
    }
    
    .case-s1-items > p:first-child {
        font-size: 20px;
        font-weight: 400;
        color: rgba(48, 48, 48, 1);
        text-align: center;
        margin-bottom: 20px;
    }
    
    .case-s1-items-row {
        flex-direction: column;
        gap: 25px;
    }
    
    .case-s1-items-row-item {
        width: 100%;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .case-s1-items-row-item img {
        height: 180px;
        width: 100%;
        object-fit: cover;
    }
    
    .case-s1-items-row-item p {
        font-size: 16px;
        line-height: 1.4;
        padding: 15px;
        margin: 0;
    }
    
    .case-s1-items-row-item > p:last-child {
        font-size: 14px;
        line-height: 1.5;
        color: rgba(107, 114, 128, 1);
        padding-top: 0;
    }
    
    .case-s1-detail-items-link-container {
        margin-top: 30px;
    }
    
    .case-s1-detail-items-link {
        padding-inline: 30px;
        font-size: 14px;
        height: 45px;
        padding-top: 12px;
        border-radius: 30px;
        background-color: rgba(0, 104, 222, 1);
        color: #fff;
        text-decoration: none;
        display: inline-block;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .case-s1-detail-items-link:hover {
        background-color: rgba(0, 88, 188, 1);
        transform: translateY(-2px);
    }
}

/* 超小型スマホ (360px以下) */
@media (max-width: 360px) {
    .case-detail-s1-container {
        padding: 15px;
        gap: 20px;
    }
    
    .case-detail-s1-title p:nth-child(2) {
        font-size: 22px;
    }
    
    .case-detail-s1-article p:first-child {
        font-size: 18px;
    }
    
    .case-detail-s1-article p:last-child {
        font-size: 13px;
    }
    
    .case-s1-detail-items-link {
        padding-inline: 25px;
        font-size: 13px;
        height: 40px;
        padding-top: 10px;
    }
    
    .case-s1-items-row-item img {
        height: 160px;
    }
}

/* 横画面スマホ対応 */
@media (max-width: 767px) and (orientation: landscape) {
    .case-detail-back {
        height: 100px;
    }
    
    .case-detail-s1 .container {
        padding-block: 20px;
    }
    
    .case-detail-s1-container {
        gap: 20px;
    }
    
    .case-detail-s1-title p:nth-child(2) {
        font-size: 20px;
    }
    
    .case-detail-s1-article p:first-child {
        font-size: 18px;
    }
}