/* ITD Premium Gallery CSS */

/* --- Grid Görünümü --- */
.itd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 40px 0;
}

.itd-gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1; /* Tam kare ve hizalı görünüm */
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #f1f5f9;
}

.itd-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.itd-gallery-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.itd-gallery-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Resmi kırpar ama tam sığdırır, hizalama mükemmel olur */
    transition: transform 0.8s ease;
    display: block;
}

.itd-gallery-item:hover .itd-gallery-item-inner img {
    transform: scale(1.1);
}

.itd-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.itd-gallery-overlay svg {
    width: 48px;
    height: 48px;
    color: #fff;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.itd-gallery-item:hover .itd-gallery-overlay {
    opacity: 1;
}

.itd-gallery-item:hover .itd-gallery-overlay svg {
    transform: scale(1);
}

/* --- Lightbox / Fullscreen Modal --- */
.itd-gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.itd-gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.itd-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 50px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
}

.itd-lightbox-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: #ea580c; /* Premium turuncu vurgu */
}

.itd-lightbox-swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide .itd-slide-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.swiper-slide .itd-slide-inner img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Orijinal oran korunur, kesilme olmaz */
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Navigasyon Okları */
.itd-lightbox-prev,
.itd-lightbox-next {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    width: 60px !important;
    height: 60px !important;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.itd-lightbox-prev:hover,
.itd-lightbox-next:hover {
    background: #ea580c !important;
    transform: scale(1.1);
}

.itd-lightbox-prev::after,
.itd-lightbox-next::after {
    font-size: 24px !important;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .itd-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .swiper-slide .itd-slide-inner {
        padding: 10px;
    }
    .itd-lightbox-prev,
    .itd-lightbox-next {
        width: 40px !important;
        height: 40px !important;
    }
    .itd-lightbox-prev::after,
    .itd-lightbox-next::after {
        font-size: 16px !important;
    }
    .itd-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }
}
