/* Gallery Item Styling */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Hover Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-content {
    transform: translateY(0);
}

.gallery-content i {
    font-size: 2rem;
    color: #ffc107; /* MCR Buildtech Gold/Yellow */
    margin-bottom: 10px;
}

/* --- Optimized Lightbox Styling (75% View) --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

/* Image restricted to 70-75% height to make space for caption */
#lightbox-img {
    max-width: 85%;
    max-height: 80%; 
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* Caption Area */
#lightbox-caption {
    width: 85%;
    text-align: center;
    margin-top: 25px;
    color: white;
    animation: fadeInUp 0.5s ease;
}

#lightbox-caption h4 {
    color: #ffc107;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#lightbox-caption p {
    color: #ccc ! important;
    font-size: 0.95rem;
}

/* Buttons Styling */
.close-btn, .prev, .next {
    position: absolute;
    color: white;
    font-size: 35px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 5px;
    transition: 0.3s;
}

.close-btn:hover, .prev:hover, .next:hover {
    background: #ffc107;
    color: #ffffff;
}

.close-btn { top: 20px; right: 40px; font-size: 45px; background: none; }
.prev { left: 30px; top: 50%; transform: translateY(-50%); }
.next { right: 30px; top: 50%; transform: translateY(-50%); }

/* Animations */
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    #lightbox-img {
        max-width: 95%;
        max-height: 60%;
    }
    .prev, .next {
        padding: 5px 15px;
        font-size: 25px;
    }
}



