/**
 * Tour Card Carousel Styles
 * Mobile-first responsive design
 */

/* Carousel Container */
.tour-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Slides */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

/* Navigation Arrows */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
}

.tour-card:hover .carousel-prev,
.tour-card:hover .carousel-next,
.tour-card.has-carousel:focus-within .carousel-prev,
.tour-card.has-carousel:focus-within .carousel-next {
    opacity: 1;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

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

.carousel-prev svg,
.carousel-next svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Dots Indicator */
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 12px;
}

.carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dots .dot.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .carousel-prev,
    .carousel-next {
        width: 32px;
        height: 32px;
        background: rgba(0, 0, 0, 0.4);
    }

    .carousel-prev svg,
    .carousel-next svg {
        width: 18px;
        height: 18px;
    }

    .carousel-prev {
        left: 6px;
    }

    .carousel-next {
        right: 6px;
    }

    /* Always show arrows on mobile for better discoverability */
    .carousel-prev,
    .carousel-next {
        opacity: 1;
    }

    .carousel-dots {
        bottom: 8px;
        padding: 3px 6px;
    }

    .carousel-dots .dot {
        width: 5px;
        height: 5px;
    }

    .carousel-dots .dot.active {
        width: 14px;
    }
}

/* Desktop Optimizations */
@media (min-width: 769px) {
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
    }

    .carousel-prev svg,
    .carousel-next svg {
        width: 22px;
        height: 22px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-dots .dot {
        width: 7px;
        height: 7px;
    }

    .carousel-dots .dot.active {
        width: 20px;
    }
}

/* Accessibility */
.carousel-prev:focus,
.carousel-next:focus,
.carousel-dots .dot:focus {
    outline: 2px solid #f79448;
    outline-offset: 2px;
}

/* Prevent image drag */
.carousel-slide img {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Smooth transitions for better UX */
.tour-carousel * {
    -webkit-tap-highlight-color: transparent;
}
