/* ===== URF Blog base styles (safe, additive to existing theme) ===== */

:root {
  --urf-accent: #0c9514;         /* matches site green */
  --urf-ink: #111827;            /* near-black text */
  --urf-muted: #6b7280;          /* gray body text */
  --urf-card-bg: #ffffff;
  --urf-card-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* --- Hero --- */
.blog-hero {
  position: relative;
  min-height: 42vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.blog-hero .hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.6);
}
.blog-hero .hero-inner {
  position: relative; z-index: 1; padding: 3rem 1rem;
}
.blog-hero h1 {
  font-weight: 800; letter-spacing: .2px; margin: 0 0 .5rem;
}
.blog-hero p {
  margin: 0; font-size: 1.125rem; opacity: .95;
}

/* --- Subscribe / CTA box --- */
.subscribe-box {
  background: #3f2b6f;          /* deep purple accent from example layout */
  color: #fff; border-radius: 14px;
  padding: 28px;
  display: grid; grid-template-columns: 1.2fr 2fr;
  gap: 22px; align-items: center;
  box-shadow: var(--urf-card-shadow);
}
.subscribe-box h3 { margin: 0 0 .35rem; font-weight: 700; }
.subscribe-box p  { margin: 0; opacity: .9; }
.subscribe-box form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.subscribe-box input {
  height: 44px; border-radius: 10px; border: none; padding: 0 14px;
}
.subscribe-box button {
  height: 44px; border-radius: 10px; border: none;
  background: #6b59a6; color: #fff; font-weight: 700; letter-spacing: .5px;
}
.subscribe-box button:hover { filter: brightness(1.05); }

/* --- Post grid --- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 26px;
}
.post-card {
  background: var(--urf-card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--urf-card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column; height: 100%;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.12); }
.post-card .thumb { aspect-ratio: 16/9; background: #eee; object-fit: cover; width: 100%; }
.post-card .body { padding: 18px 18px 20px; display: grid; gap: 8px; }
.post-card .meta { color: var(--urf-muted); font-size: .9rem; }
.post-card h3   { margin: 0; font-size: 1.1rem; line-height: 1.35; color: var(--urf-ink); }
.post-card p    { margin: 0; color: var(--urf-muted); font-size: .97rem; }
.post-card .more {
  margin-top: 10px; color: var(--urf-accent); font-weight: 700; text-decoration: none;
}

/* --- Pagination --- */
.blog-pagination {
  display: flex; gap: 10px; justify-content: center; margin-top: 28px;
}
.blog-pagination a {
  padding: 10px 14px; border-radius: 10px; background: #f3f4f6; color: var(--urf-ink); text-decoration: none;
}
.blog-pagination a.is-active, .blog-pagination a:hover {
  background: var(--urf-accent); color: #fff;
}

/* --- Article page --- */
.article {
  max-width: 72ch; margin: 0 auto; padding: 10px;
}
.article .cover {
  width: 100%; border-radius: 16px; box-shadow: var(--urf-card-shadow); margin: 10px 0 20px;
}
.article h1 { line-height: 1.15; margin-bottom: .25rem; }
.article .byline { color: var(--urf-muted); margin-bottom: 1.25rem; }
.article p, .article li { font-size: 1.05rem; line-height: 1.75; color: #1f2937; }

/* --- Tags --- */
.tag {
  display: inline-block;
  background: #f3f4f6;
  color: var(--urf-ink);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 4px;
}

/* --- Article specific --- */
.article-header {
  margin-bottom: 2rem;
  text-align: center;
}
.article-header h1 {
  color: var(--urf-ink);
  margin-bottom: 1rem;
}
.article-tags {
  margin-top: 1rem;
}
.article-content {
  margin: 2rem 0;
}
.article-content h3 {
  color: var(--urf-ink);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.article-content ul, .article-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}
.article-content li {
  margin-bottom: 0.5rem;
}
.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}
.back-to-blog {
  color: var(--urf-accent);
  text-decoration: none;
  font-weight: 600;
}
.back-to-blog:hover {
  text-decoration: underline;
}

/* --- Error handling --- */
.error-message {
  text-align: center;
  padding: 2rem;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* --- Pagination improvements --- */
.pagination-btn {
  font-weight: 600;
}
.pagination-ellipsis {
  padding: 10px 14px;
  color: var(--urf-muted);
}

/* --- List layout --- */
.posts-list { margin: 26px auto; max-width: 1100px; }
.posts-list-inner { display: grid; gap: 28px; }
.post-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  background: var(--urf-card-bg);
  border-radius: 16px;
  box-shadow: var(--urf-card-shadow);
  overflow: hidden;
}
.post-row .thumb-wrap { position: relative; overflow: hidden; }
.post-row img.thumb {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10;
  display: block; transform: scale(1); transition: transform .25s ease;
}
.post-row:hover img.thumb { transform: scale(1.03); }
.post-row .content { padding: 18px 18px 20px; display: grid; gap: 10px; align-content: start; }
.post-row .meta { display:flex; gap:10px; align-items:center; color: var(--urf-muted); font-size:.92rem; }
.post-row .tags { display:flex; flex-wrap:wrap; gap:8px; }
.post-row .tag {
  background:#eef2ff; color:#3730a3; padding:4px 10px; border-radius:999px; font-size:.8rem; font-weight:600;
}
.post-row h2 { margin: 0; font-size:1.3rem; line-height:1.3; color: var(--urf-ink); }
.post-row p { margin:0; color: var(--urf-muted); font-size:1rem; }
.post-row .more { justify-self:start; color: var(--urf-accent); font-weight:700; text-decoration:none; }
.post-row .more:hover { text-decoration: underline; }

/* Divider style vibe from reference */
.post-row + .post-row { border-top: 1px solid #e5e7eb; padding-top: 28px; }

/* Responsive */
@media (max-width: 991px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row img.thumb { aspect-ratio: 16/9; }
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .posts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .subscribe-box { grid-template-columns: 1fr; }
  .subscribe-box form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .subscribe-box form { grid-template-columns: 1fr; }
}
