/*
Theme Name: Reklamlı Galeri Teması
Theme URI: [https://wordpress.org/](https://wordpress.org/)
Author: Senin Adın
Description: Sayfa yenilemeli ve reklam odaklı özel galeri teması.
Version: 3.0
License: GNU General Public License v2 or later
*/

/* Temel Sıfırlama ve Fontlar */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Menü açıkken sayfa kaymasını engelle */
body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding-top: 20px;
    padding-bottom: 20px; /* Mobilde alt boşluk */
    margin-bottom: 30px;
    text-align: center;
    position: relative; /* Menü butonu için referans */
}
header h1 { margin: 0; font-size: 24px; color: #d32f2f; }
header a { text-decoration: none; color: inherit; }

/* --- MASONRY / GRID GALERİ STİLLERİ (YENİ) --- */
.masonry-wrapper {
    max-width: 1400px; /* Daha geniş alan */
    margin: 0 auto;
    padding: 20px;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Otomatik Grid */
    gap: 25px;
}

.masonry-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.masonry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.masonry-thumb {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.masonry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.masonry-card:hover .masonry-thumb img {
    transform: scale(1.1); /* Zoom efekti */
}

.masonry-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.masonry-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #222;
    line-height: 1.4;
}

.masonry-meta {
    font-size: 12px;
    color: #888;
    margin-top: auto; /* En alta it */
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* --- MENÜ AYRIŞTIRMA --- */
.menu-desktop-only { display: block !important; width: 100%; }
.menu-mobile-only { display: none !important; }

/* --- MENÜ STİLLERİ --- */
.menu-toggle {
    display: none !important;
    position: absolute;
    top: 20px; left: 20px;
    background: transparent; border: none;
    font-size: 24px; cursor: pointer;
    color: #333; z-index: 1001; padding: 5px;
}

.main-navigation {
    background-color: #222;
    width: 100%; margin-top: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000; position: relative;
}

.main-navigation .nav-container {
    max-width: 900px; margin: 0 auto; padding: 0;
}

ul.nav-menu {
    list-style: none !important; margin: 0 !important; padding: 0 !important;
    display: flex !important; flex-direction: row;
    justify-content: center; flex-wrap: wrap;
}

ul.nav-menu li { margin: 0; position: relative; display: block; }

ul.nav-menu li a {
    display: block; padding: 15px 25px;
    color: #fff; text-decoration: none;
    font-weight: 600; font-size: 15px;
    transition: background 0.3s ease;
    border-right: 1px solid #333;
}

ul.nav-menu li:first-child a { border-left: 1px solid #333; }
ul.nav-menu li a:hover { background-color: #d32f2f; color: #fff; }
ul.nav-menu .current-menu-item > a { background-color: #d32f2f; }

/* Alt Menü */
ul.nav-menu li ul.sub-menu {
    visibility: hidden; opacity: 0;
    position: absolute; top: 100%; left: 0;
    background-color: #333; min-width: 200px;
    z-index: 9999; transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 0; margin: 0; list-style: none; display: block;
}
ul.nav-menu li:hover > ul.sub-menu { visibility: visible; opacity: 1; }
ul.nav-menu li ul.sub-menu li { width: 100%; border-bottom: 1px solid #444; }
ul.nav-menu li ul.sub-menu li a { border: none !important; padding: 12px 15px; text-align: left; }
ul.nav-menu li ul.sub-menu li a:hover { background-color: #444; }

/* Overlay */
.menu-overlay {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
    opacity: 0; transition: opacity 0.3s;
}
.menu-overlay.active { display: block; opacity: 1; }

/* Mobil Görünüm */
@media (max-width: 768px) {
    .menu-desktop-only { display: none !important; }
    .menu-mobile-only { display: block !important; width: 100%; }
    
    header { padding-top: 15px; padding-bottom: 15px; margin-bottom: 20px; }
    .menu-toggle { display: block !important; }

    .main-navigation {
        position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
        background-color: #1a1a1a; margin-top: 0;
        transition: left 0.3s ease; overflow-y: auto;
        display: block; padding-top: 60px;
    }
    .main-navigation.active { left: 0; box-shadow: 2px 0 10px rgba(0,0,0,0.5); }

    ul.nav-menu { flex-direction: column !important; width: 100%; }
    ul.nav-menu li { width: 100%; border-bottom: 1px solid #333; }
    ul.nav-menu li a { border: none; padding: 15px 20px; text-align: left; color: #fff !important; }
    ul.nav-menu li:first-child a { border-left: none; }

    ul.nav-menu li ul.sub-menu {
        position: static; visibility: visible; opacity: 1;
        background-color: #252525; box-shadow: none;
        padding-left: 20px; width: 100%;
    }
    
    /* Masonry Grid Mobilde Tek Sütun */
    .masonry-grid { grid-template-columns: 1fr; }
}

/* Diğer Stiller */
.main-layout {
    display: flex; justify-content: center; align-items: flex-start;
    flex-wrap: nowrap; gap: 15px; max-width: 1250px;
    width: 100%; margin: 0 auto; padding: 20px; box-sizing: border-box;
}
.content-area { flex: 1; max-width: 850px; min-width: 0; width: 100%; }

.yan-blok {
    width: 160px; min-height: 600px; flex-shrink: 0; display: none;
    position: sticky; top: 20px; background: #e0e0e0;
    text-align: center; padding-top: 10px; font-size: 12px; color: #888; z-index: 90;
}
@media (min-width: 1024px) { .yan-blok { display: block; } }

.gallery-wrapper { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); text-align: center; }
.gallery-image-box { 
    position: relative; 
    background: #000; 
    min-height: 300px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 20px; 
}

.gallery-image-box img { 
    max-width: 100%; 
    max-height: 85vh; 
    width: auto; 
    height: auto; 
    object-fit: contain; 
    display: block; 
    margin: 0 auto; 
}
@media (max-width: 768px) {
    .gallery-image-box img {
        max-height: 80vh;
    }
}
.nav-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; cursor: pointer; }

.gallery-buttons { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.btn { display: inline-block; padding: 12px 25px; text-decoration: none; color: #fff; border-radius: 5px; font-weight: bold; transition: background 0.3s; border: none; cursor: pointer; font-size: 16px; }
.btn-prev { background-color: #7f8c8d; } .btn-prev:hover { background-color: #616b6c; }
.btn-next { background-color: #d32f2f; } .btn-next:hover { background-color: #b71c1c; }
.btn-disabled { background-color: #ccc; cursor: not-allowed; }

.tanitim-kutusu { background: #e0e0e0; color: #888; display: flex; align-items: center; justify-content: center; margin: 20px auto; border: 1px dashed #bbb; font-size: 14px; min-height: 90px; overflow: hidden; }
.kutu-ust { width: 100%; max-width: 728px; height: auto; min-height: 90px; }
.kutu-alt { width: 100%; max-width: 300px; height: auto; min-height: 250px; }

#interstitialModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; }
.modal-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; padding: 20px; border-radius: 8px; text-align: center; max-width: 90%; }
#adblock-notice { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background-color: #d32f2f; color: white; text-align: center; padding: 15px; z-index: 10000; font-weight: bold; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); }

/* Footer */
.site-footer { background: #222; color: #fff; padding: 40px 0 20px; margin-top: 40px; }
.footer-columns { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h3 { color: #fff; font-size: 18px; border-bottom: 2px solid #d32f2f; padding-bottom: 10px; margin-bottom: 15px; display: inline-block; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; border-bottom: 1px solid #333; padding-bottom: 8px; }
.footer-col ul li a { color: #ccc; text-decoration: none; transition: all 0.3s ease; display: block; }
.footer-col ul li a:hover { color: #d32f2f; padding-left: 5px; }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid #333; color: #777; font-size: 13px; }
@media (max-width: 768px) { .footer-columns { flex-direction: column; text-align: center; } .footer-col h3 { display: inline-block; margin-top: 20px; } }
