/* 
 * Wedding Gallery Page Animations
 * Enhanced animations and transitions for the gallery
 */

/* Page Load Animations */
.gallery-header {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.upload-button-container {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.gallery-container {
    opacity: 0;
    animation: fadeIn 1s ease 0.4s forwards;
}

/* Gallery Item Animations */
.gallery-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animation for gallery items */
.gallery-item:nth-child(1) { animation-delay: 0.5s; }
.gallery-item:nth-child(2) { animation-delay: 0.6s; }
.gallery-item:nth-child(3) { animation-delay: 0.7s; }
.gallery-item:nth-child(4) { animation-delay: 0.8s; }
.gallery-item:nth-child(5) { animation-delay: 0.9s; }
.gallery-item:nth-child(6) { animation-delay: 1.0s; }
.gallery-item:nth-child(7) { animation-delay: 1.1s; }
.gallery-item:nth-child(8) { animation-delay: 1.2s; }
.gallery-item:nth-child(9) { animation-delay: 1.3s; }
.gallery-item:nth-child(10) { animation-delay: 1.4s; }

/* Enhanced hover effects */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(158, 129, 116, 0);
    z-index: 1;
    transition: background 0.3s ease;
}

.gallery-item:hover::before {
    background: rgba(158, 129, 116, 0.2);
}

.gallery-item::after {
    content: '\f002'; /* Font Awesome magnifying glass icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 24px;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Button Animations */
.upload-button {
    position: relative;
    overflow: hidden;
}

.upload-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.6s ease;
}

.upload-button:hover::before {
    left: 100%;
}

/* Modal Animations */
.modal-option {
    transform: translateY(0);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.modal-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Lightbox Animations */
.lightbox-image {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lightbox.active .lightbox-image {
    opacity: 1;
    transform: scale(1);
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation for newly added photos */
.gallery-item.new-photo {
    animation: pulse 1s ease;
}

/* Responsive Animation Adjustments */
@media (max-width: 767px) {
    .gallery-item::after {
        font-size: 18px;
    }
    
    .gallery-item:hover img {
        transform: scale(1.03); /* Smaller scale on mobile */
    }
}

