/* jQuery Portfolio Slider Styles */

.jquery-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.jquery-slider .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    padding: 4%;
    gap: 10px;
}
.project-section .sliding-pictures {
    padding: 0;
}
.jquery-slider .swiper-slide {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Desktop: 3 images per view */
@media (min-width: 769px) {
    .jquery-slider .swiper-slide {
        width: calc(33.333% - 10px);
        margin-right: 10px;
    }
    
    .jquery-slider .swiper-slide:last-child {
        margin-right: 0;
    }
    
    .jquery-slider .swiper-slide img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

/* Mobile: 1 image per view */
@media (max-width: 768px) {
    .jquery-slider .swiper-slide {
        width: 100%;
        margin-right: 0;
    }
    
    .jquery-slider .swiper-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Enhanced mobile navigation visibility */
    .jquery-nav {
        display: block;
        pointer-events: auto;
    }
    
    .jquery-prev,
    .jquery-next {
        display: flex;
        opacity: 1;
        visibility: visible;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #da4238;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .jquery-prev:disabled,
    .jquery-next:disabled {
        opacity: 0.3;
        background: rgba(200, 200, 200, 0.8);
    }
}

/* Navigation Buttons */
.jquery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.jquery-prev,
.jquery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 30px;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.jquery-prev:hover,
.jquery-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.jquery-prev:disabled,
.jquery-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.jquery-prev {
    left: 10px;
}

.jquery-next {
    right: 10px;
}

/* Pagination Dots */
.jquery-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.jquery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.jquery-dot:hover {
    background: #da4238;
    transform: scale(1.2);
}

.jquery-dot.active {
    background: #da4238;
    border-color: #da4238;
    transform: scale(1.2);
}

/* Slide Transitions */
.jquery-slider .swiper-slide {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
}

.jquery-slider .swiper-slide.active {
    opacity: 1;
    transform: translateX(0);
}

/* Hide Swiper.js elements when using jQuery slider */
.jquery-slider .swiper-button-next,
.jquery-slider .swiper-button-prev,
.jquery-slider .swiper-pagination {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .jquery-prev,
    .jquery-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .jquery-pagination {
        bottom: 15px;
    }
    
    .jquery-dot {
        width: 10px;
        height: 10px;
    }
}

/* Ensure proper spacing for desktop grid */
@media (min-width: 769px) {
    .jquery-slider .swiper-wrapper {
        gap: 10px;
    }
    
    .jquery-slider .swiper-slide {
        margin-right: 5px;
    }
}

/* Touch-friendly mobile navigation */
@media (max-width: 768px) {
    .jquery-prev,
    .jquery-next {
        width: 45px;
        height: 45px;
        font-size: 22px;
        display: flex;
        opacity: 1;
        visibility: visible;
        z-index: 100;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #da4238;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .jquery-prev {
        left: -10px;
    }
    
    .jquery-next {
        right: -10px;
    }
    
    /* Ensure arrows are always visible on mobile */
    .jquery-nav {
        pointer-events: auto;
        display: block;
    }
    
    .jquery-prev:hover,
    .jquery-next:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
    }
    
    /* Force visibility on mobile */
    .jquery-prev:not(:disabled),
    .jquery-next:not(:disabled) {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* Additional mobile arrow enhancements */
    .jquery-prev,
    .jquery-next {
        min-width: 45px;
        font-weight: bold;
        color: #da4238;
    }
    
    /* Ensure arrows are above all content */
    .jquery-nav {
        z-index: 999;
    }
    
    /* Enhanced mobile pagination */
    .jquery-pagination {
        bottom: 25px;
        z-index: 100;
    }
    
    .jquery-dot {
        width: 8px;
        height: 8px;
        border: 0px solid rgba(255, 255, 255, 0.3);
    }
    
    .jquery-dot:hover {
        background: #da4238;
        border-color: #da4238;
        transform: scale(1);
    }
    
    .jquery-dot.active {
        background: #da4238;
        border-color: #da4238;
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(218, 66, 56, 0.4);
    }
}

/* Global mobile arrow visibility override */
@media (max-width: 768px) {
    .jquery-slider .jquery-nav {
        display: block;
        visibility: visible;
        opacity: 1;
        height: 40px;
        overflow: hidden;
        z-index: 1 !important;
    }
    
    .jquery-slider .jquery-prev,
    .jquery-slider .jquery-next {
        display: flex;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Hide Swiper.js elements completely on mobile when using jQuery slider */
    .jquery-slider .swiper-button-next,
    .jquery-slider .swiper-button-prev,
    .jquery-slider .swiper-pagination {
        display: none;
    }
}

/* Force navigation arrows to always be visible */
.jquery-slider .jquery-nav {
    display: block;
    visibility: visible;
    opacity: 1;
}

.jquery-slider .jquery-prev, .jquery-slider .jquery-next {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-content: center;
}

/* Enhanced arrow styling for better visibility */
.jquery-prev, .jquery-next {
    background: #da4238;
    border: 0;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    line-height: 1;
    padding-bottom: 23px;
}

.jquery-prev:hover,
.jquery-next:hover {
    background: #da4238;
    color: white;
    transform: translateY(-50%) scale(1.1);
}
