
/* Fotoğraf Galerisi Özel Stilleri */
.photo-gallery-section {
    padding: 2rem 0 4rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 80vh;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.gallery-header:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2c3e50);
    border-radius: 2px;
}

.gallery-header .content-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.gallery-header .lead {
    color: #64748b;
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Kategori Butonları - GÜNCELLENDİ (Dikey Sıralama) */
.gallery-categories {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
}

.gallery-categories .row {
    flex-wrap: wrap !important; /* Flex-wrap'ı zorla */
    justify-content: center !important;
    margin-right: -0.5rem !important;
    margin-left: -0.5rem !important;
}

.gallery-categories .col-auto {
    padding: 0.25rem !important; /* Butonlar arası boşluk */
    flex: 0 0 auto !important;
    width: auto !important;
    margin-bottom: 0.5rem; /* Dikey boşluk */
}

/* Kategori butonlarını responsive yap */
@media (min-width: 768px) {
    .gallery-categories .col-auto {
        flex: 0 0 auto !important;
        max-width: none !important;
    }
}

.category-filter {
    margin: 0 !important; /* Margin'i sıfırla */
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border: 2px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    z-index: 1;
    white-space: nowrap; /* Buton metnini tek satırda tut */
    width: 100%; /* Buton genişliği */
    text-align: center;
    display: inline-block;
}

.category-filter:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.category-filter:hover,
.category-filter.active {
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(44, 62, 80, 0.2);
}

.category-filter.active:before,
.category-filter:hover:before {
    transform: scaleX(1);
}

/* Kategori badge'leri */
.category-filter .badge {
    font-size: 0.65em;
    padding: 0.2em 0.5em;
    margin-left: 0.3em;
    vertical-align: middle;
}

/* Galeri Kartları - GÜNCELLENDİ */
.gallery-card-wrapper {
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.gallery-card-wrapper:hover {
    transform: translateY(-10px);
}

.gallery-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.1);
}

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-card-title {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.gallery-card:hover .gallery-card-title {
    color: #3498db;
}

.gallery-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.gallery-card-count {
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-card-count i {
    color: #3498db;
}

.gallery-card-date {
    color: #94a3b8;
    font-size: 0.85rem;
}

.gallery-card-category {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.pagination .page-link {
    color: #2c3e50;
    border: 2px solid #e2e8f0;
    margin: 0 3px;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.2);
}

.pagination .page-link:hover {
    background-color: #f1f5f9;
    border-color: #3498db;
    color: #2c3e50;
    transform: translateY(-2px);
}

/* Lightbox Modal - GÜNCELLENDİ */
#imageModal .modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
}

#imageModal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

#imageModal .modal-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

#imageModal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#imageModal .modal-header .btn-close:hover {
    opacity: 1;
}

.lightbox-container {
    padding: 1rem;
}

.lightbox-main-image {
    position: relative;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-height: 70vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lightbox-nav:hover {
    opacity: 1;
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

/* Thumbnails */
.lightbox-thumbnails {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.thumbnails-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f1f5f9;
}

.thumbnails-container::-webkit-scrollbar {
    height: 8px;
}

.thumbnails-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    border-radius: 10px;
}

.thumbnail {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    flex-shrink: 0;
}

.thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 4rem;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
    color: #3498db;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.no-results i {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* Responsive Tasarım - GÜNCELLENDİ */
@media (max-width: 992px) {
    .gallery-image-container {
        height: 240px;
    }
    
    .gallery-card-title {
        font-size: 1.1rem;
    }
    
    /* Kategori butonları için mobil düzenleme */
    .gallery-categories .col-auto {
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        margin-bottom: 0.5rem;
    }
    
    .category-filter {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: normal; /* Mobilde metni kır */
        height: auto;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .photo-gallery-section {
        padding: 1.5rem 0 3rem;
    }
    
    .gallery-header .content-title {
        font-size: 2rem;
    }
    
    .gallery-header .lead {
        font-size: 1.1rem;
    }
    
    .gallery-image-container {
        height: 220px;
    }
    
    /* Kategori konteynerini responsive yap */
    .gallery-categories {
        padding: 1rem;
    }
    
    .gallery-categories .col-auto {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0.25rem !important;
    }
    
    .category-filter {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .lightbox-nav.prev {
        left: 10px;
    }
    
    .lightbox-nav.next {
        right: 10px;
    }
    
    .thumbnail {
        width: 100px;
        height: 70px;
    }
}

@media (min-width: 769px) {
    /* Desktop için kategori butonları */
    .gallery-categories .col-auto {
        flex: 0 0 auto !important;
        max-width: none !important;
        margin-bottom: 0.5rem;
    }
    
    /* Desktop'ta daha fazla kategori varsa 2 sütun yap */
    .gallery-categories .row {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.5rem;
    }
    
    .gallery-categories .col-auto {
        width: 100% !important;
    }
    
    .category-filter {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .gallery-header .content-title {
        font-size: 1.8rem;
    }
    
    .gallery-image-container {
        height: 200px;
    }
    
    .gallery-card-info {
        padding: 1.25rem;
    }
    
    .gallery-card-title {
        font-size: 1rem;
    }
    
    /* Küçük ekranlarda kategori butonları */
    .gallery-categories .col-auto {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0.5rem;
    }
    
    .category-filter {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    #lightbox-image {
        max-height: 50vh;
    }
    
    .thumbnail {
        width: 80px;
        height: 60px;
    }
}

/* Çok fazla kategori varsa scroll özelliği */
@media (max-width: 768px) and (min-height: 600px) {
    .gallery-categories {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .gallery-categories::-webkit-scrollbar {
        width: 6px;
    }
    
    .gallery-categories::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 10px;
    }
    
    .gallery-categories::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #3498db, #2c3e50);
        border-radius: 10px;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-card-wrapper {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.gallery-card-wrapper:nth-child(1) { animation-delay: 0.1s; }
.gallery-card-wrapper:nth-child(2) { animation-delay: 0.2s; }
.gallery-card-wrapper:nth-child(3) { animation-delay: 0.3s; }
.gallery-card-wrapper:nth-child(4) { animation-delay: 0.4s; }
.gallery-card-wrapper:nth-child(5) { animation-delay: 0.5s; }
.gallery-card-wrapper:nth-child(6) { animation-delay: 0.6s; }
.gallery-card-wrapper:nth-child(7) { animation-delay: 0.7s; }
.gallery-card-wrapper:nth-child(8) { animation-delay: 0.8s; }
.gallery-card-wrapper:nth-child(9) { animation-delay: 0.9s; }

/* Hover efekti için özel stil */
.gallery-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(44, 62, 80, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    pointer-events: none;
}

.gallery-card:hover:after {
    opacity: 1;
}

/* Kategori Grid Düzenlemesi */
@media (min-width: 1200px) {
    /* Büyük ekranlarda 3 sütun */
    .gallery-categories .row {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    /* Orta ekranlarda 2 sütun */
    .gallery-categories .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    /* Tablet'te 2 sütun */
    .gallery-categories .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Kategori butonları için responsive flexbox fallback */
.gallery-categories-flex-fallback {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.gallery-categories-flex-fallback .category-filter {
    flex: 0 0 auto;
    margin: 0;
}