/*
Theme Name: Nes Tema
Theme URI: https://yilmazlarvinc.com
Description: WPBakery uyumlu, Sidebar ve Etiket destekli WordPress teması.
Author: Özel Geliştirici
Version: 1.1
Text Domain: nes-tema
*/

* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; margin: 0; padding: 0; color: #333; background: #f4f4f4; }
img { max-width: 100%; height: auto; display: block; }

/* Header & Logo */
header { background-color: #ffcc00; padding: 20px 0; text-align: center; }
.site-logo img { max-height: 90px; margin: 0 auto; }
.site-title { margin: 10px 0 5px; font-size: 26px; }
.site-title a { color: #000; text-decoration: none; font-weight: bold; }

/* Flexbox Layout (İçerik + Sidebar) */
.container { max-width: 1200px; margin: 20px auto; padding: 0 15px; }
.content-wrapper { display: flex; flex-wrap: wrap; gap: 30px; }

/* WPBakery Uyumlu Ana İçerik */
.site-main { flex: 1 1 65%; background: #fff; padding: 10px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.site-main-full { flex: 1 1 100%; background: #fff; padding: 10px; border-radius: 8px; } /* Sidebar olmayan sayfalar için */

/* Sidebar ve Bileşenler */
.site-sidebar { flex: 1 1 25%; }
.widget { background: #fff; padding: 20px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.widget-title { margin-top: 0; font-size: 18px; border-bottom: 2px solid #ffcc00; padding-bottom: 10px; }

/* İçerik & Etiketler */
article { margin-bottom: 20px; }
h1, h2 { color: #222; margin-top: 0; }
a { color: #e65100; text-decoration: none; }
a:hover { text-decoration: underline; }

.post-tags { margin-top: 30px; padding-top: 15px; border-top: 1px solid #eee; }
.post-tags a { display: inline-block; background: #eee; color: #333; padding: 5px 12px; margin-right: 5px; border-radius: 4px; font-size: 14px; }
.post-tags a:hover { background: #ffcc00; color: #000; text-decoration: none; }

/* Footer */
footer { background-color: #222; color: #fff; text-align: center; padding: 20px 15px; margin-top: 40px; width: 100%; }

/* Responsive */
@media (max-width: 850px) {
    .site-main, .site-sidebar { flex: 1 1 100%; }
}
/* --- YENİ EKLENEN KISIMLAR --- */

/* Ana Menü Tasarımı */
.site-navigation { background-color: #222; }
.main-menu { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; max-width: 1200px; }
.main-menu li { margin: 0; position: relative; }
.main-menu a { display: block; color: #fff; padding: 15px 20px; text-decoration: none; font-weight: 500; }
.main-menu a:hover { background-color: #ffcc00; color: #000; }

/* 4 Sütunlu Footer (Grid Yapısı) */
footer { background-color: #222; color: #fff; text-align: left; padding: 40px 15px 20px; margin-top: 40px; width: 100%; }
.footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 30px; }
.footer-widget { background: transparent; box-shadow: none; padding: 0; margin: 0; }
.footer-widget .widget-title { color: #ffcc00; font-size: 18px; border-bottom: 1px solid #444; padding-bottom: 10px; margin-top: 0; margin-bottom: 15px; }
.footer-widget ul { list-style: none; padding: 0; margin: 0; }
.footer-widget ul li { margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.footer-widget ul li:last-child { border-bottom: none; }
.footer-widget ul li a { color: #bbb; }
.footer-widget ul li a:hover { color: #ffcc00; text-decoration: none; }

/* Alt Bilgi (Telif Hakkı) */
.site-info { text-align: center; border-top: 1px solid #444; padding-top: 20px; color: #888; }

/* Responsive Footer ve Menü */
@media (max-width: 992px) {
    .footer-widgets { grid-template-columns: repeat(2, 1fr); } /* Tablette 2 sütun */
}
@media (max-width: 768px) {
    .main-menu { flex-direction: column; text-align: center; } /* Mobilde menü alt alta */
    .footer-widgets { grid-template-columns: 1fr; } /* Mobilde 1 sütun */
}
/* --- RESİM HİZALAMA VE BOŞLUKLAR (WordPress Standartları) --- */
.site-main img { max-width: 100%; height: auto; border-radius: 4px; }
img.alignleft { float: left; margin: 10px 20px 20px 0; }
img.alignright { float: right; margin: 10px 0 20px 20px; }
img.aligncenter { display: block; margin: 10px auto 20px auto; }
.wp-caption { max-width: 100%; text-align: center; background: #f9f9f9; padding: 10px; border: 1px solid #eee; margin-bottom: 20px; }
.wp-caption-text { font-size: 14px; color: #666; margin: 0; }

/* ==========================================================================
   TÜM SİDEBAR LİSTELERİ İÇİN OKLU MENÜ TASARIMI 
   (Kategoriler, Sayfalar, Gezinme Menüsü ve Yeni Nesil Bloklar)
   ========================================================================== */

/* Varsayılan liste stillerini (noktaları) sıfırla */
.site-sidebar .widget ul,
.site-sidebar .wp-block-navigation-container,
.site-sidebar .wp-block-categories-list,
.site-sidebar .wp-block-page-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Her bir satırın altındaki ince gri çizgi */
.site-sidebar .widget ul li,
.site-sidebar .wp-block-navigation-item,
.site-sidebar .wp-block-categories-list li,
.site-sidebar .wp-block-page-list li {
    border-bottom: 1px solid #eaeaea;
    margin: 0;
    padding: 0;
}

/* En alt satırdaki çizgiyi kaldır */
.site-sidebar .widget ul li:last-child,
.site-sidebar .wp-block-navigation-item:last-child,
.site-sidebar .wp-block-categories-list li:last-child,
.site-sidebar .wp-block-page-list li:last-child {
    border-bottom: none;
}

/* Link (Tıklanabilir alan) tasarımı */
.site-sidebar .widget ul li a,
.site-sidebar .wp-block-navigation-item a,
.site-sidebar .wp-block-categories-list li a,
.site-sidebar .wp-block-page-list li a {
    display: block !important;
    padding: 14px 25px 14px 0 !important;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

/* Sağ Kenardaki İnce Ok İşareti (Saf CSS) */
.site-sidebar .widget ul li a::after,
.site-sidebar .wp-block-navigation-item a::after,
.site-sidebar .wp-block-categories-list li a::after,
.site-sidebar .wp-block-page-list li a::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 6px;
    border-top: 1px solid #999;
    border-right: 1px solid #999;
    transition: all 0.3s ease;
}

/* Üzerine Gelindiğinde (Hover) Sağ ve Sol Boşlukların Kayması */
.site-sidebar .widget ul li a:hover,
.site-sidebar .wp-block-navigation-item a:hover,
.site-sidebar .wp-block-categories-list li a:hover,
.site-sidebar .wp-block-page-list li a:hover {
    padding-left: 8px !important;
    padding-right: 17px !important;
}

/* Hover durumunda ok işaretinin de sağa kayması */
.site-sidebar .widget ul li a:hover::after,
.site-sidebar .wp-block-navigation-item a:hover::after,
.site-sidebar .wp-block-categories-list li a:hover::after,
.site-sidebar .wp-block-page-list li a:hover::after {
    right: 0;
}
/* ==========================================================================
   WordPress Standart Resim Hizalamaları (Gutenberg ve Klasik Editör Uyumu)
   ========================================================================== */

/* Sola Hizalama */
.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

/* Sağa Hizalama */
.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

/* Ortalama */
.aligncenter {
    clear: both;
    display: block;
    margin: 10px auto 20px auto;
}

/* Hizalama Yok */
.alignnone {
    margin-bottom: 20px;
}

/* Editörden gelen <figure> ve altyazılı resimler için kapsamlar */
figure.alignleft, img.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

figure.alignright, img.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

figure.aligncenter, img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

/* Resim Altyazıları (Caption) */
.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
    text-align: center;
}
.wp-caption-text {
    font-size: 14px;
    color: #666;
    padding-top: 5px;
    margin: 0;
}

/* TAŞMA ÖNLEYİCİ (Clearfix) 
   Kısa yazılarda resimlerin kapsayıcı dışına (footer'a vb.) taşmasını engeller. */
.site-main article::after,
.site-main::after,
.content-wrapper::after {
    content: "";
    display: table;
    clear: both;
}
/* ==========================================================================
   WPBakery ve Tema İçin Zorunlu (Baskın) Resim Hizalamaları
   ========================================================================== */

img.alignleft, .wpb_text_column img.alignleft {
    float: left !important;
    margin: 10px 20px 20px 0 !important;
    display: inline !important; /* Block yapısını kırar */
}

img.alignright, .wpb_text_column img.alignright {
    float: right !important;
    margin: 10px 0 20px 20px !important;
    display: inline !important;
}

img.aligncenter, .wpb_text_column img.aligncenter {
    float: none !important;
    display: block !important;
    margin: 10px auto 20px auto !important;
}
/* Nes Tema Esnek Sütun Sistemi */
.nes-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    margin-bottom: 20px;
}

.nes-col {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

/* Masaüstü Düzeni (768px ve üzeri) */
@media (min-width: 768px) {
    .nes-col-2 { flex: 0 0 50%; max-width: 50%; } /* 2 Sütun */
    .nes-col-3 { flex: 0 0 33.333%; max-width: 33.333%; } /* 3 Sütun */
    .nes-col-4 { flex: 0 0 25%; max-width: 25%; } /* 4 Sütun */
}
/* --- NES TEMA FAQ (SSS) TASARIMI --- */
.nes-faq-wrapper {
    max-width: 100%;
    margin: 20px 0;
}

.nes-faq-item {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Soru Başlığı */
.nes-faq-soru {
    font-weight: 600;
    font-size: 16px;
    color: #222222;
    padding: 16px 20px;
    background: #fdfdfd;
    cursor: pointer;
    list-style: none; /* Varsayılan ok işaretini kaldırır */
    position: relative;
    margin: 0;
    outline: none;
    user-select: none;
}

/* Safari İçin Varsayılan Oku Gizleme */
.nes-faq-soru::-webkit-details-marker {
    display: none;
}

/* Sağ Taraftaki [+] ve [-] İkonları */
.nes-faq-soru::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 300;
    color: #444; /* Varsayılan renk */
    transition: all 0.3s ease;
}

/* Soru Açıldığında Olacaklar */
.nes-faq-item[open] {
    border-color: #ffcc00; /* Temanızın sarı rengi */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nes-faq-item[open] .nes-faq-soru {
    background: #fffdf5;
    color: #000;
}

.nes-faq-item[open] .nes-faq-soru::after {
    content: '−'; /* Eksi işareti */
    transform: translateY(-50%) rotate(180deg);
    color: #ffcc00;
}

/* Cevap Metni ve Animasyonu */
.nes-faq-cevap {
    padding: 15px 20px 20px;
    color: #555555;
    border-top: 1px solid #f0f0f0;
    line-height: 1.7;
    animation: faqFadeIn 0.4s ease-out forwards;
}

@keyframes faqFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- NES TEMA: LIGHTBOX (POPUP GÖRSEL) SİSTEMİ --- */
.nes-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Siyah, %85 şeffaf arka plan */
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out; 
}

/* Popup aktif olduğunda görünür yap */
.nes-lightbox-overlay.aktif {
    opacity: 1;
    visibility: visible;
}

/* İçerideki Görselin Ayarları */
.nes-lightbox-gorsel {
    max-width: 90%; 
    max-height: 90vh; 
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    object-fit: contain; 
}

/* Resim açıldığında hafif büyüyerek gelme animasyonu */
.nes-lightbox-overlay.aktif .nes-lightbox-gorsel {
    transform: scale(1);
}

/* --- YENİ EKLENEN: ÇARPI (X) BUTONU --- */
.nes-lightbox-kapat {
    position: absolute;
    top: 25px;
    right: 35px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 50px;
    font-family: Arial, sans-serif;
    font-weight: 300;
    cursor: pointer;
    z-index: 9999999;
    transition: all 0.2s ease;
    line-height: 1;
    user-select: none;
}

/* Çarpı butonunun üzerine gelince temanın sarı rengini alması ve hafif büyümesi */
.nes-lightbox-kapat:hover {
    color: #ffcc00; 
    transform: scale(1.15);
}

/* Mobilde çarpı butonunu biraz daha görünür ve köşeye yakın yapalım */
@media (max-width: 768px) {
    .nes-lightbox-kapat {
        top: 15px;
        right: 20px;
        font-size: 45px;
        color: #ffffff;
    }
}

/* --- NES TEMA: SEKMELİ (TAB) İÇERİK TASARIMI --- */
.nes-tabs-container {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    margin: 25px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Üst Butonların Kapsayıcısı */
.nes-tabs-nav {
    display: flex;
    flex-wrap: wrap; /* Mobilde butonlar sığmazsa alt satıra geçer */
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* Tab Butonları */
.nes-tab-btn {
    flex: 1; /* Butonların genişliği eşit dağılır */
    min-width: 140px;
    padding: 16px 10px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent; /* Aktif çizgisi için hazırlık */
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
}

/* Üzerine Gelindiğinde */
.nes-tab-btn:hover {
    color: #1e293b;
    background: #f1f5f9;
}

/* Aktif (Seçili) Buton */
.nes-tab-btn.aktif {
    color: #000000;
    background: #ffffff;
    border-bottom-color: #ffcc00; /* Temanın Sarı Rengi */
}

/* İçerik Alanı */
.nes-tabs-content-wrapper {
    padding: 10px;
    color: #475569;
    line-height: 1.7;
}

/* Varsayılan Olarak İçerikleri Gizle */
.nes-tab-pane {
    display: none;
    animation: nesTabFadeIn 0.4s ease forwards;
}

/* Aktif İçeriği Göster */
.nes-tab-pane.aktif {
    display: block;
}

/* Yumuşak Geçiş Animasyonu */
@keyframes nesTabFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobil Uyum (768px ve altı) */
@media (max-width: 768px) {
    .nes-tab-btn {
        min-width: 50%; /* Mobilde yan yana 2 buton gösterir, 3. varsa alta atar */
        padding: 5px 5px;
        font-size: 14px;
        border-bottom: 1px solid #e2e8f0; /* Mobilde alt alta binerse diye çizgi */
    }
    .nes-tabs-content-wrapper {
        padding: 10px 5px;
    }
}