/* Gallery Slider Container */
.gallery-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    background: transparent;
    margin: 0 auto;
}

.gallery-container .slide .item {
    width: 200px;
    height: 300px;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-position: 50% 50%;
    background-size: cover;
    display: inline-block;
    transition: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slide .item:nth-child(1),
.slide .item:nth-child(2) {
    top: 0;
    left: 0;
    transform: translate(0, 0);
    border-radius: 20px;
    width: 100%;
    height: 100%;
    border: none;
}

.slide .item:nth-child(3) {
    left: 50%;
}

.slide .item:nth-child(4) {
    left: calc(50% + 220px);
}

.slide .item:nth-child(5) {
    left: calc(50% + 440px);
}

/* here n = 0, 1, 2, 3,... */
.slide .item:nth-child(n + 6) {
    left: calc(50% + 660px);
    opacity: 0;
}

.item .content {
    position: absolute;
    top: 50%;
    left: 100px;
    width: 300px;
    text-align: left;
    color: #eee;
    transform: translate(0, -50%);
    font-family: var(--font-main);
    display: none;
}

.slide .item:nth-child(2) .content {
    display: block;
}

.content .name {
    font-size: 40px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0;
    animation: animate 1s ease-in-out 1 forwards;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.content .des {
    margin-top: 10px;
    margin-bottom: 20px;
    opacity: 0;
    animation: animate 1s ease-in-out 0.3s 1 forwards;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.content button {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    opacity: 0;
    animation: animate 1s ease-in-out 0.6s 1 forwards;
    background: var(--primary-red);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    font-family: var(--font-main);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4);
    transition: all 0.3s;
}

.content button:hover {
    background: var(--bright-red);
    box-shadow: 0 0 25px rgba(255, 26, 26, 0.6);
}

@keyframes animate {
    from {
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }

    to {
        opacity: 1;
        transform: translate(0);
        filter: blur(0);
    }
}

.slider-buttons {
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 20px;
    z-index: 10;
}

.slider-buttons button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    margin: 0 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.slider-buttons button:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    transform: scale(1.1);
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
    .gallery-container {
        height: 500px;
    }

    .gallery-container .slide .item {
        width: 150px;
        height: 220px;
    }

    .slide .item:nth-child(3) {
        left: 50%;
    }

    .slide .item:nth-child(4) {
        left: calc(50% + 160px);
    }

    .slide .item:nth-child(5) {
        left: calc(50% + 320px);
    }

    .item .content {
        left: 20px;
        width: 80%;
    }

    .content .name {
        font-size: 30px;
    }
}

/* Mobile adjustments for slider (Phones) */
@media (max-width: 480px) {
    .gallery-container {
        height: 65vh;
        /* Responsive height for single page feel */
        min-height: 400px;
    }

    .gallery-container .slide .item {
        width: 140px;
        /* Smaller width */
        height: 200px;
        /* Smaller height */
        top: 50%;
    }

    /* Adjust stacking positions for small screens */
    .slide .item:nth-child(3) {
        left: 50%;
    }

    .slide .item:nth-child(4) {
        left: calc(50% + 140px);
        /* Tighter overlapping */
    }

    .slide .item:nth-child(5) {
        left: calc(50% + 280px);
    }

    /* Hide 6th item onwards or push far right */
    .slide .item:nth-child(n + 6) {
        left: calc(50% + 420px);
        opacity: 0;
    }

    /* Content adjustments */
    .item .content {
        left: 10px;
        /* Less left padding */
        width: 85%;
        /* Maximum width */
        top: 50%;
        transform: translate(0, -50%);
        text-align: left;
        /* Keep left alignment */
    }

    .content .name {
        font-size: 24px;
        /* Smaller title */
        line-height: 1.1;
        margin-bottom: 5px;
    }

    .content .des {
        font-size: 0.85rem;
        /* Smaller description */
        margin-top: 5px;
        margin-bottom: 15px;
        /* Less margin */
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        /* Limit visible lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .content button {
        padding: 8px 16px;
        /* Smaller button */
        font-size: 0.75rem;
    }

    /* Navigation buttons - Repositioned for visibility */
    .slider-buttons {
        bottom: 50%;
        transform: translateY(50%);
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 10px;
        z-index: 1001;
        /* Above other elements */
        pointer-events: none;
        /* Allow clicks through container */
    }

    .slider-buttons button {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
        background: rgba(0, 0, 0, 0.6);
        pointer-events: auto;
        /* Re-enable clicks on buttons */
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}