.esh-widget {
  --esh-vermelho: #dd3333;     /* selo do formato e data (mesmo vermelho do guia) */
  --esh-selo-text: #fff;
  --esh-text: #000;
  --esh-muted: #555;
  --esh-cartaz-bg: #dde1e6;
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--esh-text);
  container-type: inline-size; /* as colunas dependem da largura do próprio widget */
}
.esh-widget[hidden] { display: none !important; }
.esh-widget * { box-sizing: border-box; }
.esh-widget .esh-card, .esh-widget .esh-card * { font-family: inherit; } /* Raleway em tudo, mesmo se o tema mudar a fonte do h3 */

/* 6 colunas em tela larga; 3 em média; 2 no celular */
.esh-widget .esh-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px 18px;
}
@container (max-width: 900px) {
  .esh-widget .esh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 520px) {
  .esh-widget .esh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .esh-widget .esh-card.esh-card--extra { display: none; } /* celular: só as 2 primeiras, numa linha */
}

/* ---------- Card ---------- */
.esh-widget .esh-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--esh-text);
  text-decoration: none;  /* o card inteiro é um link para a página de estreias */
  cursor: pointer;
}
.esh-widget .esh-card:hover,
.esh-widget .esh-card:focus { color: var(--esh-text); text-decoration: none; }
.esh-widget .esh-card:hover .esh-title { color: var(--esh-vermelho); }
.esh-widget .esh-card:focus-visible { outline: 2px solid var(--esh-vermelho); outline-offset: 4px; border-radius: 12px; }
.esh-widget .esh-cartaz {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--esh-cartaz-bg);
  margin-bottom: 10px;
}
.esh-widget .esh-cartaz img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  transition: transform .3s ease;
}
.esh-widget .esh-card:hover .esh-cartaz img { transform: scale(1.04); }
.esh-widget .esh-cartaz--vazio {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--esh-muted);
  font-size: 12px;
  font-weight: 700;
}

/* Selo do formato à esquerda, data à direita */
.esh-widget .esh-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.esh-widget .esh-selo {
  min-width: 0;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--esh-vermelho);
  color: var(--esh-selo-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.esh-widget .esh-data {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--esh-vermelho);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
/* Estreia de hoje: bolinha vermelha piscando antes de "HOJE" */
.esh-widget .esh-data--hoje::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--esh-vermelho);
  animation: esh-piscar 1.2s ease-in-out infinite;
}
@keyframes esh-piscar {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.15; }
}
@media (prefers-reduced-motion: reduce) {
  .esh-widget .esh-data--hoje::before { animation: none; }
}

.esh-widget .esh-title {
  margin: 0 0 10px;
  color: inherit;
  transition: color .2s ease;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Rodapé: logo da plataforma (sem moldura) + nome ao lado */
.esh-widget .esh-plataforma {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--esh-muted);
}
.esh-widget .esh-logo {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.esh-widget .esh-logo img { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; }
.esh-widget .esh-logo--cor { border-radius: 6px; } /* sem logo: quadradinho na cor da plataforma */
.esh-widget .esh-nome {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
