/* ============================================================
   MELHORIAS VAGA PÚBLICA — Newsletter popup, FAQ, alertas
   ============================================================ */

/* ---------- POPUP NEWSLETTER ---------- */
.nl-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(13, 61, 46, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.nl-overlay.show { opacity: 1; pointer-events: all; }
.nl-box {
  background: #fff; border-radius: 28px;
  padding: 48px 44px; max-width: 520px; width: 100%;
  text-align: center; position: relative;
  box-shadow: 0 24px 80px rgba(13,61,46,.22);
  transform: translateY(20px); transition: transform .3s;
}
.nl-overlay.show .nl-box { transform: translateY(0); }
.nl-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--bg); cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  font-size: 20px; line-height: 1; transition: background .15s;
}
.nl-close:hover { background: var(--border); }
.nl-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-light); display: grid;
  place-items: center; margin: 0 auto 20px;
  color: var(--primary);
}
.nl-icon .material-symbols-outlined { font-size: 32px; }
.nl-box h2 {
  font: 700 clamp(22px,3vw,28px)/1.1 'Source Serif 4', serif;
  letter-spacing: -.02em; margin: 0 0 10px; color: var(--text);
}
.nl-box p { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.nl-form { display: flex; flex-direction: column; gap: 10px; }
.nl-form input {
  height: 50px; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 0 18px;
  font: inherit; font-size: 15px; outline: 0;
  transition: border-color .2s;
}
.nl-form input:focus { border-color: var(--primary); }
.nl-form .btn { height: 50px; border-radius: 14px; font-size: 15px; }
.nl-skip {
  margin-top: 14px; display: block;
  color: var(--muted); font-size: 13px; cursor: pointer;
  background: none; border: 0; text-decoration: underline;
}
.nl-success { display: none; }
.nl-success .material-symbols-outlined {
  font-size: 48px; color: var(--primary);
  display: block; margin-bottom: 12px;
}

/* ---------- BANNER ALERTA POR CONCURSO (páginas de detalhe) ---------- */
.alert-banner {
  background: linear-gradient(90deg, #e8f5f0 0%, #fff 100%);
  border: 1.5px solid var(--primary);
  border-radius: 18px; padding: 20px 24px;
  display: flex; align-items: center; gap: 18px;
  margin: 24px 0; flex-wrap: wrap;
}
.alert-banner .ab-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.alert-banner .ab-icon .material-symbols-outlined { font-size: 24px; }
.alert-banner .ab-text { flex: 1; min-width: 200px; }
.alert-banner .ab-text strong {
  display: block; font-size: 15px; font-weight: 800;
  color: var(--primary-dark); margin-bottom: 2px;
}
.alert-banner .ab-text span { font-size: 14px; color: var(--muted); }
.ab-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ab-form input {
  height: 42px; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0 14px; font: inherit;
  font-size: 14px; outline: 0; min-width: 220px;
  transition: border-color .2s;
}
.ab-form input:focus { border-color: var(--primary); }
.ab-form .btn { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 12px; }
.ab-success { display: none; color: var(--primary); font-weight: 800; font-size: 14px; }

/* ---------- FAQ ACCORDION ---------- */
.faq-section { margin: 40px 0 0; }
.faq-section h2 {
  font: 700 26px/1.15 'Source Serif 4', serif;
  color: var(--primary-dark); margin: 0 0 20px;
  letter-spacing: -.02em;
}
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 16px; overflow: hidden;
  margin-bottom: 10px; background: #fff;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--primary); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 18px 22px; cursor: pointer;
  font-weight: 700; font-size: 15px; color: var(--text);
  background: none; border: 0; width: 100%; text-align: left;
}
.faq-q .material-symbols-outlined {
  font-size: 20px; color: var(--primary);
  transition: transform .25s; flex-shrink: 0;
}
.faq-item.open .faq-q .material-symbols-outlined { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  padding: 0 22px; color: var(--muted); font-size: 15px; line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 22px 18px; }

/* ---------- STICKY CTA MOBILE ---------- */
.sticky-cta {
  display: none;
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 500; white-space: nowrap;
  box-shadow: 0 8px 28px rgba(13,61,46,.22);
  animation: ctaSlideUp .5s ease both;
  border-radius: 999px;
}
@keyframes ctaSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (max-width: 768px) { .sticky-cta { display: inline-flex; } }

/* ---------- FAIXA DE URGÊNCIA (contador de prazo) ---------- */
.deadline-strip {
  background: #fff3cd; border: 1px solid #ffc107;
  border-radius: 14px; padding: 12px 20px;
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px; font-size: 14px; font-weight: 700;
  color: #7a5200;
}
.deadline-strip .material-symbols-outlined { color: #f0a500; font-size: 20px; }

/* ---------- BREADCRUMB ---------- */
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px; list-style: none; padding: 0; margin: 16px 0 0;
  font-size: 13px; color: var(--muted);
}
.breadcrumb ol li:not(:last-child)::after {
  content: '/'; margin-left: 4px; color: var(--border);
}
.breadcrumb ol a { color: var(--primary); font-weight: 600; }

/* ---------- AJUSTE: meta description nas páginas de concurso ---------- */
.concurso-intro {
  background: var(--surface-soft);
  border-radius: 16px; padding: 18px 22px;
  margin-bottom: 20px; font-size: 15px;
  color: var(--muted); line-height: 1.65;
  border-left: 4px solid var(--primary);
}

@media (max-width: 640px) {
  .nl-box { padding: 32px 24px; }
  .alert-banner { flex-direction: column; align-items: flex-start; }
  .ab-form { width: 100%; }
  .ab-form input { min-width: 0; flex: 1; }
}

/* ============================================================
   NEWSLETTER SLIDE-IN (substitui modal intrusivo)
   ============================================================ */
#nlSlideIn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 320px;
  background: #fff;
  border: 1.5px solid #dde8e2;
  border-radius: 20px;
  padding: 20px 20px 18px;
  box-shadow: 0 8px 40px rgba(14,26,21,.14);
  z-index: 9000;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
}
#nlSlideIn.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#nlSlideClose {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  font-size: 20px; line-height: 1;
  color: #6b7b72; cursor: pointer;
  padding: 2px 6px; border-radius: 6px;
}
#nlSlideClose:hover { background: #f4f6f5; }
.nl-dot {
  display: inline-block; width: 7px; height: 7px;
  background: #2aaa80; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
  animation: pulse 2s infinite;
}
.nl-slide-eyebrow {
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .1em; color: #2aaa80; margin: 0 0 6px;
}
.nl-slide-title {
  font-size: 16px; font-weight: 700; color: #111714; margin: 0 0 4px;
  line-height: 1.25;
}
.nl-slide-sub {
  font-size: 13px; color: #6b7b72; margin: 0 0 14px;
}
#nlSlideForm { display: flex; flex-direction: column; gap: 8px; }
#nlSlideForm input[type=email] {
  height: 42px; border: 1.5px solid #dde8e2; border-radius: 10px;
  padding: 0 14px; font-size: 14px; outline: none;
  transition: border-color .2s;
}
#nlSlideForm input[type=email]:focus { border-color: #2aaa80; }
#nlSlideForm .btn { width: 100%; justify-content: center; height: 42px; border-radius: 10px; }
#nlSlideSuccess {
  display: flex; align-items: center; gap: 10px;
  color: #0f6e56; font-size: 14px; font-weight: 600;
}

/* Mobile: banner fixo no rodapé (não cobre conteúdo) */
@media (max-width: 768px) {
  #nlSlideIn {
    position: fixed;
    bottom: 0; right: 0; left: 0;
    width: 100%; border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  #nlSlideIn.show { transform: translateY(0); }
  body.has-bottomnav #nlSlideIn { bottom: 64px; }
}

/* ============================================================
   NEWSLETTER SEGMENTADA (footer + slide-in expandido)
   ============================================================ */
.nl-prefs { margin-top: 10px; }
.nl-prefs-title { font-size: 12px; font-weight: 700; color: #3d4d46; margin: 0 0 6px; }
.nl-prefs-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.nl-pref-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #3d4d46; cursor: pointer;
  background: #f4f6f5; border: 1px solid #dde8e2;
  border-radius: 6px; padding: 4px 10px;
  transition: background .15s, border-color .15s;
}
.nl-pref-label input { display: none; }
.nl-pref-label:has(input:checked) {
  background: #e6f7f1; border-color: #2aaa80; color: #0f6e56; font-weight: 700;
}
.nl-footer-ok { color: #0f6e56; font-weight: 700; font-size: 14px; }

/* ============================================================
   SISTEMA DE AUTORES — byline em notícias
   ============================================================ */
.author-byline {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid #dde8e2;
  margin-bottom: 24px;
}
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: #e6f7f1; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #1a5c45;
  flex-shrink: 0; overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-meta { flex: 1; }
.author-name { font-size: 14px; font-weight: 700; color: #111714; margin: 0 0 1px; }
.author-role { font-size: 12px; color: #6b7b72; margin: 0; }
.author-date { font-size: 12px; color: #6b7b72; }

/* ============================================================
   RESUMO 30 SEGUNDOS — topo do card de concurso
   ============================================================ */
.concurso-snapshot {
  background: linear-gradient(135deg, #e8f5f0 0%, #f0faf6 100%);
  border: 1.5px solid #c5e8da;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.snapshot-label {
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .08em; color: #2aaa80; margin-bottom: 2px;
  display: block;
}
.snapshot-value {
  font-size: 18px; font-weight: 800; color: #0d3d2e; line-height: 1.1;
}
.snapshot-sub { font-size: 12px; color: #6b7b72; }
.snapshot-title {
  grid-column: 1/-1;
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .1em; color: #1a5c45;
  margin-bottom: 4px; display: flex; align-items: center; gap: 7px;
}
.snapshot-title::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%; background: #2aaa80;
  animation: pulse 2s infinite;
}

/* ============================================================
   INTEGRAÇÃO FERRAMENTAS — cta de plano de estudos
   ============================================================ */
.tools-cta {
  background: #fff;
  border: 1.5px solid #dde8e2;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.tools-cta-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: #e6f7f1; display: grid; place-items: center;
  color: #2aaa80; font-size: 24px; flex-shrink: 0;
}
.tools-cta-body { flex: 1; min-width: 180px; }
.tools-cta-body strong { display: block; font-size: 15px; color: #111714; margin-bottom: 2px; }
.tools-cta-body span { font-size: 13px; color: #6b7b72; }

/* ============================================================
   PÁGINA REDAÇÃO / AUTORES
   ============================================================ */
.authorsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; margin-top: 24px;
}
.authorCard {
  background: #fff; border: 1.5px solid #dde8e2;
  border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.authorCard .author-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: #e6f7f1; display: grid; place-items: center;
  font-size: 28px; font-weight: 800; color: #1a5c45; margin-bottom: 14px;
  overflow: hidden;
}
.authorCard h3 { font-size: 17px; font-weight: 700; margin: 0 0 3px; }
.authorCard .role { font-size: 13px; color: #2aaa80; font-weight: 600; margin: 0 0 10px; }
.authorCard .bio { font-size: 13px; color: #6b7b72; line-height: 1.6; margin: 0; }
.authorCard .areas {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px;
  justify-content: center;
}
.authorCard .area-tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; background: #e6f7f1; color: #0f6e56;
}

/* ============================================================
   ESTADOS — cobertura nacional (todos os 27)
   ============================================================ */
.statesGrid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.stateCard-sm {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 8px; background: #fff;
  border: 1.5px solid #dde8e2; border-radius: 14px;
  text-decoration: none; transition: all .2s;
  gap: 4px;
}
.stateCard-sm:hover { background: #e6f7f1; border-color: #2aaa80; transform: translateY(-2px); }
.stateCard-sm strong { font-size: 15px; font-weight: 800; color: #0d3d2e; }
.stateCard-sm span { font-size: 10px; color: #6b7b72; font-weight: 600; text-align: center; }

/* ============================================================
   MICROCOPY DE ATUALIZAÇÃO
   ============================================================ */
[data-microcopy="update-time"] {
  font-size: 12px; color: #6b7b72; font-weight: 600;
}
