/* ====== Shared ====== */
.jc-btn {
  display: inline-block;
  padding: 10px 16px;
  background: #b42b1f;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.jc-btn:hover {
  filter: brightness(0.95);
  color:#fdfdfd;
}
.jc-btn--outline {
  background: transparent;
  color: #b42b1f;
  border: 2px solid #b42b1f;
}

.jc-btn--outline:hover {
    color: #bf0000;
}
.jc-grid {
  width: 100%;
}
.jc-grid__more {
  margin-top: 18px;
  text-align: center;
}

/* ====== Main grid ====== */
.jc-grid--main {
  display: grid;
  gap: 22px;
}
.jc-grid--main.cols-1 {
  grid-template-columns: 1fr;
}
.jc-grid--main.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.jc-grid--main.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.jc-grid--main.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .jc-grid--main.cols-3,
  .jc-grid--main.cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
}
@media (max-width: 680px) {
  .jc-grid--main {
    grid-template-columns: 1fr;
  }
}

.jc-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  display: flex;
  flex-direction: column;
}
.jc-card__thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.jc-card__thumb--placeholder {
  height: 220px;
  background: #f3f4f6;
}
.jc-card__body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jc-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}
.jc-card__title a {
  color: #111827;
  text-decoration: none;
}
.jc-card__title a:hover {
  text-decoration: underline;
}

.jc-card__meta {
  color: #6b7280;
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: center;
}
.jc-meta__sep {
  color: #9ca3af;
}

.jc-card__excerpt {
  color: #374151;
}
.jc-card__actions {
  margin-top: auto;
}

/* ====== Minimal VERTICAL list (Homepage) ====== */
/* container respects optional max height and becomes scrollable if set */
.jc-grid--minimal-vert {
  display: flex;
  flex-direction: column;
  gap: var(--jc-mini-gap, 12px);
  /* Optional scroll when max height set via CSS var */
  max-height: var(--jc-mini-maxh, none);
  overflow: auto;
  padding-right: 2px; /* tiny room so scrollbar doesn't overlay content */
}

/* item */
.jc-mini-vert {
  display: grid;
  grid-template-columns: 104px 1fr; /* thumb + info */
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #111827;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}
.jc-mini-vert:hover {
  background: #fafafa;
}

/* thumbnail keeps aspect and auto-resizes with container width */
.jc-mini-vert__thumb {
  width: 100%;
  height: 0;
  padding-bottom: 72%; /* ~4:3 look in small list */
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}
.jc-mini-vert__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jc-mini-vert__thumb--placeholder {
  width: 100%;
  height: 100%;
  background: #f3f4f6;
}

/* text */
.jc-mini-vert__title {
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: var(--jc-mini-clamp, 2);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jc-mini-vert__meta {
  margin-top: 4px;
  color: #6b7280;
  font-size: 14px;
}

/* mobile collapses to 1:1 thumb on top if super narrow */
@media (max-width: 420px) {
  .jc-mini-vert {
    grid-template-columns: 88px 1fr;
    gap: 10px;
  }
}
