/*
 * Page Turner Blog Styles
 * Fonts: Poppins only (matches home page)
 */

/* =====================
   Shared blog container
===================== */

.blog-container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

/* =====================
   Blog page background
===================== */

.blog-page,
.post-page {
  background: var(--color-bg);
  min-height: 100vh;
}

/* =====================
   Blog Hero (listing page)
===================== */

.blog-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.blog-hero-title {
  font-family: var(--font-body);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.12;
  margin: 0 0 1rem;
  white-space: normal;
}

.blog-hero-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--color-muted);
  font-weight: 300;
  margin: 0;
  max-width: 480px;
}

/* =====================
   Divider
===================== */

.blog-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 0;
}

/* =====================
   Filters
===================== */

.blog-filters-section {
  padding: 1.75rem 0 1.5rem;
}

.blog-filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.blog-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.blog-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.blog-search {
  width: 100%;
  padding: 0.6rem 0.85rem 0.6rem 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 100px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.blog-search:focus {
  border-color: var(--color-accent);
}

.blog-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  border-color: var(--color-heading);
  color: var(--color-heading);
}

.filter-pill.active {
  background: var(--color-heading);
  border-color: var(--color-heading);
  color: #fff;
}

/* =====================
   Ad Units
===================== */

.ad-unit {
  margin: 1.5rem 0;
  text-align: center;
  min-height: 50px;
}

.ad-unit-listing {
  margin: 0.75rem 0 1.5rem;
}

/* =====================
   Featured Post Card
===================== */

.featured-post-card {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}

.featured-post-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.featured-post-content {
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-post-labels {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-category {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.featured-post-title {
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-heading);
  margin: 0 0 0.85rem;
}

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

.featured-post-title a:hover {
  color: var(--color-accent);
}

.featured-post-excerpt {
  font-size: 0.925rem;
  color: var(--color-muted);
  line-height: 1.7;
  font-weight: 300;
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-post-meta {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.post-meta-sep { opacity: 0.4; }

.featured-read-more {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: gap 0.15s;
  gap: 0.25rem;
}

.featured-read-more:hover {
  gap: 0.5rem;
}

.featured-post-image-link {
  display: block;
}

.featured-post-image {
  height: 100%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
}

.featured-post-image-placeholder {
  background: #c0cdc7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-book-icon {
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-book-icon-sm {
  color: rgba(255, 255, 255, 0.45);
}

/* =====================
   Post Grid
===================== */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

/* =====================
   Post Card
===================== */

.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.post-card-image-link {
  display: block;
}

.post-card-image {
  height: 175px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.post-card-image-placeholder {
  background: #c8d4cf;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.45rem;
  display: block;
}

.post-card-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-heading);
  margin: 0 0 0.55rem;
}

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

.post-card-title a:hover {
  color: var(--color-accent);
}

.post-card-excerpt {
  font-size: 0.84rem;
  color: var(--color-muted);
  line-height: 1.6;
  font-weight: 300;
  margin: 0 0 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-meta {
  font-size: 0.77rem;
  color: #bbb;
  margin-top: auto;
}

/* =====================
   No results
===================== */

.no-results {
  text-align: center;
  color: var(--color-muted);
  padding: 3rem 1rem;
  font-size: 1rem;
}

/* =====================
   Blog page footer
===================== */

.blog-page-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 2rem 0;
  text-align: center;
  margin-top: 2rem;
}

.blog-page-footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 300;
}

.blog-page-footer .footer-links a {
  color: var(--color-muted);
  text-decoration: none;
}

.blog-page-footer .footer-links a:hover { color: var(--color-heading); }

.blog-posts-section {
  padding-bottom: 1rem;
}

/* =====================
   Post Page - Breadcrumb
===================== */

.breadcrumb {
  padding: 1rem 0 0;
}

.breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #bbb;
}

.breadcrumb-list a {
  color: #bbb;
  text-decoration: none;
}

.breadcrumb-list a:hover { color: var(--color-accent); }

.breadcrumb-list li[aria-current="page"] {
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* =====================
   Post Page - Header
===================== */

.post-header {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 0;
}

.post-header-inner {
  max-width: 780px;
}

.post-category-badge {
  display: inline-block;
  background: rgba(192, 92, 46, 0.1);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: background 0.15s;
}

.post-category-badge:hover {
  background: rgba(192, 92, 46, 0.18);
}

.post-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--color-heading);
  margin: 0 0 1.25rem;
  white-space: normal;
}

.post-excerpt {
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: #999;
  line-height: 1.75;
  font-weight: 300;
  margin: 0 0 2rem;
}

/* Author row */
.post-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.post-author-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-heading);
  line-height: 1.3;
}

.author-role {
  font-size: 0.8rem;
  color: #aaa;
  font-weight: 300;
}

.post-author-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.post-date {
  font-size: 0.84rem;
  color: #aaa;
  font-weight: 300;
}

.post-reading-time-badge {
  font-size: 0.84rem;
  color: var(--color-accent);
  font-weight: 500;
}

.post-header-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0 0 2.5rem;
}

/* =====================
   Post Page - Hero Image
===================== */

.post-hero-image {
  margin-bottom: 2.5rem;
}

.post-hero-img {
  width: 100%;
  max-width: 780px;
  height: auto;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  max-height: 460px;
}

/* =====================
   Post Body
===================== */

.post-body {
  max-width: 780px;
  padding-bottom: 2rem;
}

.post-body h2 {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: var(--color-heading);
  margin: 2.5rem 0 0.75rem;
  line-height: 1.3;
}

.post-body h3 {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--color-heading);
  margin: 2rem 0 0.6rem;
}

.post-body p {
  font-size: clamp(1rem, 1.25vw, 1.0625rem);
  line-height: 1.85;
  color: var(--color-muted);
  font-weight: 300;
  margin: 0 0 1.5rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
  margin: 0 0 1.5rem;
}

.post-body li {
  font-size: clamp(1rem, 1.25vw, 1.0625rem);
  line-height: 1.8;
  color: var(--color-muted);
  font-weight: 300;
  margin-bottom: 0.4rem;
}

.post-body strong {
  font-weight: 500;
  color: var(--color-heading);
}

.post-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover { text-decoration: none; }

.post-body blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
}

.post-body blockquote p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-muted);
  font-weight: 300;
}

.post-body hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 2.5rem 0;
}

.post-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* =====================
   Related Posts
===================== */

.related-posts {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.related-posts-title {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 1.75rem;
}

/* =====================
   Responsive
===================== */

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

  .featured-post-card {
    grid-template-columns: 1fr;
  }

  .featured-post-image {
    min-height: 200px;
    order: -1;
  }
}

@media (max-width: 640px) {
  .blog-filters-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-search-wrap {
    max-width: 100%;
    width: 100%;
  }

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

  .blog-hero-title {
    font-size: 2rem;
  }

  .post-title {
    font-size: 1.85rem;
  }

  .post-author-right {
    align-items: flex-start;
  }

  .post-author-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
}
