/* ==========================================================================
   PORTFÓLIO GOVTECH - SISTEMA DE GESTÃO MUNICIPAL INTELIGENTE
   Identidade Visual: Tons Claros, Limpos, Institucionais, Alta Confiança
   ========================================================================== */

:root {
  /* Paleta Primária & Marca */
  --primary: #0052cc;
  --primary-dark: #0747a6;
  --primary-light: #ebf3ff;
  --primary-gradient: linear-gradient(135deg, #0052cc 0%, #1772eb 100%);

  /* Cores de Destaque e Acentos */
  --secondary: #10b981;
  --secondary-dark: #059669;
  --secondary-light: #ecfdf5;

  --accent-orange: #f59e0b;
  --accent-orange-light: #fffbeb;

  --accent-purple: #8b5cf6;
  --accent-purple-light: #f5f3ff;

  --accent-cyan: #06b6d4;
  --accent-cyan-light: #ecfeff;

  --accent-rose: #f43f5e;
  --accent-rose-light: #fff1f2;

  /* Neutros e Fundos Claros */
  --bg-body: #f8fafc;
  --bg-gradient: linear-gradient(140deg, #f0f7ff 0%, #f4fbf7 40%, #faf8fc 80%, #fffdf8 100%);
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  
  /* Textos */
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Bordas e Sombras Suaves */
  --border-subtle: #e2e8f0;
  --border-light: #edf2f7;
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 20px 35px -8px rgba(0, 82, 204, 0.12), 0 6px 14px -3px rgba(15, 23, 42, 0.04);

  /* Dimensões e Raios */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Base */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-body);
  background: var(--bg-gradient) no-repeat fixed;
  background-size: cover;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.brand-badge {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background: rgba(0, 82, 204, 0.05);
}

.btn-nav-action {
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  padding: 0.55rem 1.25rem;
  transition: all var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 82, 204, 0.2);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.5rem;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  background-color: var(--secondary);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: #0f172a;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, #0052cc 0%, #10b981 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  padding: 0.85rem 1.65rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  font-size: 1rem;
}

.hero-btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border: 1px solid var(--primary);
  box-shadow: 0 8px 18px rgba(0, 82, 204, 0.22);
}

.hero-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 82, 204, 0.3);
}

.hero-btn-outline {
  background: #ffffff;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.hero-btn-outline:hover {
  background: var(--surface-hover);
  border-color: #cbd5e1;
  color: var(--text-main);
  transform: translateY(-2px);
}

.hero-btn-accent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
}

.hero-btn-accent:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.35);
}

/* Painel de Métricas do Hero (Do PDF) */
.hero-stats-bar {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero Card Interativo */
.hero-showcase-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  position: relative;
}

.hero-badge-float {
  position: absolute;
  top: -14px;
  right: 24px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   SELETORES E FILTROS DE MÓDULOS
   ========================================================================== */
.modules-section {
  padding: 4.5rem 0 5.5rem;
  position: relative;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* Barra de Filtros por Categoria */
.filter-tabs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.filter-tab-btn:hover {
  background: var(--surface-hover);
  border-color: #cbd5e1;
  color: var(--text-main);
}

.filter-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.25);
}

.filter-tab-btn .badge-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.filter-tab-btn.active .badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Busca interna nos módulos */
.search-modules-box {
  max-width: 480px;
  margin: 0 auto 2.5rem;
  position: relative;
}

.search-modules-box input {
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-subtle);
  font-size: 0.95rem;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.search-modules-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.12);
  outline: none;
}

.search-modules-box i {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ==========================================================================
   CARDS DE MÓDULOS (20 SOLUÇÕES DO PDF)
   Estilo Humano, Limpo, Tipografia Clara, Sem Efeito "IA Genérica"
   ========================================================================== */
.module-item-col {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.module-item-col.d-none {
  display: none !important;
}

.gov-module-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.gov-module-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-hover);
}

/* Header do Card */
.module-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.module-num {
  font-family: 'Inter', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-muted);
  flex-shrink: 0;
}

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.cat-saude .module-icon { background: var(--primary-light); color: var(--primary); }
.cat-saude .module-num { background: #e0edff; color: var(--primary-dark); }

.cat-zeladoria .module-icon { background: var(--secondary-light); color: var(--secondary-dark); }
.cat-zeladoria .module-num { background: #d1fae5; color: var(--secondary-dark); }

.cat-transito .module-icon { background: var(--accent-orange-light); color: #d97706; }
.cat-transito .module-num { background: #fef3c7; color: #b45309; }

.cat-meioambiente .module-icon { background: var(--accent-cyan-light); color: #0e7490; }
.cat-meioambiente .module-num { background: #cffafe; color: #0891b2; }

.cat-educacao .module-icon { background: var(--accent-purple-light); color: #7c3aed; }
.cat-educacao .module-num { background: #ede9fe; color: #6d28d9; }

.module-title-box {
  flex: 1;
}

.module-category-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.module-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0;
  line-height: 1.35;
}

.module-description {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* Box "Por que adquirir" idêntico ao PDF */
.why-buy-box {
  background: #f8fafc;
  border-left: 3px solid var(--secondary);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin-top: auto;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.5;
}

.why-buy-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary-dark);
  margin-bottom: 0.25rem;
}

.module-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.mod-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   COMO FUNCIONA / CONTRATAÇÃO (DO PDF)
   ========================================================================== */
.how-it-works-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-md);
  margin-top: 3.5rem;
  position: relative;
  overflow: hidden;
}

.how-it-works-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0052cc, #10b981, #f59e0b);
}

.step-card {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  height: 100%;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   SEÇÃO DE RECURSOS DA PLATAFORMA (COMO O SITE ORIGINAL)
   ========================================================================== */
.feature-box-light {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  height: 100%;
}

.feature-box-light:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-box-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   MODAIS (PORTAL DO CIDADÃO, BUSCA CEP, DEMONSTRAÇÃO)
   ========================================================================== */
.modal-content {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 1.75rem 1rem;
}

.modal-body {
  padding: 1.75rem;
}

.municipio-card-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all var(--transition-fast);
  cursor: pointer;
  width: 100%;
}

.municipio-card-btn:hover {
  background: #f0f7ff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}

.mun-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 4rem 0 2rem;
  color: var(--text-body);
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
}

/* Responsividade */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2.35rem;
  }
  .hero-section {
    padding: 3rem 0;
  }
}
