#heroDoors {
    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/doors.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.heroDoors {
    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;
}

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

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

.aboutDoors-us-container {
    text-align: center;
    padding: clamp(1.5rem, 5vw, 3.125rem);
    margin: 0 auto;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    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-size: 1.2em; */
    font-weight: 300;
    width: 100%;
    margin-bottom: 60px;
 }

 .keyPoints{
    display: flex; 
    flex-direction: column;
    text-align: left;
 }

 .secondaryPoints{
    display: flex; 
    margin-bottom: 8px;
 }
.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: left;
    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;
    overflow: hidden;
    
   
}
.servicesAll-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    object-fit: cover; 
    z-index: 1; 
    transition: transform 0.3s ease;

}

.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: 768px) {
    #heroDoors {
        flex-direction: column;
        background-position: center;
    }
    .heroDoors h3 {
        font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
        font-weight: 300;
        margin: 0;
    }

    .heroDoors h1 {
        font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
        font-weight: 500;
        margin: 10px 0;
    }
    #projects{
        padding:30px;
    }
    .projects-grid {
       
        grid-template-columns: 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%;
        text-align: left;
        
    }

    .servicesAll-card:hover .servicesAll-card-content {
        transform: none; /* Cancel hover effect */
    }
    .secondaryPoints{
        display: flex; 
        flex-direction: column;
        margin-bottom: 8px;
        text-align: center;
     }

}    
/* 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;
    }
}


/* ===========================================
   GALLERY — replaces the project grid
   =========================================== */
#gallery {
    display: flex;
    justify-content: center;
    padding: 20px;
    padding-bottom: 60px;
}

.gallery {
    display: grid;
    /* nine images: one column on phones, two on tablets, a clean 3x3 above */
    grid-template-columns: 1fr;
    gap: clamp(12px, 2vw, 30px);
    width: min(100%, 1200px);
}

@media screen and (min-width: 600px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 900px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover,
.gallery img:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.94);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay img {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 8px;
}

.overlay .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.overlay .close-btn:hover {
    background-color: #ff4c4c;
}
