.tilted-carousel-container {
    position: relative !important;
    height: 500px !important;
    overflow: hidden !important;
    perspective: 1200px !important;
    cursor: url('../images/scroll.png'), grab !important;
    user-select: none !important;
}

@media (max-width: 1024px) {
    .tilted-carousel-container {
        height: 450px;
    }
}

.tilted-carousel-container.dragging {
    cursor: url('../images/scroll.png'), grabbing !important;
}

.tilted-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.tilted-slide {
    position: absolute !important;
    width: 300px !important;
    height: 400px !important;
    cursor: pointer !important;
    -webkit-transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    -webkit-transform-style: preserve-3d !important;
    transform-style: preserve-3d !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.tilted-image {
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
    position: relative !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    overflow: hidden !important;
}

.orange-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,165,0,0.3) 0%, transparent 50%);
    border-radius: 15px;
    pointer-events: none;
}



/* Positioning for 3D effect */
.tilted-slide:nth-child(1) { transform: translateX(-400px) rotateY(45deg) scale(0.8); z-index: 1; }
.tilted-slide:nth-child(2) { transform: translateX(-200px) rotateY(25deg) scale(0.9); z-index: 2; }
.tilted-slide:nth-child(3) { transform: translateX(0) rotateY(0deg) scale(1); z-index: 3; }
.tilted-slide:nth-child(4) { transform: translateX(200px) rotateY(-25deg) scale(0.9); z-index: 2; }
.tilted-slide:nth-child(5) { transform: translateX(400px) rotateY(-45deg) scale(0.8); z-index: 1; }

.tilted-slide:nth-child(n+6) { 
    transform: translateX(600px) rotateY(-60deg) scale(0.6); 
    opacity: 0; 
    z-index: 0; 
}

/* Active slide */
.tilted-slide.active {
    -webkit-transform: translateX(0) rotateY(0deg) scale(1.1) !important;
    transform: translateX(0) rotateY(0deg) scale(1.1) !important;
    z-index: 10 !important;
    cursor: pointer !important;
}

.tilted-slide.active .tilted-image {
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

/* Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    transform: translateY(-50%);
    z-index: 100;
    pointer-events: none;
}

.carousel-nav .nav-btn {
    pointer-events: auto;
}

.nav-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
}

.nav-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Modal */
.tilted-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
    
    #modal-img {
        max-width: 95%;
        max-height: 85%;
    }
}

@media (max-width: 480px) {
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 25px;
    }
    
    #modal-img {
        max-width: 98%;
        max-height: 80%;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #bbb;
}

#modal-img {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    -o-object-fit: contain;
    object-fit: contain;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    -webkit-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .tilted-carousel-container {
        height: 350px;
        cursor: grab;
    }
    
    .tilted-slide {
        width: 180px;
        height: 250px;
    }
    
    .tilted-slide:nth-child(1) { transform: translateX(-200px) rotateY(35deg) scale(0.75); }
    .tilted-slide:nth-child(2) { transform: translateX(-100px) rotateY(20deg) scale(0.9); }
    .tilted-slide:nth-child(3) { transform: translateX(0) rotateY(0deg) scale(1); }
    .tilted-slide:nth-child(4) { transform: translateX(100px) rotateY(-20deg) scale(0.9); }
    .tilted-slide:nth-child(5) { transform: translateX(200px) rotateY(-35deg) scale(0.75); }
    
    .carousel-nav {
        padding: 0 15px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .tilted-slide.active {
        transform: translateX(0) rotateY(0deg) scale(1.05) !important;
    }
}

@media (max-width: 480px) {
    .tilted-carousel-container {
        height: 280px;
        touch-action: pan-y;
    }
    
    .tilted-slide {
        width: 140px;
        height: 180px;
    }
    
    .tilted-slide:nth-child(1) { transform: translateX(-160px) rotateY(30deg) scale(0.7); }
    .tilted-slide:nth-child(2) { transform: translateX(-80px) rotateY(15deg) scale(0.85); }
    .tilted-slide:nth-child(3) { transform: translateX(0) rotateY(0deg) scale(1); }
    .tilted-slide:nth-child(4) { transform: translateX(80px) rotateY(-15deg) scale(0.85); }
    .tilted-slide:nth-child(5) { transform: translateX(160px) rotateY(-30deg) scale(0.7); }
    
    .carousel-nav {
        padding: 0 10px;
    }
    
    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .tilted-slide.active {
        transform: translateX(0) rotateY(0deg) scale(1.02) !important;
    }
    
    .tilted-image {
        border-radius: 10px;
    }
}

@media (max-width: 360px) {
    .tilted-carousel-container {
        height: 250px;
    }
    
    .tilted-slide {
        width: 120px;
        height: 160px;
    }
    
    .tilted-slide:nth-child(1) { transform: translateX(-140px) rotateY(25deg) scale(0.65); }
    .tilted-slide:nth-child(2) { transform: translateX(-70px) rotateY(12deg) scale(0.8); }
    .tilted-slide:nth-child(3) { transform: translateX(0) rotateY(0deg) scale(1); }
    .tilted-slide:nth-child(4) { transform: translateX(70px) rotateY(-12deg) scale(0.8); }
    .tilted-slide:nth-child(5) { transform: translateX(140px) rotateY(-25deg) scale(0.65); }
    
    .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}