/* work.css */

.page-hero-work {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(rgba(13, 27, 75, 0.8), rgba(13, 27, 75, 0.85)), url('../img/12.webp') center/cover no-repeat;
    text-align: center;
    color: #fff;
    z-index: 1;
}

.gallery-page-section {
    padding: 100px 0;
}

/* Strict Ordered Uniform Grid */
.gallery-uniform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    aspect-ratio: 4 / 3; /* Fixed height ratio for perfect order */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.gallery-item img, 
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, opacity 0.4s ease;
    opacity: 0.9;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.08);
    opacity: 0.4;
}

/* Video Indicator Icon */
.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.7);
    z-index: 2;
    pointer-events: none;
    transition: color 0.4s;
}

.gallery-item:hover .video-indicator {
    color: #C9A84C;
}

/* Overlay Info */
.gallery-overlay {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    background: linear-gradient(to top, rgba(13, 27, 75, 0.9) 0%, transparent 60%);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-icon-view {
    color: #C9A84C;
    font-size: 2rem;
    margin-bottom: 5px;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(13, 27, 75, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: none; /* hidden by default */
}

.lightbox-content img.active,
.lightbox-content video.active {
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: -10px;
    color: #fff;
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    color: #C9A84C;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 27, 75, 0.7);
    color: #fff;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: #0D1B4B;
    border-color: #C9A84C;
    color: #C9A84C;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

@media (max-width: 991px) {
    .lightbox-prev { left: -20px; }
    .lightbox-next { right: -20px; }
}
