/* ================================================= */
/* ====== PREMIUM KB STYLES (SON FİNAL VERSİYON) ====== */
/* ================================================= */

/* --- 1. ANA YERLEŞİM (LAYOUT) --- */
.kb-container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.kb-layout {
    display: flex;
    gap: 32px;
    position: relative;
    overflow: visible; /* STICKY SORUNU ÇÖZÜMÜ */
}

/* --- 2. SOL BLOK (NAVİGASYON) --- */
aside.kb-nav {
    position: sticky;
    top: calc(var(--pkb-header-height, 80px) + 40px);
    align-self: flex-start;
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    font-family: inherit;
    border-right: 1px solid #e5e7eb;
    padding-right: 32px;
}

/* --- 3. SAĞ BLOK (İÇERİK) --- */
section.kb-cat-main { flex: 1; min-width: 0; font-family: inherit; }

/* --- 4. KAPANABİLİR SOL MENÜ --- */
#pkb-sidebar-toggle { position: absolute; left: 320px; top: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background-color: white; border: 1px solid #e5e7eb; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.3s ease; }
#pkb-sidebar-toggle svg { width: 16px; height: 16px; color: #6b7280; transition: transform 0.3s ease; }
.kb-layout.is-sidebar-collapsed .kb-nav { display: none; }
.kb-layout.is-sidebar-collapsed { border-left: 1px solid #e5e7eb; padding-left: 40px; gap: 0; }
.kb-layout.is-sidebar-collapsed .kb-cat-main { padding-left: 0; }
.kb-layout.is-sidebar-collapsed #pkb-sidebar-toggle { left: 0px; transform: translate(-50%, -50%); }
.kb-layout.is-sidebar-collapsed #pkb-sidebar-toggle svg { transform: rotate(180deg); }

/* --- 5. SOL MENÜ (AKORDİYON KARTI) --- */
aside.kb-nav .kb-accordion__list--root { list-style-type: none !important; padding: 16px !important; margin: 0 !important; background-color: #F9FAFB !important; border-radius: 12px !important; border: 1px solid #E5E7EB !important; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important; }
.kb-accordion__toggle { display: flex; align-items: center; justify-content: space-between !important; width: 100%; padding: 12px 10px !important; border-radius: 8px !important; text-decoration: none !important; color: #374151 !important; font-weight: 500 !important; font-size: 15px !important; background-color: transparent !important; border: none !important; cursor: pointer; text-align: left; transition: background-color 0.2s, color 0.2s; }
.kb-accordion__toggle .kb-accordion__title { word-break: break-word; }
.kb-accordion__toggle:hover { background-color: #F3F4F6 !important; }
.kb-accordion__item.is-current > .kb-accordion__toggle, .kb-accordion__item.is-open > .kb-accordion__toggle { background-color: #F3F4F6 !important; color: #111827 !important; font-weight: 600 !important; }
.kb-accordion__left { display: flex; align-items: center; gap: 12px; }
.kb-accordion__icon { width: 24px; height: 24px; flex-shrink: 0; }
.kb-accordion__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.kb-accordion__icon.is-default { color: #9ca3af; }
.kb-accordion__dot::before { content: "•"; font-size: 24px; line-height: 24px; }
.kb-accordion__chev { color: #9CA3AF; transition: transform 0.25s ease; }
.kb-accordion__chev svg { width: 18px; height: 18px; }
.kb-accordion__item[aria-expanded="true"] > .kb-accordion__toggle .kb-accordion__chev { transform: rotate(90deg); }
.kb-accordion__panel { overflow: hidden; transition: max-height 0.25s ease-out; }
.kb-accordion__list--child { padding-left: 20px !important; margin: 4px 0 8px 16px !important; border-left: 1px solid #E5E7EB; list-style: none; }

/* --- 6. BREADCRUMB --- */
.pkb-breadcrumb-bar { position: relative; width: 100%; }
.pkb-breadcrumb-bar::before { content: ""; position: absolute; z-index: 0; left: 50%; transform: translateX(-50%); top: 0; bottom: 0; width: 100vw; background: #f8f9fa; border-top: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; }
.pkb-breadcrumb { position:relative; z-index: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; max-width: 1140px; margin: 0 auto; padding: 14px 20px; }
.pkb-breadcrumb .pkb-bc-link { color: #03148C; text-decoration: none; font-weight: 500; transition: color 0.15s ease; background: #f8f9fa; padding: 0 2px; }
.pkb-breadcrumb .pkb-bc-link:hover { color: #F23E5B; }
.pkb-breadcrumb .pkb-bc-link.is-home { color: #03148C; }
.pkb-breadcrumb .pkb-bc-sep { color: #adb5bd; background: #f8f9fa; }
.pkb-breadcrumb .pkb-bc-current { color: #212529; font-weight: 600; background: #f8f9fa; }

/* --- 7. SAĞ BLOK BAŞLIK --- */
.pkb-cat-header { display: flex; align-items: flex-start; gap: 16px; padding: 24px; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 40px; }
.pkb-cat-header .entry-title { font-size: 28px !important; font-family: inherit; }
.pkb-cat-meta { font-family: inherit; }
.pkb-cat-icon { flex-shrink: 0; width: 40px; height: 40px; }
.pkb-cat-icon img { display: block; width: 100%; height: 100%; border-radius: 8px; }
.pkb-cat-meta { margin-top: 8px; font-size: 14px; color: #6b7280; }
.pkb-cat-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pkb-cat-meta .dot { margin: 0 8px; }

/* --- 8. ALT KATEGORİ KARTLARI --- */
.pkb-subcat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 40px; }
.pkb-subcat-card { display: flex; align-items: flex-start; gap: 16px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 10px; text-decoration: none; color: inherit; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.pkb-subcat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.pkb-subcat-card .pkb-subcat-icon { flex-shrink: 0; width: 32px; height: 32px; }
.pkb-subcat-card .pkb-subcat-icon img { width: 100%; height: 100%; border-radius: 6px; }
.pkb-subcat-card .pkb-subcat-title { font-weight: 600; color: #111827; margin-bottom: 4px; }
.pkb-subcat-card .pkb-subcat-desc { font-size: 14px; color: #6b7280; line-height: 1.5; }

/* --- 9. MAKALE LİSTESİ --- */
.pkb-article-list .pkb-article-item > a { display: flex; align-items: center; gap: 12px; padding: 16px 20px; text-decoration: none; }
.pkb-article-list .pkb-article-icon { flex-shrink: 0; color: #6b7280; }
.pkb-article-list .pkb-article-title { color: #F23E5B !important; margin: 0 0 4px 0; font-size:17px; }
.pkb-article-list a:hover .pkb-article-title { color: #d8314c !important; }
.pkb-article-list .pkb-article-meta { font-size: 12px; color: #9ca3af; }
.pkb-article-list .pkb-article-meta .dot { margin: 0 6px; }

/* --- 10. MOBİL UYUMLULUK --- */
@media (max-width: 991px) {
    .kb-layout { flex-direction: column; gap: 24px; }
    aside.kb-nav { position: static !important; width: 100%; max-width: 100%; border-right: none; padding: 0 !important; background: none !important; border: none !important; box-shadow: none !important; }
    section.kb-cat-main { padding-left: 0; }
    #pkb-sidebar-toggle { display: none; }
    .kb-container { padding: 0 15px !important; }
    main.kb-archive, main.kb-article { padding-top: calc(var(--pkb-header-height, 80px) + 20px) !important; margin-top:0; }
    .pkb-breadcrumb { padding-left: 15px; padding-right: 15px; }
}
@media (max-width: 576px) {
    .pkb-subcat-grid { grid-template-columns: 1fr; }
    .pkb-cat-header .entry-title { font-size: 24px !important; }
}

/* ================================================= */
/* ====== SON DOKUNUŞLAR (GÜVENLİ VERSİYON) ====== */
/* ================================================= */

/* 1. Sol Menünün Sticky (Yapışkan) Özelliğini Kaldırma */
aside.kb-nav {
    position: static !important;
    top: auto !important;
    align-self: initial !important; /* Hizalamayı sıfırla */
}

/* 2. Breadcrumb Altına Boşluk Ekleme */
.pkb-breadcrumb-bar {
    margin-bottom: 32px !important;
}

/* 3. Breadcrumb Renklerini Ayarlama */
.pkb-breadcrumb .pkb-bc-link,
.pkb-breadcrumb .pkb-bc-link.is-home {
    color: #03148C !important;
}

/* ================================================= */
/* PAYLAŞ BUTONU STİLLERİ — BADGE MODE (FINAL)      */
/* ================================================= */
.pkb-cat-header{
  display:flex; justify-content:space-between; align-items:flex-start;
}
.pkb-header-actions{ margin-left:auto; padding-left:20px; }

/* Kapsayıcı */
.pkb-share-wrap{ position:relative; display:inline-block; overflow:visible; }

/* Tetikleyici buton */
.pkb-share-btn{
  background:none; border:1px solid transparent; border-radius:50%;
  padding:6px; cursor:pointer; color:#6b7280;
  display:flex; align-items:center; justify-content:center; line-height:1;
  transition:background-color .2s, color .2s, box-shadow .2s;
}
.pkb-share-btn:hover{ background:#f3f4f6; color:#111827; }
.pkb-share-btn:focus-visible{ outline:2px solid #9ca3af; outline-offset:2px; }

/* Tooltip */
.pkb-share-tooltip{
  position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  margin-bottom:8px; background:#111827; color:#fff; padding:4px 8px;
  border-radius:4px; font-size:12px; white-space:nowrap;
  opacity:0; visibility:hidden; transition:opacity .2s, visibility .2s; z-index:11;
}
.pkb-share-btn:hover .pkb-share-tooltip{ opacity:1; visibility:visible; }

/* Popover */
.pkb-share-popover{
  position:absolute; top:100%; right:0; margin-top:8px;
  background:#fff; border-radius:12px; padding:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  border:1px solid #e5e7eb;
  display:flex; align-items:center; gap:10px; white-space:nowrap;
  z-index:20; overflow:visible; width:auto;
}
[hidden]{ display:none !important; }

/* --- BADGE MODE --- */
.pkb-share-popover a,
.pkb-share-popover button{
  width:28px; height:28px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px;               /* daire rozet */
  color:#111827; background:#f3f4f6; /* açık zemin, koyu ikon */
  border:1px solid #e5e7eb;
  line-height:1; text-decoration:none; cursor:pointer;
  transition:background-color .18s, transform .12s, color .18s, border-color .18s;
}
.pkb-share-popover a:hover,
.pkb-share-popover button:hover{
  background:#111827; color:#ffffff; border-color:#111827; transform:translateY(-1px);
}
.pkb-share-popover a:focus-visible,
.pkb-share-popover button:focus-visible{
  outline:2px solid #9ca3af; outline-offset:2px;
}

/* SVG: aynı ölçü ve kesilmesin */
.pkb-share-popover svg{
  width:16px; height:16px; display:block;
  shape-rendering:geometricPrecision;
}

.pkb-share-popover .whatsapp-svg * {
  stroke: currentColor !important;
  fill: none !important;
}

/* Paylaş butonu boyutunu sabitle (kategori & makale aynı) */
.pkb-share-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px; /* svg boyutu için */
}

.pkb-share-btn svg {
  width: 20px;
  height: 20px;
}

/* ================================================= */
/* ====== YENİ ÖZELLİKLER STİLLERİ (FAQ, FEEDBACK, NAV, RELATED) ====== */
/* ================================================= */

/* --- 1. FAQ (SSS) Accordion Stilleri --- */
.pkb-faq-accordion {
    margin: 24px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.pkb-faq-item:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}
.pkb-faq-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background-color: #f9fafb;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    color: #111827;
    transition: background-color 0.2s;
}
.pkb-faq-toggle:hover {
    background-color: #f3f4f6;
}
.pkb-faq-chev {
    color: #9ca3af;
    transition: transform 0.2s ease-in-out;
}
.pkb-faq-item.is-open .pkb-faq-chev {
    transform: rotate(180deg);
}

/* >>> Animasyon için güncellendi <<< */
.pkb-faq-content {
    background-color: #ffffff;
    overflow: hidden;
    height: 0;                      /* kapalıyken görünmesin */
    opacity: 0;
    transition: height 260ms cubic-bezier(.2,.7,.2,1), opacity 200ms ease;
    will-change: height, opacity;
}
.pkb-faq-content-inner {
    padding: 20px;
    color: #374151;
    line-height: 1.6;
}
.pkb-faq-content-inner p:last-child {
    margin-bottom: 0;
}

/* Hareketi sevmeyen kullanıcılar için animasyonu kapat */
@media (prefers-reduced-motion: reduce) {
    .pkb-faq-content { transition: none; }
    .pkb-faq-chev { transition: none; }
}


/* --- 2. Feedback ("Yardımcı oldu mu?") Stilleri --- */
.pkb-feedback-wrap {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 32px;
}
.pkb-feedback-question {
    font-weight: 500;
    color: #374151;
    margin: 0 0 16px 0;
}
.pkb-feedback-buttons {
    display: inline-flex;
    gap: 12px;
}
.pkb-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.pkb-feedback-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}
.pkb-feedback-wrap.is-submitted .pkb-feedback-btn {
    cursor: not-allowed;
    opacity: 0.7;
}
.pkb-feedback-thanks {
    font-weight: 500;
    color: #166534; /* Yeşil renk */
}

/* --- 3. Previous/Next Makale Navigasyonu Stilleri --- */
.pkb-post-nav {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}
.pkb-post-nav-prev,
.pkb-post-nav-next {
    flex: 1;
    min-width: 0;
}
.pkb-post-nav-prev {
    border-right: 1px solid #e5e7eb;
}
.pkb-post-nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}
.pkb-post-nav a:hover {
    background-color: #f9fafb;
}
.pkb-post-nav-next a {
    justify-content: flex-end;
    text-align: right;
}
.pkb-post-nav a > div {
    display: flex;
    flex-direction: column;
}
.pkb-post-nav a span {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}
.pkb-post-nav a strong {
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}
.pkb-post-nav a svg {
    flex-shrink: 0;
    color: #9ca3af;
}

/* --- 4. Related Articles (İlgili Makaleler) Stilleri --- */
.pkb-related-articles {
    margin-bottom: 40px;
}
.pkb-related-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    border-top: 1px solid #e5e7eb;
    padding-top: 40px;
}
.pkb-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.pkb-related-card {
    display: block;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.pkb-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}
.pkb-related-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}
.pkb-related-card-meta {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    white-space: nowrap;     /* YENİ: Metnin alt satıra kaymasını engeller */
    overflow: hidden;        /* YENİ: Kartın dışına taşarsa gizler */
    text-overflow: ellipsis; /* YENİ: Sığmazsa sonuna ... ekler */
}

/* --- 5. Üç Nokta Menüsü Stilleri --- */
.pkb-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* Sağa yaslamak için */
    padding-left: 20px;
}
.pkb-actions-wrap {
    position: relative;
}
.pkb-actions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #6b7280;
    transition: background-color 0.2s, color 0.2s;
}
.pkb-actions-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
}
.pkb-actions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px;
    width: 160px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}
.pkb-actions-wrap.is-open .pkb-actions-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pkb-action-item {
    display: flex; /* Değişti */
    align-items: center; /* Yeni Eklendi */
    gap: 10px; /* Yeni Eklendi */
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    color: #374151;
}

.pkb-action-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* YENİ: İkonların stilleri için eklendi */
.pkb-action-item svg {
    flex-shrink: 0;
    color: #6b7280;
}

/* Makale Başlığı Altındaki Tarihin Mobil Uyum Sorunu İçin Düzeltme */
.single-kb_article .pkb-cat-header .pkb-cat-meta {
    white-space: nowrap;
}

/* ================================================= */
/* ====== GELİŞMİŞ AJAX ARAMA STİLLERİ (FİNAL) ====== */
/* ================================================= */

.pkb-search-wrap {
    position: relative;
    margin: 24px 0;
}
.pkb-search-input-wrap {
    position: relative;
}
.pkb-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.pkb-search-field {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}
.pkb-search-field:focus {
    outline: none;
    border-color: #03148C;
    box-shadow: 0 0 0 3px rgba(3, 20, 140, 0.1);
}
.pkb-search-spinner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #03148C;
    border-radius: 50%;
    animation: pkb-spin 1s linear infinite;
}
@keyframes pkb-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.pkb-search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 8px;
    display: none;
    overflow: hidden;
}
.pkb-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}
.pkb-results-tabs {
    display: flex;
    gap: 8px;
}
.pkb-tab-item {
    border: none;
    background: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}
.pkb-tab-item:hover {
    background-color: #eee;
}
.pkb-tab-item.is-active {
    background-color: #fff;
    color: #03148C;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.pkb-results-clear {
    border: none;
    background: none;
    color: #777;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.pkb-results-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}
.pkb-result-group {
    display: block; /* Başlangıçta hepsi görünür */
}
.pkb-result-item {
    display: block;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
}
.pkb-result-item:hover {
    background-color: #f3f4f6;
}
.pkb-result-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}
.pkb-result-meta {
    font-size: 12px;
    color: #6b7280;
}
.pkb-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

