/* ================================================
   GALERİ SAYFASI
   ================================================ */

/* ---- Galeri Hero / Parallax Başlık ---- */
.gallery-hero {
    position: relative;
    height: 320px;
    background-image: url("../../images/hero/cta-bg.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gallery-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 35, 66, 0.68);
}

.gallery-hero__content {
    position: relative;
    z-index: 1;
}

.gallery-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: white;
    margin: 0 0 0.5rem;
}

.gallery-hero__sub {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* ---- Filtre Butonları ---- */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    padding: 0 1rem 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-filter-btn {
    padding: 0.5rem 1.4rem;
    border: 1px solid rgba(10, 35, 66, 0.2);
    border-radius: 100px;
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 220ms ease;
}

.gallery-filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.gallery-filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ---- Fotoğraf Grid ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

/* ---- Fotoğraf Kartı ---- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    background: #e8e4dc;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms ease;
}

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

/* Hover overlay — büyüteç ikonu */
.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 35, 66, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 300ms ease;
    opacity: 0;
}

.gallery-item:hover .gallery-item__overlay {
    background: rgba(10, 35, 66, 0.45);
    opacity: 1;
}

/* Filtre animasyonu */
.gallery-item.is-hidden {
    display: none;
}

/* ---- LİGHTBOX ---- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 15, 35, 0.94);
    cursor: pointer;
}

.lightbox__img-wrap {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img-wrap img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    display: block;
}

/* Kapat butonu */
.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 200ms ease;
}

.lightbox__close:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
}

/* Önceki / Sonraki butonlar */
.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 200ms ease;
}

.lightbox__prev { left: 1.25rem; }
.lightbox__next { right: 1.25rem; }

.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
}

/* Sayaç */
.lightbox__counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    font-family: var(--font-body);
    letter-spacing: 0.1em;
    z-index: 2;
}

/* Body scroll kilidi */
body.lightbox-open {
    overflow: hidden;
}

/* ================================================
   MOBİL
   ================================================ */
@media (max-width: 768px) {
    .gallery-hero {
        background-attachment: scroll;
        height: 240px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.75rem 3rem;
    }

    .gallery-filters {
        gap: 0.4rem;
        padding-bottom: 1.75rem;
    }

    .gallery-filter-btn {
        font-size: 0.82rem;
        padding: 0.45rem 1rem;
    }

    .lightbox__prev { left: 0.5rem; }
    .lightbox__next { right: 0.5rem; }
}

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