.page-header {
    padding: 180px 0 100px;
    background: var(--mono-0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 15px;
    margin: 100px 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--mono-1) 0%, var(--mono-0) 100%);
    border-radius: 20px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    display: block;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease, border-radius 0.5s ease !important;
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}
.gallery-item video.gi-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
    border-radius: 15px !important;
}

.gi-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%);
    transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 15px !important;
}

.gallery-item:hover .gi-img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.gi-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 100%) !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    opacity: 0;
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 30px;
    border-radius: 15px !important;
    backdrop-filter: blur(2px);
}

.gallery-item:hover .gi-overlay {
    opacity: 1;
}

.gallery-item:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 115, 183, 0.2) !important;
    z-index: 10;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.gallery-item:nth-child(odd):hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(211, 0, 0, 0.2) !important;
}

.gi-title {
    font-size: 1.3rem;
    margin-bottom: 5px;
    line-height: 1.2;
    transform: translateZ(40px) translateY(20px);
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mono-6);
    font-weight: 500;
}

.gallery-item.large .gi-title {
    font-size: 2rem;
}

.gallery-item:hover .gi-title {
    transform: translateZ(40px) translateY(0);
}

.gi-tag {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    transform: translateZ(30px) translateY(20px);
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.05s;
    text-transform: uppercase;
}

.gallery-item:hover .gi-tag {
    transform: translateZ(30px) translateY(0);
    color: var(--accent-blue);
}

.gallery-item:nth-child(odd):hover .gi-tag {
    color: var(--accent-red);
}

/* Play Icon for Videos */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8) translateZ(50px);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 5;
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 5px;
}

.gallery-item[data-video]:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateZ(50px);
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-item.large,
    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gi-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.1) 100%) !important;
    }

    .gi-title,
    .gi-tag {
        transform: translateY(0) translateZ(0);
    }

    .gallery-item[data-video] .play-icon {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Lightbox Enhancements */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    /* Increased blur for premium feel */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

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

.lightbox-content {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    object-fit: contain;
}

video.lightbox-content {
    background: #000;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-caption {
    color: #fff;
    margin-top: 25px;
    font-size: 1.4rem;
    font-weight: 300;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 40px;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    color: #fff;
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: rotate(90deg);
}

/* Cursor fix */
.gallery-item {
    cursor: pointer;
}