/* モーダル全体のスタイル */
.modal {
    /* 画面全体に */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 前面表示 */
    z-index: 999;
    /* 子要素を中央配置 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* モーダルウィンドウのスタイル */
.modal-content {
    width: 80%;
    max-width: 700px;
    max-height: 500px;
    background-color: #fefefe;
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 20px;
    box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.75);
    font-size: 1rem;
    opacity: 0.8;
    /* コンテンツがウィンドウからはみ出した場合にスクロールバーを表示 */
    overflow-y: auto;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #888;
    width: max-content;
}

.modal-content h3 {
    font-size: 1rem;
    margin: 40px 0;
    margin-bottom: 10px;
    border-bottom: 2px solid #888;
    width: 100%;
}

.modal-content img {
    width: 14%;
    padding: 10px;
}

.modal-content a img:hover {
    transform: scale(1.3, 1.3);
}

/* モーダルウィンドウの閉じるボタン */
.close {
    display: none;
}

/* フェードイン（アニメーション前） */
.fade-in {
    /* 一旦非表示にしておく */
    transform: translateY(100%);
}

/* ボタンが押されたら付与するクラス */
.show {
    /* 縦方向の移動 */
    transform: translateY(0);
    /* アニメーション時間、開始前後の時間 */
    transition: transform 1s ease-in-out;
}

/* レスポンシブ */
@media screen and (max-width: 700px) {
    .modal-content img {
        width: 24%;
        padding: 10px;
    }

    .close {
        display: block;
        /* モーダルウィンドウの上に固定して配置する */
        position: fixed;
        top: 1;
        right: 60px;
        color: #aaa;
        float: right;
        font-size: 40px;
        font-weight: bold;
        text-shadow:
            1px 1px 0 #666,
            1.5px 1.5px 0 #666,
            2px 2px 0 #666;
    }

    .close:hover {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }
}