/*Cards (simple, theme-friendly)
   =========================== */

/* Base card */
.card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;                    /* clips header/image corners */
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin: 0 0 16px 0;
  display: flex;                       /* equal-height support */
  flex-direction: column;
}

/* Body */
.card-body {
  padding: 14px 14px 12px 14px;
  color: #000;
  line-height: 1.5;
  flex: 1 1 auto;      /* fills remaining height */
}

/* Footer (optional) */
.card-footer {
  padding: 10px 14px;
  background: #f7f9fb;
  border-top: 1px solid #e6e6e6;
  text-align: right;
}

/* Links in cards (inherits site link colors if defined in theme.css) */
.card a { text-decoration: none; }
.card a:hover, .card a:focus { text-decoration: underline; }

/* Compact size variant */
.card--sm .card-header { padding: 8px 12px; font-size: 1rem; }
.card--sm .card-body   { padding: 10px 12px; }
.card--sm .card-footer { padding: 8px 12px; }

/* Lists inside cards */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-list li {
  padding: 6px 0;
  border-bottom: 1px dashed #e0e0e0;
}
.card-list li:last-child { border-bottom: 0; }

/* Optional image top variant */
.card-img-top {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid #e6e6e6;
}

/* Badge (inline NEW or status chip) */
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 999px;
  background: var(--mo-red, #B4202E);
  color: #fff;
  margin-left: 6px;
}

#maincontent .card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  #maincontent .card-row { grid-template-columns: 1fr; }
}

/* Print: simplify */
@media print {
  .card { box-shadow: none; border-color: #aaa; }
  .card-header { background: #eee !important; color: #000 !important; border-bottom-color: #bbb; }
}

/* card-header has to be at the bottom of this css */
/* Header: choose color via .card--blue or .card--red */
/* Base card header: tightened padding */
.card-header {
  padding: 8px 12px;
  font-weight: 700;
  font-variant: small-caps;
  font-size: 1.05rem;
  border-bottom: 1px solid #e6e6e6;
  color: #ffffff; /* default for colored headers */
}

/* Header color variants */
/* Strong variants (direct child selector = higher specificity) */
.card.card--blue > .card-header {
  background: var(--mo-blue, #04304B) !important;
  border-bottom-color: #03263a;  /* subtle seam for blue */
  color: #ffffff;
}
.card--red .card-header {
  background: var(--mo-red, #B4202E) !important;
  border-bottom-color: #7f1721;  /* subtle seam for red */
  color: #ffffff;
}

/* Compact header variant */
.card--sm > .card-header {
  padding: 6px 10px;
  font-size: 1rem;
}

/* Strengthen selector so only your cards match */
.card .card-header { /* base */ }
.card.card--blue > .card-header { background: var(--mo-blue) !important; }
.card.card--red  > .card-header { background: var(--mo-red)  !important; }