@charset "utf-8";

/* ===========================
main
=========================== */
.section--gallery-fanart {
    padding: 0 5.3%;
}

.galleryBtn {
    margin-top: 64px;
}

.galleryBtn__list {
    display: flex;
    gap: 8px;
}

.galleryBtn__item {
    color: var(--primary-blue);
    font-family: Outfit;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1;
    border-radius: 49px;
    border: 1px solid var(--primary-blue);
    display: flex;
    padding: 9px 19px;
    justify-content: center;
    align-items: center;
}

.galleryBtn__select {
    color: var(--primary-white);
    background-color: var(--primary-blue);
}

/* ====== grid base ====== */
.gallery-fanart__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* SP: 2カラム */
    gap: 15px;   
    margin: 32px auto 0;
}

/* 正方形でトリミングして埋める（余白なし） */
.gallery-fanart__list img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;         /* ← 明示（リセットと整合） */
    object-fit: cover;    /* ← 余白を作らず四角いっぱい。コメントは「トリミングあり」です */
    display: block;
}

/* modal */
/*全て共通：hideエリアをはじめは非表示*/
.hide-area{
	display: none;
}

/* Modaal 閉じるボタンのデザイン調整 */
.modaal-close {
    background: none !important;   /* hover時の●（背景丸）を無効化 */
    box-shadow: none !important;
    width: 40px;                   /* ✕の全体ボタンサイズ（調整可） */
    height: 40px;
}

/* ✕の線（疑似要素） */
.modaal-close:before,
.modaal-close:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;                   /* ✕の線の長さ（お好みで） */
    height: 1px;                   /* 線の太さ */
    background-color: var(--bg-base);
    border-radius: 0;
    transform-origin: center;
}

/* ✕を45°・-45°で交差させる */
.modaal-close:before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.modaal-close:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* hover時の色変更 */
.modaal-close:hover:before,
.modaal-close:hover:after {
    background-color: rgba(254, 254, 254, 0.5);
}


.modaal-overlay {
    z-index: 10000 !important;
}

.modaal-wrapper {
    z-index: 10001 !important;
}

/* 画像モーダル内の画像サイズを制限 */
.modaal-image .modaal-content img {
    max-width: 100%;
    max-height: 72vh;  /* 画面の高さの90%まで */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.gallery:focus,
.gallery:focus-visible {
    outline: none;
}

/* Modaalの次へ／前へボタンを非表示 */
.modaal-gallery-next,
.modaal-gallery-prev {
    display: none !important;
}
/* 〆modal */


/* modal hover */
.gallery-fanart__item a{
    display: block;
    transition: all .3s ease-in-out;
}
.gallery-fanart__item img{
    width: 100%;
    vertical-align: middle;
}
.gallery-fanart__item a:hover{
    opacity: .7;
}

/* モーダル時のスクロールバーの確保 */

/* main tb */
@media screen and (min-width: 768px){
    .section--gallery-fanart {
        padding: 0 7.3%;
    }

    .gallery-fanart__list {
        gap: 22px;
}

    .gallery-fanart__list {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-fanart > img {
        max-width: 370px;;
    }

    .galleryBtn__item {
        font-size: 1.4rem;
    }

    .copy {
        padding-top: 108px;
    }

    .galleryBtn {
        padding-bottom: 8px;
    }
}

@media screen and (min-width: 900px){
    .gallery-fanart__list {
        margin-top: 74px;
        gap: 28px; /* 横の余白 */
    }

    .gallery-fanart__top {
        display: flex;
        justify-content: space-between;
        align-items: end;
    }

    .galleryBtn {
        padding-bottom: 13px;
    }

    /* pc版　画像モーダル内の画像サイズを制限 */
    .modaal-image .modaal-content img {
        max-height: 80vh;  /* 画面の高さの90%まで */
    }
    /* 〆modal */
}

/* @media screen and (min-width: 1024px){
    .gallery-fanart__list {
        grid-template-columns: repeat(4, 1fr);
    }
} */

/* main pc */
@media screen and (min-width: 1440px){
    .gallery-fanart__list {
        grid-template-columns: repeat(4, 1fr);
    }

    .article {
        padding: 0 8.3%;
    }

    .section--gallery-fanart {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0;
    }

    .gallery-fanart__list {
        margin-top: 83px;
    }
}


