/* WED-FLIX Carousel Styles */

.gallery-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.gallery-carousel::before,
.gallery-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.gallery-carousel::before {
    left: 0;
    background: linear-gradient(90deg, var(--background-dark) 0%, transparent 100%);
}

.gallery-carousel::after {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, var(--background-dark) 100%);
}

.gallery-carousel-container {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    padding: 0 20px;
}

.gallery-item {
    flex: 0 0 250px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: scale(1);
}

.gallery-item:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 12px 35px rgba(229, 9, 20, 0.4);
    z-index: 10;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.15);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.8) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 3;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.gallery-item-date {
    font-size: 0.85rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Video specific styles */
.video-item {
    position: relative;
}

.video-item .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 5;
}

.video-item:hover .play-overlay {
    opacity: 1;
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-item .duration {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
}

/* Carousel navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.carousel-nav-btn {
    background: var(--background-card);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.carousel-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.carousel-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Auto-scroll animation */
@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.gallery-carousel.auto-scroll .gallery-carousel-container {
    animation: autoScroll 30s linear infinite;
}

.gallery-carousel.auto-scroll:hover .gallery-carousel-container {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-carousel::before,
    .gallery-carousel::after {
        width: 50px;
    }
    
    .gallery-item {
        flex: 0 0 200px;
        height: 150px;
    }
    
    .carousel-nav {
        margin-top: 20px;
    }
    
    .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-carousel::before,
    .gallery-carousel::after {
        display: none;
    }
    
    .gallery-item {
        flex: 0 0 150px;
        height: 120px;
    }
    
    .gallery-item-info {
        padding: 15px;
    }
    
    .gallery-item-title {
        font-size: 0.9rem;
    }
    
    .gallery-item-date {
        font-size: 0.8rem;
    }
}

/* Loading states */
.gallery-carousel.loading {
    opacity: 0.7;
}

.gallery-carousel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth scrolling for touch devices */
.gallery-carousel {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for webkit browsers */
.gallery-carousel::-webkit-scrollbar {
    height: 8px;
}

.gallery-carousel::-webkit-scrollbar-track {
    background: var(--background-dark);
    border-radius: 4px;
}

.gallery-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.gallery-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}