/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 60px; /* More space for top on mobile */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.98); /* Near solid black for focus */
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 95%; /* More space on mobile */
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    text-align: center;
    color: #fff; /* Brighter for mobile */
    padding: 25px 0;
    font-family: var(--font-heading);
    font-size: 1rem; /* Slightly smaller for mobile */
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.4;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 50px; /* Larger hit area */
    font-weight: 200;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-red);
    background: rgba(255,255,255,0.2);
    text-decoration: none;
}

/* Add Cursor Pointer to Trigger Images */
.project-card-img, .service-detail-img, .equipment-image img, .portfolio-image-wrapper img {
    cursor: zoom-in;
}

@media only screen and (max-width: 700px) {
    .lightbox-modal {
        padding-top: 100px; /* Avoid notch/top bar */
    }
    .lightbox-content {
        max-width: 98%;
        max-height: 70vh;
    }
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 40px;
    }
    #lightbox-caption {
        font-size: 0.9rem;
        padding: 15px 10px;
    }
}
