/*
 * gallery.css — Supernova Gallery Page Scoped Styles
 * HARD REQUIREMENT: Sharp 90-degree corners (border-radius: 0 !important;) on all image containers & cards
 */

.gallery-page,
.gallery-page *,
.gallery-page img,
.gallery-page div,
.gallery-page button,
.gallery-page a,
.gallery-page .gal-masonry-item,
.gallery-page .gal-video-card,
.gallery-page #gal-lightbox,
.gallery-page #gal-video-modal {
    border-radius: 0 !important;
}

/* Metallic Silver Chrome Text Styling */
.gallery-page .text-silver-metallic {
    color: #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 45%, #94a3b8 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

/* COLLAGE GRID — 4 equal columns, 9 fixed rows of 205px each, 12px distinct gap */
.gallery-page .gal-collage {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(9, 205px);
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Every collage cell: images fill their cell fully with un-distorted object-fit cover */
.gallery-page .gal-collage-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-page .gal-collage-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Mobile: collapse to 2 columns, auto rows */
@media (max-width: 640px) {
    .gallery-page .gal-collage {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        grid-auto-rows: 160px;
    }
    .gallery-page .gal-collage-item {
        grid-column: auto !important;
        grid-row: auto !important;
    }
}


.gallery-page .gal-sec1-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .gallery-page .gal-sec1-grid {
        flex-direction: row;
        gap: 3.5rem;
        align-items: stretch;
        min-height: 440px;
    }
    .gallery-page .gal-sec1-left {
        width: 46%;
        min-width: 46%;
        max-height: 350px;
        flex-shrink: 0;
    }
    .gallery-page .gal-sec1-right {
        width: 54%;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 2rem 0;
    }
}

/* Tab Filter Buttons */
.gallery-page .gal-tab-btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.25s ease;
    cursor: pointer;
}

.gallery-page .gal-tab-btn:hover {
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.1);
}

.gallery-page .gal-tab-btn.active {
    color: #ffffff;
    background: #a855f7;
    border-color: #c084fc;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

/* Scrollbar Hide Utility */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Video Slider Horizontal Scroll Container */
#gal-video-slider-container {
    scroll-behavior: smooth;
}

/* Lightbox Modal Window (Fixed Fullscreen Overlay Popup) */
#gal-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background-color: rgba(2, 6, 23, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-sizing: border-box !important;
    display: none !important;
}

#gal-lightbox.active {
    display: flex !important;
    animation: gal-modal-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Lightbox Navigation Overlapping Arrows & Close Button */
#gal-lightbox .gal-lb-nav-btn {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000010 !important;
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: rgba(9, 19, 34, 0.92) !important;
    border: 2px solid #22d3ee !important;
    color: #22d3ee !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(16px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.45), inset 0 0 10px rgba(6, 182, 212, 0.25) !important;
}

#gal-lightbox .gal-lb-nav-btn:hover {
    background-color: #06b6d4 !important;
    color: #030712 !important;
    border-color: #ffffff !important;
    transform: translateY(-50%) scale(1.15) !important;
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.9), 0 0 15px rgba(255, 255, 255, 0.8) !important;
}

#gal-lightbox .gal-lb-nav-btn.prev-btn {
    left: 20px !important;
}

#gal-lightbox .gal-lb-nav-btn.next-btn {
    right: 20px !important;
}

@media (min-width: 640px) {
    #gal-lightbox .gal-lb-nav-btn {
        width: 60px !important;
        height: 60px !important;
    }
    #gal-lightbox .gal-lb-nav-btn.prev-btn {
        left: 32px !important;
    }
    #gal-lightbox .gal-lb-nav-btn.next-btn {
        right: 32px !important;
    }
}

#gal-lightbox .gal-lb-close-btn {
    position: fixed !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 1000010 !important;
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: rgba(9, 19, 34, 0.92) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.25s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(16px) !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important;
}

#gal-lightbox .gal-lb-close-btn:hover {
    color: #030712 !important;
    border-color: #ffffff !important;
    background-color: #22d3ee !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.8) !important;
}

#gal-video-modal:not(.hidden) {
    display: flex;
    animation: gal-modal-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gal-modal-fade {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

/* Focus Shift Effect on Main Gallery Container (GPU Hardware Accelerated) */
.gallery-page #gal-main-container {
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.gallery-page #gal-main-container.gal-focus-shifted {
    transform: translate3d(-12px, 0, 0);
    opacity: 0.82;
}

/* ==========================================================================
   STORY SIDE PANEL ("THE PEOPLE BEHIND THE MOMENT") - FOCUS SHIFT DRAWER
   HARD REQUIREMENT: Sharp 90-degree corners (border-radius: 0 !important;)
   ========================================================================== */

#story-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background-color: rgba(2, 6, 23, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    border-radius: 0 !important;
}

#story-panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Thin vertical cyan energy line at right edge */
#story-energy-line {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 100vh;
    background-color: #06b6d4;
    box-shadow: 0 0 15px #06b6d4, 0 0 30px #06b6d4;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    border-radius: 0 !important;
}

#story-energy-line.surge {
    opacity: 1;
    box-shadow: 0 0 25px #06b6d4, 0 0 50px #22d3ee;
}

/* Off-canvas Side Drawer Container (GPU Accelerated) */
#story-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    max-width: 650px;
    z-index: 99995;
    background-color: #030712;
    border-left: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.85), -2px 0 15px rgba(6, 182, 212, 0.15);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0 !important;
}

@media (min-width: 768px) {
    #story-side-panel {
        width: 45vw;
    }
}

@media (min-width: 1280px) {
    #story-side-panel {
        width: 42vw;
    }
}

#story-side-panel.open {
    transform: translate3d(0, 0, 0);
}

/* Staggered Content Reveal inside Side Panel */
#story-panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 0 !important;
}

.story-stagger-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#story-side-panel.open .story-stagger-1 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
}

#story-side-panel.open .story-stagger-2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.28s;
}

#story-side-panel.open .story-stagger-3 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.38s;
}

/* Custom Scrollbar for Story Content */
.story-scroll-area::-webkit-scrollbar {
    width: 5px;
}
.story-scroll-area::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
.story-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.4);
}
.story-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}
