/* Blog Styles
   Archive grid, single post, sidebar, pagination
   Uses CSS variables from main.css */

/* ========================================
   BLOG ARCHIVE PAGE
   ======================================== */
.blog-archive {
  padding: 80px 0 60px;
}

.blog-archive .section-title {
  text-align: center;
  margin-bottom: 48px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ========================================
   POST CARD
   ======================================== */
.post-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.post-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--primary, #800020);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.post-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--dark, #0d0d0d);
  margin: 0 0 10px;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--primary, #800020);
}

.post-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted, #6b7280);
  margin: 0 0 16px;
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}

.post-card__date {
  font-weight: 500;
}

.post-card__read-more {
  font-weight: 600;
  color: var(--primary, #800020);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card__read-more:hover {
  color: var(--secondary, #D4AF37);
}

/* ========================================
   SINGLE POST
   ======================================== */
.single-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 20px 60px;
}

.single-post__header {
  text-align: center;
  margin-bottom: 40px;
}

.single-post__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--primary, #800020);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.single-post__title {
  font-family: 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark, #0d0d0d);
  margin: 0 0 16px;
}

.single-post__meta {
  font-size: 0.9rem;
  color: var(--text-muted, #6b7280);
}

.single-post__meta span + span::before {
  content: '\00B7';
  margin: 0 8px;
}

.single-post__featured-image {
  width: 100%;
  border-radius: var(--radius-lg, 12px);
  margin-bottom: 40px;
}

/* ========================================
   ARTICLE CONTENT TYPOGRAPHY
   ======================================== */
.post-content {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text, #1f2937);
}

.post-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark, #0d0d0d);
  margin: 48px 0 16px;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark, #0d0d0d);
  margin: 36px 0 12px;
  line-height: 1.35;
}

.post-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark, #0d0d0d);
  margin: 28px 0 10px;
  line-height: 1.4;
}

.post-content p {
  margin: 0 0 20px;
}

.post-content a {
  color: var(--primary, #800020);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.post-content a:hover {
  color: var(--secondary, #D4AF37);
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.post-content ul {
  list-style: disc;
}

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

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--primary, #800020);
  background: rgba(128, 0, 32, 0.04);
  border-radius: 0 var(--radius-lg, 12px) var(--radius-lg, 12px) 0;
  font-style: italic;
  color: var(--text, #1f2937);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary, #800020);
}

.post-content pre {
  margin: 24px 0;
  padding: 20px;
  background: var(--dark, #0d0d0d);
  border-radius: var(--radius-lg, 12px);
  overflow-x: auto;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: #e5e7eb;
  font-size: 0.88rem;
  line-height: 1.7;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg, 12px);
  margin: 24px 0;
}

.post-content figure {
  margin: 32px 0;
}

.post-content figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  margin-top: 8px;
}

/* ========================================
   AUTHOR BOX
   ======================================== */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 56px;
  padding: 28px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg, 12px);
  background: rgba(0, 0, 0, 0.02);
}

.author-box__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box__name {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark, #0d0d0d);
  margin: 0 0 4px;
}

.author-box__role {
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  margin: 0 0 10px;
}

.author-box__bio {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text, #1f2937);
  margin: 0;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.pagination a {
  color: var(--text, #1f2937);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
  background: var(--primary, #800020);
  color: #fff;
  border-color: var(--primary, #800020);
}

.pagination .current,
.pagination .page-numbers.current {
  background: var(--primary, #800020);
  color: #fff;
  border: 1px solid var(--primary, #800020);
}

.pagination .dots {
  border: none;
  color: var(--text-muted, #6b7280);
}

.pagination .prev,
.pagination .next {
  font-weight: 700;
}

/* ========================================
   SIDEBAR WIDGETS
   ======================================== */
.blog-sidebar {
  padding-top: 16px;
}

.widget {
  margin-bottom: 36px;
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg, 12px);
}

.widget-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark, #0d0d0d);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary, #800020);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  font-size: 0.9rem;
  color: var(--text, #1f2937);
  text-decoration: none;
  transition: color 0.2s ease;
}

.widget ul li a:hover {
  color: var(--primary, #800020);
}

.widget__search-form {
  display: flex;
  gap: 8px;
}

.widget__search-input {
  flex: 1;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.widget__search-input:focus {
  border-color: var(--primary, #800020);
}

.widget__search-btn {
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary, #800020);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.widget__search-btn:hover {
  background: var(--secondary, #D4AF37);
}

.widget__tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.widget__tag-list a {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text, #1f2937);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.widget__tag-list a:hover {
  background: var(--primary, #800020);
  color: #fff;
  border-color: var(--primary, #800020);
}

/* ========================================
   LAYOUT WITH SIDEBAR
   ======================================== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    order: 2;
  }
}

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

  .blog-archive {
    padding: 60px 0 40px;
  }

  .single-post {
    padding: 60px 16px 40px;
  }

  .single-post__title {
    font-size: 1.6rem;
  }

  .post-content h2 {
    font-size: 1.35rem;
  }

  .post-content h3 {
    font-size: 1.15rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .post-card__body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .single-post__title {
    font-size: 1.4rem;
  }

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}
