/* ============================================
   Form Elektrik — Blog (liste + detay yardımcıları)
   Açık tema · beyaz zemin · lacivert + cyan vurgu
   (styles.css değişkenlerine bağlı)
   ============================================ */

/* Alt sayfa başlık bölümü (header altı boşluk) */
.subpage-hero { padding-top: calc(var(--header-h) + 28px); padding-bottom: 0; }
.subpage-hero .section-head { margin-bottom: 18px !important; }
.subpage-hero .section-title { font-size: clamp(2rem, 4vw, 2.75rem) !important; }
.subpage-hero .section-lead { margin-top: 10px; }

/* ===== Araç çubuğu: arama + yazar + etiket ===== */
.blog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  margin-bottom: 36px;
}
.blog-search {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}
.blog-search .material-symbols-rounded {
  position: absolute;
  left: 14px;
  color: var(--text-faint);
  font-size: 18px;
  pointer-events: none;
}
.blog-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.blog-search input::placeholder { color: var(--text-faint); }
.blog-search input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(42,169,224,0.15);
}
.blog-toolbar select {
  height: 44px;
  min-width: 160px;
  padding: 0 16px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}
.blog-toolbar select:hover { border-color: var(--cyan); }
.blog-toolbar select option { background: #fff; color: var(--text); }
.blog-tag-select { position: relative; min-width: 190px; }
.blog-tag-select > button { width: 100%; height: 44px; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px 0 18px; border-radius: 100px; background: #fff; border: 1px solid var(--line-2); color: var(--text); font-size: 13px; font-weight: 700; font-family: var(--font); cursor: pointer; }
.blog-tag-select > button:hover, .blog-tag-select.open > button { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(42,169,224,0.12); }
.blog-tag-select > button .material-symbols-rounded { font-size: 20px; color: var(--text-faint); transition: transform .18s; }
.blog-tag-select.open > button .material-symbols-rounded { transform: rotate(180deg); }
.blog-tag-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: 260px; max-height: 280px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.96); box-shadow: 0 24px 60px -34px rgba(15,22,64,0.45); backdrop-filter: blur(12px); display: none; }
.blog-tag-select.open .blog-tag-menu { display: grid; gap: 6px; }
.blog-tag-option { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; color: var(--text-soft); font-size: 13px; }
.blog-tag-option:hover { background: var(--cyan-soft); color: var(--navy); }
.blog-tag-option input { width: 16px; height: 16px; accent-color: var(--cyan); }
.blog-tag-option span { font-weight: 700; }
.blog-tag-option em { font-style: normal; font-size: 11px; color: var(--text-faint); }

/* Seçili etiketler — her biri ayrı chip, satıra sığmazsa alt satıra kayar */
.blog-active-tags[hidden] { display: none !important; }
.blog-active-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.blog-active-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Tek etiket chip'i */
.blog-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 4px 0 12px;
  border-radius: 100px;
  background: var(--cyan);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(42,169,224,0.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.blog-active-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(42,169,224,0.28);
}
.blog-active-chip-text { white-space: nowrap; }
.blog-active-chip-x {
  background: rgba(255,255,255,0.18);
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.blog-active-chip-x:hover { background: rgba(255,255,255,0.38); }
.blog-active-chip-x .material-symbols-rounded { font-size: 15px; }

/* "Tümünü temizle" — chip'lerden görsel olarak ayrık, outline stil */
.blog-active-tags-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid rgba(42,169,224,0.35);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.blog-active-tags-clear:hover {
  background: rgba(42,169,224,0.08);
  border-color: var(--cyan);
}
.blog-active-tags-clear .material-symbols-rounded { font-size: 16px; }

/* ===== Öne çıkan (featured) yazı ===== */
.blog-featured-section { padding-top: 0; }
.blog-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--cyan-soft), var(--bg-soft));
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s ease, transform .35s cubic-bezier(0.16,1,0.3,1), box-shadow .3s ease;
}
.blog-featured:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-featured-cover {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
}
.blog-featured-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-featured-cover.no-img { display: flex; align-items: center; justify-content: center; }
.blog-featured-cover.no-img .material-symbols-rounded { font-size: 64px; color: rgba(255,255,255,0.5); }
.blog-featured-body { display: flex; flex-direction: column; gap: 14px; }
.blog-featured-eyebrow {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
}
.blog-featured-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0;
}
.blog-featured-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-row-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  flex-wrap: wrap;
}
.blog-row-author .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.blog-row-author-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cyan);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  flex-shrink: 0; overflow: hidden;
}
.blog-row-author-avatar.has-img { background: #fff; }
.blog-row-author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-row-author-name { font-weight: 600; color: var(--navy); }

/* ===== Liste (post-card grid — ana sayfayla aynı dil) ===== */
.blog-list-section .blog-grid { margin-top: 0; }
.post-card .post-thumb.no-img { display: flex; align-items: center; justify-content: center; }
.post-card .post-thumb.no-img .material-symbols-rounded { font-size: 40px; color: var(--cyan); opacity: .5; }
.post-card .post-body h3 {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .post-body p {
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-faint);
}
.post-card-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.post-author-pic { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-author-pic--letter {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cyan);
  color: #fff; font-weight: 700; font-size: 9px;
}
.post-author-inline { font-weight: 600; color: var(--text-soft); }

/* Boş durum */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-soft);
  grid-column: 1 / -1;
}
.blog-empty .material-symbols-rounded {
  font-size: 56px;
  opacity: .3;
  margin-bottom: 12px;
  display: block;
}

/* ===== Yazı detay (post.html) ===== */
.post-shell { max-width: 1320px; margin: 0 auto; padding: calc(var(--header-h) + 48px) 28px 80px; display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 780px); gap: 48px; align-items: start; justify-content: center; }
.post-wrap { max-width: 780px; margin: 0; padding: 0; }
.post-toc { position: sticky; top: calc(var(--header-h) + 22px); }
.post-toc-card { max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overflow-x: hidden; padding: 22px 14px 22px 22px; border: 1px solid rgba(212,219,232,0.86); border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,251,255,0.9)); box-shadow: 0 22px 55px -34px rgba(15,22,64,0.35); backdrop-filter: blur(14px); scroll-behavior: smooth; scrollbar-gutter: stable; }
/* İnce, markalı kaydırma çubuğu */
.post-toc-card { scrollbar-width: thin; scrollbar-color: rgba(42,169,224,0.45) transparent; }
.post-toc-card::-webkit-scrollbar { width: 8px; }
.post-toc-card::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.post-toc-card::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(42,169,224,0.55), rgba(42,169,224,0.3)); border-radius: 100px; border: 2px solid transparent; background-clip: padding-box; }
.post-toc-card::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--cyan), rgba(42,169,224,0.55)); background-clip: padding-box; border: 2px solid transparent; }
.post-toc-card b { display:flex; align-items:center; gap:10px; font-family: var(--font-head); color: var(--navy); margin-bottom: 16px; font-size: 1.1rem; position: sticky; top: -22px; padding: 4px 0 12px; background: linear-gradient(180deg, rgba(252,253,255,0.98) 70%, transparent); z-index: 2; }
.post-toc-card b::before { content:''; width:10px; height:10px; border-radius:50%; background:var(--cyan); box-shadow:0 0 0 5px rgba(42,169,224,0.12); flex: none; }
.post-toc nav { display:grid; gap: 3px; position: relative; }
.post-toc a { position: relative; display:block; padding: 9px 12px; border-radius: 12px; color: var(--text-soft); font-size: 13px; line-height: 1.4; border-left: 2px solid transparent; transition: background .18s, color .18s, border-color .18s, padding-left .18s; }
.post-toc a:hover { background: var(--cyan-soft); color: var(--cyan); border-left-color: rgba(42,169,224,0.5); }
.post-toc a.toc-h3 { margin-left: 12px; padding-left: 16px; font-size: 12.5px; color: #5d6985; }
.post-toc a.toc-h3::before { content:''; position:absolute; left: 4px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: rgba(120,132,158,0.4); transform: translateY(-50%); transition: background .18s; }
/* Okunan başlık vurgusu (scroll-spy) */
.post-toc a.toc-active { background: var(--cyan-soft); color: var(--cyan); font-weight: 600; border-left-color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(42,169,224,0.18); }
.post-toc a.toc-active.toc-h3::before { background: var(--cyan); }
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-soft); margin-bottom: 28px;
  transition: color .2s;
}
.post-back:hover { color: var(--cyan); }
.post-back .material-symbols-rounded { font-size: 18px; }
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px; font-size: 13px; color: var(--text-soft);
}
.post-meta .post-tag { font-family: var(--font); font-weight: 700; font-size: 11px; color: var(--cyan); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.post-meta .post-author-pic--letter { width: 26px; height: 26px; font-size: 10px; }
.post-meta .post-author-name { font-weight: 600; color: var(--navy); }
.post-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700; line-height: 1.14;
  letter-spacing: -0.02em; margin-bottom: 28px;
  color: var(--navy);
}
.post-cover { width: 100%; border-radius: var(--radius); margin-bottom: 36px; border: 1px solid var(--line); }
.post-content {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px; line-height: 1.85; color: var(--text);
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-family: var(--font-head); color: var(--navy); margin: 36px 0 16px; line-height: 1.3;
}
.post-content h2 { font-size: 26px; }
.post-content h3 { font-size: 21px; }
.post-content p { margin: 18px 0; }
.post-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 24px 0; }
.post-content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { margin: 18px 0 18px 26px; }
.post-content li { margin: 8px 0; }
.post-content blockquote {
  border-left: 3px solid var(--cyan); padding-left: 20px;
  margin: 24px 0; color: var(--text-soft); font-style: italic;
}
.post-content pre {
  background: var(--bg-soft-2); padding: 20px; border-radius: var(--radius-sm);
  overflow-x: auto; border: 1px solid var(--line); margin: 24px 0;
}
.post-content code { background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .88em; }
.post-content pre code { background: none; padding: 0; }
.post-content iframe { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 24px 0; }
.post-loading, .post-error { text-align: center; color: var(--text-soft); padding: 60px 0; }

/* İlgili yazılar */
.post-related { padding: 50px 0 70px; border-top: 1px solid var(--line); }
.post-related .wrap { max-width: 1100px; }
.post-related-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin: 0 0 24px; color: var(--navy); }
.post-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; }
  .post-shell { grid-template-columns: 1fr; padding-left: 20px; padding-right: 20px; }
  .post-toc { position: static; }
  .post-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .blog-tag-menu { left: 0; right: auto; width: 100%; }
  .post-related-grid { grid-template-columns: 1fr; }
}
