/* FBFoodSafety blog archive, tag, author, and post templates. */

.page-blogs,
.page-blog-post,
.page-tag,
.page-author {
  background: #fff;
}

#ai_blog,
#ai_post,
.archive-page {
  color: var(--color-text, #2c2e2a);
}

.blog-hero {
  position: relative;
  padding: 180px 0 80px;
  background: #0f1f13;
  overflow: hidden;
}

.blog-hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.blog-hero-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.blog-hero-label,
.post-section-badge,
.archive-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(142, 212, 98, 0.42);
  background: rgba(142, 212, 98, 0.16);
  color: var(--color-primary, #8ED462);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.blog-hero-title,
.post-hero-title,
.archive-title {
  font-family: var(--font-heading-condensed, var(--font-heading, "Inter", sans-serif));
  letter-spacing: 0;
}

.blog-hero-title {
  margin: 1.5rem 0 1rem;
  color: #fff;
  font-size: clamp(2.6rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
}

.blog-hero-desc {
  max-width: 660px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.05rem;
  line-height: 1.7;
}

.blog-tag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.blog-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.blog-filter-btn:hover,
.blog-filter-btn.active {
  background: var(--color-primary-hover, #368D32);
  border-color: var(--color-primary-hover, #368D32);
  color: #fff;
}

.blog-main {
  padding: 4.5rem 0;
  background: #fff;
}

.blog-container,
.archive-container {
  width: min(100% - 4rem, 1120px);
  margin: 0 auto;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
}

.blog-posts-col {
  min-width: 0;
}

.blog-section-header {
  margin-bottom: 2rem;
}

.blog-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  padding: 5px 16px;
  border-radius: 999px;
  background: #0f1f13;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.blog-section-title {
  margin: 0;
  color: var(--color-text, #2c2e2a);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.18;
}

.blog-search-wrap {
  position: relative;
  margin-bottom: 2rem;
}

.blog-search-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 46px 12px 20px;
  border: 1px solid rgba(15, 31, 19, 0.13);
  border-radius: 999px;
  background: var(--color-beige, #f5f2eb);
  color: var(--color-text, #2c2e2a);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.blog-search-input:focus {
  border-color: var(--color-primary-hover, #368D32);
  background: #fff;
}

.blog-search-icon {
  position: absolute;
  right: 17px;
  top: 50%;
  color: var(--color-primary-hover, #368D32);
  line-height: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
}

.post-card {
  min-width: 0;
}

.blog-card-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(15, 31, 19, 0.08);
  border-radius: var(--radius-lg, 16px);
  background: #fff;
  box-shadow: 0 6px 22px rgba(15, 31, 19, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.blog-card:hover .blog-card-shell {
  border-color: rgba(54, 141, 50, 0.2);
  box-shadow: 0 14px 40px rgba(15, 31, 19, 0.12);
  transform: translateY(-4px);
}

.blog-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eaf2e5;
}

.blog-card-image img,
.post-feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image img {
  transition: transform 0.45s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}

.blog-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #0f1f13;
  color: var(--color-primary, #8ED462);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.blog-card-tags,
.post-hero-tags,
.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag,
.post-hero-tag,
.post-tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--color-primary-light, rgba(142, 212, 98, 0.15));
  color: var(--color-primary-hover, #368D32);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.7px;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

.blog-card-title {
  margin: 0.85rem 0 0.6rem;
  color: var(--color-text, #2c2e2a);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0;
}

.blog-card-excerpt {
  display: -webkit-box;
  flex: 1;
  margin: 0 0 1.1rem;
  overflow: hidden;
  color: var(--color-text-muted, #6b7280);
  font-size: 0.9rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 31, 19, 0.08);
  color: var(--color-text-muted, #6b7280);
  font-size: 0.78rem;
  font-weight: 600;
}

.blog-meta-sep {
  opacity: 0.45;
}

.blog-sidebar {
  position: sticky;
  top: 118px;
}

.blog-sidebar-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg, 16px);
  background: var(--color-beige, #f5f2eb);
}

.blog-sidebar-title {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(15, 31, 19, 0.1);
  color: var(--color-text, #2c2e2a);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

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

.blog-tag-item {
  border-bottom: 1px solid rgba(15, 31, 19, 0.08);
}

.blog-tag-item:last-child {
  border-bottom: 0;
}

.blog-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 10px 0;
  color: var(--color-text, #2c2e2a);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.blog-tag-row:hover {
  color: var(--color-primary-hover, #368D32);
}

.blog-tag-count {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(15, 31, 19, 0.08);
  color: var(--color-text-muted, #6b7280);
  font-size: 0.72rem;
  font-weight: 700;
}

.blog-authors-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.blog-author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.blog-author-avatar,
.blog-author-avatar-placeholder,
.post-hero-avatar,
.post-author-avatar,
.post-avatar-placeholder {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.blog-author-avatar-placeholder,
.post-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-hover, #368D32);
  color: #fff;
  font-weight: 800;
}

.blog-author-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.blog-author-name {
  color: var(--color-text, #2c2e2a);
  font-size: 0.88rem;
  font-weight: 700;
}

.blog-author-posts {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.75rem;
}

.blog-empty-state {
  padding: 3rem 2rem;
  border: 1px solid rgba(15, 31, 19, 0.08);
  border-radius: var(--radius-lg, 16px);
  background: var(--color-bg-secondary, #f9fafb);
  text-align: center;
}

.blog-empty-state h3 {
  margin: 0 0 0.5rem;
  color: var(--color-text, #2c2e2a);
  font-size: 1.4rem;
  letter-spacing: 0;
}

.blog-empty-state p {
  margin: 0;
  color: var(--color-text-muted, #6b7280);
}

.blog-newsletter,
.post-newsletter {
  padding: 5.5rem 2rem;
  background: #0f1f13;
  color: #fff;
}

.blog-newsletter-inner,
.post-newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.blog-newsletter-badge,
.post-newsletter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(142, 212, 98, 0.32);
  background: rgba(142, 212, 98, 0.14);
  color: var(--color-primary, #8ED462);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.blog-newsletter-title,
.post-newsletter-title {
  margin: 0 0 1rem;
  color: #fff;
  font-family: var(--font-heading-condensed, var(--font-heading, "Inter", sans-serif));
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.blog-newsletter-desc,
.post-newsletter-desc {
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1rem;
  line-height: 1.7;
}

.blog-newsletter-actions,
.post-newsletter-actions,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.blog-newsletter-btn,
.post-newsletter-btn,
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--color-primary-hover, #368D32);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.blog-newsletter-btn:hover,
.post-newsletter-btn:hover,
.pagination a:hover {
  background: var(--color-primary-dark, #1a5e18);
  color: #fff;
}

.pagination {
  margin-top: 2.5rem;
}

.pagination span {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.9rem;
  font-weight: 700;
}

.archive-page {
  padding: 170px 0 5rem;
  background: #fff;
}

.archive-header {
  margin-bottom: 2.5rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid rgba(15, 31, 19, 0.08);
}

.archive-title {
  max-width: 860px;
  margin: 1rem 0 0.85rem;
  color: var(--color-text, #2c2e2a);
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-weight: 700;
  line-height: 1.05;
}

.archive-description {
  max-width: 720px;
  margin: 0;
  color: var(--color-text-muted, #6b7280);
  font-size: 1.08rem;
  line-height: 1.75;
}

.post-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 0%;
  height: 3px;
  background: var(--color-primary, #8ED462);
}

.site-post {
  background: #fff;
}

.post-hero {
  position: relative;
  padding: 210px 2rem 82px;
  overflow: hidden;
  background: #0f1f13;
  text-align: center;
}

.post-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.post-hero-tags {
  justify-content: center;
  margin-bottom: 1.75rem;
}

.post-hero-tag {
  border: 1px solid rgba(142, 212, 98, 0.4);
  background: rgba(142, 212, 98, 0.12);
  color: var(--color-primary, #8ED462);
}

.post-hero-tag:hover {
  background: var(--color-primary-hover, #368D32);
  border-color: var(--color-primary-hover, #368D32);
  color: #fff;
}

.post-hero-title {
  margin: 0 0 2.4rem;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.06;
}

.post-hero-meta {
  display: flex;
  justify-content: center;
}

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

.post-hero-avatar,
.post-avatar-placeholder {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(142, 212, 98, 0.35);
}

.post-hero-author-info {
  min-width: 0;
  text-align: left;
}

.post-hero-author-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.post-hero-author-name {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.post-hero-date {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.84rem;
  font-weight: 600;
}

.post-hero-dot {
  margin: 0 6px;
  opacity: 0.55;
}

.post-feature-wrap {
  padding: 0 2rem;
  background: linear-gradient(to bottom, #0f1f13 50%, #fff 50%);
}

.post-feature-container {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.post-feature-frame {
  overflow: hidden;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 18px 60px rgba(15, 31, 19, 0.24);
}

.post-feature-img {
  display: block;
  aspect-ratio: 16 / 8.8;
  max-height: 560px;
}

.post-content-section {
  padding: 4.5rem 2rem;
  background: #fff;
}

.post-content-container {
  max-width: 860px;
  margin: 0 auto;
}

.post-body {
  color: var(--color-text, #2c2e2a);
  font-family: var(--font-family, "Inter", sans-serif);
  font-size: 1.05rem;
  line-height: 1.85;
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 2.3em 0 0.75em;
  color: var(--color-text, #2c2e2a);
  font-family: var(--font-heading, "Inter", sans-serif);
  line-height: 1.22;
  letter-spacing: 0;
}

.post-body h2 {
  font-size: 1.75em;
}

.post-body h3 {
  font-size: 1.35em;
}

.post-body p {
  margin: 0 0 1.45em;
}

.post-body a {
  color: var(--color-primary-hover, #368D32);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-body blockquote {
  margin: 2.4em 0;
  padding: 1.15em 1.35em;
  border-left: 4px solid var(--color-primary-hover, #368D32);
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  background: var(--color-beige, #f5f2eb);
  color: var(--color-text-secondary, #4b5563);
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 2.5em 0;
  border-radius: var(--radius-md, 12px);
}

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

.post-body li {
  margin-bottom: 0.55em;
}

.post-body table {
  width: 100%;
  margin: 2em 0;
  border-collapse: collapse;
  font-size: 0.94em;
}

.post-body th,
.post-body td {
  padding: 0.8em 1em;
  border: 1px solid rgba(15, 31, 19, 0.12);
  text-align: left;
}

.post-body th {
  background: var(--color-beige, #f5f2eb);
  font-weight: 800;
}

.post-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(15, 31, 19, 0.08);
}

.post-share-label,
.post-tags-label,
.post-author-label {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.post-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(15, 31, 19, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text, #2c2e2a);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.post-share-btn:hover {
  background: var(--color-text, #2c2e2a);
  border-color: var(--color-text, #2c2e2a);
  color: #fff;
}

.post-tags-section {
  padding: 0 2rem;
  background: #fff;
}

.post-tags-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(15, 31, 19, 0.08);
}

.post-tag-pill {
  background: var(--color-beige, #f5f2eb);
  color: var(--color-text, #2c2e2a);
}

.post-tag-pill:hover {
  background: var(--color-text, #2c2e2a);
  color: #fff;
}

.post-author-section {
  padding: 4rem 2rem;
  background: var(--color-beige, #f5f2eb);
}

.post-author-container {
  max-width: 860px;
  margin: 0 auto;
}

.post-author-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg, 16px);
  background: #fff;
  box-shadow: 0 8px 30px rgba(15, 31, 19, 0.08);
}

.post-author-avatar,
.post-author-card .post-avatar-placeholder {
  width: 72px;
  height: 72px;
  border: 3px solid var(--color-beige, #f5f2eb);
}

.post-author-info {
  min-width: 0;
}

.post-author-name {
  display: inline-flex;
  margin-top: 0.25rem;
  color: var(--color-text, #2c2e2a);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.post-author-bio-text {
  margin: 0.6rem 0 0;
  color: var(--color-text-muted, #6b7280);
  font-size: 0.95rem;
  line-height: 1.7;
}

.post-related {
  padding: 5rem 2rem;
  background: #fff;
}

.post-related-container {
  max-width: 1120px;
  margin: 0 auto;
}

.post-related-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-related-title {
  margin: 0.85rem 0 0;
  color: var(--color-text, #2c2e2a);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .blog-sidebar-card {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 140px 0 58px;
  }

  .blog-hero-overlay {
    padding: 0 1.25rem;
  }

  .blog-container,
  .archive-container {
    width: min(100% - 2rem, 1120px);
  }

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

  .blog-main {
    padding: 3rem 0;
  }

  .blog-card-body {
    padding: 1.25rem;
  }

  .archive-page {
    padding-top: 140px;
  }

  .post-hero {
    padding: 155px 1.25rem 56px;
  }

  .post-hero-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .post-hero-author {
    flex-direction: column;
  }

  .post-hero-author-info,
  .post-hero-author-names {
    text-align: center;
    justify-content: center;
  }

  .post-feature-wrap {
    padding: 0 1rem;
  }

  .post-feature-img {
    aspect-ratio: 16 / 10.5;
  }

  .post-content-section,
  .post-author-section,
  .post-newsletter,
  .post-related {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

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