/* Additional CSS to help with passive event handling for Owl Carousel */

/* Improve touch scrolling behavior */
.owl-carousel {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* When dragging, allow horizontal touch action */
.owl-carousel.owl-drag {
    touch-action: pan-y pinch-zoom;
}

/* For carousel items, allow proper touch handling */
.owl-carousel .owl-item {
    touch-action: manipulation;
}

/* Ensure proper touch behavior on stage */
.owl-carousel .owl-stage {
    touch-action: pan-y;
}

/* When actively dragging, disable touch actions that might interfere */
.owl-carousel.owl-grab {
    touch-action: none;
}

/* Improve click/tap responsiveness */
.owl-carousel .owl-nav button,
.owl-carousel .owl-dots .owl-dot {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Optimize for better performance during animations */
.owl-carousel .owl-stage-outer {
    will-change: transform;
}

.owl-carousel .owl-item {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Always show navigation arrows and style them */
.owl-carousel .owl-nav {
    display: block !important;
}

.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    color: white !important;
    border: none !important;
    padding: 10px 15px !important;
    font-size: 20px !important;
    line-height: 1;
    border-radius: 50%;
    margin: 0;
    transition: background 0.3s;
    width: 40px;
    height: 40px;
    text-align: center;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

.owl-carousel .owl-nav button.owl-prev {
    left: 10px;
}

.owl-carousel .owl-nav button.owl-next {
    right: 10px;
}

/* Ensure arrows are visible on all screen sizes */
@media (max-width: 768px) {
    .owl-carousel .owl-nav button.owl-prev,
    .owl-carousel .owl-nav button.owl-next {
        display: block;
        width: 35px;
        height: 35px;
        padding: 8px 12px !important;
    }

    .owl-carousel .owl-nav button.owl-prev {
        left: 5px;
    }

    .owl-carousel .owl-nav button.owl-next {
        right: 5px;
    }
}

/* Swipe animation for carousels */
.swipe-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    pointer-events: none; /* Allows clicks to go through to the carousel */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    white-space: nowrap;
}

.swipe-indicator.visible {
    opacity: 1;
}

/* Hidden state */
.swipe-indicator.hidden {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.swipe-indicator .icon-hand {
    display: inline-block;
    margin-right: 10px;
    animation: swipe 1s infinite ease-in-out;
}

.swipe-indicator .icon-hand::before {
    content: 'SWIPE'; /* Using text as a placeholder */
    font-family: sans-serif;
    font-weight: bold;
}


@keyframes swipe {
    0% {
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(-10px);
    }
}

/* Mobile spacing tweaks to reduce empty space around carousels */
@media (max-width: 480px) {
    .gtco-section {
        padding: 1.5em 0;
    }

    /* Limit fullwidth header carousel height and crop images nicely */
    .carousel-container .owl-carousel-fullwidth {
        max-height: 260px;
    }
    .carousel-container .owl-carousel-fullwidth .item img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        object-position: center;
    }

    /* Keep project cards compact */
    .owl-carousel-carousel .gtco-item img {
        margin-bottom: 16px !important;
    }
}
