/* ===========================================================
   Fotoğraf Galerisi Modalı — Profesyonel Yeniden Tasarım
   Not: JS (photo-modal.js) thumbnail genişliğini 97px (87 + 2x5
   margin) olarak hesapladığı için bu ölçüler korunmuştur.
   =========================================================== */

.photos-modal {
    position: fixed;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 26px;
    background: rgba(15, 23, 42, .80);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    background-blend-mode: normal;
    z-index: 99999;
    animation: vbModalFade .25s ease;
}

@keyframes vbModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.photos-modal .wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
    max-height: 92vh;
    margin: 0 auto;
    padding: 18px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    animation: vbModalPop .32s cubic-bezier(.2, .9, .3, 1.15);
}

@keyframes vbModalPop {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.photos-modal .relative { position: relative; }

/* Kapat butonu */
.photos-modal_close {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;
    width: 42px;
    height: 42px;
    transform: none;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #16243a;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    z-index: 20;
    transition: all .2s ease;
}
.photos-modal_close:hover { color: #fff; background: #004169; transform: rotate(90deg); }
.photos-modal_close i { font-size: 18px; line-height: 1; }

/* Klavye bilgisi gizli kalsın */
.photos-modal_keyboard-info,
.col-12.photos-modal_keyboard-info.hidden-xs { display: none; }

/* ---------- Carousel (büyük görsel) ---------- */
.photos-modal_carousel {
    position: relative;
    width: 100%;
    height: 62vh;
    max-height: 600px;
    min-height: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
}
.photos-modal_carousel .image {
    position: absolute;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    border-radius: 14px;
}
.photos-modal_carousel .image.active { display: block; }

/* Sayaç rozeti */
.photos-modal_carousel .image-count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    height: 32px;
    padding: 0 14px;
    border-radius: 30px;
    background: rgba(15, 23, 42, .72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    box-sizing: border-box;
    z-index: 6;
}

/* ---------- Kategoriler ---------- */
.photos-modal_categories {
    position: absolute;
    top: 14px;
    left: 14px;
    right: auto;
    z-index: 7;
    width: max-content !important;
    height: min-content;
}
.photos-modal_categories .categories {
    max-height: none;
    height: auto !important;
    overflow: visible;
    padding: 0;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
}
.photos-modal_categories .categories_link {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
    float: none;
    width: auto;
    margin: 0;
    padding: 7px 14px;
    color: #16243a;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: all .2s ease;
}
.photos-modal_categories .categories_link:hover,
.photos-modal_categories .categories_link:focus { color: #004169; background: #fff; }
.photos-modal_categories .categories_link.active {
    color: #fff;
    background: #004169;
    box-shadow: 0 4px 12px rgba(241, 102, 71, .4);
}
.photos-modal_categories .categories_link-category-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 175px;
}
.photos-modal_categories .total-photo-count { opacity: .7; }

/* ---------- Thumbnails ---------- */
.photos-modal_thumbnails {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-pack: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 16px;
}
.photos-modal_thumbnails .thumbnails {
    margin-top: 0;
    width: calc(100% - 120px);
    overflow-x: hidden;
    padding-left: 12px;
    padding-right: 12px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
}
.photos-modal_thumbnails .thumbnails_carousel {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    margin-left: auto;
    margin-right: auto;
    transition: linear all 500ms;
}
.photos-modal_thumbnails .thumbnails_item {
    cursor: pointer;
    width: 87px;
    height: 58px;
    margin: 0 5px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 2px solid transparent;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    transition: border-color .2s ease;
}
.photos-modal_thumbnails .thumbnails_item .image {
    width: 100%;
    height: 100%;
    opacity: .45;
    display: block;
    background-size: cover;
    background-position: 50%;
    transition: opacity .3s ease;
}
.photos-modal_thumbnails .thumbnails_item:hover .image { opacity: .8; }
.photos-modal_thumbnails .thumbnails_item.active { border-color: #004169; }
.photos-modal_thumbnails .thumbnails_item.active .image { opacity: 1; }

/* Prev / Next butonları */
.photos-modal_thumbnails .thumbnails_prev,
.photos-modal_thumbnails .thumbnails_next {
    position: absolute;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    line-height: normal;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: #16243a;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    transition: background .2s ease;
}
.photos-modal_thumbnails .thumbnails_prev:hover,
.photos-modal_thumbnails .thumbnails_next:hover { background: #004169; }
.photos-modal_thumbnails .thumbnails_prev { left: 0; }
.photos-modal_thumbnails .thumbnails_next { right: 0; }
.photos-modal_thumbnails .thumbnails_next i,
.photos-modal_thumbnails .thumbnails_prev i { color: #fff; font-size: 18px; }

/* "+ / Fotoğraf Daha" kutusunun tamamını tıklanabilir yapan saydam katman */
.bfafter .vb-foto-cover {
    position: absolute;
    inset: 0;
    left: 0;
    top: 0;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
    border-radius: 10px;
    z-index: 4;
}

/* "+" işareti hover (galeriyi aç ipucu) */
.open-photo-modal-carousel { color: #fff; cursor: pointer; }
.open-photo-modal-carousel:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .photos-modal { padding: 12px; }
    .photos-modal .wrapper { padding: 12px; border-radius: 16px; max-height: 94vh; }
    .photos-modal_carousel { height: 46vh; min-height: 200px; }
    .photos-modal_categories { top: 12px; left: 12px; }
    .photos-modal_categories .categories_link { padding: 6px 11px; font-size: 12px; }
    .photos-modal_thumbnails .thumbnails { width: calc(100% - 100px); }
    .photos-modal_thumbnails .thumbnails_prev,
    .photos-modal_thumbnails .thumbnails_next { width: 38px; height: 38px; }
    .photos-modal_thumbnails .thumbnails_next i,
    .photos-modal_thumbnails .thumbnails_prev i { font-size: 15px; }
    .photos-modal_close { width: 36px; height: 36px; top: 10px; right: 10px; }
    .photos-modal_close i { font-size: 15px; }
}
