/* ===== CAROUSEL GALLERY ===== */
.carousel-gallery {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-white);
    position: relative;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    position: relative;
    height: 500px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 24, 65, 0.9), transparent);
    color: white;
    padding: 2rem;
    text-align: left;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-caption {
    transform: translateY(0);
}

.carousel-caption h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

.carousel-caption p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Navigation arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-arrow:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* Dots indicator */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-medium);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--accent-blue);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: var(--accent-red);
}

/* Thumbnails */
.carousel-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.thumbnail {
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--accent-blue);
    transform: scale(1.05);
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play/Pause button */
.carousel-controls {
    text-align: center;
    margin-top: 20px;
}

.carousel-play-pause {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.carousel-play-pause:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

/* Fullscreen button */
.carousel-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-fullscreen:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Fullscreen mode */
.carousel-container:fullscreen {
    padding: 20px;
    background: var(--primary);
}

.carousel-container:fullscreen .carousel-slide {
    height: 80vh;
}

/* Loading animation */
.carousel-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.carousel-loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-light);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-slide {
        height: 350px;
    }
    
    .carousel-caption h3 {
        font-size: 1.4rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .carousel-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }
    
    .thumbnail {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        height: 250px;
    }
    
    .carousel-caption {
        padding: 1rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.2rem;
    }
}