
/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Header Gradient Background */
.bg-gold {
    background: #D1B464;
}

/* Khmer Flower Styling */
.khmer-flower,
.khmer-accent {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* === UPDATED ANIMATION === */
/* Now uses spin-slow animation */
.khmer-pattern {
    animation: spin-slow 20s linear infinite;
}

.khmer-accent {
    animation: spin-slow 20s linear infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Background Patterns */
section {
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e303e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a4456;
}

/* Khmer Border Pattern */
.khmer-border-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #1e303e 0px,
        #1e303e 10px,
        transparent 10px,
        transparent 20px
    );
}


/* Card Hover Effects */
.practice-card {
    transition: all 0.3s ease;
}

.practice-card:hover {
    transform: translateY(-5px);
}

/* Decorative Khmer Pattern Background */
.khmer-bg {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(30, 48, 62, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(30, 48, 62, 0.05) 0%, transparent 50%);
}

/* Team Member Cards */
.team-member {
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: scale(1.05);
}


/* Section Divider with Khmer Pattern */
.section-divider {
    position: relative;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #1e303e 20%,
        #1e303e 80%,
        transparent 100%
    );
}

.section-divider::before,
.section-divider::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #1e303e;
    font-size: 1.5rem;
}

.section-divider::before {
    left: 10%;
}

.section-divider::after {
    right: 10%;
}

/* === ADDED FOR SWAPPABLE CAROUSEL === */
#team-carousel-track {
    cursor: grab;
}

#team-carousel-track:active {
    cursor: grabbing;
}


/* === NEW "MAJESTIC GALLERY" STYLES === */
/* Base wrapper for any image we want to have the hover effect */
.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
    transition: all 0.3s ease-in-out;
    width: 100%;
    /* Use auto height to hug the image content */
    height: auto; 
    background: transparent; /* Ensure no white box behind */
}

.gallery-image-wrapper img {
    transition: transform 0.3s ease-in-out;
    width: 100%;
    height: auto; /* Allow height to adjust naturally based on width */
    object-fit: cover; 
    display: block; /* Removes bottom margin/gap */
}

.gallery-image-wrapper:hover {
    /* The "lift up" effect */
    transform: translateY(-0.5rem) scale(1.02);
    z-index: 10;
    
    /* The "Majestic Gold Glow" - #D1B464 at 70% opacity */
    box-shadow: 0 10px 30px -5px rgba(209, 180, 100, 0.7); 
}

/* Re-usable class for the partner frame hover */
.hover\:shadow-gold-glow:hover {
    /* #D1B464 at 70% opacity */
    box-shadow: 0 10px 30px -5px rgba(209, 180, 100, 0.7);
}

/* === NEW GALLERY SLIDER STYLES (NATURAL & RESPONSIVE) === */
.gallery-slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;    
    overflow: hidden;
    padding-bottom: 3rem; /* Space for dots */
}

/* The track holds all the slides */
.gallery-slider-track {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
    /* Ensure track height hugs the tallest slide, or use items-start to align top */
    align-items: flex-start;
}

/* Each slide group */
.gallery-slide-group {
    /* Flex-basis 100% ensures one slide takes full width */
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%; 
    padding: 0 4px; 
    box-sizing: border-box;
}

/* The Grid Layout */
.gallery-grid {
    display: grid;
    width: 100%; 
    gap: 1.5rem; 
    /* No fixed rows, let content define height */
    grid-template-rows: auto; 
    /* Center items vertically so gaps are distributed, not just white space at bottom */
    align-items: center;
    
    /* Desktop: 3 columns */
    grid-template-columns: repeat(3, 1fr);
}

/* Tablet Breakpoint (max-width: 1024px) */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* Switch to 2 columns */
        gap: 1rem;
    }
}

/* Mobile Breakpoint (max-width: 640px) */
@media (max-width: 640px) {
    .gallery-grid {
        /* Keep 2 columns on mobile */
        grid-template-columns: repeat(2, 1fr); 
        gap: 0.75rem;
    }
}

/* Dots */
.gallery-slider-dots {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 10px 0;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e1; 
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background-color: #D1B464; 
    transform: scale(1.3);
}

/* Navigation Arrows */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: #1e303e;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}
.gallery-nav-btn:hover {
    background-color: #D1B464;
    color: white;
    border-color: #D1B464;
}
.gallery-prev { left: 0; }
.gallery-next { right: 0; }

/* On mobile, move arrows to be less intrusive */
@media (max-width: 640px) {
    .gallery-nav-btn {
        width: 36px;
        height: 36px;
        /* Position them at the bottom sides instead of middle of image */
        top: auto;
        bottom: 0px; 
        transform: none;
    }
    .gallery-prev { left: 20px; }
    .gallery-next { right: 20px; }
}

@keyframes divine-float {
            0%, 100% {
                transform: translateY(0px);
                filter: drop-shadow(0 0 20px rgba(209, 180, 100, 0.6));
            }
            50% {
                transform: translateY(-15px); 
                filter: drop-shadow(0 0 50px rgba(255, 215, 0, 1.0)); 
            }
        }

        .animate-divine {
            animation: divine-float 5s ease-in-out infinite;
        }

.hover\:text-gold:hover {
    color: #D1B464;
}