/* ====================================================================
   IRMÃOS POLÍCIA — MARKETPLACE BASE (4 marketplaces compartilham este CSS)
   Padrão: header preto, body branco, detalhes pretos, dourado pros destaques.
   ==================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #0a0a0a;
  --black-soft: #1a1a1a;
  --white: #ffffff;
  --off-white: #f7f7f8;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gold: #d4a641;
  --gold-light: #e8c56d;
  --gold-dark: #b8902e;
  --gold-glow: rgba(212, 166, 65, 0.18);
  --green: #22c55e;
  --red: #dc2626;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 8px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.10);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; font-size: 15px; }
@media (min-width: 480px) { html { font-size: 16px; } }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) { .container { padding: 0 32px; } }

/* ============ HEADER ============ */
.mkt-header {
  background: var(--black);
  color: var(--white);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.mkt-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.mkt-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.mkt-logo img {
  height: 40px;
  width: auto;
  /* Imagem é preta originalmente — invertemos pra ficar branca no header preto */
  filter: invert(1);
}
@media (min-width: 720px) { .mkt-logo img { height: 44px; } }
.mkt-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.mkt-nav a, .mkt-nav button {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  padding: 6px 0;
  background: none;
  font-family: inherit;
}
.mkt-nav a:hover, .mkt-nav button:hover { color: var(--gold-light); }

.mkt-nav-cta {
  background: #fbdc00 !important;
  color: var(--black) !important;
  font-weight: 700 !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.mkt-nav-cta:hover {
  background: #ffe833 !important;
  color: var(--black) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 220, 0, 0.35);
}

@media (max-width: 720px) {
  .mkt-nav { gap: 14px; }
  .mkt-nav a, .mkt-nav button { font-size: 0.85rem; }
  .mkt-nav-cta { padding: 8px 14px !important; }
  .mkt-nav-aluno { display: none; }   /* esconde Área do Aluno em mobile pra caber */
}

/* ============ FAIXA DE BUSCA (substitui o hero antigo) ============ */
.mkt-hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--gray-200);
}
.mkt-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--black);
  margin: 0 0 6px;
}
.mkt-hero-sub {
  font-size: 1rem;
  color: var(--gray-600);
  margin: 0 0 24px;
  max-width: 640px;
}

/* ============ BARRA DE BUSCA ============ */
.mkt-search {
  position: relative;
  max-width: 640px;
}
.mkt-search-input {
  width: 100%;
  padding: 16px 56px 16px 52px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.mkt-search-input::placeholder { color: var(--gray-400); }
.mkt-search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow), var(--shadow-md);
}
.mkt-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--gray-500);
  pointer-events: none;
}
.mkt-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition);
}
.mkt-search-clear:hover { background: var(--gray-300); }
.mkt-search.has-query .mkt-search-clear { display: flex; }

/* ============ GRID DE CARDS ============ */
.mkt-grid-section {
  padding: 32px 0 64px;
  background: var(--white);
}
.mkt-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.mkt-grid-count {
  font-size: 0.92rem;
  color: var(--gray-500);
  font-weight: 500;
}
.mkt-grid-count strong { color: var(--black); font-weight: 700; }

.mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
@media (min-width: 720px) { .mkt-grid { gap: 24px; } }

.mkt-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--gray-500);
  display: none;
}
.mkt-empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.mkt-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.mkt-empty-hint { font-size: 0.92rem; }

.mkt-grid.is-empty + .mkt-empty,
.mkt-grid.is-empty ~ .mkt-empty { display: block; }

/* ============ CARD DE CONCURSO — IMAGEM GRANDE + OVERLAY HOVER ============ */
.mkt-card {
  position: relative;
  background: var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 20px -6px rgba(0, 0, 0, 0.10);
  isolation: isolate;
}
.mkt-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.08),
    0 24px 48px -12px rgba(0, 0, 0, 0.20);
}

/* ─── IMAGEM 16:9 ─── */
.mkt-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: var(--black);
}
.mkt-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 0.32s ease;
}
.mkt-card:hover .mkt-card-image img {
  transform: scale(1.04);
}

/* ─── LOGO PURO: imagem que e' so o brasao (sem fundo composto)
       Aplica padding + contain pra equilibrar com cards de imagem composta ─── */
.mkt-card-image.is-logo-puro {
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 100%);
}
.mkt-card-image.is-logo-puro img {
  object-fit: contain;
  padding: 6% 8%;
}
@media (max-width: 720px) {
  .mkt-card-image.is-logo-puro img {
    padding: 5% 7%;
  }
}

/* ─── BADGE 🔥 MAIS PROCURADO ─── */
.mkt-card-flame {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px 5px 7px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  box-shadow:
    0 2px 8px rgba(212, 166, 65, 0.4),
    0 0 0 1px rgba(212, 166, 65, 0.5);
}
.mkt-card-flame::before {
  content: '🔥';
  font-size: 0.85rem;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(255, 140, 0, 0.7));
}

/* ─── RIBBON EM BREVE ─── */
.mkt-card-soon-ribbon {
  position: absolute;
  top: 14px;
  right: -32px;
  z-index: 3;
  width: 130px;
  text-align: center;
  background: var(--black);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 0;
  transform: rotate(35deg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ─── OVERLAY DE DETALHES (entra de baixo no hover) ─── */
.mkt-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.78) 50%,
    rgba(0, 0, 0, 0.20) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px 20px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.mkt-card:hover .mkt-card-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mkt-card-overlay-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.mkt-card-overlay-item { min-width: 0; }
.mkt-card-overlay-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1px;
}
.mkt-card-overlay-value {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mkt-card-overlay-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  align-self: flex-start;
  transition: background 0.25s ease, transform 0.25s ease;
}
.mkt-card-overlay-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}
.mkt-card:hover .mkt-card-overlay-cta { background: var(--gold-light); }
.mkt-card:hover .mkt-card-overlay-cta:hover { transform: translateX(2px); }
.mkt-card:hover .mkt-card-overlay-cta:hover svg { transform: translateX(3px); }

/* ─── FOOTER DO CARD: SIGLA + ESTADO + DESCRICAO ─── */
.mkt-card-foot {
  background: var(--white);
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--gray-100);
}
.mkt-card-foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mkt-card-foot-left { min-width: 0; }
.mkt-card-foot-desc {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-top: 1px dashed var(--gray-200);
  padding-top: 9px;
}
.mkt-card-foot-desc strong {
  color: var(--black);
  font-weight: 700;
}
.mkt-card-sigla {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--black);
  margin-bottom: 2px;
}
.mkt-card-nome {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-card-foot-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-card-foot-status.is-urgente {
  background: rgba(220, 38, 38, 0.12);
  color: var(--red);
}
.mkt-card-foot-status.is-urgente::before {
  content: '⚡';
  animation: mktPulse 1.6s ease-in-out infinite;
}
.mkt-card-foot-status.is-padrao {
  background: var(--gray-100);
  color: var(--gray-600);
}
@keyframes mktPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.15); }
}

/* ─── VARIANTE: MAIS PROCURADO ─── */
.mkt-card.is-hot .mkt-card-foot {
  background: linear-gradient(180deg, #fffaf0 0%, var(--white) 100%);
  border-top: 1px solid rgba(212, 166, 65, 0.25);
}
.mkt-card.is-hot .mkt-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at top right,
    rgba(212, 166, 65, 0.18) 0%,
    transparent 55%
  );
  pointer-events: none;
}

/* ─── VARIANTE: EM BREVE ─── */
.mkt-card.is-soon .mkt-card-image img { filter: grayscale(0.5) brightness(0.85); }
.mkt-card.is-soon:hover .mkt-card-image img { transform: none; }
.mkt-card.is-soon:hover { transform: none; }
.mkt-card.is-soon .mkt-card-overlay { display: none; }
.mkt-card.is-soon .mkt-card-foot {
  background: var(--gray-50);
}
.mkt-card.is-soon .mkt-card-foot-status {
  background: var(--gray-200);
  color: var(--gray-600);
}

/* Animação de entrada — cards revelam em cascata */
.mkt-card {
  opacity: 0;
  transform: translateY(12px);
  animation: mktCardReveal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.mkt-card:nth-child(1) { animation-delay: 0.05s; }
.mkt-card:nth-child(2) { animation-delay: 0.12s; }
.mkt-card:nth-child(3) { animation-delay: 0.19s; }
.mkt-card:nth-child(4) { animation-delay: 0.26s; }
.mkt-card:nth-child(5) { animation-delay: 0.33s; }
.mkt-card:nth-child(n+6) { animation-delay: 0.4s; }
@keyframes mktCardReveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .mkt-card,
  .mkt-card-foot-status.is-urgente::before {
    animation: none !important;
  }
  .mkt-card { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .mkt-card-sigla { font-size: 1.4rem; }
  .mkt-card-overlay { padding: 14px 16px 16px; }
  .mkt-card-overlay-value { font-size: 0.78rem; }
}

/* ============ DROPDOWN "CURSOS" (abre abaixo do botão) ============ */
.mkt-cursos-wrapper {
  position: relative;
  display: inline-block;
}
.mkt-cursos-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius);
  width: 320px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray-200);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 150;
}
.mkt-cursos-wrapper.is-open .mkt-cursos-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mkt-cursos-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-left: 1px solid var(--gray-200);
  transform: rotate(45deg);
}
.mkt-cursos-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition);
}
.mkt-cursos-option:hover { background: var(--gray-50); color: var(--black); }
.mkt-cursos-option-icon {
  width: 32px;
  height: 32px;
  background: var(--black);
  color: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.mkt-cursos-option-text { flex: 1; min-width: 0; }
.mkt-cursos-option-title { font-size: 0.92rem; font-weight: 700; color: var(--black); }
.mkt-cursos-option-desc { font-size: 0.74rem; color: var(--gray-500); margin-top: 1px; font-weight: 500; }

@media (max-width: 720px) {
  .mkt-cursos-dropdown {
    position: fixed;
    top: auto;
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: calc(100vw - 32px);
    margin-top: 12px;
  }
  .mkt-cursos-dropdown::before { display: none; }
}

/* ============ FOOTER ============ */
.mkt-footer {
  background: var(--black);
  color: var(--gray-400);
  padding: 48px 0 24px;
  font-size: 0.88rem;
}
.mkt-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 24px;
  margin-bottom: 28px;
}
@media (min-width: 720px) {
  .mkt-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px 48px;
  }
}
.mkt-footer-brand p {
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--gray-500);
  line-height: 1.55;
  max-width: 320px;
}
.mkt-footer-logo img {
  height: 36px;
  filter: invert(1);
  opacity: 0.92;
}
.mkt-footer-col h4 {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}
.mkt-footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mkt-footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  transition: color var(--transition);
  font-size: 0.88rem;
}
.mkt-footer-list a:hover { color: var(--gold-light); }
.mkt-footer-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.mkt-footer-meta {
  text-align: center;
  font-size: 0.76rem;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-800);
  padding-top: 18px;
}
/* Compatibilidade com versão antiga do footer */
.mkt-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.mkt-footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
}
.mkt-footer-links a:hover { color: var(--gold-light); }
