/* Blog-specific styles. Loaded in addition to /styles.css on every blog page. */

body.blog-page {
  padding-top: 76px;
}

body.blog-page .site-header {
  color: var(--ink);
  background: rgba(248, 248, 243, 0.96);
  box-shadow: 0 10px 34px rgba(23, 32, 27, 0.08);
  backdrop-filter: blur(18px);
}

.blog-hero {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 6vw, 84px) clamp(48px, 7vw, 76px);
  background:
    linear-gradient(90deg, rgba(23, 43, 33, 0.88) 0%, rgba(23, 43, 33, 0.6) 42%, rgba(23, 43, 33, 0.15) 75%),
    var(--leaf) url("../assets/blog/hero-orchard.jpg") center 60% / cover no-repeat;
  color: var(--white);
}

.blog-hero .eyebrow {
  color: #f1c66d;
}

.blog-hero h1 {
  max-width: 16ch;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
}

.blog-hero p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: clamp(28px, 4vw, 40px) clamp(20px, 6vw, 84px) 0;
}

.filter-btn {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.filter-btn:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.filter-btn.is-active {
  color: var(--white);
  border-color: var(--leaf);
  background: var(--leaf);
}

.post-list {
  display: grid;
  gap: 18px;
  padding: clamp(48px, 7vw, 84px) clamp(20px, 6vw, 84px);
}

.post-list-empty {
  color: var(--muted);
  font-size: 1.02rem;
}

.post-card {
  display: grid;
  gap: 10px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--line);
  background: var(--white);
  transition: box-shadow 160ms ease;
}

.post-card:hover {
  box-shadow: 0 16px 42px rgba(23, 32, 27, 0.08);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-tag {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tag-orchard-updates {
  color: #2f5f45;
  background: #e4efe1;
}

.tag-precision-ag-farming-tech {
  color: #1d4e5e;
  background: #d9eaf0;
}

.tag-business-expansion {
  color: #7a581b;
  background: #f6e9d3;
}

.tag-market-insights {
  color: #f1c66d;
  background: #243629;
}

.post-card h2 {
  margin-bottom: 4px;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
}

.post-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.post-card .text-link {
  margin-top: 8px;
}

.post-header {
  padding: clamp(48px, 7vw, 84px) clamp(20px, 6vw, 84px) clamp(32px, 5vw, 54px);
  border-bottom: 1px solid var(--line);
  background: #fbfbf7;
}

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

.post-header h1 {
  max-width: 20ch;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.06;
}

.post-image {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 54px) clamp(20px, 6vw, 84px) 0;
}

.post-image img {
  width: 100%;
  height: auto;
}

.post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 6vw, 84px);
}

.post-body p {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.75;
}

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

.post-sources {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 84px) clamp(40px, 6vw, 64px);
}

.post-sources h2 {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.post-sources ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
}

.post-sources a {
  color: var(--leaf);
  font-weight: 700;
  text-decoration: underline;
}

.post-back {
  padding: 0 clamp(20px, 6vw, 84px) clamp(48px, 7vw, 72px);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: clamp(8px, 2vw, 16px) 0 clamp(48px, 7vw, 72px);
  padding: 24px clamp(20px, 6vw, 84px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
}

.post-nav-next {
  align-items: flex-end;
  text-align: right;
  grid-column: 3;
}

.post-nav-prev {
  grid-column: 1;
}

.post-nav-empty {
  grid-column: 1;
}

.post-nav-next.post-nav-empty {
  grid-column: 3;
}

.post-nav-label {
  color: var(--field);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-nav-title {
  overflow: hidden;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-nav-link:hover .post-nav-title {
  text-decoration: underline;
}

.post-nav-all {
  grid-column: 2;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.post-nav-all:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

@media (max-width: 640px) {
  .post-nav {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .post-nav-prev,
  .post-nav-next,
  .post-nav-all,
  .post-nav-empty {
    grid-column: 1;
  }

  .post-nav-next {
    align-items: center;
    text-align: center;
  }

  .post-nav-title {
    max-width: 100%;
    white-space: normal;
  }

  .post-nav-empty {
    display: none;
  }
}

@media (max-width: 520px) {
  body.blog-page {
    padding-top: 68px;
  }
}
