/* ============================================================
   CHRONIX-IL · Blog styles
   ============================================================ */

/* ── Blog index ── */
.blog-index-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.4rem 5rem;
}

.blog-index-head {
  text-align: center;
  padding: 2rem 0 3rem;
}

.blog-index-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: .5rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* ── Blog card ── */
.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.blog-card-img {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

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

.blog-card-body {
  padding: 1.3rem 1.4rem 1.6rem;
}

.blog-card-body h2 {
  font-size: 1.1rem;
  margin: .4rem 0 .6rem;
  line-height: 1.35;
}

.blog-card-body h2 a:hover {
  color: var(--gold);
}

.blog-card-body p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
  margin-bottom: .8rem;
}

/* ── Post meta & category ── */
.post-category {
  display: inline-block;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .65rem;
  border-radius: 999px;
  margin-bottom: .4rem;
}

.post-meta {
  font-size: .82rem;
  color: var(--muted);
}

/* ── Blog post layout ── */
.blog-post-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas: "crumbs crumbs" "post sidebar";
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.8rem 1.4rem 5rem;
  gap: 0 2.5rem;
  align-items: start;
}

.blog-crumbs {
  grid-area: crumbs;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.blog-crumbs a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post {
  grid-area: post;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.post-header {
  padding: 2rem 2.2rem 1.4rem;
}

.post-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: .5rem 0 .8rem;
}

.post-hero {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.post-body {
  padding: 2rem 2.2rem 2.6rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.post-body h2 {
  font-size: 1.25rem;
  margin: 2rem 0 .7rem;
  color: var(--ink);
}

.post-body p {
  margin-bottom: 1rem;
}

.post-body ul, .post-body ol {
  padding-inline-start: 1.4rem;
  margin-bottom: 1rem;
}

.post-body li {
  margin-bottom: .4rem;
}

.post-body strong {
  color: var(--ink);
}

/* ── Table ── */
.blog-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.6rem;
  font-size: .93rem;
}

.blog-table th {
  background: var(--bg-soft);
  padding: .6rem 1rem;
  font-weight: 700;
  text-align: right;
  border-bottom: 2px solid var(--line);
}

.blog-table td {
  padding: .55rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.blog-table tr:last-child td {
  border-bottom: none;
}

/* ── Blog CTA block ── */
.blog-cta {
  margin-top: 2rem;
  padding: 1.4rem 1.6rem;
  background: var(--gold-soft);
  border-radius: 12px;
  text-align: center;
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.blog-cta p {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.btn-block {
  width: 100%;
  text-align: center;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Sidebar ── */
.blog-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 80px;
}

.sidebar-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem;
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: .7rem;
}

.sidebar-box p {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.sidebar-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-posts li {
  border-bottom: 1px solid var(--line);
  padding: .55rem 0;
  font-size: .9rem;
}

.sidebar-posts li:last-child {
  border-bottom: none;
}

.sidebar-posts a:hover {
  color: var(--gold);
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .blog-post-wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "crumbs" "post" "sidebar";
    padding: 1rem 1rem 4rem;
  }

  .blog-sidebar {
    position: static;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .post-header {
    padding: 1.4rem 1.2rem 1rem;
  }

  .post-body {
    padding: 1.2rem 1.2rem 2rem;
  }

  .blog-cta {
    flex-direction: column;
  }
}
