/* =========================================================
   PROMO BANNERS (antes do footer)
   - Desktop: 2 em linha
   - Mobile: 1 por linha
   - Clickable evidente (também no mobile)
   - Sombra mais sutil + padronização
   - Respiro antes do bloco "Apoiadores"
   - Evita encostar na BottomNav no mobile
   ========================================================= */

.promo-rail {
  width: 90%;
  max-width: 1280px;

  /* mais respiro antes do footer/apoiaodres */
  margin: 18px auto 22px;
}

/* Grid */
.promo-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* Desktop: 2 colunas */
@media (min-width: 992px) {
  .promo-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
  }
}

/* Card */
.promo-card {
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;

  /* garante área clicável e evita "pulos" de layout */
  min-height: 1px;

  transform: translateZ(0);
  will-change: transform, filter, box-shadow;

  outline: none;

  /* sombra MAIS sutil (menos "pesada" que antes) */
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);

  /* micro movimento (apenas quando visível via JS) */
  animation: promoFloat 4.8s ease-in-out infinite;
  animation-play-state: paused;
}

/* Imagem */
.promo-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* Overlay leve permanente (deixa "clicável" também no mobile) */
.promo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0) 45%,
      rgba(0, 0, 0, 0.1)
    );
  opacity: 0.55;
  transition: opacity 220ms ease;
}

/* Ícone de "abrir" no canto (clique evidente no mobile também) */
.promo-card::after {
  content: '↗';
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.16);

  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  font-size: 16px;
  line-height: 1;

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  opacity: 0.92;
  transition:
    transform 220ms ease,
    opacity 220ms ease,
    background 220ms ease;
  pointer-events: none;
}

/* Hover/Focus (desktop) */
@media (hover: hover) and (pointer: fine) {
  .promo-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    filter: saturate(1.04);
  }
  .promo-card:hover::before {
    opacity: 0.72;
  }
  .promo-card:hover::after {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.42);
    opacity: 1;
  }
}

/* Focus visível */
.promo-card:focus-visible {
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(251, 89, 4, 0.38);
  transform: translateY(-2px);
}

/* Animação */
@keyframes promoFloat {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Só anima quando JS marcar como visível */
.promo-card.is-visible {
  animation-play-state: running;
}

/* Evitar encostar na BottomNav no mobile:
   - Se seu layout tiver bottomnav fixa, isso dá respiro abaixo do bloco */
@media (max-width: 520px) {
  .promo-rail {
    margin-bottom: 26px;
    padding-bottom: 76px; /* respiro pro conteúdo não “bater” na bottomnav */
  }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .promo-card,
  .promo-card.is-visible {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }
}
