/* blog.css - Blog Templates (Section 23) */

/* --------------------------------------------------------------------------
   23. Blog Templates
   -------------------------------------------------------------------------- */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.blog-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.5s ease, transform 0.5s ease;
  will-change: transform;
}

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

.blog-card__link { display: block; color: inherit; }
.blog-card__link:hover { color: inherit; }

.blog-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg);
}

.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.blog-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8edf5, #d4dce9);
}

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

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.blog-card__date {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-family: 'Georgia', serif;
}

.blog-card__cat {
  font-size: 0.7rem;
  background: rgba(61, 155, 140, 0.12);
  color: var(--color-teal);
  padding: 2px 10px;
  border-radius: 50px;
  font-weight: 500;
}

.blog-card__title {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.blog-card__excerpt {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.7;
}

/* Sidebar */
.blog-sidebar { position: sticky; top: calc(var(--header-height) + 24px); }

.widget {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 0.95rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

.widget-cat-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.widget-cat-list li:last-child { border-bottom: none; }
.widget-cat-list a { color: var(--color-text); display: flex; justify-content: space-between; }
.widget-cat-list a:hover { color: var(--color-navy); }

.widget-recent-list { display: flex; flex-direction: column; gap: 14px; }

.widget-recent-list li { display: flex; flex-direction: column; gap: 4px; }

.widget-recent-list a { font-size: 0.875rem; color: var(--color-text); line-height: 1.5; }
.widget-recent-list a:hover { color: var(--color-navy); }

.widget-recent-list time { font-size: 0.75rem; color: var(--color-text-light); font-family: 'Georgia', serif; }

/* Pagination */
.pagination { margin-top: 40px; }

.pagination .page-numbers {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.pagination .page-numbers li { display: block; }

.pagination .page-numbers a,
.pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  transition: all var(--transition);
}

.pagination .page-numbers a:hover,
.pagination .page-numbers .current {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

/* Single Post */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

.post-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  line-height: 1.4;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-meta--header { margin-bottom: 16px; }

.post-meta__date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Georgia', serif;
}

.post-meta__cat {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  padding: 3px 12px;
  border-radius: 50px;
}

.post-article { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }

.post-thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-content {
  padding: 40px;
  font-size: 1rem;
  line-height: 1.9;
}

.entry-content h2 { font-size: 1.4rem; margin: 2em 0 0.8em; padding-bottom: 8px; border-bottom: 2px solid var(--color-border); }
.entry-content h3 { font-size: 1.15rem; margin: 1.8em 0 0.7em; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 1.5em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { color: var(--color-teal); text-decoration: underline; }
.entry-content img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.entry-content blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 4px solid var(--color-teal);
  background: rgba(61, 155, 140, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-tags {
  padding: 24px 40px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
}

.post-tag {
  font-size: 0.8rem;
  color: var(--color-text-light);
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  transition: all var(--transition);
}

.post-tag:hover { border-color: var(--color-navy); color: var(--color-navy); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 40px;
  border-top: 1px solid var(--color-border);
}

.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}

.post-nav__link:hover { background: rgba(232, 113, 74, 0.06); color: inherit; }

.post-nav__next { text-align: right; }

.post-nav__direction {
  font-size: 0.75rem;
  color: var(--color-teal);
  font-weight: 500;
}

.post-nav__title {
  font-size: 0.875rem;
  color: var(--color-navy);
  line-height: 1.5;
}

.post-back {
  padding: 24px 40px;
  border-top: 1px solid var(--color-border);
}

.no-posts {
  padding: 60px;
  text-align: center;
  color: var(--color-text-light);
  background: var(--color-white);
  border-radius: var(--radius-lg);
}
