/* ── Blog app styles ────────────────────────────────────────────────────────── */
/* Builds on top of the shared JabJab style.css */

/* ── Blog: no navbar ─────────────────────────────────────────────────────────── */


/* Tighten dedication padding slightly for the blog reading context */
.dedication { padding: 2.5rem 0 2rem; }

/* ── Blog: background radial glow ────────────────────────────────────────────── */
/* Background radial glow — same as xmpp.tel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(124,58,237,.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(99,102,241,.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.blog-main, .dedication, .footer { position: relative; z-index: 1; }

a { color: var(--accent); }
a:hover { filter: brightness(1.15); }

/* ── Layout ──────────────────────────────────────────────────────────────────── */

.blog-main {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

/* ── Card ────────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: rgba(124,58,237,.5);
  box-shadow: 0 0 0 1px rgba(124,58,237,.15), 0 8px 32px rgba(124,58,237,.1);
}

/* Header image — full bleed, no side padding */
.card-image-link { display: block; }

.card .header-img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  display: block;
}

/* Gradient placeholder when no image */
.card .header-placeholder {
  width: 100%;
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card .header-placeholder span {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1rem, 4vw, 2.2rem);
  text-align: center;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

/* Inner padded section */
.card-inner {
  padding: 1.1rem 1.4rem 0;
}

/* Meta row */
.meta-row {
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: .55rem;
}

.meta-row a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* Title */
.card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 .65rem;
}

.card h2 a {
  color: var(--text);
  text-decoration: none;
}

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

/* Excerpt with bottom fade */
.card .body {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-height: 5rem;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  margin-bottom: .5rem;
}

.card .body p { margin: 0 0 .4rem; }

/* Read more */
.read-more {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: .01em;
  padding-bottom: .9rem;
}

.read-more:hover { color: var(--accent-soft); filter: none; }

/* Card footer — report link */
.card-footer {
  padding: .4rem 1.4rem .65rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  margin-top: .1rem;
}

.report-link {
  font-size: .72rem;
  color: var(--text-dim);
  opacity: .45;
  text-decoration: none;
}

.report-link:hover { opacity: 1; filter: none; }

/* ── Empty state ──────────────────────────────────────────────────────────────── */

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
}

/* ── Pagination ───────────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.page-link {
  color: var(--accent);
  padding: .3rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.page-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  filter: none;
}

.page-current {
  padding: .3rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
}

.page-ellipsis {
  padding: .3rem .2rem;
  color: var(--text-dim);
}

/* ── Post detail overrides ────────────────────────────────────────────────────── */

/* Match list card padding exactly; only override what's different */
.card-inner--detail {
  padding: 1.1rem 1.4rem 1rem;
}

.card-inner--detail .post-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 .5rem;
  color: var(--text);
}

/* No border on meta — same as list cards */
.card-inner--detail .meta-row {
  margin-bottom: .9rem;
}

/* Full body — override .card .body with equal specificity */
.card .body--full {
  max-height: none;
  mask-image: none;
  -webkit-mask-image: none;
  overflow: visible;
  font-size: .92rem;
  line-height: 1.72;
  margin-bottom: 0;
  padding-bottom: .5rem;
}

.card .body--full p  { margin-bottom: .75rem; }
.card .body--full h1,
.card .body--full h2,
.card .body--full h3 { margin: 1.2rem 0 .45rem; color: var(--text); font-weight: 700; }
.card .body--full pre {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  overflow-x: auto;
  margin-bottom: .85rem;
  font-size: .875rem;
}
.card .body--full code {
  background: var(--surface-2);
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .875rem;
}
.card .body--full pre code { background: none; padding: 0; }
.card .body--full blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: .85rem;
  color: var(--text-dim);
  font-style: italic;
}
.card .body--full a  { color: var(--accent); }
.card .body--full hr { border: none; border-top: 1px solid var(--border); margin: 1.1rem 0; }

/* Detail footer — back link left, report right */
.card-footer--detail {
  justify-content: space-between;
  align-items: center;
  padding: .5rem 1.4rem .7rem;
}

.back-link {
  font-size: .82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover { color: var(--accent-soft); filter: none; }

/* ── Per-user page header ─────────────────────────────────────────────────────── */

.user-header {
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.user-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.user-header p {
  font-size: .85rem;
  color: var(--text-dim);
  margin: .25rem 0 0;
}
