@charset "utf-8";

.works {
    background-color: #f8f8f8;
    padding-top: 45px;
    padding-bottom: 55px;
}

.works h2 {
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    padding-top: 120px;
}

.works h2::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background-color: #000;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
}

.works-list {
    display: flex;
    justify-content: center; /* 左右固定パディングの代わりに中央寄せを適用 */
    flex-wrap: wrap; /* 画面幅が狭い時に自動で折り返して中央配置を維持 */
    gap: 30px; /* 写真同士の程よい間隔 */
    padding-top: 90px;
    padding-bottom: 70px;
    padding-left: 20px; /* 巨大な450pxの固定余白を解除 */
    padding-right: 20px; /* 巨大な220pxの固定余白を解除 */
    object-fit: cover;
    margin: 0 auto;
    text-align: center;
}

.works-list li {
    flex-shrink: 0;
    width: 300px;
    object-fit: cover;
    margin: 0; /* 中央寄せに干渉しないよう調整 */
    text-align: center;
}

.works-list li img {
    width: 85%;
    height: 85%;
    object-fit: cover;
}

.works-list li:first-child {
    margin-left: 0;
}

.works-list dt {
    margin-top: 10px;
    font-weight: bold;
}

.profile {
    background-color: #fff;
    padding-top: 45px;
    padding-bottom: 200px; /* 重複していた記述（125px）を1つに整理 */
}



.profile h2 {
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    padding-bottom: 90px;
    padding-top: 120px;
}

.profile h2::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background-color: #000;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
}



.profile-list li img {
    width: 250px;
    height: 300px;
    padding-left: 0px; /* 固定パディングを解除して中央揃え */
}

.profile-list {
    display: flex;
    justify-content: center; /* プロフィール全体を中央に配置 */
    flex-wrap: wrap; /* 狭い画面で縦並びにするための設定 */
    gap: 40px;
}

.profile dt {
    padding-left: 0px; /* 左パディングを解除してテキストを中央に */
    margin-top: 10px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.profile dd {
    padding-left: 0px; /* 左パディングを解除してテキストを中央に */
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
}

.profile-list li {
    display: flex;
    flex-direction: column; /* 画像と説明テキストを縦一列に並べる */
    align-items: center; /* 列の中でパーツを中央揃えにする */
    padding-left: 0px; /* 巨大な300pxの固定余白を解除 */
}



@media (max-width: 800px) {
    .works-list {
        padding-left: 20px;
        padding-right: 20px;
    }

    .works-list li {
        width: 220px;
        margin-left: 0px; /* 10pxから0pxに変更し、親要素のgapと競合を防ぐ */
    }

    .works-list li:first-child {
        margin-left: 0;
    }

    .works h2 {
        padding-top: 60px;
    }

    .profile li {
        padding-left: 0px; /* 40pxの固定余白を解除 */
    }

    .profile-list li img {
        width: 150px;
        height: 150px;
        padding-left: 0px;
    }

    .profile dt {
        padding-left: 0px;
        padding-right: 0px;
    }
    
    .profile dd {
        padding-left: 0px;
        padding-right: 0px;
    }

    .profile h2 {
        padding-top: 60px;
    }
}