/* 写真ギャラリーサイト用 CSS */
body {
    font-family: sans-serif;
    margin: 0;
    background: #f4f4f4;
}

.photo_header {
    text-align: center;
    padding-top: 0.5em;
/*    background-color: #333; */
    color: #222222;
    font-size: 1.5em;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-left:20px;
    padding-right:25px;
    padding-top:200px;
}

.modal.show {
    display: flex;
}

.modal-img-container {
    position: relative;
    display: inline-block;
}
.modal img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 0 20px #fff;
    display: block;
}

.caption {
    margin-top: 15px;
    color: white;
    font-size: 1.2em;
    text-align: center;
}

.prev-btn, .next-btn {
    position: absolute;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
}


.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    font-size: 24px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.prev-btn { top: 50%; left: 30px; transform: translateY(-50%); }
.next-btn { top: 50%; right: 100px; transform: translateY(-50%); }

.prev-btn:hover,
.next-btn:hover {
    background: rgba(255,255,255,0.2);
}

.thumb {
    text-align: center;
    margin-bottom: 20px; /* 適宜余白 */
}

.thumb-caption {
    margin-top: 6px;
    font-size: 14px;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* ポップアップCSS（index側で定義） */
.intro-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: flex-start;  /* ← 上から表示 */
    z-index: 9999;
    flex-direction: column;
    text-align: center;
    padding: 40px 20px; /* ← 上下余白で×ボタン見やすく */
    overflow-y: auto;   /* ← ポップアップ全体にスクロール許可 */
    box-sizing: border-box;
}

.intro-popup-content {
    background: #222;
    padding: 30px 20px;
    border-radius: 10px;
    position: relative;
    max-width: 90%;
    max-height: 90vh;       /* ← 高さ制限 */
    overflow-y: auto;       /* ← 中身が多い場合スクロール */
    margin: auto;
    box-sizing: border-box;
}

.close-intro-btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4daeff; /* 明るい青 */
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.close-intro-btn:hover {
    background-color: #3399ff; /* ホバー時に少し濃く */
}

/* お知らせボタン */
.info-button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(to right, #007BFF, #00B4FF); /* 青グラデーション */
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-button:hover {
    background: linear-gradient(to right, #0056b3, #0088cc); /* 濃い青に変化 */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.info-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
