/* History events nav + cards (safe for light/dark) */
.history-events-card{
  display:block;
  text-decoration:none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.history-events-card:hover{
  border-color: rgba(59,130,246,.35);
}
.history-events-card .he-title{
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  margin: 0 0 6px;
}
.history-events-card .he-desc{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 10px;
}
.history-events-card .he-meta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
}

/* Right-side logo (same level as card, fades from right to left) */
.history-events-card .he-card-logo{
  position:absolute;
  top:0;
  right:-8px;
  bottom:0;
  /* extend fade range to ~2/3 of the card (with sane bounds) */
  width: clamp(180px, 66%, 420px);
  opacity:.45;
  pointer-events:none;
  transform: translateZ(0);
  /* fade from right -> left */
  -webkit-mask-image: linear-gradient(to left,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,.85) 22%,
    rgba(0,0,0,0) 66%
  );
  mask-image: linear-gradient(to left,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,.85) 22%,
    rgba(0,0,0,0) 66%
  );
}

.history-events-card .he-card-logo-img,
.history-events-card .he-card-logo-ph{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.history-events-card .he-card-logo-ph{
  background: linear-gradient(135deg, rgba(148,163,184,.25), rgba(99,102,241,.18));
}

.history-events-card .he-card-body{
  position:relative;
  z-index:2;
  padding-right: 140px;
}

.history-events-card .he-card-icon{
  position:absolute;
  z-index:3;
  top: 12px;
  right: 12px;
}

@media (max-width:720px){
  .history-events-card .he-card-logo{ width: clamp(150px, 66%, 320px); opacity:.40; }
  .history-events-card .he-card-body{ padding-right: 110px; }
}
