/* Gallery Slider Styles */
.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.slideshow-container:hover {
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 15px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Loading State */
.slideshow-container.loading {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.slideshow-container.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gallery-slide {
    display: none;
    width: 100%;
    animation: slideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.gallery-slide.active {
    display: block;
}

.gallery-slide img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
    transition: filter 0.3s ease;
}

.gallery-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

/* Enhanced Navigation Buttons */
.gallery-prev, .gallery-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 10;
    opacity: 0.8;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-prev:hover, .gallery-next:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.4));
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.gallery-prev:active, .gallery-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Enhanced Dots */
.gallery-dots {
    text-align: center;
    margin: 25px auto 0;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 90%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.gallery-dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.4), rgba(32, 178, 170, 0.6));
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(64, 224, 208, 0.5);
    position: relative;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.gallery-dot:hover {
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.7), rgba(32, 178, 170, 0.9));
    transform: scale(1.3);
    border-color: rgba(64, 224, 208, 0.8);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 0 0 3px rgba(64, 224, 208, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.gallery-dot.active {
    background: linear-gradient(135deg, #40E0D0, #20B2AA);
    transform: scale(1.4);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 20px rgba(64, 224, 208, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 4px rgba(64, 224, 208, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.gallery-dot.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.gallery-dot.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 50%;
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 0.5; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Enhanced Slide Animation */
@keyframes slideIn {
    0% { 
        opacity: 0; 
        transform: translateX(30px) scale(0.95);
        filter: blur(2px);
    }
    50% {
        opacity: 0.7;
        transform: translateX(10px) scale(0.98);
        filter: blur(1px);
    }
    100% { 
        opacity: 1; 
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

/* Enhanced Responsive Design */
@media only screen and (max-width: 768px) {
    .slideshow-container {
        margin: 10px;
        border-radius: 12px;
    }
    
    .gallery-prev, .gallery-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
        transform: translateY(-50%);
    }
    
    .gallery-prev {
        left: 15px;
    }
    
    .gallery-next {
        right: 15px;
    }
    
    .gallery-prev:hover, .gallery-next:hover {
        transform: translateY(-50%) scale(1.1);
    }
    
    .gallery-prev:active, .gallery-next:active {
        transform: translateY(-50%) scale(0.95);
    }
    
    .gallery-slide img {
        max-height: 350px;
    }
    
    .gallery-dots {
        margin: 20px auto 0;
        padding: 12px 16px;
        max-width: 95%;
    }
    
    .gallery-dot {
        height: 9px;
        width: 9px;
        margin: 0 4px;
        border-width: 1.5px;
    }
    
    .gallery-dot:hover {
        transform: scale(1.25);
    }
    
    .gallery-dot.active {
        transform: scale(1.3);
    }
}

@media only screen and (max-width: 480px) {
    .gallery-prev, .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
        transform: translateY(-50%);
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-prev:hover, .gallery-next:hover {
        transform: translateY(-50%) scale(1.1);
    }
    
    .gallery-prev:active, .gallery-next:active {
        transform: translateY(-50%) scale(0.95);
    }
    
    .gallery-slide img {
        max-height: 280px;
    }
    
    .gallery-dots {
        margin: 15px auto 0;
        padding: 10px 14px;
        max-width: 98%;
    }
    
    .gallery-dot {
        height: 8px;
        width: 8px;
        margin: 0 3px;
    }
}

/* Animation Enhancement for Gallery Section */
#gallery .to-animate {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#gallery .to-animate.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#gallery .section-heading h2.to-animate {
    transform: translateY(30px);
}

#gallery .subtext.to-animate {
    transform: translateY(20px);
}

#gallery .section-heading h2.to-animate.animated {
    animation: slideInUp 0.8s ease-out forwards;
}

#gallery .subtext.to-animate.animated {
    animation: slideInUp 0.6s ease-out 0.2s forwards;
}

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