/* ==========================================================================
   Görsel grid + lightbox (icerik/resim4.php)
   Tema diliyle uyumlu: amber vurgu, koyu lacivert, kare köşe, yumuşak gölge.
   Sınıf adları resim4.js ile bağlı — DEĞİŞTİRME.
   ========================================================================== */

/* ── Grid ────────────────────────────────────────────────────────────────── */
.galleryk {
    margin-bottom: 30px;
}

.galleryk-item {
    position: relative;
    padding: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(5, 32, 73, .10);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow .35s ease, transform .35s ease;
}

.galleryk-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(5, 32, 73, .18);
}

.galleryk-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    transition: transform .6s ease;
}

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

/* Hover'da amber büyüteç rozeti */
.galleryk-item:after {
    content: "+";
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    background-color: var(--thm-base, #f8a800);
    color: var(--thm-black, #052049);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .35s ease, transform .35s ease;
}

.galleryk-item:hover:after {
    opacity: 1;
    transform: scale(1);
}

.galleryk-item p {
    margin: 0;
    padding: 14px 18px;
    font-family: var(--thm-font, inherit);
    font-size: 16px;
    font-weight: 600;
    color: var(--thm-black, #052049);
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.modal {
    display: none;                 /* açılışta JS flex yapıyor */
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    padding: 30px 20px;
    background-color: rgba(5, 16, 35, .93);
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* DİKKAT: .modal-content'e transform VERME. Transform'lu bir ata, içindeki
   position:fixed elemanı (kapat butonu) kendine bağlar; buton ekranın köşesine
   değil görselin köşesine yapışır. Animasyon sadece opaklık; büyüme efekti
   görselin kendisine (img) verilir. */
.modal-content {
    position: relative;
    width: auto;
    max-width: 1000px;
    padding: 0;
    background: transparent;     /* beyaz panel yerine görselin kendisi öne çıksın */
    border-radius: 0;
    text-align: center;
    animation: lb-fade .3s ease both;
}

@keyframes lb-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lb-zoom {
    from { transform: scale(.94); }
    to   { transform: scale(1); }
}

.modal-content img {
    display: block;
    max-width: 100%;
    max-height: 74vh;
    margin: 0 auto;
    border-radius: 0;
    object-fit: contain;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
    animation: lb-zoom .35s ease both;
}

.modal-content h3 {
    margin: 20px 0 4px;
    font-family: var(--thm-font, inherit);
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.modal-content p {
    margin: 0;
    font-size: 15px;
    line-height: 26px;
    color: rgba(255, 255, 255, .75);
    white-space: pre-line;
}

/* Kapat */
.modal .close {
    position: fixed;
    top: 26px;
    right: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background-color: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease;
}

.modal .close:hover {
    background-color: var(--thm-base, #f8a800);
    color: var(--thm-black, #052049);
}

/* Önceki / Sonraki */
.modal-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.modal-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    padding: 12px 22px;
    background-color: rgba(255, 255, 255, .12);
    border: none;
    border-radius: 0;
    color: #ffffff;
    font-family: var(--thm-font, inherit);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease;
}

.modal-nav button:hover {
    background-color: var(--thm-base, #f8a800);
    color: var(--thm-black, #052049);
}

@media (max-width: 575px) {
    .modal .close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .modal-content img {
        max-height: 60vh;
    }

    .modal-nav button {
        min-width: 100px;
        padding: 10px 16px;
    }
}
