/* =========================================
   1. MASONRY GRID LAYOUT
   ========================================= */

.gallery-container {
    display: flex;
    gap: 20px;
    margin-top: 60px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-item {
    width: 100%;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #333;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #444;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item img.loaded {
    opacity: 1;
    animation: none;
}

@keyframes skeleton-pulse {
    0% {
        background-color: #444;
    }

    50% {
        background-color: #555;
    }

    100% {
        background-color: #444;
    }
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 2;
}

/* =========================================
   2. LIGHTBOX
   ========================================= */

#lightbox {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#lightbox.active img {
    transform: scale(1);
}

/* Lightbox Buttons */
.lightbox-btn {
    position: absolute;
    color: #fff;
    padding: 0;
    cursor: pointer;
    user-select: none;
    z-index: 2010;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-btn svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.lightbox-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.lightbox-btn:active {
    transform: scale(0.95);
}

.lightbox-btn.close {
    top: 20px;
    right: 20px;
}

.lightbox-btn.prev {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

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

.lightbox-btn.next {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

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

/* =========================================
   3. GALLERY HERO SECTION
   ========================================= */

.gallery-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 30vh;
    margin: 0;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    background-color: #000;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.gallery-slide.active {
    opacity: 1;
}

/* Hero Dots */
.gallery-dots {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
}

.gallery-dot:hover,
.gallery-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.gallery-dot:focus-visible {
    outline: 2px solid #fff;
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

/* Category Links */
.hero-links {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    pointer-events: auto;
    z-index: 3;
}

.floating-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 10px 20px;
    height: 48px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    transition: color 0.2s, background-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.floating-link:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Scroll Arrow */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    animation: arrowBounce 2s infinite ease-in-out;
}

.scroll-down:hover {
    opacity: 1;
}

@keyframes arrowBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Page Spacing Overrides */
main {
    margin-top: 0 !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.gallery-hero h1 {
    text-align: center;
}

/* =========================================
   4. RESPONSIVENESS
   ========================================= */

@media (max-width: 768px) {
    .floating-link {
        padding: 8px 16px;
        font-size: 1rem;
    }
}