/* ==========================================================================
   CUSTOM PREMIUM LIGHTBOX STYLESHEET
   ========================================================================== */

.custom-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 16, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    font-family: 'Inter', sans-serif;
}

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

/* Lightbox Wrapper */
.lightbox-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

/* Lightbox Image */
.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.25); /* Elegant Gold Border */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-lightbox.active .lightbox-image {
    transform: scale(1);
}

/* Navigation & Controls */
.lightbox-btn {
    position: fixed;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #D4AF37; /* Gold */
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.lightbox-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
    color: #ffffff;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.45);
}

/* Specific Positions */
.lightbox-close {
    top: 30px;
    right: 30px;
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.05);
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.08);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.08);
}

/* Lightbox Info Bar */
.lightbox-info {
    margin-top: 25px;
    text-align: center;
    color: #ffffff;
    max-width: 80vw;
    z-index: 10050;
}

.lightbox-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    color: #ffffff;
}

.lightbox-counter {
    font-size: 11px;
    font-weight: 600;
    color: #D4AF37; /* Gold */
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Loader Spinner */
.lightbox-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    border-top-color: #D4AF37;
    animation: lightbox-spin 0.8s infinite linear;
    z-index: 10020;
    display: none;
}

@keyframes lightbox-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .lightbox-wrapper {
        max-width: 95vw;
        max-height: 65vh;
    }
    
    .lightbox-image {
        max-height: 65vh;
        border-radius: 12px;
    }
    
    .lightbox-btn {
        width: 44px;
        height: 44px;
    }

    .lightbox-btn svg {
        width: 16px;
        height: 16px;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
    }

    .lightbox-prev {
        left: 20px;
        bottom: 30px;
        top: auto;
        transform: none;
    }

    .lightbox-prev:hover {
        transform: scale(1.05);
    }

    .lightbox-next {
        right: 20px;
        bottom: 30px;
        top: auto;
        transform: none;
    }

    .lightbox-next:hover {
        transform: scale(1.05);
    }

    .lightbox-info {
        margin-top: 15px;
        padding-bottom: 80px; /* Space for mobile nav buttons at the bottom */
    }

    .lightbox-title {
        font-size: 20px;
    }
}
