body {
    margin: 0;
    padding: 0;
}

.gallery-content {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #f4f4f4;
    padding-top: 60px;
}

.gallery {
    display: grid;
    gap: 15px;
    padding: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: 1500px;
    width: 100%;
    margin-top :0;
}

/* スマホでは2列 */
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .gallery-content {
        background-color: #333;
    }
}

/* タブレットでは3列 */
@media (min-width: 601px) and (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-content {
        background-color: #333;
    }
}

/* PCでは最大5列 */
@media (min-width: 1025px) {
    .gallery {
        grid-template-columns: repeat(6, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%;
}

.gallery-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    cursor: pointer;
    border-radius: 8px;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    background: white;
    padding-top: 0px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.lightbox.show .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.lightbox img {
    object-fit: contain;
    max-width: 100%;
    /* 親要素の幅に収まる */
    max-height: 80vh;
    /* 画面の80%以内に制限 */
    display: block;
    margin: auto;
}

.lightbox-info {
    margin: 10px;
    font-size: 16px;
    color: #333;
    text-align: center;
}

.lightbox-info a {
    margin: 10px;
    font-size: 16px;
    color: #84475d;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
}

.header-logo {
    max-height: 35px;
    width: auto;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #5c85ff;
    align-items: center;
    display: flex;
    justify-content: space-between;
    transition: transform 0.3s ease-in-out;
    height: 60px;
    z-index: 10;
}

.header-inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hamburger {
    width: 40px;
    height: 40px;
    display: flex;
    margin-left: 10px;
    margin-right: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.hamburger span {
    display: block;
    width: 20px;  /* 線の長さを小さめに */
    height: 3px;  /* 線の太さ */
    background: #fff;
    margin: 3px 0;  /* 線の間隔 */
    transition: 0.3s;
    border-radius: 2px;
}

/* ナビゲーションメニュー */
.menu {
    position: fixed;
    left: 0;
    width: 250px;
    height: 100%; /* 画面全体にフィット */
    background: #5c85ff;
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    display: flex;
    flex-direction: column;
    z-index: 5;
    /* スクロールに影響されないようにするための設定 */
    overflow-y: auto;
}

/* メニューが開いたとき */
.menu.open {
    transform: translateX(0);
}

/* メニューのリスト */
.menu ul {
    list-style: none;
    padding: 20px;
    margin: 0;
    flex-grow: 1; /* リストが残りのスペースを占めるように */
}

/* メニューのアイテム */
.menu ul li {
    padding: 15px 0;
}

/* メニューアイテムのリンク */
.menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

/* メニューのフッター */
.menu-footer {
    text-align: center;
    color: white;
    font-size: 14px;
    padding: 10px;
    background-color: #222;
    margin-top: auto; /* フッターをメニューの下部に配置 */
}

/* オーバーレイ */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.overlay.show {
    display: block;
}

.menu-close {
    font-size: 30px;
    font-weight: bold;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    cursor: pointer;
}
