/**
 * SEO Blog — panel.css değişkenleriyle (arka plan, tipografi, vurgu).
 */

body.app-blog {
  font-family: var(--font, "Plus Jakarta Sans", system-ui, sans-serif);
}

body.app-blog .main.main--blog {
  background: var(--bg-deep);
  padding-top: 2rem;
  padding-bottom: 4rem;
}

body.app-blog .topbar {
  background: rgba(18, 18, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body.app-blog .topbar .logo,
body.app-blog .topbar-nav a {
  color: var(--text);
}

body.app-blog .topbar-nav a:hover {
  color: #fff;
}

body.app-blog .topbar-nav a.is-active,
body.app-blog .topbar-nav a.topbar-blog.is-active {
  color: #ddd6fe;
}

.blog-empty a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-empty a:hover {
  color: #ddd6fe;
}

/* —— Arşiv —— */
.blog {
  max-width: min(72rem, 100%);
  margin: 0 auto;
}

.blog__layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 980px) {
  .blog__layout {
    grid-template-columns: 18.5rem minmax(0, 1fr);
    align-items: start;
  }

  .blog__aside {
    position: sticky;
    top: 1.25rem;
  }

  /* Yazı detay: içerik solda, kategori yan sütunu sağda */
  .blog__layout--post {
    grid-template-columns: minmax(0, 1fr) 18.5rem;
  }

  .blog__main--post {
    min-width: 0;
  }
}

.blog-side__back {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.blog-side__back:hover {
  color: #ddd6fe;
  border-bottom-color: var(--accent-soft);
}

.blog-cats__link--in-post {
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--text);
  background: rgba(139, 92, 246, 0.08);
}

.blog__main--post .blog-article {
  max-width: 100%;
  margin: 0;
}

.blog-side {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.blog-side__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.blog-side__empty {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog__head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.blog-cats--side {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0;
}

.blog-cats__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.blog-cats--side .blog-cats__link {
  width: 100%;
  justify-content: space-between;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.blog-cats__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-cats__link:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.35);
}

.blog-cats__link.is-active {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, var(--accent));
  border-color: transparent;
}

.blog-cats__count {
  opacity: 0.75;
  font-weight: 700;
}

.blog__label {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.blog__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.blog__dek {
  margin: 0.65rem 0 0;
  max-width: 36rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.blog__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .blog__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 1000px) {
  .blog__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-card--has-thumb {
  padding-top: 0;
}

.blog-card__thumb {
  margin: 0 -1.2rem 1rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.2);
}

.blog-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card:hover {
  border-color: rgba(139, 92, 246, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.blog-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.blog-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.8125rem;
  line-height: 1.58;
  color: var(--text-muted);
}

.blog-card__more {
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* Sayfalama */
.blog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.blog-pager__link,
.blog-pager__span {
  min-width: 2.5rem;
  padding: 0.45rem 0.65rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.blog-pager__link {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.blog-pager__link:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.35);
}

.blog-pager__current {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, var(--accent));
  border: 1px solid transparent;
}

.blog-pager__ellipsis {
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.blog-pager__info {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

/* —— Tek yazı —— */
.blog-article {
  max-width: min(56rem, 100%);
  margin: 0 auto;
}

.blog-article__breadcrumb {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.blog-article__breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}

.blog-article__breadcrumb a:hover {
  color: #ddd6fe;
}

.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.blog-article__cat,
.blog-article__breadcrumb a {
  color: var(--accent);
}

.blog-article__cat {
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}

.blog-article__cat:hover {
  color: #ddd6fe;
}

.blog-article__title {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--text);
}

.blog-article__cover {
  margin: 0 0 1.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 21 / 9;
  max-height: min(22rem, 52vh);
  background: var(--bg-panel);
}

.blog-article__cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(22rem, 52vh);
  object-fit: cover;
}

.blog-article__lead {
  margin: 0 0 2rem;
  padding-bottom: 1.75rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Okuma gövdesi */
.blog-prose {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
}

.blog-prose > *:first-child {
  margin-top: 0;
}

.blog-prose > *:last-child {
  margin-bottom: 0;
}

.blog-prose p {
  margin: 0 0 1.1rem;
}

.blog-prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.blog-prose h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.blog-prose h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
}

.blog-prose li {
  margin-bottom: 0.35rem;
}

.blog-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139, 92, 246, 0.45);
}

.blog-prose a:hover {
  color: #ddd6fe;
}

.blog-prose blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(139, 92, 246, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.blog-prose blockquote p {
  margin: 0;
}

.blog-prose code {
  font-size: 0.84em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.blog-prose pre {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.blog-prose pre code {
  padding: 0;
  border: none;
  background: none;
}

.blog-prose table {
  width: 100%;
  margin: 1.1rem 0;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.blog-prose th,
.blog-prose td {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
}

.blog-prose th {
  background: var(--bg-panel);
  font-weight: 600;
  text-align: left;
}

.blog-prose hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.blog-prose figure {
  margin: 1.25rem 0;
}

.blog-prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.blog-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Boş / hata */
.blog-empty {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.blog-empty strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1rem;
}

@media (max-width: 768px) {
  body.app-blog .main.main--blog {
    padding-top: 1.25rem;
  }
}
