/* Photo Gallery Section Styles */
.gallery-scroll {
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.1s linear; /* Added for JS smooth scrolling */
}

/* Hide scrollbar for gallery container */
#galleryContainer {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

#galleryContainer::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gallery-card {
    flex-shrink: 0;
    width: 320px;
    height: 240px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1);
}

/* Smooth gallery container transitions */
#galleryContainer {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#galleryContainer::-webkit-scrollbar {
    display: none;
}

/* Enhanced gallery card animations */
.gallery-card img {
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.05);
}

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

/* Continuous smooth scroll behavior like testimonials */
#galleryContainer .flex {
    transition: transform 0.1s linear;
}

/* Gallery container for continuous scrolling */
#galleryContainer {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: none; /* Remove opacity transition for continuous scroll */
    scroll-behavior: auto; /* Disable smooth scroll for continuous movement */
}

/* Mobile Gallery Adjustments */
@media (max-width: 768px) {
    .gallery-card {
        width: 280px;
        height: 200px;
        min-width: 280px;
    }
    
    #galleryContainer {
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #galleryContainer .flex {
        gap: 1rem;
    }
    
    /* Ensure gallery section is visible on mobile */
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Make gallery arrows visible on mobile */
    #galleryLeft,
    #galleryRight {
        display: block !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(0, 0, 0, 0.7);
        border: none;
        color: white;
        padding: 0.5rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }
    
    #galleryLeft {
        left: 0.5rem;
    }
    
    #galleryRight {
        right: 0.5rem;
    }
    
    /* Auto scroll indicator for mobile */
    .gallery-auto-scroll-indicator {
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.5rem;
        z-index: 5;
    }
    
    .gallery-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(212, 175, 55, 0.3);
        transition: all 0.3s ease;
    }
    
    .gallery-dot.active {
        background: #D4AF37;
        transform: scale(1.2);
    }
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(212, 175, 55, 0.2);
}

/* Smooth entrance animation for gallery cards */
.gallery-card {
    animation: fadeInScale 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Stagger animation for cards */
.gallery-card:nth-child(1) { animation-delay: 0.1s; }
.gallery-card:nth-child(2) { animation-delay: 0.2s; }
.gallery-card:nth-child(3) { animation-delay: 0.3s; }
.gallery-card:nth-child(4) { animation-delay: 0.4s; }
.gallery-card:nth-child(5) { animation-delay: 0.5s; }
.gallery-card:nth-child(6) { animation-delay: 0.6s; }

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Gradient backgrounds for gallery cards */
.gold-brown {
    background: linear-gradient(135deg, #D4AF37 0%, #8B4513 100%);
}

.blue-sand {
    background: linear-gradient(135deg, #1E3A8A 0%, #F5F5DC 100%);
}

.brown-gold {
    background: linear-gradient(135deg, #8B4513 0%, #D4AF37 100%);
}

.sand-blue {
    background: linear-gradient(135deg, #F5F5DC 0%, #1E3A8A 100%);
}
