/* ============================================================
   MAINPROJET.CSS — Individual Project Detail Page Only
   Lightbox viewer + image grid for project detail pages.
   ============================================================ */

/* --- ZOOM CURSOR --- */
.zoom {
    cursor: pointer;
    z-index: 700;
}


/* --- LIGHTBOX --- */
#lbOuter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lbOuter.show {
    visibility: visible;
    opacity: 1;
}

#lbInner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#lbInner img {
    max-height: 85vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

#lbClose {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1100;
    width: 60px;
    height: 60px;
    background-color: rgb(88, 88, 88);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#lbClose span {
    font-size: 20px;
    color: #fff;
}

#lbClose:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

#lbPrev,
#lbNext {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    z-index: 1100;
}

#lbPrev { left: 20px; }
#lbNext { right: 20px; }

#lbPrev:hover,
#lbNext:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

#lbPrev:active,
#lbNext:active {
    background-color: rgba(0, 0, 0, 0.9);
}

#lbClose:active {
    background-color: rgba(0, 0, 0, 0.9);
}


/* --- IMAGE GRID --- */
.gridbox {
    margin-top: 100px;
    margin-bottom: 200px;
    position: relative;
    display: flex;
    width: 100%;
    height: auto;
    justify-content: center;
}

.startgrid {
    width: 900px;
    max-width: 95%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 350px;
}

.pimage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 11;
    width: 100%;
    height: 100%;
    transition: 0.5s;
}

.pimage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 15;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
    pointer-events: none;
}

.pimage:hover .overlay {
    opacity: 1;
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .startgrid {
        grid-template-columns: 1fr;
        grid-auto-rows: 500px;
    }

    .gridbox {
        margin-bottom: 100px;
    }
}

@media (max-width: 768px) {
    .startgrid {
        grid-auto-rows: 400px;
    }

    .gridbox {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    #lbInner img {
        height: auto;
        max-height: 80vh;
        max-width: 95vw;
    }

    #lbPrev { left: 5px; }
    #lbNext { right: 5px; }
}

@media (max-width: 480px) {
    .startgrid {
        grid-auto-rows: 250px;
    }
}
