/* ═══════════════════════════════════════════════════════════════════════════
   blog.css — Blog listesi ve yazı sayfası
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Blog Listesi ────────────────────────────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--wd-border-color-light);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.blog-card:hover {
  box-shadow: var(--wd-shadow);
  transform: translateY(-2px);
}

.blog-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--wd-gray-200);
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__body {
  padding: 18px 20px 22px;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--wd-text-light);
  margin-bottom: 10px;
}

.blog-card__meta .category {
  color: var(--wd-primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card__meta .date::before {
  content: '|';
  margin-right: 12px;
  opacity: 0.4;
}

.blog-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__title a {
  color: var(--wd-heading-color);
  transition: color 0.2s ease;
}

.blog-card__title a:hover {
  color: var(--wd-primary-color);
}

.blog-card__excerpt {
  font-size: 13px;
  color: var(--wd-gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-card__read-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--wd-primary-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-card__read-more:hover {
  color: var(--wd-primary-dark);
}

.blog-card__read-time {
  font-size: 11px;
  color: var(--wd-text-light);
}

/* ── Yazı Sayfası ────────────────────────────────────────────────────────── */

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
  align-items: start;
}

.post-header {
  margin-bottom: 30px;
}

.post-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--wd-text-light);
  margin-bottom: 14px;
}

.post-header__category {
  background: var(--wd-primary-color);
  color: #fff;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-header__category a {
  color: inherit;
}

.post-header__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.post-header__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-header__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.post-header__author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--wd-heading-color);
}

.post-featured-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
  margin-bottom: 30px;
}

/* Yazı İçeriği */
.post-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--wd-gray-700);
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--wd-heading-color);
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 28px;
  margin-bottom: 10px;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content ul,
.post-content ol {
  margin: 14px 0 18px 24px;
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  display: block;
}

.post-content blockquote {
  border-left: 4px solid var(--wd-primary-color);
  padding: 14px 20px;
  background: var(--wd-gray-100);
  margin: 20px 0;
  font-style: italic;
  color: var(--wd-gray-700);
}

.post-content a {
  color: var(--wd-primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--wd-primary-dark);
}

.post-content code {
  background: var(--wd-gray-100);
  padding: 2px 6px;
  font-size: 13px;
  border-radius: 3px;
  font-family: monospace;
}

.post-content table {
  margin: 20px 0;
  border: 1px solid var(--wd-border-color);
}

.post-content th {
  background: var(--wd-gray-100);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--wd-border-color);
  font-size: 13px;
}

.post-content td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--wd-border-color-light);
}

/* Yazı Alt Bilgi */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--wd-border-color);
}

.post-tag {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--wd-border-color-dark);
  color: var(--wd-gray-700);
  border-radius: 20px;
  transition: var(--wd-transition);
}

.post-tag:hover {
  background: var(--wd-primary-color);
  border-color: var(--wd-primary-color);
  color: #fff;
}

/* Paylaş */
.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.post-share__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wd-text-light);
}

.post-share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--wd-gray-200);
  color: var(--wd-gray-700);
  font-size: 15px;
  border-radius: 50%;
  transition: var(--wd-transition);
}

.post-share__link:hover {
  background: var(--wd-primary-color);
  color: #fff;
}

/* İlgili Yazılar */
.related-posts {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--wd-border-color);
}

.related-posts .blog-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Blog + Sidebar Layout ───────────────────────────────────────────────── */

.blog-layout,
.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 50px;
  align-items: flex-start;
}

.blog-main,
.blog-post-main {
  min-width: 0;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: calc(var(--wd-header-total-height, 154px) + 20px);
}

.blog-sidebar__title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wd-primary-color);
  color: var(--wd-heading-color);
}

.blog-sidebar__widget {
  margin-bottom: 30px;
}

.blog-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--wd-text-color);
  border-bottom: 1px solid var(--wd-border-color-light);
  transition: color 0.15s ease;
}

.blog-cat-link span {
  font-size: 12px;
  color: var(--wd-text-light);
  background: var(--wd-gray-100);
  padding: 1px 7px;
  border-radius: 10px;
}

.blog-cat-link:hover,
.blog-cat-link.active {
  color: var(--wd-primary-color);
}

.blog-cat-link.active {
  font-weight: 700;
}

/* ── Blog Yazısı ─────────────────────────────────────────────────────────── */

.blog-post {
  padding: 30px 0 60px;
}

.blog-post__hero {
  margin-bottom: 28px;
  overflow: hidden;
  max-height: 480px;
}

.blog-post__hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.blog-post__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--wd-text-light);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.blog-post__meta time {
  color: var(--wd-primary-color);
  font-weight: 600;
}

.blog-post__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--wd-heading-color);
  margin-bottom: 24px;
}

.blog-post__content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--wd-text-color);
  margin-bottom: 36px;
}

.blog-post__content h2 {
  font-size: 1.4rem;
  margin: 32px 0 14px;
}

.blog-post__content h3 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
}

.blog-post__content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

.blog-post__content ul,
.blog-post__content ol {
  padding-left: 1.5em;
  margin: 12px 0;
}

.blog-post__content li {
  margin-bottom: 6px;
}

.blog-post__content blockquote {
  border-left: 4px solid var(--wd-primary-color);
  padding-left: 16px;
  margin: 20px 0;
  color: var(--wd-text-light);
  font-style: italic;
}

.blog-post__share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--wd-border-color-light);
  margin-top: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wd-text-light);
}

.blog-post__share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--wd-border-color);
  border-radius: 50%;
  color: var(--wd-text-color);
  transition: background 0.15s ease, color 0.15s ease;
}

.blog-post__share a:hover {
  background: var(--wd-primary-color);
  border-color: var(--wd-primary-color);
  color: #fff;
}

/* Blog son yazılar (sidebar) */
.blog-recent {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-recent__item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--wd-border-color-light);
  align-items: flex-start;
}

.blog-recent__thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  overflow: hidden;
}

.blog-recent__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-recent__info {
  min-width: 0;
}

.blog-recent__info a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wd-heading-color);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-recent__info small {
  font-size: 11px;
  color: var(--wd-text-light);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-layout,
  .blog-layout,
  .blog-post-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  .related-posts .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-post__title {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-header__title {
    font-size: 1.5rem;
  }

  .related-posts .blog-grid {
    grid-template-columns: 1fr;
  }
}
