/* ==================================================
   FOTO GALERİ SAYFASI
================================================== */

.gallery-section {
    width: 100%;
    padding: 70px 0 100px;
    background-color: #f6f7f9;
}

.gallery-section .container {
    max-width: 1400px;
}

/* Galeri görselleri */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background-color: #eeeeee;
    border: 0;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.06);
}

/* Görsel üzerindeki MGE alanı */

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 63, 139, 0.78);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.gallery-zoom-icon {
    position: absolute;
    right: 18px;
    bottom: 14px;
    color: #ffffff;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.gallery-item:focus-visible {
    outline: 3px solid #174b9b;
    outline-offset: 3px;
}

/* Büyütülmüş görsel alanı */

.gallery-lightbox {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: flex;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    padding: 50px 90px;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition:
        visibility 0.25s ease,
        opacity 0.25s ease;
}

.gallery-lightbox.is-open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.gallery-lightbox-content {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.gallery-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox-content figcaption {
    min-height: 25px;
    margin-top: 14px;
    color: #ffffff;
    font-size: 14px;
    text-align: center;
}

/* Kapatma butonu */

.gallery-lightbox-close {
    position: absolute;
    z-index: 2;
    top: 20px;
    right: 28px;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background-color: transparent;
    border: 0;
    font-size: 42px;
    font-weight: 300;
    line-height: 1;
}

/* Önceki ve sonraki butonları */

.gallery-lightbox-navigation {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 55px;
    height: 70px;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
    border: 0;
    font-size: 55px;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-50%);
    transition: background-color 0.2s ease;
}

.gallery-lightbox-navigation:hover {
    background-color: rgba(23, 75, 155, 0.9);
}

.gallery-lightbox-previous {
    left: 22px;
}

.gallery-lightbox-next {
    right: 22px;
}

body.gallery-is-open {
    overflow: hidden;
}

/* Küçük masaüstü */

@media (max-width: 1199.98px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-item img {
        height: 235px;
    }
}

/* Tablet */

@media (max-width: 899.98px) {
    .gallery-section {
        padding: 55px 0 80px;
    }

    .gallery-section .container {
        padding-right: 25px;
        padding-left: 25px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .gallery-item img {
        height: 230px;
    }

    .gallery-lightbox {
        padding-right: 70px;
        padding-left: 70px;
    }
}

/* Telefon */

@media (max-width: 575.98px) {
    .gallery-section {
        padding: 40px 0 60px;
    }

    .gallery-section .container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery-item img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .gallery-overlay {
        opacity: 0;
    }

    .gallery-lightbox {
        padding: 65px 12px 50px;
    }

    .gallery-lightbox-content img {
        max-height: calc(100vh - 150px);
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .gallery-lightbox-navigation {
        top: auto;
        bottom: 12px;
        width: 48px;
        height: 45px;
        font-size: 42px;
        transform: none;
    }

    .gallery-lightbox-previous {
        left: calc(50% - 58px);
    }

    .gallery-lightbox-next {
        right: calc(50% - 58px);
    }
}