/* General Projects Section */
.projects {

    padding: 5%;
    background: var(--accent-color);
    text-align: center;
}

.projects h2 {
    font-size: 2.25rem;
    margin-top: 7rem;
    margin-bottom: 3rem;
}


.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--primary-color);
}

/* General Layout Adjustments */
.projects {
    text-align: center;
    padding: 60px 50px;
    position: relative;
}

.plus {
    font-weight: bold;
    font-size: 1.3rem;
}

.line-title {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 16px;
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    text-transform: capitalize;
}

.line-title span {
    position: relative;
    display: inline-block;
}

/* Carousel */
.custom-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    gap: 15px;
}

.item {
    flex: 0 0 calc(33.33% - 10px);
    height: 30rem;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease-in-out;
    cursor: pointer;
}

.item.active {
    box-shadow: 12px 40px 40px rgba(0, 0, 0, 0.25);
}

.item:after {
    content: "";
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
}

.item-desc {
    padding: 0 24px 24px;
    color: #fff;
    position: absolute;
    left: 0;
    bottom: 0;
    margin-bottom: 4rem;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    transform: translateY(calc(100% - 54px));
    transition: all 0.4s ease-in-out;
}

.item.active .item-desc {
    transform: none;

}

.item-desc h3 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.item-desc p {
    margin: 0;
    opacity: 1;
    /* Make descriptions visible */
    transform: translateY(0);

    transition: none;
    /* No delay or animation */
}

.item.active .item-desc p {
    opacity: 1;

    transform: translateY(0);
}

/* Navigation Buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    font-size: 2rem;
    transition: background 0.3s ease;
    user-select: none;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
    left: 1rem;
}

.carousel-button.next {
    right: 1rem;
}

/* Infinite Carousel Animation */
.carousel-track.is-transitioning {
    transition: transform 0.5s ease-in-out;
}



.item.clone {
    display: none;
    /* Hide cloned items initially */
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    .item {
        flex: 0 0 calc(100% - 10px);
    }
}