/**
 * Blog - Zenterra Theme
 * Colors: #343A40 (dark), #3E87CB (accent blue)
 */

/* ========================================
   BLOG LISTING (home, archive)
   ======================================== */
.blog-listing #primary {
  width: 100%;
  max-width: 100%;
}
.blog-listing .site-main {
  padding: 0;
}

/* Blog page header */
.blog-page-header {
  background: #343A40;
  color: #fff;
  padding: 50px 0 45px;
  margin-bottom: 50px;
}
.blog-page-header .blog-page-title {
  color: #fff;
  font-size: 2.5em;
  margin: 0 0 8px 0;
  font-weight: 600;
}
.blog-page-header .blog-page-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1em;
  margin: 0;
}

/* Archive header (category, tag, etc.) */
.blog-listing .page-header {
  background: #f8f9fa;
  border-bottom: 3px solid #3E87CB;
  padding: 40px 0 35px;
  margin-bottom: 45px;
}
.blog-listing .page-header .page-title {
  color: #343A40;
  font-size: 2em;
  margin: 0 0 8px 0;
}
.blog-listing .page-header .archive-description {
  color: #555;
  margin-top: 8px;
}

/* Blog posts grid */
.blog-posts-wrapper {
  padding-bottom: 60px;
}
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

/* Blog card */
.blog-card {
  margin: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.blog-card:hover {
  box-shadow: 0 8px 30px rgba(52, 58, 64, 0.12);
  border-color: #3E87CB;
}
.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Card image */
.blog-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f0;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8eef5 0%, #f0f4f8 100%);
}
.placeholder-icon {
  font-size: 3em;
  opacity: 0.4;
}

/* Card content */
.blog-card-content {
  padding: 24px 26px 28px;
}
.blog-card-meta {
  margin-bottom: 10px;
}
.blog-card-date {
  color: #3E87CB;
  font-size: 0.9em;
  font-weight: 500;
}
.blog-card-title {
  color: #343A40;
  font-size: 1.35em;
  margin: 0 0 12px 0;
  font-weight: 600;
  line-height: 1.35;
  transition: color 0.2s ease;
}
.blog-card:hover .blog-card-title {
  color: #3E87CB;
}
.blog-card-excerpt {
  color: #555;
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 14px;
}
.blog-card-excerpt p {
  margin: 0;
}
.blog-card-read-more {
  color: #3E87CB;
  font-weight: 600;
  font-size: 0.95em;
}
.blog-card-read-more::after {
  content: ' →';
}

/* Pagination */
.blog-posts-wrapper .pagination,
.blog-posts-wrapper .nav-links {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e8e8e8;
  text-align: center;
}
.blog-posts-wrapper .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  margin: 0 4px;
  color: #343A40;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.blog-posts-wrapper .page-numbers:hover,
.blog-posts-wrapper .page-numbers.current {
  background: #3E87CB;
  color: #fff;
  border-color: #3E87CB;
}

/* ========================================
   SINGLE POST
   ======================================== */
.single-post-page #primary {
  width: 100%;
  max-width: 100%;
}
.single-post-page .site-main {
  padding: 0;
}

/* Single post header */
.single-post-header {
  background: #343A40;
  color: #fff;
  padding: 45px 0 40px;
}
.single-post-meta {
  margin-bottom: 12px;
  font-size: 0.95em;
}
.single-post-date {
  color: rgba(255, 255, 255, 0.9);
}
.single-post-categories {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}
.single-post-categories a {
  color: #3E87CB;
}
.single-post-title {
  color: #fff;
  font-size: 2.25em;
  margin: 0 0 12px 0;
  font-weight: 600;
  line-height: 1.25;
}
.single-post-excerpt {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1em;
  line-height: 1.5;
  margin-top: 8px;
}
.single-post-excerpt p {
  margin: 0;
}

/* Featured image */
.single-post-featured-image {
  max-height: 450px;
  overflow: hidden;
  background: #f0f0f0;
}
.single-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Post content */
.single-post-content {
  padding: 45px 0 60px;
  max-width: 720px;
  margin: 0 auto;
}
.single-post-content .entry-content {
  color: #343A40;
  font-size: 1.05em;
  line-height: 1.75;
}
.single-post-content .entry-content h2 {
  color: #343A40;
  font-size: 1.5em;
  margin: 36px 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #3E87CB;
}
.single-post-content .entry-content h3 {
  color: #343A40;
  font-size: 1.25em;
  margin: 28px 0 10px 0;
}
.single-post-content .entry-content p {
  margin: 0 0 18px 0;
}
.single-post-content .entry-content a {
  color: #3E87CB;
}
.single-post-content .entry-content a:hover {
  color: #343A40;
}
.single-post-content .page-links {
  margin-top: 24px;
  color: #707070;
}

/* Post footer / tags */
.single-post-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
  font-size: 0.95em;
  color: #707070;
}
.single-post-footer a {
  color: #3E87CB;
}
.tags-label {
  font-weight: 600;
  margin-right: 8px;
}

/* Post navigation */
.post-navigation {
  margin: 40px 0 60px;
  padding: 25px 0;
  border-top: 1px solid #e8e8e8;
}
.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.post-navigation a {
  color: #3E87CB;
  text-decoration: none;
}
.post-navigation a:hover {
  color: #343A40;
}
.post-navigation .nav-subtitle {
  display: block;
  font-size: 0.85em;
  color: #707070;
  margin-bottom: 4px;
}

/* Archive page (uses blog layout) */
.blog-listing.archive .blog-page-header {
  display: none;
}
.blog-listing.archive .page-header {
  margin-top: 0;
}

/* No results */
.blog-listing .no-results {
  padding: 60px 0;
  text-align: center;
}
.blog-listing .no-results .page-title {
  color: #343A40;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 991px) {
  .blog-posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
@media (max-width: 767px) {
  .blog-page-header {
    padding: 35px 0 30px;
  }
  .blog-page-header .blog-page-title {
    font-size: 2em;
  }
  .single-post-header {
    padding: 35px 0 30px;
  }
  .single-post-title {
    font-size: 1.75em;
  }
  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .blog-card-content {
    padding: 20px;
  }
  .single-post-content {
    padding: 35px 0 50px;
  }
}
