/* ==========================================================
   JT MAISON — Project Carousel Widget
   ========================================================== */

.jtm-project-carousel {
    padding: 100px 40px;
    background: var(--jtm-white);
    width: 100%;
    box-sizing: border-box;
}

.jtm-project-carousel__inner {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

.jtm-project-carousel__inner::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.jtm-project-carousel__item {
    flex: 0 0 calc(25% - 12px); /* 4 items visible on desktop */
    aspect-ratio: 1 / 1.1; /* slightly taller than a perfect square */
    scroll-snap-align: start;
}

.jtm-project-carousel__item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.jtm-project-carousel__arrows {
    display: none; /* Hide carousel arrows on desktop */
}

/* Project Links acting as Carousel Navigation */
.jtm-project-carousel__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 80px;
}

.jtm-project-carousel__nav-link {
    font-family: var(--jtm-font-ui);
    font-size: 18px;
    font-weight: 500;
    color: var(--jtm-dark);
    text-decoration: none;
    transition: opacity 0.3s;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jtm-project-carousel__nav-link:hover {
    opacity: 0.6;
}

/* ==========================================================
   RESPONSIVE MOBILE
   ========================================================== */
@media (max-width: 768px) {
    .jtm-project-carousel {
        padding: 60px 0; /* Full bleed carousel */
    }
    
    .jtm-project-carousel__inner {
        padding: 0 24px; /* Maintain padding on first item */
        gap: 12px;
    }
    
    .jtm-project-carousel__item {
        flex: 0 0 85vw; /* Almost full width so next item peeks */
        aspect-ratio: 1 / 1;
    }
    
    .jtm-project-carousel__nav {
        flex-direction: row;
        justify-content: center;
        gap: 32px;
        margin-top: 40px;
        padding: 0 24px;
    }
    
    .jtm-project-carousel__nav-text {
        display: none; /* Hide text on mobile, showing only arrows */
    }
    
    .jtm-project-carousel__nav-link {
        font-size: 24px; /* Make arrows slightly larger on mobile */
        padding: 8px;
    }
}
