/*
 * blog.css — Shared styles for all blog content block variants
 * Include in your base template: <link rel="stylesheet" href="/static/blog/blog.css">
 *
 * Variants:
 *   .blog-grid-featured   — 4-col image-top cards with category badge
 *   .blog-grid-section    — section header + image-top cards
 *   .blog-horizontal-list — bordered "Don't Miss" box with thumbnail-right rows
 *
 * Accent colours are set per-block via inline style (config.accent_color).
 */

/* ── Shared card base ──────────────────────────────────────────────────────── */

.blog-block {
  width: 100%;
}

.blog-block-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: inherit;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .15s ease;
}

.blog-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* ── Card image wrapper ────────────────────────────────────────────────────── */

.blog-card-img-wrap {
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%;   /* 16:9 */
  position: relative;
  background: #f1f5f9;
}

.blog-card-img-wrap--square {
  padding-top: 100%;     /* 1:1 */
}

.blog-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

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

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

.blog-card-body {
  padding: .875rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-cat-badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #1d4ed8;
  display: block;
  margin-bottom: .3rem;
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 .5rem;
  flex: 1;
}

.blog-card-title a,
.blog-hlist-item-title a {
  color: #111827;
  text-decoration: none;
}

.blog-card-title a:hover,
.blog-hlist-item-title a:hover {
  color: #1d4ed8;
}

.blog-card-title--md {
  font-size: .95rem;
}

.blog-card-excerpt {
  font-size: .85rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: .4rem;
}

.blog-card-date {
  font-size: .78rem;
  color: #6b7280;
  display: block;
  margin-top: auto;
  padding-top: .4rem;
}

/* ── Variant 2: section header ─────────────────────────────────────────────── */

.blog-section-header {
  border-bottom: 2px solid #111827;
  padding-bottom: .4rem;
}

.blog-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: .15rem;
}

.blog-section-subtitle {
  font-size: .9rem;
  margin-bottom: 0;
}

.blog-card--section {
  border: none;
  border-radius: 0;
}

.blog-card--section:hover {
  box-shadow: none;
}

.blog-card--section .blog-card-body {
  padding: .6rem 0 0;
}

/* ── Variant 3: horizontal list ────────────────────────────────────────────── */

.blog-hlist-box {
  border: 2px solid #bfdbfe;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.blog-hlist-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: .5rem;
  color: #b91c1c;
}

.blog-hlist-divider {
  border-color: #e5e7eb;
  margin: .5rem 0 1rem;
}

.blog-hlist-item {
  gap: .75rem;
}

.blog-hlist-text {
  flex: 1;
  min-width: 0;
}

.blog-hlist-item-title {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .2rem;
}

.blog-hlist-thumb {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 575px) {
  .blog-hlist-thumb { width: 80px; height: 64px; }
  .blog-card-title  { font-size: .9rem; }
}
