/* --- GALLERY PAGE STYLES --- */

.gallery-section {
    padding: 140px 8% 100px;
    background: #fff;
    min-height: 100vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background: #fdf6e3; /* Loading fallback color */
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.zoom-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

.gallery-card:hover .zoom-icon {
    transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* --- LIGHTBOX & WATERMARK --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    cursor: default;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.image-watermark {
    position: absolute;
    top: 20px;
    right: 20px;
    width: clamp(80px, 15vw, 150px);
    opacity: 0.7;
    pointer-events: none;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

/* --- LIGHTBOX CONTROLS --- */
.lightbox-controls {
    position: absolute;
    top: 30px;
    right: 40px;
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 5002;
}

.control-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.control-btn:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.1);
}

.close-lightbox {
    font-size: 2rem;
    line-height: 0;
}

.download-icon-btn {
    font-size: 1rem;
}

.download-icon-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

@media (max-width: 768px) {
    .lightbox-controls {
        top: 20px;
        right: 20px;
        gap: 15px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
    }
}
