/* ========================================
   PROFESSIONAL GALLERY - ANA CSS
   ======================================== */

/* Reset ve Temel Stiller */
* {
    box-sizing: border-box;
}

.professional-gallery {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Galeri Grid */
.gallery-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(6, 1fr);
    margin-bottom: 30px;
}

/* Galeri Öğeleri */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

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

/* Resim Container */
.image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Resim Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.image-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.image-description {
    font-size: 14px;
    margin: 0 0 15px 0;
    opacity: 0.9;
    line-height: 1.4;
}

.overlay-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.view-btn, .info-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-btn:hover, .info-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Yükleme İndikatörü */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading-indicator.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Galeri Kontrolleri */
.gallery-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 18px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.gallery-info {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 600;
    margin-left: 10px;
    padding: 0 15px;
}

/* Lightbox Modal */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.lightbox-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.lightbox-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.lightbox-description {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.lightbox-loading.active {
    display: block;
}

/* Navigasyon Butonları */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.prev-nav {
    left: 30px;
}

.next-nav {
    right: 30px;
}

/* Thumbnail Navigator */
.lightbox-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    z-index: 10001;
}

.thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.thumbnail-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.6;
}

.thumbnail-item:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail-item.active {
    opacity: 1;
    border-color: white;
    transform: scale(1.1);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Zoom Kontrolleri */
.lightbox-zoom-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 16px;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

/* Tam Ekran Kontrolü */
.lightbox-fullscreen {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 16px;
    z-index: 10001;
}

.lightbox-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateX(-50%) scale(1.05);
}

/* Resim Yok Durumu */
.no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-images-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-images h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #333;
}

.no-images p {
    font-size: 16px;
    margin: 0;
    opacity: 0.8;
}

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Geçiş Animasyonları */
.gallery-transition-fade {
    animation: fadeTransition 0.8s ease-in-out;
}

.gallery-transition-slide {
    animation: slideTransition 0.8s ease-in-out;
}

.gallery-transition-zoom {
    animation: zoomTransition 0.8s ease-in-out;
}

.gallery-transition-flip {
    animation: flipTransition 0.8s ease-in-out;
}

.gallery-transition-rotate {
    animation: rotateTransition 0.8s ease-in-out;
}

.gallery-transition-bounce {
    animation: bounceTransition 0.8s ease-in-out;
}

.gallery-transition-elastic {
    animation: elasticTransition 0.8s ease-in-out;
}

.gallery-transition-pulse {
    animation: pulseTransition 0.8s ease-in-out;
}

@keyframes fadeTransition {
    0% { opacity: 0; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes slideTransition {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0); }
}

@keyframes zoomTransition {
    0% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

@keyframes flipTransition {
    0% { transform: rotateY(-90deg); }
    100% { transform: rotateY(0deg); }
}

@keyframes rotateTransition {
    0% { transform: rotate(-180deg) scale(0.8); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes bounceTransition {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

@keyframes elasticTransition {
    0% { transform: scale(0.3); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes pulseTransition {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive Tasarım */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .image-container {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .image-container {
        height: 180px;
    }
    
    .gallery-controls {
        bottom: 20px;
        right: 20px;
        padding: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .prev-nav {
        left: 15px;
    }
    
    .next-nav {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .image-container {
        height: 250px;
    }
    
    .professional-gallery {
        padding: 10px;
    }
    
    .gallery-controls {
        bottom: 10px;
        right: 10px;
        flex-direction: column;
        gap: 5px;
    }
    
    .lightbox-container {
        padding: 10px;
    }
    
    .lightbox-image {
        max-height: 70vh;
    }
    
    .thumbnails-container {
        max-width: 90%;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
}

/* Yüksek Performans Optimizasyonları */
.gallery-item {
    will-change: transform, opacity;
}

.gallery-image {
    will-change: transform;
}

.lightbox-image {
    will-change: transform, opacity;
}

/* Erişilebilirlik */
.control-btn:focus,
.lightbox-close:focus,
.lightbox-nav:focus,
.zoom-btn:focus,
.lightbox-fullscreen:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Karanlık Tema Desteği */
@media (prefers-color-scheme: dark) {
    .professional-gallery {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .gallery-item {
        background: #2a2a2a;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}
