/* ============================================================
   Sports Gallery — sportsbar_pwa
   ────────────────────────────────────────────────────────────
   Galeri sayfası (gallery.php) — events/reviews pattern'i:
   - Slim dark hero
   - 4:3 sabit aspect kart grid (3-2-1 responsive)
   - Hover slide-up overlay (title + description)
   - Boş durum
   - PhotoSwipe stil dokunulmadı (zaten event_detail.php'da çalışıyor)
============================================================ */

/* Sayfa wrapper — body.sb-light cream zemin */
.sb-gallery-page {
    background: var(--br-cream);
    min-height: calc(100vh - 200px);
}

/* ════════════════════════════════════════════════════════════
   1) HERO BANNER (slim dark)
═══════════════════════════════════════════════════════════ */

.sb-gallery-hero {
    position: relative;
    background: var(--br-bg-1);
    color: var(--br-cream);
    padding: 48px 0;
    overflow: hidden;
    border-bottom: 4px solid var(--br-wine);
}

.sb-gallery-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 60px,
        rgba(245, 237, 216, 0.025) 60px,
        rgba(245, 237, 216, 0.025) 120px
    );
    pointer-events: none;
}

.sb-gallery-hero::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.sb-gallery-hero-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--br-space-lg);
    z-index: 1;
    text-align: center;
}

.sb-gallery-hero-eyebrow {
    font-family: var(--br-font-mono);
    font-size: 0.75rem;
    color: var(--br-gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 8px;
    font-weight: 700;
}

.sb-gallery-hero-title {
    font-family: var(--br-font-display) !important;
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    line-height: 0.95 !important;
    color: var(--br-cream) !important;
    margin: 0 0 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
}

.sb-gallery-hero-title-accent {
    color: var(--br-wine);
}

.sb-gallery-hero-text {
    font-family: var(--br-font-mono);
    font-size: 0.875rem;
    color: var(--br-cream-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

/* ════════════════════════════════════════════════════════════
   2) GRID — 4:3 sabit aspect, 3-2-1 responsive
═══════════════════════════════════════════════════════════ */

.sb-gallery-section {
    padding: 32px var(--br-space-lg) 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.sb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

@media (max-width: 720px) {
    .sb-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .sb-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ─── Gallery item ─── */
.sb-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--br-radius-md);
    background: var(--br-grad-pitch-fade);
    border: 1px solid var(--br-cream-deep);
    text-decoration: none;
    cursor: zoom-in;
    transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.sb-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--br-shadow-lg);
    border-color: var(--br-bg-1);
}

.sb-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sb-gallery-item:hover img {
    transform: scale(1.08);
}

/* ─── Overlay (slide-up on hover) ─── */
.sb-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    background: linear-gradient(
        to top,
        rgba(5, 47, 29, 0.92) 0%,
        rgba(5, 47, 29, 0.55) 45%,
        rgba(5, 47, 29, 0) 75%
    );
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 280ms ease, transform 280ms ease;
    pointer-events: none;
}

.sb-gallery-item:hover .sb-gallery-overlay,
.sb-gallery-item:focus-visible .sb-gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile/touch — overlay her zaman görünür (hover yok) */
@media (hover: none) {
    .sb-gallery-overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

.sb-gallery-overlay-title {
    font-family: var(--br-font-display);
    font-size: 1.25rem;
    color: var(--br-cream);
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.sb-gallery-overlay-text {
    font-family: var(--br-font-sans);
    font-size: 0.8125rem;
    color: var(--br-cream-muted);
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    /* 2 satır clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Zoom-in cursor hint badge (sağ üst köşe) */
.sb-gallery-zoom-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(5, 47, 29, 0.85);
    color: var(--br-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 220ms ease, transform 220ms ease;
    pointer-events: none;
}

.sb-gallery-item:hover .sb-gallery-zoom-hint {
    opacity: 1;
    transform: scale(1);
}

@media (hover: none) {
    .sb-gallery-zoom-hint {
        opacity: 1;
        transform: scale(1);
    }
}

.sb-gallery-zoom-hint svg {
    width: 14px;
    height: 14px;
}

/* ════════════════════════════════════════════════════════════
   3) EMPTY STATE
═══════════════════════════════════════════════════════════ */

.sb-gallery-empty {
    text-align: center;
    padding: 80px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.sb-gallery-empty-icon {
    width: 88px;
    height: 88px;
    color: var(--br-cream-deep);
    margin: 0 auto 24px;
    stroke-width: 1.4;
}

body.sb-light .sb-gallery-empty-title,
body.theme-dark.sb-light .sb-gallery-empty-title {
    font-family: var(--br-font-display) !important;
    font-size: 2rem !important;
    color: var(--br-bg-1) !important;
    margin: 0 0 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
}

body.sb-light .sb-gallery-empty-text,
body.theme-dark.sb-light .sb-gallery-empty-text {
    font-family: var(--br-font-sans) !important;
    font-size: 0.9375rem !important;
    color: var(--br-text-soft) !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* ════════════════════════════════════════════════════════════
   4) PhotoSwipe caption — sportsbar uyumlu
═══════════════════════════════════════════════════════════ */

.pswp__custom-caption,
.sb-gallery-pswp-caption {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 47, 29, 0.88);
    color: var(--br-cream);
    padding: 10px 20px;
    border-radius: var(--br-radius-sm);
    font-family: var(--br-font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1700;
    max-width: 90vw;
    text-align: center;
    border: 1px solid rgba(255, 182, 39, 0.25);
}

.sb-gallery-pswp-caption-title {
    font-family: var(--br-font-display);
    font-size: 1rem;
    color: var(--br-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 2px;
}

.sb-gallery-pswp-caption-text {
    font-family: var(--br-font-sans);
    font-size: 0.8125rem;
    color: var(--br-cream-muted);
    margin: 0;
    line-height: 1.4;
}
