/* =========================
   1. VARIÁVEIS E BASE
========================= */
:root {
  --primary-blue: #2563eb;
  --primary-cyan: #0891b2;
  --primary-green: #059669;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --shadow-soft: 0 4px 12px rgba(37, 99, 235, 0.08);
  --shadow-strong: 0 8px 24px rgba(37, 99, 235, 0.15);
  --gradient-main: linear-gradient(120deg, #2563eb 0%, #0891b2 50%, #059669 100%);
  --gradient-highlight: linear-gradient(90deg, #fde68a, #6ee7b7);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif; background: var(--bg-light); color: var(--text-dark); line-height: 1.5; overflow-x: hidden; }

/* =========================
   2. HEADER
========================= */
.fg-header { background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 1000; }
.fg-header-container { max-width: 1400px; margin: 0 auto; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; }
.fg-header-left { display: flex; align-items: center; gap: 12px; }
.fg-header-logo { width: 60px; height: 60px; object-fit: contain; }
.fg-header-title strong { font-size: 1.5rem; font-weight: 900; background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: block; }
.fg-header-sub { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.fg-header-right { display: flex; gap: 16px; align-items: center; }

/* =========================
   3. BOTÕES
========================= */
.button-primary, .button-outline, .button-entrar, .button-registar { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.button-entrar span { background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.button-outline span { color: #fff; }
.button-entrar { background: #fff; border: 2px solid #7dd3fc; box-shadow: var(--shadow-soft); }
.button-entrar:hover { background: #f0f9ff; transform: translateY(-1px); }
.button-registar { background: var(--gradient-main); border: 2px solid transparent; box-shadow: var(--shadow-soft); color: #fff; }
.button-registar span { color: #fff; -webkit-text-fill-color: #fff; }
.button-registar:hover { background: linear-gradient(135deg, #1e40af, #1e3a8a); transform: translateY(-1px); }
.button-outline { background: rgba(255,255,255,0.15); border: 2px solid #7dd3fc; color: #fff; }
.button-outline:hover { background: #fff; border-color: #fff; }
.button-outline:hover span { -webkit-text-fill-color: var(--primary-blue); }
.button-primary { background: #fff; color: var(--primary-blue); border: none; box-shadow: var(--shadow-soft); }
.button-primary:hover { background: #f1f5f9; color: #000; }
.area-tecnica-link { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: 0.2s; }
.area-tecnica-link:hover { color: var(--primary-blue); }

/* =========================
   4. HERO
========================= */
.fg-hero { background: var(--gradient-main); padding: 80px 20px 140px; text-align: center; color: #fff; }
.fg-hero-content { max-width: 900px; margin: 0 auto; }
.fg-hero-badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 6px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; margin-bottom: 24px; }
.fg-hero h1 { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.fg-hero-highlight { background: var(--gradient-highlight); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fg-hero p { font-size: 1.25rem; color: #e0f2fe; max-width: 700px; margin: 0 auto 40px; }
.fg-hero-actions { display: flex; justify-content: center; gap: 16px; margin-bottom: 60px; }
.fg-hero-metrics { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.metric { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); padding: 30px; border-radius: 24px; min-width: 180px; border: 1px solid rgba(255,255,255,0.1); }
.metric strong { display: block; font-size: 2rem; font-weight: 800; }

/* =========================
   5. TIMELINE
========================= */
.section { max-width: 1200px; margin: 80px auto; padding: 0 24px; display: flex; flex-direction: column; align-items: center; }
.section h2 { font-size: 2.5rem; font-weight: 900; text-align: center; background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.section-sub { color: var(--text-muted); text-align: center; margin-bottom: 48px; }
.timeline-container { width: 100%; max-width: 1000px; display: flex; flex-direction: column; align-items: center; }
.timeline-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; margin-bottom: 32px; }
.timeline-step { background: #fff; border: 2px solid #e2e8f0; border-radius: 20px; padding: 24px 16px; text-align: center; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; }
.timeline-step.active { background: var(--gradient-main); border-color: transparent; color: #fff; transform: translateY(-5px); box-shadow: var(--shadow-strong); }
.timeline-step-number { font-size: 1.5rem; font-weight: 800; background: #f1f5f9; color: var(--primary-blue); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; margin-bottom: 12px; }
.timeline-step.active .timeline-step-number { background: rgba(255,255,255,0.2); color: #fff; }
.timeline-step-title { font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.timeline-step-date { font-size: 0.8rem; margin-top: 8px; opacity: 0.8; }
.timeline-panel { width: 100%; max-width: 800px; background: var(--gradient-main); border-radius: 24px; padding: 40px; color: #fff; box-shadow: var(--shadow-strong); }
.timeline-panel-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }

/* =========================
   6. CARDS DE PROJETOS
========================= */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; width: 100%; }
.card { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-soft); transition: 0.3s; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-strong); }
.card::before { content: ''; display: block; height: 5px; background: var(--gradient-main); border-radius: 24px 24px 0 0; }
.card-body { padding: 24px; position: relative; }
.card-body h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 8px; }
.card-location { color: var(--text-muted); font-size: .88rem; margin: 0 0 12px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.card-footer .price { font-weight: 800; font-size: 1rem; color: var(--primary-blue); }
.card-footer .votes { font-size: .85rem; color: var(--text-muted); }
.status-tag { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.status-tag.status-approved { background: #d1fae5; color: #065f46; }
.status-tag.status-voting { background: #dbeafe; color: #1e40af; }
.status-tag.status-submitted { background: #e0f2fe; color: #075985; }
.projects-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); grid-column: 1 / -1; }
.projects-empty .icon { font-size: 3rem; margin-bottom: 12px; }
.projetos-vencedores-bg { width: 100vw; background: #d7e8ff; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; padding: 48px 0; }
.projetos-vencedores-section { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =========================
   7. INFO SECTION
========================= */
.info-section { margin-top: 60px; margin-bottom: 60px; }
.info-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; }
.info-card { background: #fff; border-radius: 20px; padding: 32px 28px; border: 1px solid #e2e8f0; box-shadow: 0 2px 12px rgba(37,99,235,.06); transition: transform .2s, box-shadow .2s; }
.info-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(37,99,235,.12); }
.info-card-highlight { background: linear-gradient(135deg, #eff6ff, #f0fdfa); border-color: #bfdbfe; }
.info-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.info-card-icon { font-size: 2rem; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 14px; flex-shrink: 0; }
.info-card-header h3 { font-size: 1.25rem; font-weight: 800; }
.info-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.info-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; line-height: 1.5; }
.info-bullet { color: var(--primary-blue); font-weight: 700; flex-shrink: 0; }
.steps-list { display: flex; flex-direction: column; gap: 20px; }
.step-item { display: flex; align-items: flex-start; gap: 16px; }
.step-num { width: 36px; height: 36px; background: var(--gradient-main); color: #fff; font-weight: 800; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-item strong { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.step-item p { font-size: .88rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

/* =========================
   8. CENTRO DE APOIO
========================= */
.support-section { margin-top: 40px; margin-bottom: 40px; }
.support-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; width: 100%; }
.support-col { display: flex; flex-direction: column; gap: 24px; }
.support-card { background: #fff; border-radius: 20px; padding: 28px; border: 1px solid #e2e8f0; box-shadow: 0 2px 12px rgba(37,99,235,.06); }
.support-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.support-icon { font-size: 1.5rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 12px; flex-shrink: 0; }
.support-card-header h3 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid #f1f5f9; }
.faq-item:last-child { border-bottom: none; }
.faq-question { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 0; background: none; border: none; cursor: pointer; font-size: .93rem; font-weight: 600; color: var(--text-dark); text-align: left; font-family: inherit; }
.faq-question::after { content: '+'; font-size: 1.2rem; font-weight: 700; color: var(--primary-blue); flex-shrink: 0; margin-left: 12px; }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; font-size: .88rem; color: var(--text-muted); line-height: 1.6; padding: 0; }
.faq-item.open .faq-answer { max-height: 200px; padding: 0 0 14px; }
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; text-decoration: none; color: var(--text-dark); transition: all .15s; }
.doc-item:hover { border-color: var(--primary-blue); box-shadow: 0 4px 12px rgba(37,99,235,.08); transform: translateY(-1px); }
.doc-icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-item strong { display: block; font-size: .9rem; font-weight: 700; }
.doc-item span { font-size: .82rem; color: var(--text-muted); }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; font-size: .9rem; }
.contact-item > span { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.contact-item strong { display: block; font-size: .82rem; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.contact-item a { color: var(--primary-blue); text-decoration: none; font-weight: 600; }
.contact-item a:hover { text-decoration: underline; }

/* =========================
   9. FINAL CTA
========================= */
.final-cta { text-align: center; padding: 60px 24px; background: linear-gradient(135deg, #eff6ff, #f0fdfa); border-radius: 24px; margin: 40px 0; }
.final-cta h2 { font-size: 1.8rem; font-weight: 900; margin: 0 0 12px; color: var(--text-dark); }
.final-cta p { color: var(--text-muted); font-size: 1.05rem; margin: 0 0 24px; }

/* =========================
   10. FOOTER
========================= */
.footer { background: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #0891b2); color: #fff; padding: 60px 24px 24px; margin-top: 60px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.footer-desc { color: #cbd5e1; font-size: 1.1rem; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #cbd5e1; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-sep { border: none; border-top: 1px solid #3b82f6; margin: 40px 0 16px; }
.footer-copy { text-align: center; color: #cbd5e1; font-size: 1rem; }

/* =========================
   11. RESPONSIVIDADE
========================= */
@media (max-width: 1024px) { .timeline-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .info-cards-grid { grid-template-columns: 1fr; } .support-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .fg-header-container { padding: 12px 20px; }
  .fg-header-right { gap: 8px; }
  .timeline-steps { grid-template-columns: repeat(2, 1fr); }
  .fg-hero h1 { font-size: 2.5rem; }
  .footer-container { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .timeline-steps { grid-template-columns: 1fr; }
  .button-primary, .button-outline, .button-entrar, .button-registar { width: 100%; justify-content: center; }
  .fg-hero-actions { flex-direction: column; }
}
