/* Lightbox Styles */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

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

.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    animation: zoomIn 0.3s ease;
    transition: opacity 0.15s ease;
    display: block;
}

/* Click zones - invisible areas on left/right of image */
.lightbox-click-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    cursor: pointer;
    z-index: 1;
}

.lightbox-click-zone.left {
    left: 0;
    cursor: w-resize; /* West-pointing cursor */
}

.lightbox-click-zone.right {
    right: 0;
    cursor: e-resize; /* East-pointing cursor */
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2.5rem;  /* Slightly smaller */
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
    line-height: 1;  /* Add this */
    padding: 0;      /* Add this */
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    user-select: none;
    opacity: 0.5;
    z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    z-index: 10001;
}

/* Keyboard hint */
.lightbox-hint {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    display: flex;
    gap: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 10001;
}

.lightbox-hint span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section title in lightbox */
.lightbox-section-title {
    position: absolute;
    top: 6rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 300;
    letter-spacing: clamp(0.15em, 1vw, 0.3em);
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.7);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(1rem, 3vw, 2rem);
    border-radius: 20px;
    z-index: 10001;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox-section-title {
        top: 4rem;
        font-size: 0.85rem;
        letter-spacing: 0.15em;
        padding: 0.5rem 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .lightbox-hint {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lightbox-counter {
        bottom: 1rem;
        font-size: 0.9rem;
    }
}