/**
 * Galeri CSS Stilleri
 */

/* Galeri Container */
.custom-gallery-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 20px;
    box-sizing: border-box;
}

/* Galeri Öğeleri Grid */
.custom-gallery-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Sütun sayısına göre responsive grid */
.custom-gallery-container[data-columns="3"] .custom-gallery-items {
    grid-template-columns: repeat(3, 1fr);
}

.custom-gallery-container[data-columns="2"] .custom-gallery-items {
    grid-template-columns: repeat(2, 1fr);
}

/* Galeri Öğesi */
.gallery-item {
    perspective: 1000px;
    width: 100%;
    height: 250px;
    margin-bottom: 20px;
}

/* 3D Dönüş Efekti */
.gallery-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item:hover .gallery-item-inner {
    transform: rotateY(180deg);
}

/* Ön ve Arka Yüz Ortak Stiller */
.gallery-item-image,
.gallery-item-content {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

/* Ön Yüz (Resim) */
.gallery-item-image {
    background-color: #f8f8f8;
}

.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Arka Yüz (İçerik) */
.gallery-item-content {
    background-color: #fff;
    color: #333;
    transform: rotateY(180deg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.gallery-item-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.gallery-item-description {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* Sayfalama */
.custom-gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.custom-gallery-pagination a,
.custom-gallery-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.custom-gallery-pagination a {
    background-color: #f5f5f5;
    color: #333;
    transition: all 0.3s ease;
}

.custom-gallery-pagination a:hover {
    background-color: #e0e0e0;
}

.custom-gallery-pagination .current {
    background-color: #ff6600;
    color: #fff;
}

.custom-gallery-pagination .prev-page,
.custom-gallery-pagination .next-page {
    font-weight: 600;
}

/* Responsive Tasarım */
@media screen and (max-width: 992px) {
    .custom-gallery-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .custom-gallery-container[data-columns="4"] .custom-gallery-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .custom-gallery-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .custom-gallery-container[data-columns="4"] .custom-gallery-items,
    .custom-gallery-container[data-columns="3"] .custom-gallery-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item {
        height: 220px;
    }
}

@media screen and (max-width: 480px) {
    .custom-gallery-items {
        grid-template-columns: 1fr;
    }
    
    .custom-gallery-container[data-columns="4"] .custom-gallery-items,
    .custom-gallery-container[data-columns="3"] .custom-gallery-items,
    .custom-gallery-container[data-columns="2"] .custom-gallery-items {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 250px;
    }
}