/* =====================================================================
   POST HERO GALLERY — Yazı başındaki kaydırmalı galeri
   Yer: /sd/assets/css/post-gallery.css
   ===================================================================== */

.post-hero-gallery {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card, #1f1730);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    aspect-ratio: 16/9;
}

.phg-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
}

.phg-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    background: #0f0a1f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.phg-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.phg-slide figcaption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: white;
    padding: 1.25rem 1.5rem 1rem;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* === Navigasyon Okları === */
.phg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 10, 31, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 5;
    transition: all 0.2s;
    user-select: none;
}
.phg-nav:hover {
    background: rgba(159, 74, 127, 0.85);
    transform: translateY(-50%) scale(1.08);
}
.phg-nav:active { transform: translateY(-50%) scale(0.95); }
.phg-nav.prev { left: 1rem; }
.phg-nav.next { right: 1rem; }
.phg-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* === Sayı Göstergesi (Sağ Üst) === */
.phg-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(15, 10, 31, 0.7);
    backdrop-filter: blur(12px);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 5;
    border: 1px solid rgba(255,255,255,0.12);
}

/* === Alt Noktalar === */
.phg-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 5;
    background: rgba(15, 10, 31, 0.5);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
}
.phg-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s;
}
.phg-dot.active {
    background: #c084a8;
    width: 22px;
    border-radius: 999px;
}

/* === Thumbnail Şeridi (alt küçük önizlemeler) === */
.phg-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem;
    scrollbar-width: thin;
}
.phg-thumbs::-webkit-scrollbar { height: 4px; }
.phg-thumbs::-webkit-scrollbar-thumb { background: var(--accent, #9F4A7F); border-radius: 4px; }

.phg-thumb {
    flex: 0 0 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--bg-elevated, #241b35);
    padding: 0;
}
.phg-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.phg-thumb.active {
    border-color: var(--accent, #9F4A7F);
    box-shadow: 0 0 0 3px rgba(159, 74, 127, 0.3);
}

/* === Lightbox (Tam ekran büyütme) === */
.phg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.phg-lightbox.open { display: flex; }

.phg-lightbox-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
}
.phg-lightbox-content img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
}

.phg-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phg-lightbox-close:hover {
    background: rgba(159, 74, 127, 0.8);
}

.phg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phg-lightbox-nav:hover { background: rgba(159, 74, 127, 0.8); }
.phg-lightbox-nav.prev { left: -4rem; }
.phg-lightbox-nav.next { right: -4rem; }

.phg-lightbox-caption {
    position: absolute;
    bottom: -3rem;
    left: 0; right: 0;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    font-style: italic;
    padding: 0 1rem;
}

/* === Mobil === */
@media (max-width: 768px) {
    .post-hero-gallery {
        aspect-ratio: 4/3;
        margin: 1rem -0.5rem;
        border-radius: 12px;
    }
    .phg-nav {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .phg-nav.prev { left: 0.5rem; }
    .phg-nav.next { right: 0.5rem; }
    .phg-counter {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }
    .phg-thumbs { display: none; }

    .phg-lightbox-nav.prev { left: 0.5rem; top: auto; bottom: 1rem; transform: none; }
    .phg-lightbox-nav.next { right: 0.5rem; top: auto; bottom: 1rem; transform: none; }
    .phg-lightbox-close { top: 0.5rem; right: 0.5rem; }
}

/* === Yükleniyor === */
.phg-loading {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-light, #c084a8);
    font-size: 0.9rem;
}
