@charset "utf-8";

html {
    scroll-behavior: smooth;
}

/* 見出しのCSS */

h1 {
    font-family: 'Questrial', sans-serif;
    font-size: 36px;
    font-weight: 400;
    letter-spacing: 0.1em;
    padding-left: 40px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 72px;
}

h1::after {
    content: '';
    display: block;
    width: 145px;
    height: 2px;
    background-color: #00213B;
}



/* 画像ホバー時の動き */
.item {
    display: block;
    width: 276px;
    height: 207px;
    z-index: 1;
}

.item img {
    width: 276px;
    height: 207px;
}

.item-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.item .caption {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.item .caption p {
    font-family: 'Questrial', sans-serif;
    font-size: 14px;
    color: #fff;
    margin-top: 16px;
}

.item .caption p:first-child {
    margin-top: 0;
}

.item-content .mask {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.item:hover .mask {
    opacity: 1;
}


/* トップに戻るボタン */
html {
    scroll-behavior: smooth;
}

.pagetop {
    height: 50px;
    width: 50px;
    position: fixed;
    right: 40px;
    bottom: 40px;
    background-color: #bec6ca;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
}

.pagetop-arrow {
    height: 15px;
    width: 15px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
    transform: translateY(20%) rotate(-45deg);
}

.pagetop:hover {
    background-color: #858383;
}

/* 作品の並び方 */
.works-wrap {
    max-width: 1600px;
    width: 90%;
    margin-top: 72px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    position: relative;
}


.grid {
    flex-grow: 1;
    max-width: 1200px;
    position: relative;
}

.item-wrap {
    position: relative;
    flex-grow: 1;
    max-width: 1200px;
}

/* シリーズ説明文CSS */
.works-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.works-text li {
    display: none;
}

.works-text li.active {
    display: block;
}

.works-text h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.works-text .keshiki h2 {
    margin-bottom: 72px;
}

.works-text .mado h2 {
    margin-bottom: 72px;
}

.works-text p {
    margin-bottom: 72px;
}

.item-wrap ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, 276px);
    column-gap: 32px;
    row-gap: 32px;
    justify-content: center;
    grid-auto-flow: dense;
}


/* 並び替えボタンのCSS */
.category-menu {
    margin-right: 128px;
    flex-shrink: 0;
    margin-bottom: 72px;
}

.category-menu ul {
    position: sticky;
    top: 150px;
    left: 0;
    right: 0;
}

.category-menu ul li {
    font-family: 'Questrial', sans-serif;
}

.category-menu .all {
    margin-top: 0;
}

.category-menu .year {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 8px;
    margin-top: 24px;
}

.category-menu .series {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 8px;
    margin-top: 24px;
}

.series .imitation-flower {
    grid-column-start: 1;
    grid-column-end: 3;
}

.category-menu li {
    cursor: pointer;
    position: relative;
}

.category-menu li.active::before {
    content: '';
    position: absolute;
    right: calc(100% + 8px);
    top: 20%;
    background: #00213B;
    width: 5px;
    height: 55%;
}

.footer {
    margin-top: 128px;
}

/* ここからモバイル用 */
@media (max-width: 1000px) {
    .works-wrap {
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        margin-top: 48px;
    }

    .category-menu {
        margin-right: auto;
        margin-left: auto;
        margin-bottom: 48px;
    }

    .category-menu ul {
        position: static;
    }

    .category-menu .year {
        grid-template-columns: repeat(5, 1fr);
        column-gap: 32px;
    }

    .category-menu .series {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid {
        margin-left: auto;
        margin-right: auto;
    }

    .item-wrap ul {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .item-wrap ul {
        grid-template-columns: 1fr;
    }

    h1 {
        padding-top: 32px;
        font-size: 20px;
    }

    h1::after {
        width: 80px;
        height: 1px;
    }

    .works-wrap {
        padding-left: 20px;
        padding-right: 20px;
    }

    .category-menu .year {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 36px;
    }

    .category-menu ul li {
        font-size: 14px;
    }

    .pagetop {
        height: 40px;
        width: 40px;
        right: 20px;
        bottom: 20px;
    }
}