/* ===== Article Card (shared) ===== */

/* Safe defaults; pages can override by redefining on a wrapper */
:root{
  --brand:#800000;  /* maroon */
  --accent:#ffba08; /* yellow */
  --text:#1A1A1A;
  --surface:#ffffff;
  --border:rgba(128,0,0,.14);
  --shadow:0 6px 24px rgba(0,0,0,.06);
  --ring:rgba(255,186,8,.35);
}

/* Grid */
.card-grid{
  display:grid;
  gap: clamp(14px, 2.2vw, 20px);
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  align-content:start;
}

/* Card */
.card{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(14px, 2vw, 18px);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow:hidden;
  isolation:isolate;
}
.card:hover{
  transform: translateY(-3px);
  border-color: rgba(128,0,0,.22);
  box-shadow: 0 12px 34px rgba(128,0,0,.08), 0 4px 14px rgba(0,0,0,.06);
}

.card a.title{ color: var(--brand); text-decoration: none; }
.card h2{
  margin:0 0 8px;
  font-family: var(--font-site, "Bitter", Georgia, serif);
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.35;

}
.card a.title:hover h2{
  color:#5f0000;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Meta row — unified class name */
.meta{
  color:#6b7280;
  font-size:.86rem;
  margin-bottom:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.meta span + span::before{
  content:"•";
  margin: 0 6px;
  color:#9ca3af;
}

/* Category chip — unified class name */
.badge{
  background:#fff6d1;
  color:#7a3d00;
  border:1px solid #ffe089;
  padding:2px 10px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:800;
}

/* Excerpt */
.excerpt{
  color:#344054;
  margin:6px 0 12px;
  min-height:3.2em;
  text-justify: inter-word; 
  hyphens:auto;
}

/* Button */
.btn{
  align-self:flex-start;
  display:inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,186,8,.55);
  text-decoration: none;
  color: #4a2a00;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255,186,8,.25);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ filter: brightness(1.05); transform: translateY(-1px); }
.btn:focus-visible{ outline: 3px solid var(--ring); outline-offset: 2px; }

.card:focus-within{
  outline: 3px solid var(--ring, rgba(255,186,8,.35));
  outline-offset: 2px;
  border-color: rgba(255,186,8,.55);
}


/* Small screens */
@media (max-width: 560px){
  .title{ font-size: clamp(1.2rem, 4vw, 1.6rem); }
  .card-grid{ grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .card, .btn{ transition: none; }
}
