@charset "utf-8";

html,
body {
    overflow-x: hidden;
}

.sub_title,
.title {
    text-align: center;
}

.works {
    margin-top: 100px;
}

/* 絞り込みバー */
.works_bar {
    display: flex;
    gap: 40px;
    border-bottom: 1px solid #83ccd4;
    margin-top: 100px;
    padding: 10px;
}

.works_bar li {
    cursor: pointer;
    font-weight: 500;
}

.works_bar li:hover {
    opacity: 0.7;
    transition: 0.3s ease-in-out;
}

.works_bar li.active {
    color: #83ccd4;
}

.works_main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px auto;
    justify-content: space-between;
    padding: 10px;
}

/* 背景と画像 */
.works_wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

/* 画像 */
.works_box {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    background-color: rgba(212, 139, 131, 0.07);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
    max-width: 500px;
    overflow: hidden;
}

.works_box img {
    height: auto;
    transition: transform .5s ease;
    width: 100%;
}

.works_box:hover img {
    transform: scale(1.03);
}

/* タイトル */
.works_title {
    font-size: 16px;
    margin: 15px auto;
    align-self: flex-start;
}

.works_wrapper {
    opacity: 0;
    transform: translateY(20px);
    /* 初期状態で少し下に表示 */
    animation: fadeInUp 0.8s forwards;
    /* 初期状態ではanimationを付けないようにして、後でjQueryで適用する */
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 960px) {
    .works_main {
        justify-content: center;
    }
}


body.night {
    .works_bar {
        border-bottom: 1px solid #FCF2E5;
    }
    .works_bar li {
        color: #FCF2E5;
    }
    .works_bar li.active {
        color: #F9F5AC;
    }
    .works_box {
        background-color: rgba(97, 123, 145, 0.5);
    }
}