/* gallery-styles.css - 縦長画像対応版 */

/* ギャラリーセクション */
.gallery-section {
    padding-top: 120px; /* ヘッダーの高さを考慮してパディングを増やす */
    padding-bottom: 60px;
    background-color: #fbf7f0;
}

.gallery-section h1 {
    text-align: center;
    color: #7c9630;
    margin-bottom: 15px;
}

.gallery-section p {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ギャラリーコンテナ */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ギャラリー行 */
.gallery-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ギャラリーアイテム - 縦長画像用に調整 */
.gallery-item {
    flex: 1;
    max-width: calc(50% - 10px);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* 画像スタイル - 縦長画像用に調整 */
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 2/3; /* 縦長の比率に変更 (400x600) */
    object-fit: cover;
}

.caption {
    padding: 15px;
    font-size: 0.95rem;
    text-align: center;
    color: #333;
    background-color: #fff;
}

/* アクティブなナビゲーションリンク */
.nav-links .active {
    font-weight: bold;
    text-decoration: underline;
}

/* レスポンシブスタイル - 縦長画像対応 */
@media (max-width: 992px) {
    .gallery-item {
        max-width: 45%;
    }
}

@media (max-width: 768px) {
    .gallery-row {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .gallery-item {
        max-width: 80%;
    }
    
    .gallery-section {
        padding-top: 100px;
    }
    
    /* モバイル表示では画像の比率を維持しつつ、サイズを調整 */
    .gallery-item img {
        aspect-ratio: 2/3;
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        gap: 20px;
    }
    
    .gallery-section {
        padding-top: 90px;
    }
    
    .gallery-item {
        max-width: 95%;
    }
    
    /* さらに小さい画面ではサイズを縮小 */
    .gallery-item img {
        max-height: 400px;
    }
}

/* 画像拡大表示機能（オプション） */
.gallery-item {
    cursor: pointer;
}

/* 画像のコントラスト調整（オプション） */
.gallery-item img {
    transition: filter 0.3s;
}

.gallery-item:hover img {
    filter: brightness(1.05);
}