/* EMA image-led news listing cards. Loaded only on /news/ pages via a
   tplHeader hook in rlCustom.class.php. Paired with the news.tpl override at
   custom/templates/ema_fountain_blue/controllers/news/news.tpl.
   Reversible: delete this file + that override + the two hooks. */

.ema-newsgrid { --ema-accent:#1a5fd0; --ema-accent-ink:#0b3f97; --ema-teal:#0e8a9c;
  --ema-ink:#132340; --ema-muted:#5b6a86; --ema-faint:#8794ab; --ema-border:#e6ecf5;
  row-gap: 26px; }

.ema-newscol { margin-bottom: 0; }

.ema-newscard {
  display: flex; flex-direction: column; width: 100%;
  background: #fff; border: 1px solid var(--ema-border); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(19,35,64,.04), 0 10px 26px rgba(19,35,64,.06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ema-newscard:hover, .ema-newscard:focus-visible {
  transform: translateY(-4px); text-decoration: none; color: inherit;
  border-color: #b9cdf0;
  box-shadow: 0 6px 14px rgba(19,35,64,.10), 0 22px 46px rgba(19,35,64,.13);
}
.ema-newscard:focus-visible { outline: 2px solid var(--ema-accent); outline-offset: 2px; }

.ema-newscard__media { display: block; aspect-ratio: 16/10; overflow: hidden; background: #eef2f8; }
.ema-newscard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ema-newscard:hover .ema-newscard__media img { transform: scale(1.05); }

.ema-newscard__body { display: flex; flex-direction: column; gap: 9px; padding: 15px 16px 17px; flex: 1 1 auto; }

.ema-newscard__meta { display: flex; align-items: center; gap: 9px; font-size: 12.5px;
  color: var(--ema-faint); font-variant-numeric: tabular-nums; }
.ema-newscard__meta time { white-space: nowrap; }
.ema-newscard__chip { text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px;
  font-weight: 700; color: var(--ema-teal); background: rgba(14,138,156,.12);
  padding: 3px 8px; border-radius: 6px; }
.ema-newscard__views { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.ema-newscard__views svg { width: 15px; height: 11px; fill: currentColor; }

.ema-newscard__title { font-size: 17.5px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em;
  color: var(--ema-ink); text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.ema-newscard__excerpt { font-size: 14px; line-height: 1.55; color: var(--ema-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ema-newscard__more { margin-top: auto; padding-top: 3px; display: inline-flex; align-items: center;
  gap: 6px; font-size: 14px; font-weight: 650; color: var(--ema-accent); }
.ema-newscard__more svg { width: 16px; height: 16px; transition: transform .2s ease; }
.ema-newscard:hover .ema-newscard__more { color: var(--ema-accent-ink); }
.ema-newscard:hover .ema-newscard__more svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .ema-newscard, .ema-newscard__media img, .ema-newscard__more svg { transition: none; }
  .ema-newscard:hover { transform: none; }
  .ema-newscard:hover .ema-newscard__media img { transform: none; }
}
