/* LHP Modern Gallery Lightbox & Slideshow Styles */

/* Hover cues on gallery images */
.wp-block-gallery,
.blocks-gallery-grid,
.gallery {
    position: relative;
}

.wp-block-gallery .blocks-gallery-item figure,
.wp-block-gallery figure,
.gallery .gallery-item figure,
.gallery .gallery-icon {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin: 0;
}

.wp-block-gallery img,
.blocks-gallery-item img,
.gallery-item img,
.entry .wp-block-gallery img {
    cursor: pointer !important;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), filter 0.35s ease;
    display: block;
}

.blocks-gallery-item:hover img,
.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(1.06);
}

.blocks-gallery-item figure::after,
.gallery-item figure::after {
    content: '\f00e';
    font-family: FontAwesome, sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: rgba(18, 24, 38, 0.75);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blocks-gallery-item:hover figure::after,
.gallery-item:hover figure::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Lightbox Modal Overlay */
.lhp-lb-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.lhp-lb-overlay.lhp-lb-active {
    opacity: 1;
    visibility: visible;
}

/* Slideshow Progress Bar */
.lhp-lb-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10000002;
    display: none;
}

.lhp-lb-progress.lhp-lb-show {
    display: block;
}

.lhp-lb-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.7);
    transition: width linear;
}

/* Header Bar */
.lhp-lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    z-index: 10000001;
    flex-shrink: 0;
}

.lhp-lb-info {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 60%;
    overflow: hidden;
}

.lhp-lb-counter {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #f1f2f6;
    white-space: nowrap;
}

.lhp-lb-title {
    font-size: 15px;
    color: #ced6e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.lhp-lb-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lhp-lb-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
    line-height: 1;
}

.lhp-lb-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

.lhp-lb-btn:active {
    transform: translateY(0);
}

.lhp-lb-play-btn.lhp-lb-playing {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

.lhp-lb-close-btn {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
    font-size: 16px;
}

.lhp-lb-close-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* Stage Area (Image Viewport + Navigation) */
.lhp-lb-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px 60px;
    box-sizing: border-box;
}

.lhp-lb-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lhp-lb-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #f39c12;
    z-index: 1;
    display: none;
}

.lhp-lb-spinner.lhp-lb-show {
    display: block;
}

.lhp-lb-image {
    max-width: 88vw;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.lhp-lb-image.lhp-lb-fading {
    opacity: 0;
    transform: scale(0.97);
}

.lhp-lb-caption-bar {
    margin-top: 10px;
    text-align: center;
    max-width: 88vw;
}

.lhp-lb-caption-text {
    color: #dfe4ea;
    font-size: 14px;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Nav Buttons */
.lhp-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000001;
    transition: background 0.2s ease, transform 0.15s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lhp-lb-nav:hover {
    background: rgba(243, 156, 18, 0.85);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.lhp-lb-prev {
    left: 16px;
}

.lhp-lb-next {
    right: 16px;
}

/* Thumbnails Strip */
.lhp-lb-thumbnails-wrap {
    background: rgba(0, 0, 0, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    flex-shrink: 0;
    z-index: 10000001;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lhp-lb-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    justify-content: flex-start;
}

.lhp-lb-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.lhp-lb-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.lhp-lb-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}

.lhp-lb-thumb-item {
    height: 52px;
    width: 76px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.45;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    background: #1e272e;
}

.lhp-lb-thumb-item:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.lhp-lb-thumb-item.lhp-lb-thumb-active {
    opacity: 1;
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    transform: scale(1.05);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .lhp-lb-header {
        padding: 8px 12px;
    }
    .lhp-lb-info {
        max-width: 50%;
    }
    .lhp-lb-title {
        display: none;
    }
    .lhp-lb-stage {
        padding: 10px 10px;
    }
    .lhp-lb-nav {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
    .lhp-lb-prev {
        left: 8px;
    }
    .lhp-lb-next {
        right: 8px;
    }
    .lhp-lb-image {
        max-width: 95vw;
        max-height: calc(100vh - 170px);
    }
    .lhp-lb-btn-text {
        display: none;
    }
    .lhp-lb-thumb-item {
        height: 42px;
        width: 60px;
    }
}

