/* --- LIGHTBOX COMPONENT SYSTEM --- */
.linkedin-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.linkedin-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.linkedin-lightbox-modal {
    width: 100%;
    height: 100%;
    max-width: 1320px;
    max-height: 860px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-content-area {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: 100%;
    min-height: 0;
}

.lightbox-viewer-wrapper {
    position: relative;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.lightbox-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.lightbox-slider-track::-webkit-scrollbar {
    display: none;
}

.lightbox-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

.lightbox-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #ffffff;
    border-left: 1px solid #e5e5ea;
    overflow: hidden;
}

.lightbox-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid #f0f0f2;
    flex-shrink: 0;
}

.lightbox-sidebar-header .author-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lightbox-sidebar-header .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.lightbox-sidebar-header .author-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1d1d1f;
    display: block;
}

.lightbox-sidebar-header .post-date {
    font-size: 0.78rem;
    color: #86868b;
}

.lightbox-close {
    background: #f0f0f2;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: #e5e5ea;
}

.lightbox-body-text {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #1d1d1f;
}

.lightbox-footer-action {
    padding: 1.25rem;
    border-top: 1px solid #f0f0f2;
    background: #ffffff;
    flex-shrink: 0;
}

.lightbox-footer-action .btn {
    width: 100%;
}

/* --- INFINITE SCROLL LOADER --- */
.infinite-scroll-sentinel {
    height: 20px;
    width: 100%;
    margin-top: 1rem;
}

.infinite-scroll-loader {
    margin-top: 1.25rem;
}

/* --- EVENT LIGHTBOX TYPOGRAPHY & HEADER STYLING --- */
.lightbox-event-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f2;
    color: #1d1d1f;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.lightbox-event-header-block {
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f0f0f2;
}

.lightbox-event-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.lightbox-event-submeta {
    font-size: 0.78rem;
    color: #86868b;
    font-weight: 500;
    line-height: 1.4;
}

.lightbox-caption-box {
    background: #f9f9fb;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #f0f0f2;
}

.lightbox-caption-text {
    font-size: 0.9rem;
    color: #333336;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 900px) {
    .linkedin-lightbox-overlay {
        padding: 0;
    }
    .linkedin-lightbox-modal {
        border-radius: 0;
        max-height: 100%;
        height: 100dvh;
    }
    .lightbox-content-area {
        grid-template-columns: 1fr;
        grid-template-rows: 42dvh 1fr;
        height: 100dvh;
        min-height: 0;
    }
    .lightbox-sidebar {
        border-left: none;
        border-top: 1px solid #e5e5ea;
        min-height: 0;
        height: 100%;
    }
}