/* Kurnool Bazar blog - public pages (index, category, post). Mobile-first, 680px column;
   shared pieces (.card, .hero, .tag, .pager, .pform, .msg, .teaser-list, .prose) live in site.css. */

/* ---- category bar ---- */
.blog-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.blog-cats a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--blue); font-weight: 700; font-size: 13px; text-decoration: none; box-shadow: var(--shadow); }
.blog-cats a.on { background: var(--maroon); color: #fff; }
.blog-cats .n { margin-left: 6px; font-size: 12px; font-weight: 700; color: #4a4f57; background: #f1f1f1; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.blog-cats a.on .n { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---- post cards (index) ---- */
.post-list { display: grid; gap: 8px; margin-top: 8px; }
.post-card { padding: 0; overflow: clip; margin-top: 0; }
.post-card.featured { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.post-cover { display: block; aspect-ratio: 16 / 9; background: #eee; }
.post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 12px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.post-meta time { font-weight: 600; }
.tag.feat { background: var(--gold-2); color: #4a3300; }
.post-title { margin: 6px 0 4px; font-size: clamp(17px, 5vw, 21px); line-height: 1.25; overflow-wrap: anywhere; }
.post-title a { color: var(--maroon); text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.post-ex { margin: 0 0 8px; font-size: 14px; color: #3d3d3d; }
.post-more { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; font-size: 14px; text-decoration: none; }
.post-more:hover { text-decoration: underline; }

/* ---- post page ---- */
.post { padding: 14px 12px; }
.post-head h1 { margin: 6px 0 4px; font-size: clamp(20px, 6vw, 26px); line-height: 1.25; color: var(--maroon); overflow-wrap: anywhere; }
.post-lead { margin: 4px 0 0; font-size: 15px; color: #444; font-weight: 600; }
.post-hero { margin: 12px 0 0; }
.post-hero img { display: block; width: 100%; height: auto; border-radius: 10px; background: #eee; }
.post-prose { margin-top: 12px; font-size: 15px; line-height: 1.65; color: #222; }
.post-prose h2 { font-size: 19px; margin: 18px 0 6px; }
.post-prose h3 { font-size: 16px; margin: 14px 0 4px; }
.post-prose h4 { font-size: 15px; margin: 12px 0 4px; }
.post-prose p, .post-prose ul, .post-prose ol { margin: 8px 0; }
.post-prose img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 10px auto; }
.post-prose figure { margin: 10px 0; }
.post-prose figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.post-prose blockquote { margin: 10px 0; padding: 8px 12px; border-left: 4px solid var(--gold); background: var(--cream); border-radius: 0 8px 8px 0; color: #444; }
.post-prose pre { overflow-x: auto; background: #f4f4f4; padding: 10px; border-radius: 8px; font-size: 13px; }
.post-prose code { background: #f4f4f4; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.post-prose table { width: 100%; font-size: 14px; border-collapse: collapse; margin: 10px 0; }
.post-prose th, .post-prose td { border: 1px solid #e3e3e3; padding: 6px 8px; text-align: left; }
.post-prose th { background: #deeefa; color: #0d2c54; }
.post-prose hr { border: 0; border-top: 1px solid #e3e3e3; margin: 14px 0; }
.post-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid #eee; }
.post-foot .meta-line { margin: 0 0 8px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-lbl { font-weight: 700; font-size: 13px; color: var(--muted); }
.share a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; }
.share .wa { background: #0b6e33; }   /* white text passes AA (>=4.5:1) */
a.tag { display: inline-flex; align-items: center; min-height: 24px; }
.share .tg { background: #1877a8; }
.share .fb { background: #1657c4; }
.share .x { background: #1b1b1f; }

/* ---- older / newer ---- */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.prevnext .pn { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 10px 12px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.prevnext .pn.empty { background: transparent; box-shadow: none; }
.prevnext .next { text-align: right; }
.prevnext .lbl { font-size: 12px; color: var(--muted); font-weight: 700; }
.prevnext .ttl { font-size: 13px; font-weight: 700; color: var(--maroon); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 360px) { .prevnext { grid-template-columns: 1fr; } .prevnext .next { text-align: left; } .prevnext .pn.empty { display: none; } }

/* ---- comments ---- */
.cm-title { margin: 0 0 6px; font-size: 18px; color: var(--maroon); }
.cm-n { color: var(--muted); font-weight: 600; font-size: 15px; }
.cm-sub { margin: 14px 0 0; font-size: 16px; color: var(--purple); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 10px 0; border-top: 1px solid #eee; }
.comment:first-child { border-top: 0; }
.c-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.c-name { font-weight: 800; font-size: 14px; color: var(--purple); overflow-wrap: anywhere; }
.c-body { margin-top: 4px; font-size: 14px; color: #222; overflow-wrap: anywhere; line-height: 1.5; }
.err-list { margin: 0; padding-left: 18px; }
.err-list li { margin: 2px 0; }
.comment-form { position: relative; }
.comment-form .opt { font-weight: 600; color: var(--muted); font-size: 12px; }
.comment-form .btns .btn { min-width: 160px; }

@media (min-width: 520px) {
  .post-card.has-cover { display: grid; grid-template-columns: 200px 1fr; }
  .post-card.has-cover .post-cover { aspect-ratio: auto; min-height: 100%; }
  .post-card.has-cover.featured { grid-template-columns: 1fr; }
  .post-card.has-cover.featured .post-cover { aspect-ratio: 16 / 9; }
}
@media print {
  .share, .prevnext, .comment-form, .blog-cats { display: none !important; }
}
