﻿.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.gallery-container{
    padding-bottom: 200rem;
}

.gallery-container h1{
        padding-right: 120rem;
    padding-left: 120rem;
    margin-bottom:35rem;
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-container{
            padding-right: 20rem;
    padding-left: 20rem;
    }

    .gallery-container h1{
           padding-right: 20rem;
    padding-left: 20rem;
    }

    #lightboxImg{
        min-width: 300rem !important;
    }

        .lightbox-stage {
      height: max-content;
    }

        .lightbox-dialog{
            align-items:center;
        }

        .lightbox-nav{
            display:flex !important;
                z-index:999;
                height: 46px !important;
                font-size:32px !important;
                justify-content: center;
        }


}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    margin: 0;
}

.gallery-btn {
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 14px;
    overflow: hidden;
    display: block;
}

.gallery-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 220ms ease, filter 220ms ease;
}

@media (max-width: 576px) {
    .gallery-img {
        height: 200px;
    }
}

/* hover: hafif zoom + ikon */
.gallery-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 220ms ease;
}

.gallery-zoom-icon {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    display: grid;
    place-items: center;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 220ms ease, transform 220ms ease;
    user-select: none;
}

.gallery-btn:hover .gallery-img {
    transform: scale(1.05);
    filter: saturate(1.05);
}

.gallery-btn:hover::after {
    opacity: 1;
}

.gallery-btn:hover .gallery-zoom-icon {
    opacity: 1;
    transform: translateY(0);
}

.gallery-caption {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.35;
    color: #444;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

    .lightbox.is-open {
        display: block;
    }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: #1e1e1e;
    opacity: .9;
    transition-timing-function: cubic-bezier(.22, .61, .36, 1);
    transition-duration: inherit;
    transition-property: opacity;
}

.lightbox-dialog {
    position: relative;
    max-width: min(1100px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    height: 100%;
    margin: 16px auto;
    border-radius: 16px;
    overflow: hidden;
    top: 60rem;
    display: flex;
    justify-content: center;
}

.lightbox-stage {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
    padding: 18px 54px 14px;
    width: 90%;
}

#lightboxImg {
    max-width: 100%;
    max-height: calc(100vh - 170px);
    min-width: 400rem;
    object-fit: contain;
    display: block;
}

.lightbox-caption {
    width: 100%;
    padding-top: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    text-align: center;
    min-height: 20px;
}

.lightbox-close {
 position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 2px;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 60px;
    border: 0;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

    .lightbox-nav.prev {
        left: 8px;
    }

    .lightbox-nav.next {
        right: 8px;
    }

    .lightbox-close:hover,
    .lightbox-nav:hover {
        background: rgba(255,255,255,0.18);
    }

@media (max-width: 576px) {
    .lightbox-stage {
        padding: 14px 14px 12px;
    }

    .lightbox-nav {
        display: none;
    }
    /* mobilde swipe ile geçebiliriz */
}
