/* ==========================================================================
   modules.css — componentes COMPARTILHADOS das vitrines de módulo
   (Rifas, Guia comercial, Consórcio, Anúncios/Classificados).

   Por que existe: estas classes eram definidas SÓ em raffles.php e reusadas por
   outras views (anuncios/guia/consorcio/raffles_results) — que ficavam SEM estilo.
   Aqui viram fonte única, usando os tokens reais do site.css (--color-*, --radius-lg,
   --shadow), adaptando a claro/escuro. Carregado uma vez no layout público.
   ========================================================================== */

/* Subnavegação (links secundários acima da grade) */
.rifa-subnav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.5rem; }
.rifa-subnav a { color: var(--color-primary); font-weight: 600; text-decoration: none; font-size: .9375rem; display: inline-flex; align-items: center; min-height: 1.5rem; gap: .4rem; }
.rifa-subnav a:hover { text-decoration: underline; }

/* Grade de cards */
.rifa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

/* Card de vitrine */
.rifa-card { background: var(--color-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.rifa-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rifa-card__media { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--color-bg-alt); }
.rifa-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rifa-card__badge { position: absolute; top: .75rem; left: .75rem; font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: #111; color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.rifa-card__badge--open { background: #15803d; }
.rifa-card__badge--paused { background: #b45309; }
.rifa-card__badge--drawn, .rifa-card__badge--finished { background: #6b7280; }
.rifa-card__body { padding: 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.rifa-card__code { font-size: .75rem; font-weight: 700; letter-spacing: .04em; color: var(--color-text-muted); text-transform: uppercase; }
.rifa-card__title { font-size: 1.125rem; font-weight: 800; line-height: 1.25; margin: 0; }
.rifa-card__title a { color: var(--color-text); text-decoration: none; }
.rifa-card__prize { font-size: .875rem; color: var(--color-text-muted); margin: 0; }
.rifa-card__bar { height: 8px; border-radius: 999px; background: var(--color-bg-alt); overflow: hidden; margin-top: .35rem; }
.rifa-card__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--color-primary), #16a34a); border-radius: 999px; }
.rifa-card__progress { font-size: .75rem; color: var(--color-text-muted); margin: 0; }
.rifa-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .5rem; }
.rifa-card__price-label { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
.rifa-card__price strong { font-size: 1.125rem; font-weight: 800; color: var(--color-text); }

/* Estado vazio */
.rifa-empty { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.rifa-empty i { font-size: 2.5rem; opacity: .4; }
.rifa-empty h2 { font-size: 1.3125rem; margin: .75rem 0 .25rem; color: var(--color-text); }

/* Heroes dedicados dos módulos — mesma linguagem dos mkt-hero--autos/imoveis/leilao
   (gradiente escuro sobre a arte, legível em tema claro E escuro). Antes estas
   páginas caíam no base mkt-hero e mostravam a mesma fachada genérica. */
.mkt-hero--rifas,
.mkt-hero--guia,
.mkt-hero--consorcio,
.mkt-hero--anuncios,
.mkt-hero--simulador,
.mkt-hero--debitos {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.mkt-hero--rifas {
  background-image:
    linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%),
    url('../img/hero-rifas.jpg');
}
.mkt-hero--guia {
  background-image:
    linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%),
    url('../img/hero-guia.jpg');
}
.mkt-hero--consorcio {
  background-image:
    linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%),
    url('../img/hero-consorcio.jpg');
}
.mkt-hero--anuncios {
  background-image:
    linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%),
    url('../img/hero-anuncios.jpg');
}
.mkt-hero--simulador {
  background-image:
    linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%),
    url('../img/hero-simulador.jpg');
}
.mkt-hero--debitos {
  background-image:
    linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%),
    url('../img/hero-debitos.jpg');
}

/* Scroll-reveal sutil (clean). Progressive enhancement: sem JS ou com
   prefers-reduced-motion nada fica escondido — o gate html.js-reveal só é
   ligado pelo JS quando há suporte E o usuário não pediu menos movimento. */
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
  }
  html.js-reveal .reveal.is-in { opacity: 1; transform: none; }
}

/* Heroes dedicados das demais páginas (antes compartilhavam hero-facade.jpg do
   base .mkt-hero, ou eram .page-hero claro sem foto). Mesmo padrão dos módulos. */
.mkt-hero--blog,
.mkt-hero--vendedores,
.mkt-hero--contato,
.mkt-hero--vender,
.mkt-hero--sobre,
.mkt-hero--faq {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.mkt-hero--blog       { background-image: linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%), url('../img/hero-blog.jpg'); }
.mkt-hero--vendedores { background-image: linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%), url('../img/hero-vendedores.jpg'); }
.mkt-hero--contato    { background-image: linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%), url('../img/hero-contato.jpg'); }
.mkt-hero--vender     { background-image: linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%), url('../img/hero-vender.jpg'); }
.mkt-hero--sobre      { background-image: linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%), url('../img/hero-sobre.jpg'); }
.mkt-hero--faq        { background-image: linear-gradient(180deg, rgba(9,13,19,.62) 0%, rgba(9,13,19,.42) 42%, rgba(9,13,19,.80) 100%), url('../img/hero-faq.jpg'); }
