body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

/* --- Filtreleme Butonları Alanı --- */
.galeri-filtreleme {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 25px auto;
    padding: 10px;
}

.filtre-btn {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filtre-btn:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.filtre-btn.aktif {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

/* Galeri Ana Konteyneri (Mobil: 2 Sütun) */
.galeri-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* --- Listelenen Medya Sayısı Alanı Stili --- */
.medya-sayisi-alani {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

/* Her bir medya kutusu ve altındaki yazı alanı */
.galeri-item-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.galeri-item {
    background: #111;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galeri-item:hover img,
.galeri-item:hover video {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Resim ve Videolar */
.galeri-item img, 
.galeri-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    pointer-events: none;
}

/* Kartın altındaki başlık alanı */
.galeri-baslik {
    padding: 12px 10px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background-color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Lightbox Stilleri --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

#lightbox-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

#lightbox-content img,
#lightbox-content video {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 5px 5px 0 0;
    display: block;
}

#lightbox-caption {
    background-color: rgba(20, 20, 20, 0.9);
    color: #fff;
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    border-radius: 0 0 5px 5px;
    box-sizing: border-box;
    letter-spacing: 0.5px;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
    transition: color 0.2s;
}

#lightbox-close:hover {
    color: #ff4d4d;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 40px;
    padding: 20px 15px;
    cursor: pointer;
    z-index: 10005;
    border-radius: 5px;
    transition: background-color 0.2s;
    user-select: none;
}

.lightbox-arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

#prev-btn {
    left: 30px;
}

#next-btn {
    right: 30px;
}

@media (min-width: 768px) {
    .galeri-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .galeri-container {
        grid-template-columns: repeat(5, 1fr);
    }
}
