/**
 * Gallery Lightbox Styles
 * Niseko Hakuunso-inspired Minimalist Design
 * Clean, image-focused gallery with subtle interactions
 */

/* Gallery Section - Minimalist Design */
.gallery-section-niseko {
    background: #ffffff;
    padding: 4rem 0 6rem;
    min-height: 60vh;
}

.gallery-section-niseko .container {
    max-width: 1400px;
}

/* Filter Buttons - Minimal Style */
.gallery-filters-niseko {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.gallery-filter-btn-niseko {
    padding: 0.625rem 1.5rem;
    background: transparent;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: var(--font-body, 'Inter', sans-serif);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.02em;
    position: relative;
    outline: none;
}

.gallery-filter-btn-niseko:hover {
    color: #333;
    border-color: #999;
    background: #fafafa;
}

.gallery-filter-btn-niseko.active {
    color: #000;
    border-color: #000;
    background: #fff;
    font-weight: 500;
}

.gallery-filter-btn-niseko.active::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 0;
    right: 0;
    height: 1px;
    background: #000;
}

/* Gallery Grid - Clean Masonry Style */
.gallery-grid-niseko {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

@media (min-width: 768px) {
    .gallery-grid-niseko {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .gallery-grid-niseko {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 2.5rem;
    }
}

/* Gallery Item - Minimal Image Focus */
.gallery-item-niseko {
    position: relative;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: opacity, transform;
}

.gallery-item-niseko:hover {
    transform: translateY(-4px);
}

.gallery-item-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Zoom Icon - Niseko Hakuunso Style (Exact Match) */
.gallery-zoom-icon-niseko {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C9A961;
    font-size: 18px;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item-niseko:hover .gallery-zoom-icon-niseko {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-zoom-icon-niseko::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 2px solid rgba(201, 169, 97, 0.7);
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    animation: vanishRing 1.5s ease-out infinite;
}

.gallery-item-niseko:hover .gallery-zoom-icon-niseko::before {
    visibility: visible;
}

@keyframes vanishRing {
    0% {
        width: 50px;
        height: 50px;
        opacity: 0.8;
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

.gallery-item-niseko:hover .gallery-zoom-icon-niseko {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item-niseko:hover .gallery-zoom-icon-niseko::before {
    animation: vanishRing 1.5s ease-out infinite;
}

.gallery-zoom-icon-niseko i {
    font-size: 18px;
    line-height: 1;
    color: #C9A961;
    transition: transform 0.3s ease, color 0.3s ease;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.gallery-item-niseko:hover .gallery-zoom-icon-niseko i {
    transform: scale(1.1);
}

/* Lightbox Modal Styles - Minimal Design */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.gallery-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-info {
    margin-top: 1.5rem;
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.gallery-lightbox-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 0.02em;
}

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

.gallery-lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.gallery-lightbox-prev {
    left: 30px;
}

.gallery-lightbox-next {
    right: 30px;
}

.gallery-lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 300;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0;
    letter-spacing: 0.05em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-section-niseko {
        padding: 3rem 0 4rem;
    }
    
    .gallery-filters-niseko {
        gap: 0.375rem;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .gallery-filter-btn-niseko {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .gallery-grid-niseko {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item-image {
        padding-bottom: 75%;
    }
    
    .gallery-lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .gallery-lightbox-image {
        max-height: 75vh;
    }
    
    .gallery-lightbox-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .gallery-lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .gallery-lightbox-prev {
        left: 15px;
    }
    
    .gallery-lightbox-next {
        right: 15px;
    }
    
    .gallery-lightbox-counter {
        bottom: 15px;
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* Legacy styles - keeping for backward compatibility */
.gallery-card-enhanced {
    display: none;
}

.gallery-card-content {
    display: none;
}
