/* Galeri Section Genel Stiller */
.gallery-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.gallery-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Başlık Alanı */
.gallery-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
}

.gallery-title {
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.gallery-description {
    max-width: 800px;
    margin: 30px auto 0;
    font-size: 18px;
    line-height: 1.8;
    color: #5a6c7d;
}

.gallery-description p {
    margin-bottom: 15px;
}

/* Galeri Grid */
.gallery-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Galeri Öğeleri */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.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(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Resim Container */
.image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* Overlay Efekti */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

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

/* Zoom Icon */
.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 40px;
    color: white;
    z-index: 2;
    transition: transform 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Loading State */
.gallery-image.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Empty State */
.empty-gallery {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.empty-gallery p {
    font-size: 20px;
    color: #7f8c8d;
    margin: 20px 0;
}

.empty-gallery::before {
    content: '📷';
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive Tasarım */
@media (max-width: 1200px) {
    .gallery-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }

    .gallery-title {
        font-size: 36px;
        letter-spacing: 1px;
    }

    .gallery-description {
        font-size: 16px;
    }

    .gallery-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-header {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 28px;
    }

    .gallery-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .image-container {
        padding-bottom: 66.67%; /* 3:2 aspect ratio for mobile */
    }
}

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

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

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

/* Lightbox Desteği İçin Hazırlık */
.gallery-item[data-lightbox] {
    position: relative;
}

/* Opsiyonel: Masonry Layout için */
.gallery-wrapper.masonry {
    display: block;
    column-count: 4;
    column-gap: 25px;
}

.gallery-wrapper.masonry .gallery-item {
    display: inline-block;
    margin-bottom: 25px;
    width: 100%;
}

.gallery-wrapper.masonry .image-container {
    padding-bottom: auto;
    height: auto;
}

.gallery-wrapper.masonry .gallery-image {
    position: relative;
    width: 100%;
    height: auto;
}

@media (max-width: 1200px) {
    .gallery-wrapper.masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-wrapper.masonry {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-wrapper.masonry {
        column-count: 1;
    }
}

/* Performans İyileştirmeleri */
.gallery-image {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
}

/* Lazy Loading Placeholder */
.gallery-image[loading="lazy"] {
    background: #f0f0f0;
}

/* Accessibility */
.gallery-item:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.gallery-item:focus:not(:focus-visible) {
    outline: none;
}

/* Print Styles */
@media print {
    .gallery-section {
        background: white;
    }

    .gallery-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-item::before,
    .gallery-item::after {
        display: none;
    }
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-caption {
    text-align: center;
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 30px;
    }
}
