/* ===== GALLERY SECTION ===== */
.gallery-section {
    position: relative;
    padding: var(--space-3xl) var(--space-m);
    background: var(--void);
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    background: #111;
    display: none; /* Hidden by default for load more logic */
}

/* Show first 8 items */
.gallery-item:nth-child(-n+8) {
    display: block;
}

.gallery-item.show {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-item img.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
    filter: brightness(0.7) contrast(1.1) grayscale(20%);
}

.gallery-item:hover img.gallery-img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.1) grayscale(0%);
}

/* Overlay & Branding */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
    z-index: 1;
}

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

.gallery-watermark {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 90px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.4s var(--ease);
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.gallery-item:hover .gallery-watermark {
    opacity: 0.8;
    transform: translateY(0);
}

.gallery-actions {
    text-align: center;
    margin-top: 3rem;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-watermark {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 120px;
    opacity: 0.7;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,1));
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent-red);
}

.lightbox-controls {
    position: absolute;
    top: 50%;
    left: -60px;
    right: -60px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-controls {
        left: 10px;
        right: 10px;
    }
    .lightbox-close {
        top: -35px;
        right: 10px;
    }
}
