/* ================================
   GALLERY PAGE CSS - 完全修正版
   重複を削除し、統一されたスタイル
================================ */

/* ================================
   ページヒーロー
================================ */
.page-hero {
    position: relative;
    height: 400px;
    margin-top: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
        url('../images/gallery-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    color: white;
    margin: 0 0 1rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(14, 95, 216, 0.8);
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #0E5FD8 0%, #1976D2 100%);
    box-shadow: 0 0 20px rgba(14, 95, 216, 0.6);
}

.page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0E5FD8;
}

.separator {
    color: rgba(255, 255, 255, 0.4);
}

.current {
    color: #0E5FD8;
    font-weight: 500;
}

/* ================================
   ギャラリーメインセクション
================================ */
.gallery-main {
    background: linear-gradient(to bottom, #0a0a0a 0%, #000000 100%);
    padding: clamp(3rem, 8vw, 5rem) 0;
    min-height: 100vh;
}

/* ================================
   フィルターセクション
================================ */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0E5FD8 0%, #1976D2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-tab.active {
    color: white;
    border-color: #0E5FD8;
    box-shadow: 0 5px 20px rgba(14, 95, 216, 0.3);
}

.filter-tab.active::before {
    left: 0;
}

.filter-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-text {
    font-weight: 500;
}

.count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.filter-tab.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* ビューオプション */
.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 1.1rem;
}

.view-btn:hover,
.view-btn.active {
    background: #0E5FD8;
    border-color: #0E5FD8;
    color: white;
    box-shadow: 0 5px 15px rgba(14, 95, 216, 0.3);
}

/* ================================
   ギャラリーコンテナ
================================ */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    min-height: 400px;
}

.gallery-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ローディングメッセージ */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.loading-message p {
    margin: 0;
}

/* ================================
   ギャラリーカード
================================ */
.gallery-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(14, 95, 216, 0.2);
}

.gallery-card.featured {
    border: 3px solid #0E5FD8;
    box-shadow: 0 8px 25px rgba(14, 95, 216, 0.2);
}

/* カード画像 */
.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .card-image img {
    transform: scale(1.05);
}

/* カードオーバーレイ */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.gallery-card:hover .card-overlay {
    opacity: 1;
}

.category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #0E5FD8 0%, #1976D2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 20;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    z-index: 20;
}

.zoom-btn:hover {
    background: #0E5FD8;
    border-color: #0E5FD8;
    transform: scale(1.1);
}

/* カード情報 */
.card-info {
    padding: 1.5rem;
    background: white;
}

.card-info h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.gallery-card.featured .card-info h3 {
    color: #0E5FD8;
}

.card-info .date {
    color: #0E5FD8;
    font-size: 0.9rem;
    margin: 0 0 0.8rem 0;
    font-weight: 500;
}

.card-info .description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* リストビュー */
.gallery-container.list-view .gallery-card {
    display: flex;
    flex-direction: row;
    height: 200px;
}

.gallery-container.list-view .card-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.gallery-container.list-view .card-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ================================
   ページネーション
================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 1.1rem;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: #0E5FD8;
    color: #0E5FD8;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-num {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
}

.page-num:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #0E5FD8;
    color: #0E5FD8;
}

.page-num.active {
    background: linear-gradient(135deg, #0E5FD8 0%, #1976D2 100%);
    border-color: #0E5FD8;
    color: white;
    box-shadow: 0 5px 20px rgba(14, 95, 216, 0.4);
}

/* ================================
   ライトボックス
================================ */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-info {
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    color: white;
    text-align: center;
}

.lightbox-info h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: white;
}

.lightbox-date {
    color: #0E5FD8;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.lightbox-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    border-radius: 50%;
    z-index: 10;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #0E5FD8;
    border-color: #0E5FD8;
    transform: scale(1.1);
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ================================
   レスポンシブデザイン
================================ */
@media (max-width: 1200px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-hero {
        height: 300px;
        margin-top: 60px;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-container.list-view .gallery-card {
        flex-direction: column;
        height: auto;
    }
    
    .gallery-container.list-view .card-image {
        width: 100%;
        height: 200px;
    }
    
    .gallery-container.list-view .card-info {
        padding: 1.5rem;
    }
    
    .card-info {
        padding: 1rem;
    }
    
    .card-image {
        height: 180px;
    }
    
    .lightbox-container {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-info {
        padding: 1.5rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 3rem;
        letter-spacing: 2px;
    }
    
    .filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .tab-icon {
        font-size: 1rem;
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        gap: 0.5rem;
    }
    
    .page-btn,
    .page-num {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}