/**
 * Stylesheet Khusus Album Galeri & Lightbox Interaktif 2-Panel
 * Tema: Jasa Listrik (Warna: Biru #1E88FF, Kuning #FFC107, Dark Navy #0B1320)
 *
 * @package JasaListrik
 */

/* ==========================================================================
   1. FILTER KATEGORI (PILLS)
   ========================================================================== */
.jl-galeri-tabs-container {
    margin-bottom: 36px;
    display: flex;
    justify-content: center;
}

.jl-galeri-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.jl-galeri-tab-btn {
    appearance: none;
    background: #FFFFFF;
    color: #172B4D;
    border: 1px solid #DDE7F6;
    padding: 9px 22px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    outline: none;
}

.jl-galeri-tab-btn:hover {
    background: #F0F7FF;
    border-color: #BFDBFE;
    color: #1E88FF;
    transform: translateY(-1px);
}

.jl-galeri-tab-btn.is-active,
.jl-galeri-tab-btn[aria-selected="true"] {
    background: #1E88FF !important;
    color: #FFFFFF !important;
    border-color: #1E88FF !important;
    box-shadow: 0 4px 14px rgba(30, 136, 255, 0.3) !important;
}

/* ==========================================================================
   2. GRID KARTU ALBUM
   ========================================================================== */
.jl-album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 991px) {
    .jl-album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 640px) {
    .jl-album-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.jl-album-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(17, 29, 46, 0.05);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    outline: none;
}

.jl-album-card:hover,
.jl-album-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(30, 136, 255, 0.12);
    border-color: #BFDBFE;
}

.jl-album-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 220px;
    overflow: hidden;
    background: #0F172A;
}

.jl-album-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.jl-album-card:hover .jl-album-card-img {
    transform: scale(1.05);
}

.jl-album-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
}

/* Badge Kategori */
.jl-album-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(17, 29, 46, 0.88);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
}

/* Badge "+N Foto" */
.jl-album-photo-count-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(17, 29, 46, 0.88);
    color: #FFC107;
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 193, 7, 0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.jl-album-photo-count-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Isi Kartu */
.jl-album-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.jl-album-card-title {
    font-size: 18.5px;
    font-weight: 800;
    color: #172B4D;
    line-height: 1.35;
    margin: 0 0 10px 0;
    transition: color 0.2s ease;
}

.jl-album-card:hover .jl-album-card-title {
    color: #1E88FF;
}

.jl-album-card-excerpt {
    font-size: 14px;
    color: #5E6C84;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.jl-album-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
    font-size: 13px;
    font-weight: 700;
    color: #1E88FF;
}

.jl-album-card-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   3. PAGINASI & TOMBOL MUAT LEBIH BANYAK
   ========================================================================== */
.jl-album-pagination-wrap {
    margin-top: 48px;
    text-align: center;
}

.jl-album-load-more-btn {
    background: #FFFFFF;
    color: #1E88FF;
    border: 2px solid #1E88FF;
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
}

.jl-album-load-more-btn:hover {
    background: #1E88FF;
    color: #FFFFFF;
    box-shadow: 0 8px 20px rgba(30, 136, 255, 0.25);
    transform: translateY(-2px);
}

/* ==========================================================================
   4. LIGHTBOX 2 PANEL (TEMA GELAP)
   ========================================================================== */
.jl-album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.jl-album-lightbox.is-open {
    display: flex;
}

.jl-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 14, 23, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.jl-lightbox-window {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1340px;
    height: 90vh;
    max-height: 860px;
    background: #0B1320;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    display: grid;
    grid-template-columns: 1fr 400px;
}

/* Panel Kiri (Visual Viewport) */
.jl-lb-panel-visual {
    background: #050B14;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Toolbar Atas (Zoom Controls) */
.jl-lb-visual-toolbar {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(17, 29, 46, 0.85);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.jl-lb-tool-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.jl-lb-tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.jl-lb-zoom-level {
    font-size: 12px;
    font-weight: 700;
    color: #CBD5E1;
    min-width: 44px;
    text-align: center;
}

/* Viewport Gambar Utama */
.jl-lb-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    cursor: default;
}

.jl-lb-viewport.is-zoomed {
    cursor: grab;
}

.jl-lb-viewport.is-grabbing {
    cursor: grabbing;
}

.jl-lb-main-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.15s ease-out;
}

.jl-lb-main-img {
    max-width: 90%;
    max-height: calc(90vh - 150px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
    pointer-events: none;
}

/* Navigasi Panah Kiri / Kanan */
.jl-lb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    background: rgba(17, 29, 46, 0.85);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}

.jl-lb-nav-btn:hover {
    background: #1E88FF;
    border-color: #1E88FF;
    transform: translateY(-50%) scale(1.08);
}

.jl-lb-nav-prev {
    left: 16px;
}

.jl-lb-nav-next {
    right: 16px;
}

/* Strip Thumbnail Bawah */
.jl-lb-thumb-strip-wrap {
    background: #090F1A;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    position: relative;
    z-index: 5;
}

.jl-lb-thumb-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 4px;
}

.jl-lb-thumb-strip::-webkit-scrollbar {
    height: 6px;
}

.jl-lb-thumb-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.jl-lb-thumb-item {
    width: 72px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all 0.2s ease;
    background: #000000;
}

.jl-lb-thumb-item:hover {
    opacity: 0.85;
}

.jl-lb-thumb-item.is-active {
    border-color: #1E88FF;
    opacity: 1;
    box-shadow: 0 0 12px rgba(30, 136, 255, 0.6);
}

.jl-lb-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Panel Kanan (Info & Deskripsi Proyek) */
.jl-lb-panel-info {
    background: #0E1726;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #FFFFFF;
}

.jl-lb-info-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(14, 23, 38, 0.8);
}

.jl-lb-counter-badge {
    background: rgba(30, 136, 255, 0.2);
    color: #60A5FA;
    border: 1px solid rgba(30, 136, 255, 0.4);
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
}

.jl-lb-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #FFFFFF;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.jl-lb-close-btn:hover {
    background: #DC2626;
    color: #FFFFFF;
}

.jl-lb-info-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jl-lb-info-body::-webkit-scrollbar {
    width: 6px;
}

.jl-lb-info-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.jl-lb-album-title {
    font-size: 20px;
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.35;
    margin: 0;
}

.jl-lb-album-excerpt {
    font-size: 13.5px;
    color: #94A3B8;
    line-height: 1.55;
    margin: 0;
}

/* Kotak Keterangan Foto Aktif */
.jl-lb-caption-box {
    background: rgba(30, 136, 255, 0.08);
    border: 1px solid rgba(30, 136, 255, 0.25);
    border-left: 4px solid #1E88FF;
    border-radius: 8px;
    padding: 12px 14px;
}

.jl-lb-caption-label {
    font-size: 11px;
    font-weight: 800;
    color: #60A5FA;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
    display: block;
}

.jl-lb-caption-text {
    font-size: 13.5px;
    color: #E2E8F0;
    line-height: 1.5;
    margin: 0;
}

/* Kotak Deskripsi Lengkap Proyek */
.jl-lb-desc-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
}

.jl-lb-desc-title {
    font-size: 12px;
    font-weight: 800;
    color: #FFC107;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px 0;
}

.jl-lb-desc-content {
    font-size: 13px;
    color: #CBD5E1;
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 6px;
}

.jl-lb-desc-content p {
    margin: 0 0 10px 0;
}

.jl-lb-desc-content p:last-child {
    margin-bottom: 0;
}

/* Detail Proyek List */
.jl-lb-project-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12.5px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.jl-lb-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.jl-lb-meta-label {
    color: #64748B;
    font-weight: 600;
}

.jl-lb-meta-value {
    color: #F1F5F9;
    font-weight: 700;
    text-align: right;
}

/* Footer Panel Kanan (CTA WhatsApp & Tautan Ukuran Penuh) */
.jl-lb-info-footer {
    padding: 18px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(14, 23, 38, 0.95);
}

.jl-lb-btn-wa {
    background: #FFC107;
    color: #111D2E;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 18px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(255, 193, 7, 0.3);
    transition: all 0.2s ease;
}

.jl-lb-btn-wa:hover {
    background: #FFB300;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    color: #000000;
}

.jl-lb-btn-full {
    color: #94A3B8;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
    transition: color 0.2s;
}

.jl-lb-btn-full:hover {
    color: #FFFFFF;
}

/* Responsif Lightbox Mobile & Tablet */
@media (max-width: 991px) {
    .jl-album-lightbox {
        padding: 10px;
    }

    .jl-lightbox-window {
        grid-template-columns: 1fr;
        height: 94vh;
        max-height: none;
        overflow-y: auto;
    }

    .jl-lb-panel-visual {
        height: 55vh;
        min-height: 320px;
    }

    .jl-lb-main-img {
        max-height: calc(55vh - 100px);
    }

    .jl-lb-panel-info {
        height: auto;
        overflow-y: visible;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .jl-lb-desc-content {
        max-height: none;
    }
}

/* ==========================================================================
   5. HALAMAN SINGLE DETAIL ALBUM (single-galeri.php)
   ========================================================================== */
.jl-single-album-wrap {
    padding: 50px 0 80px;
}

.jl-single-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 28px 0;
}

.jl-single-meta-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 18px;
}

.jl-single-meta-card .label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.jl-single-meta-card .value {
    font-size: 14.5px;
    font-weight: 800;
    color: #172B4D;
    display: block;
}

.jl-single-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 36px 0;
}

@media (max-width: 991px) {
    .jl-single-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 640px) {
    .jl-single-photos-grid {
        grid-template-columns: 1fr;
    }
}

.jl-single-photo-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}

.jl-single-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(30, 136, 255, 0.12);
}

.jl-single-photo-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0F172A;
}

.jl-single-photo-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.jl-single-photo-item:hover .jl-single-photo-media img {
    transform: scale(1.04);
}

.jl-single-photo-zoom-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 29, 46, 0.4);
    opacity: 0;
    transition: opacity 0.25s;
    color: #FFFFFF;
    font-size: 28px;
}

.jl-single-photo-item:hover .jl-single-photo-zoom-icon {
    opacity: 1;
}

.jl-single-photo-caption {
    padding: 12px 16px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    background: #FFFFFF;
    border-top: 1px solid #F1F5F9;
}
