#heroBespoke {
    min-height: calc(100svh - 80px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/assets/images/services/bespoke/Project\ 3/Project 3.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.heroBespoke {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.heroBespoke h3 {
    font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
    font-weight: 300;
    margin: 0;
}

.heroBespoke h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
    font-weight: 500;
    margin: 10px 0;
}

.aboutBespoke-us-container {
    text-align: center;
    padding: clamp(1.5rem, 5vw, 3.125rem);
    margin: 0 auto;
    max-width: 800px;
    border-radius: 10px;

    position: relative;
}

.highlight {
    color: #ff4c4c;
    font-weight: bold;
}

#projects {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    padding: 30px;

}

#projects p {
    font-weight: 300;
    width: 100%;
    margin-bottom: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 40px;
    width: 100%;
    margin: 0 auto;
    margin-top: clamp(2.5rem, 8vw, 6.25rem);
}

.servicesAll-card {
    position: relative;
    text-align: center;
    overflow: hidden;
    border: 0.1px solid black;
    height: clamp(320px, 55vw, 500px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0px 10px 20px #00000026;
    transition: box-shadow 200ms cubic-bezier(0.5, 0.5, 0, 1), transform 200ms cubic-bezier(0.5, 0.5, 0, 1);
    cursor: pointer;

}

.servicesAll-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.3s ease;
    outline: none;
}

.servicesAll-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    box-sizing: border-box;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* Smooth transition */
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.servicesAll-card-content p {
    color: white;
    font-size: 18px;
    line-height: 1.6;
}

.servicesAll-card:hover .servicesAll-card-content {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 200ms;
    /* Remove delay for the slide-in effect */
    height: 100%;

}

.servicesAll-card:hover .servicesAll-card-img {
    transform: scale(1.05);
}

.servicesAll-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.servicesAll-carousel.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.servicesAll-carousel-images {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.servicesAll-carousel-images img {
    max-width: 100%;
    max-height: 80vh;
    display: none;
}

.servicesAll-carousel-images img:first-child {
    display: block;
}

.servicesAll-close,
.servicesAll-prev,
.servicesAll-next {
    position: absolute;
    color: black;
    font-size: 48px;
    cursor: pointer;
    user-select: none;
}

.servicesAll-close {
    top: 50px;
    right: 50px;
}

.servicesAll-prev,
.servicesAll-next {
    top: 50%;
    transform: translateY(-50%);
}

.servicesAll-prev {
    left: 30px;
}

.servicesAll-next {
    right: 30px;
}

@media screen and (max-width: 1340px) {
    .hero h3 {
        font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
        font-weight: 300;
        margin: 0;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
        font-weight: 500;
        margin: 10px 0;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    }
    
}

@media screen and (max-width: 768px) {
    #heroBespoke {
        flex-direction: column;
        background-position: center;
    }

    .heroBespoke h3 {
        font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
        font-weight: 300;
        margin: 0;
    }

    .heroBespoke h1 {
        font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
        font-weight: 500;
        margin: 10px 0;
    }

    #projects {
        padding: 30px;
    }

    .projects-grid {

        grid-template-columns: repeat(1, 1fr);
    }

    .servicesAll-card-content {
        display: flex;
        /* Always show text content */
        flex-direction: column;
        transform: translateY(0);
        /* Ensure text is visible */
        opacity: 1;
        /* Ensure opacity is 1 */
        justify-content: flex-start;
        align-items: flex-start;
        height: 100%;

    }

    .servicesAll-card:hover .servicesAll-card-content {
        transform: none;
        /* Cancel hover effect */
    }

}
/* Lightbox controls sized for touch */
.servicesAll-close,
.servicesAll-prev,
.servicesAll-next {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

@media screen and (max-width: 768px) {
    .servicesAll-close,
    .servicesAll-prev,
    .servicesAll-next {
        font-size: 28px;
    }

    .servicesAll-close {
        top: 16px;
        right: 16px;
    }

    .servicesAll-prev {
        left: 10px;
    }

    .servicesAll-next {
        right: 10px;
    }

    .servicesAll-carousel-images img {
        max-height: 70vh;
    }
}
