/* ==========================================================================
   Site Lightbox (Tam Ekran Görsel İnceleme & Galeri Modülü)
   Türkiye Kamp Rehberi & Park4Night
   ========================================================================== */

/* Zoomable Görsel İpuçları (Affordance) */
.zoomable-photo,
.campsite-photo-surface,
.detail-campsite-photo-grid .campsite-photo-surface,
.detail-cover-wrap,
.bento-gallery .bento-main,
.bento-gallery .bento-thumb,
.route-info-cover-wrap,
.stop-gallery-slot,
.stop-media-card,
.spot-quick-popup-img-wrap,
[data-lightbox] {
    cursor: zoom-in !important;
}

.campsite-photo-surface:hover img,
.detail-campsite-photo-grid .campsite-photo-surface:hover img,
.bento-gallery .bento-main:hover img,
.bento-gallery .bento-thumb:hover img,
.route-info-cover-wrap:hover img {
    filter: brightness(1.06);
    transition: filter 0.2s ease, transform 0.25s ease;
}

/* Küçük görsel yakınlaştırma rozeti (Hover Hint) */
.campsite-photo-surface::before,
.route-info-cover-wrap::before {
    content: "\f00e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 5;
    pointer-events: none;
}

.campsite-photo-surface:hover::before,
.route-info-cover-wrap:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Sayfa Kaydırma Kilidi */
body.site-lightbox-open {
    overflow: hidden !important;
    touch-action: none !important;
}

/* ==========================================================================
   Lightbox Modal Yapısı
   ========================================================================== */
.site-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 100001; /* Leaflet, bottom-sheet ve floating widgetların üstünde */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(4, 7, 15, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.site-lightbox-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Üst Başlık Çubuğu */
.site-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    z-index: 10;
    background: linear-gradient(180deg, rgba(4, 7, 15, 0.85) 0%, rgba(4, 7, 15, 0) 100%);
    gap: 1rem;
}

.site-lightbox-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.site-lightbox-title {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-lightbox-counter {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.site-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-lightbox-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.site-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.05);
}

.site-lightbox-close-btn {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.site-lightbox-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    transform: scale(1.08);
}

/* Orta Görsel Alanı */
.site-lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.5rem 1rem;
    overflow: hidden;
}

.site-lightbox-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 94vw;
    max-height: calc(100vh - 160px);
}

.site-lightbox-img {
    max-width: 92vw;
    max-height: calc(100vh - 160px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    cursor: default;
}

.site-lightbox-modal.active .site-lightbox-img {
    transform: scale(1);
    opacity: 1;
}

/* Yükleniyor Göstergesi */
.site-lightbox-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #3b82f6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.site-lightbox-loader.loading {
    opacity: 1;
}

/* İleri / Geri Butonları */
.site-lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.site-lightbox-prev {
    left: 24px;
}

.site-lightbox-next {
    right: 24px;
}

.site-lightbox-nav-btn:hover {
    background: rgba(59, 130, 246, 0.85);
    border-color: rgba(147, 197, 253, 0.5);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
}

.site-lightbox-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.site-lightbox-nav-btn.hidden {
    display: none !important;
}

/* Alt Açıklama ve Kaynak/Atıf Çubuğu */
.site-lightbox-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem 1.25rem;
    background: linear-gradient(0deg, rgba(4, 7, 15, 0.9) 0%, rgba(4, 7, 15, 0) 100%);
    gap: 0.35rem;
    text-align: center;
    z-index: 10;
}

.site-lightbox-caption {
    font-size: 0.92rem;
    color: #e2e8f0;
    font-weight: 500;
}

.site-lightbox-credit {
    font-size: 0.78rem;
    color: #94a3b8;
}

.site-lightbox-credit a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-lightbox-credit a:hover {
    color: #93c5fd;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .site-lightbox-header {
        padding: 0.75rem 1rem;
    }

    .site-lightbox-title {
        font-size: 0.98rem;
    }

    .site-lightbox-counter {
        font-size: 0.72rem;
        padding: 2px 8px;
    }

    .site-lightbox-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .site-lightbox-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
        background: rgba(15, 23, 42, 0.65);
    }

    .site-lightbox-prev {
        left: 10px;
    }

    .site-lightbox-next {
        right: 10px;
    }

    .site-lightbox-img {
        max-width: 96vw;
        max-height: calc(100vh - 140px);
        border-radius: 8px;
    }

    .site-lightbox-footer {
        padding: 0.5rem 1rem 1rem;
    }

    .site-lightbox-caption {
        font-size: 0.85rem;
    }

    .site-lightbox-credit {
        font-size: 0.72rem;
    }
}
