@charset "utf-8";

/* -----------------------------------------
main
-------------------------------------------- */

.title {
    text-align: center;
    font-family: "Karla";
    font-size: 2.4rem;
    letter-spacing: 3.84px;
    background-image: url(../images/paperBg.webp);
    background-size: contain;
    background-position: center;
    width: 100%;
    padding: 16px 0px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.title span {
    text-align: center;
    font-family: "Shippori Mincho";
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 2.24px;
}

.select__wrapper {
    position: relative;
    display: inline-block;
    width: 180px;
    margin: 64px auto;
}

.sort {
    width: 80%;
    padding: 8px 32px 8px 12px;
    font-size: 1.4rem;
    letter-spacing: 0.3rem;
    appearance: none;
    border: 0.7px solid #433931;
    border-radius: 4px;
    text-align: center;
}

.sort__btn {
    text-align: right;
    margin-right: 13.5%;
}

.select__icon {
    position: absolute;
    top: 50%;
    right: 12px;
    pointer-events: none;
    transform: translateY(-50%);
}

.gallery {
    padding: 0 16px;
}

.work img {
    aspect-ratio: 343/ 440;
    object-fit: cover;
    max-width: 80%;
    height: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 100px;
}

.work p:first-of-type {
    font-family: "Shippori Mincho";
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 1.2px;
    margin-top: 32px;
}

.work p {
    display: flex;
    flex-direction: column;
    /* background-color: rgba(255, 255, 255, 0.6);
    opacity: 0.6;
    padding: 12px 2%;
    box-shadow: 2px 2px 4px rgba(84, 84, 84, 0.2);
    margin: 0 3%; */
}

.work span {
    font-family: "Shippori Mincho";
    font-size: 1.4rem;
    line-height: 1.5;
    letter-spacing: 0.84px;
    margin-top: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 64px;
    font-family: sans-serif;
}

.pagination a {
    padding: 8px 12px;
    text-decoration: none;
    color: #433931;
    border: 0.12rem solid #433931;
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
}

.pagination a:hover {
    background-color: #937257;
    color: #fff;
}

.pagination a.active {
    background-color: #937257;
    color: #fff;
    font-weight: bold;
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.4;
}

.footer {
    margin-top: 100px;
}

@media screen and (min-width:376px) and (min-width:768px) {
    .work img {
        aspect-ratio: 343/ 440;
        object-fit: cover;
        max-width: 80%;
        height: auto;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
}

/* gallery pc */
@media screen and (min-width:769px) {
    .title {
        font-size: 3.2rem;
        letter-spacing: 5.12px;
        padding: 56px 0px;
    }

    .title span {
        font-size: 2rem;
        font-weight: 600;
        line-height: 1.5;
        letter-spacing: 3.2px;
    }

    .sort__btn {
        text-align: right;
        letter-spacing: 3%;
        margin-right: 3.2%;
    }

    /* ギャラリー全体のスタイル */
    .gallery {
        max-width: 1440px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 64px;
        padding: 16px 3.2%;
    }

    /* 各アイテムのスタイル */
    .work {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .work:nth-child(n + 4) {
        margin-top: 24px;
    }

    .work img {
        aspect-ratio: 343/ 440;
        object-fit: cover;
        max-width: 100%;
        height: auto;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        margin-top: 0;
    }


    .work p {
        margin-top: 12px;
        font-size: 1.4rem;
    }

    .pagination {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 64px;
        font-family: sans-serif;
    }

    .pagination a {
        padding: 8px 12px;
        text-decoration: none;
        color: #433931;
        border: 0.1rem solid #433931;
        transition: background-color 0.3s, color 0.3s;
        font-size: 1.6rem;
    }

    .pagination a:hover {
        background-color: #937257;
        color: #fff;
    }

    .pagination a.active {
        background-color: #937257;
        color: #fff;
    }

    .pagination a.prev,
    .pagination a.next {
        font-weight: bold;
    }

    .work__image-wrap {
        position: relative;
        display: block;
        overflow: hidden;
        margin: 16px 0;
    }

    .work__image-wrap img {
        display: block;
        width: 100%;
        height: auto;
        position: relative;
        z-index: 1;
    }

    .wood__overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('../images/wood.webp');
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
        z-index: 2;
    }

    .work__image-wrap:hover .wood__overlay {
        opacity: 0.8;
        filter: brightness(1.1);
    }
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        /* タブレットで2カラム */
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        /* スマホで1カラム */
    }
}