/* TABS */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.tab-btn {
  padding: 0.5rem 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.tab-btn:hover { background: var(--primary-light); color: white; }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-btn.hidden { display: none; }

.btn-primary { background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s; text-decoration: none; display: inline-block; }
.btn-primary:hover { background: var(--primary-light); }
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; }

.btn-secondary { background: var(--secondary); color: black; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-secondary:hover { transform: translateY(-2px); }

.btn-outline { background: white; color: var(--primary); border: 2px solid var(--primary); padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-outline:hover { background: var(--primary); color: white; }

/* CARGOS TABS */
.cargos-tabs-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.cargo-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--background);
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.cargo-tab:hover { background: #e9ecef; color: var(--primary); }
.cargo-tab.active { background: var(--primary); color: white; border-color: var(--primary); font-weight: bold; }
.cargo-content-area { display: none; animation: fadeIn 0.3s; }
.cargo-content-area.active { display: block; }

/* MUNICÍPIO SELECTOR */
.municipio-selector { margin: 1.5rem 0; padding: 1rem; background: var(--muted); border-radius: 8px; text-align: center; }
.municipio-selector select {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 100%;
  max-width: 300px;
  margin: 0.5rem auto;
  display: block;
}
.municipio-selector label { display: block; margin-top: 1rem; color: white; }

.municipio-info {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--primary);
  border-radius: 8px;
  color: white;
}
.municipio-info h2 { font-size: 1.5rem; margin-bottom: 1rem; color: white; border: none; }
.municipio-info p { color: rgba(255,255,255,0.9); }

/* DATA SECTION */
.data-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.data-section h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--primary); }
.chart-container { position: relative; height: 400px; margin: 1rem 0; }

/* ACTION BUTTONS - 50% MENOS ESPAÇO */
.action-buttons { display: flex; gap: 0.375rem; flex-wrap: wrap; margin-top: 0.5rem; justify-content: center; }
.action-buttons .tab-btn { flex: 1; min-width: 140px; text-align: center; }

/* FEATURE LIST - 50% MENOS ESPAÇO */
.feature-list { list-style: none; padding-left: 0; }
.feature-list li { padding-left: 2rem; position: relative; margin-bottom: 0.375rem; line-height: 1.5; }
.feature-list li::before { content: "✅"; position: absolute; left: 0; top: 0; }

/* INÍCIO - 50% MENOS ESPAÇO */
.inicio-titulo { text-align: center; font-size: 2.2rem; color: var(--primary); margin-bottom: 0.75rem; }
.inicio-texto-principal { text-align: center; max-width: 800px; margin: 0 auto 1rem; color: var(--text); font-size: 1.1rem; line-height: 1.6; }
.inicio-lista-box { background: #f9f9f9; padding: 1rem; border-radius: 8px; margin: 1rem auto; max-width: 800px; }
.inicio-lista-box h3 { margin-top: 0; margin-bottom: 0.5rem; color: var(--primary); }

/* PRODUTOS */
.section-title { text-align: center; margin-bottom: 1rem; }
.section-subtitle { margin-top: 2rem; margin-bottom: 1rem; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.product-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }
.product-card.featured { border: 3px solid var(--secondary); transform: scale(1.05); position: relative; }
.product-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: black;
  padding: 0.4rem 1.5rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}
.product-price { background: var(--background); padding: 1rem; border-radius: 8px; margin: 1.5rem 0; }
.product-price-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0 0; }

.product-banner {
  background: var(--header-bg);
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}
.product-banner p { margin: 0; color: var(--text); font-size: 1.1rem; }
.product-banner strong { color: var(--primary); font-weight: 800; }
.product-banner a { color: var(--primary-light); font-weight: bold; text-decoration: underline; }

.product-cta-box {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--card);
  border-radius: 12px;
}
.cta-faq { border: 2px dashed var(--secondary); }
.cta-acesso { border: 2px dashed var(--primary); }
.product-cta-box h3 { color: var(--primary); margin-bottom: 1rem; }
.product-cta-box p { color: var(--muted); margin-bottom: 1.5rem; }

/* ELECTION GROUP */
.election-group { margin-bottom: 2rem; }
.election-title { background: var(--primary); color: white; padding: 0.5rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 1.2rem; font-weight: 600; }
.report-item { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); transition: background 0.2s; }
.report-item:hover { background: #f1f5f9; }
.report-item:last-child { border-bottom: none; }
.btn-download { background: var(--primary); color: white; padding: 0.5rem 1rem; border-radius: 6px; text-decoration: none; font-size: 0.9rem; transition: background 0.2s; }
.btn-download:hover { background: var(--primary-light); }

/* TICKER */
.ticker {
  background: #002b55;
  color: white;
  overflow: hidden;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  position: relative;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--secondary);
  color: black;
  padding: 0.75rem 1rem;
  font-weight: 700;
  z-index: 2;
  display: flex;
  align-items: center;
  box-shadow: 2px 0 4px rgba(0,0,0,0.2);
}
.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: tickerScroll 400s linear infinite;
  font-family: 'Roboto Mono', monospace;
  text-shadow: 0 0 2px rgba(0,0,0,0.4);
  padding-left: 180px;
}
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { display: inline-block; padding: 0 2rem; border-right: 1px solid rgba(255,255,255,0.2); }
.ticker-year { color: var(--secondary); font-weight: 700; margin-right: 0.5rem; }
.ticker-candidate { color: #FFD700; font-weight: bold; }
.ticker:hover .ticker-content { animation-play-state: paused; }

/* MODAL */
.content-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  overflow-y: auto;
  padding: 2rem 1rem;
}
.content-modal.active { display: flex; align-items: flex-start; justify-content: center; }
.content-modal-container {
  background: white;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  padding: 2rem;
  position: relative;
  animation: modalSlideIn 0.3s;
  margin: 2rem 0;
}
.content-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.content-modal-close:hover { background: var(--background); color: var(--primary); }
.content-modal-title { color: var(--primary); font-size: 1.8rem; margin-bottom: 1.5rem; border-bottom: 3px solid var(--secondary); padding-bottom: 0.5rem; }

/* FAQ */
.faq-category { margin-bottom: 2rem; }
.faq-category-title { background: var(--primary); color: white; padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 1.2rem; font-weight: 600; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; overflow: hidden; }
.faq-question { background: var(--background); padding: 1rem; cursor: pointer; font-weight: 600; color: var(--primary); display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-question:hover { background: #e9ecef; }
.faq-answer { padding: 1rem; display: none; background: white; line-height: 1.7; color: var(--text); }
.faq-answer.active { display: block; }
.faq-arrow { transition: transform 0.3s; }
.faq-question.active .faq-arrow { transform: rotate(180deg); }

/* GLOSSÁRIO */
.glossario-categoria { margin-bottom: 2.5rem; background: var(--background); padding: 1.5rem; border-radius: 8px; border-left: 4px solid var(--primary); }
.glossario-categoria-nome { color: var(--primary); font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }
.glossario-categoria-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; }
.glossario-termo { margin-bottom: 1.5rem; padding: 1rem; background: white; border-radius: 6px; border: 1px solid var(--border); }
.glossario-termo-titulo { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--secondary); }
.glossario-termo-definicao { color: var(--text); line-height: 1.7; margin-bottom: 0.75rem; }
.glossario-termo-exemplo { background: rgba(255,215,0,0.1); padding: 0.75rem; border-radius: 4px; font-size: 0.9rem; color: var(--muted); border-left: 3px solid var(--secondary); }

/* FONTES */
.fonte-item { margin-bottom: 2rem; padding: 1.5rem; background: var(--background); border-radius: 8px; }
.fonte-nome { color: var(--primary); font-size: 1.3rem; font-weight: 700; margin-bottom: 0.75rem; }
.fonte-descricao { color: var(--text); line-height: 1.7; margin-bottom: 1rem; }
.fonte-url { color: var(--primary-light); font-weight: 600; text-decoration: underline; }
.metodologia-section { margin-bottom: 2rem; }
.metodologia-section h4 { color: var(--primary); font-size: 1.2rem; margin-bottom: 1rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }

/* PARTIDOS */
.partidos-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
.partidos-tab { padding: 0.75rem 1.5rem; background: var(--background); border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.partidos-tab:hover { background: var(--primary-light); color: white; }
.partidos-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.partidos-content { display: none; }
.partidos-content.active { display: block; animation: fadeIn 0.3s; }
.partido-card { background: white; border: 2px solid var(--border); border-radius: 8px; padding: 1.5rem; margin-bottom: 1rem; transition: all 0.2s; }
.partido-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,61,121,0.1); }
.partido-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--border); }
.partido-sigla { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.partido-situacao { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.partido-situacao.ativo { background: var(--success); color: white; }
.partido-situacao.historico { background: var(--warning); color: black; }
.partido-nome { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.partido-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.partido-info-item { background: var(--background); padding: 0.75rem; border-radius: 6px; }
.partido-info-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
.partido-info-value { font-weight: 600; color: var(--text); }
.partido-espectro { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.9rem; font-weight: 600; margin-top: 0.5rem; }
.partido-espectro.esquerda { background: #ff6b6b; color: white; }
.partido-espectro.centro-esquerda { background: #ffa502; color: white; }
.partido-espectro.centro { background: #ffd700; color: black; }
.partido-espectro.centro-direita { background: #7bed9f; color: black; }
.partido-espectro.direita { background: #70a1ff; color: white; }

/* VISÃO COMPORTAMENTAL */
.visao-comportamental-selector { background: var(--card); padding: 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; border: 2px solid var(--border); }
.visao-comportamental-selector h4 { color: var(--primary); margin-bottom: 1rem; font-size: 1.1rem; }
.visao-charts-container { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.visao-loading { text-align: center; padding: 2rem; color: var(--muted); font-style: italic; }