﻿/* =========================
   GALLERY (CLEAN / NO DUPES)
   ========================= */

/* Head */
.gallery-head {
    margin: 0 0 14px;
}

.gallery-title {
    margin: 0;
    font-weight: 950;
    font-size: 2rem;
}

.gallery-sub {
    margin: 6px 0 0;
    opacity: .7;
    font-weight: 600;
}

/* =========================
   GRID + CARD
   ========================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gallery-card {
    display: block;
    padding: 0;
    text-align: left;
    cursor: pointer;
    background: #fff;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 0; /* yuvarlak yok */
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

    .gallery-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 40px rgba(15,23,42,.10);
        border-color: rgba(15,23,42,.22);
    }

.gallery-media {
    background: #f3f4f6;
}

    .gallery-media img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        display: block;
    }

.gallery-cap {
    padding: 10px 12px;
    font-weight: 800;
    font-size: .95rem;
    color: #0f172a;
    border-top: 1px solid rgba(15,23,42,.08);
}

/* Empty */
.gallery-empty {
    padding: 16px;
    border: 1px dashed rgba(15,23,42,.20);
    border-radius: 12px;
    opacity: .85;
}

/* Responsive */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-media img {
        height: 180px;
    }
}

@media (max-width: 420px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-media img {
        height: 220px;
    }
}

/* =========================
   PAGINATION
   ========================= */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin: 18px 0 6px;
    padding: 12px 0;
    flex-wrap: wrap;
}

    .gallery-pagination .page-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 38px;
        min-width: 42px;
        padding: 0 14px;
        border-radius: 10px;
        border: 1px solid rgba(15,23,42,.12);
        background: #fff;
        color: #0f172a;
        text-decoration: none;
        font-weight: 800;
        transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    }

        .gallery-pagination .page-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(15,23,42,.08);
        }

        .gallery-pagination .page-btn.active {
            background: #0f172a;
            color: #fff;
            border-color: #0f172a;
        }

        .gallery-pagination .page-btn.disabled {
            opacity: .45;
            pointer-events: none;
        }

/* =========================
   LIGHTBOX
   ========================= */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

    .lightbox.is-open {
        display: block;
    }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
}

.lightbox-panel {
    position: absolute;
    inset: 30px;
    display: grid;
    place-items: center;
}

.lb-figure {
    margin: 0;
    width: 100%;
    max-width: min(1100px, 92vw);
    max-height: min(82vh, 800px);
    background: #0b1220;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 0; /* yuvarlak yok */
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
}

/* görsel */
#lbImg {
    width: 100%;
    height: calc(min(82vh, 800px) - 56px);
    object-fit: contain;
    background: #0b1220;
    display: block;
}

/* caption (istersen komple gizle, aşağıda not var) */
.lb-cap {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: rgba(255,255,255,.86);
    font-weight: 750;
    border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
}

/* close */
.lb-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.35);
    color: #fff;
    cursor: pointer;
}

/* arrows */
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.35);
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.lb-prev {
    left: 10px;
}

.lb-next {
    right: 10px;
}

@media (max-width: 640px) {
    .lightbox-panel {
        inset: 14px;
    }

    .lb-nav {
        width: 46px;
        height: 46px;
    }
}
