.gallery-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    overflow: hidden;
}

.gallery-header {
    position: relative;
}

.gallery-container {
    position: relative;
    padding: 2rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #fff;
    transform: translateZ(0);
    will-change: transform;
}

.gallery-item-inner {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.gallery-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    z-index: 1;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    transition: transform 0.4s ease-out;
    z-index: 2;
}

.gallery-image.loaded + .gallery-image-placeholder {
    display: none;
}

.gallery-image.error {
    opacity: 0.8;
    filter: grayscale(0.5);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    color: white;
    transition: opacity 0.3s ease-out;
    z-index: 3;
}

.overlay-content {
    width: 100%;
    transform: translateY(20px);
    transition: transform 0.3s ease-out;
}

.gallery-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.gallery-line {
    width: 50px;
    height: 2px;
    background-color: var(--bs-primary, #0d6efd);
    margin: 1rem 0;
}

.gallery-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.view-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bs-primary, #0d6efd);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

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

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

/* Mobil cihazlar için dokunmatik optimizasyonları */
@media (hover: none) {
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.5) 70%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }

    .overlay-content {
        transform: translateY(0);
    }

    .gallery-item:active .gallery-image {
        transform: scale(1.05);
    }
}

/* Fancybox özelleştirmeleri */
.fancybox-bg {
    background: linear-gradient(45deg, #000000, #1a1a1a);
}

.fancybox-is-open .fancybox-bg {
    opacity: 0.95;
}

/* Responsive düzenlemeler */
@media (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .gallery-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-overlay {
        padding: 1.5rem;
    }

    .gallery-title {
        font-size: 1.2rem;
    }

    .gallery-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .gallery-overlay {
        padding: 1rem;
    }
} 