/*
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: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.site-main-full { flex: 1 1 100%; background: #fff; padding: 30px; 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;
}