/* ---------- TEMEL SIFIRLAMA ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 10px 0;
}

header .back-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #6c5ce7;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

header .back-link:hover {
    color: #341f97;
}

h1 {
    font-weight: 300;
    letter-spacing: 2px;
    color: #2d3436;
    margin: 0;
    border-bottom: 2px solid #dfe6e9;
    padding-bottom: 10px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 300;
    color: #2d3436;
    margin: 40px 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #b2bec3;
    width: 100%;
    max-width: 1200px;
}

.sub-category {
    font-size: 1.3rem;
    font-weight: 400;
    color: #2d3436;
    margin: 25px 0 10px 0;
    width: 100%;
    max-width: 1200px;
}

/* ---------- GALERİ - GRID DÜZENİ ---------- */
.gallery {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.gallery-item {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    aspect-ratio: 4 / 3;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.35);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ---------- MODAL (LIGHTBOX) ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 10px;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* RESİM KONTEYNERİ */
.modal-content .image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
    max-height: 90vh;
}

.modal-content img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 18px;
    background: #111;
}

/* AÇIKLAMA ALANI - KÜÇÜK FONT */
.image-caption {
    color: #fff;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px 16px;
    border-radius: 6px;
    width: 100%;
    max-width: 800px;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    margin-top: 6px;
}

.image-caption .caption-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
    color: #ffd700;
    display: block;
}

.image-caption .caption-desc {
    color: #d0d0d0;
    font-size: 12px;
    display: block;
    margin-top: 1px;
}

/* NAV BUTONLARI */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f1f1;
    font-size: 2.6rem;
    font-weight: 300;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    user-select: none;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.06);
}

.nav-btn.prev {
    left: -25px;
}

.nav-btn.next {
    right: -25px;
}

/* KAPATMA BUTONU */
.close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #eee;
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.close-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
    border-color: #e74c3c;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* ---------- MOBİL UYUM ---------- */
@media screen and (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .modal-content {
        padding: 12px;
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .modal-content img {
        max-height: 58vh;
    }
    
    .modal-content .image-container {
        max-height: 58vh;
    }
    
    .nav-btn {
        width: 44px;
        height: 44px;
        font-size: 2rem;
    }
    .nav-btn.prev {
        left: -10px;
    }
    .nav-btn.next {
        right: -10px;
    }
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        top: -8px;
        right: -8px;
    }
    
    .image-caption {
        padding: 6px 12px;
        font-size: 12px;
        margin-top: 5px;
    }
    .image-caption .caption-title {
        font-size: 13px;
    }
    .image-caption .caption-desc {
        font-size: 11px;
    }
    
    .category-title {
        font-size: 1.4rem;
        margin-top: 30px;
    }
}

@media screen and (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .modal {
        padding: 6px;
    }
    
    .modal-content {
        padding: 6px;
        border-radius: 12px;
    }
    
    .modal-content img {
        max-height: 48vh;
    }
    
    .modal-content .image-container {
        max-height: 48vh;
    }
    
    .image-caption {
        padding: 4px 8px;
        font-size: 11px;
        margin-top: 3px;
        border-radius: 4px;
    }
    .image-caption .caption-title {
        font-size: 12px;
        margin-bottom: 1px;
    }
    .image-caption .caption-desc {
        font-size: 10px;
        margin-top: 0px;
    }
    
    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1.4rem;
    }
    .nav-btn.prev {
        left: -4px;
    }
    .nav-btn.next {
        right: -4px;
    }
    
    .close-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
        top: -4px;
        right: -4px;
    }
    
    header .back-link {
        font-size: 0.8rem;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-right: 10px;
    }
    
    header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .category-title {
        font-size: 1.1rem;
        margin-top: 20px;
    }
}