/* ==================================================================
   WEBBFINANCEIRO V2 - DESIGN SYSTEM - CSS GLOBAL
   Versão: 2.0 | Data: Dezembro 2025
   Sistema de Design Completo - Premium, Minimalista, Escalável
   ================================================================== */

/* ==================================================================
   1. RESET E NORMALIZE
   ================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--wf-font-body);
  line-height: 1.7;
  color: var(--wf-color-text);
  background: var(--wf-color-bg);
  font-size: 16px;
  overflow-x: hidden;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

img {
  border-style: none;
}

/* ==================================================================
   2. VARIÁVEIS CSS GLOBAIS
   ================================================================== */

:root {
  /* ===== TIPOGRAFIA ===== */
  --wf-font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wf-font-heading: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wf-font-mono: "Monaco", "Menlo", "Courier New", monospace;
  
  /* ===== CORES - BACKGROUNDS ===== */
  --wf-color-bg: #f6f8fb;
  --wf-color-surface: #ffffff;
  --wf-color-surface-alt: #edf1f7;
  --wf-color-surface-hover: #f8fafc;
  
  /* ===== CORES - BORDERS ===== */
  --wf-color-border: #e3e8ef;
  --wf-color-border-strong: #cbd2e0;
  --wf-color-border-light: #f1f5f9;
  
  /* ===== CORES - TEXT ===== */
  --wf-color-text: #1f2937;
  --wf-color-text-muted: #5b6478;
  --wf-color-text-light: #9ca3af;
  --wf-color-text-inverse: #ffffff;
  
  /* ===== CORES - ACCENT (GLOBAL) ===== */
  --wf-color-accent: #2563eb;
  --wf-color-accent-soft: #eef2ff;
  --wf-color-accent-strong: #1d4ed8;
  --wf-color-accent-light: #dbeafe;
  
  /* ===== CORES - STATUS ===== */
  --wf-color-success: #059669;
  --wf-color-success-soft: #d1fae5;
  --wf-color-warning: #d97706;
  --wf-color-warning-soft: #fef3c7;
  --wf-color-error: #dc2626;
  --wf-color-error-soft: #fee2e2;
  --wf-color-info: #0284c7;
  --wf-color-info-soft: #bae6fd;
  
  /* ===== ESPAÇAMENTO ===== */
  --wf-spacing-xs: 0.25rem;      /* 4px */
  --wf-spacing-sm: 0.5rem;       /* 8px */
  --wf-spacing-md: 1rem;         /* 16px */
  --wf-spacing-lg: 1.5rem;       /* 24px */
  --wf-spacing-xl: 2rem;         /* 32px */
  --wf-spacing-2xl: 3rem;        /* 48px */
  --wf-spacing-3xl: 4rem;        /* 64px */
  --wf-spacing-4xl: 6rem;        /* 96px */
  
  /* ===== BORDAS ===== */
  --wf-radius-sm: 10px;
  --wf-radius-md: 12px;
  --wf-radius-card: 18px;
  --wf-radius-lg: 24px;
  --wf-radius-full: 9999px;
  
  /* ===== SOMBRAS ===== */
  --wf-shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --wf-shadow-md: 0 4px 8px rgba(15, 23, 42, 0.06);
  --wf-shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08);
  --wf-shadow-card: 0 18px 45px rgba(15, 23, 42, 0.08);
  --wf-shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.06);
  --wf-shadow-hover: 0 20px 50px rgba(15, 23, 42, 0.12);
  
  /* ===== LAYOUT ===== */
  --wf-max-width-content: 1160px;
  --wf-max-width-article: 800px;
  --wf-max-width-sidebar: 300px;
  --wf-max-width-narrow: 680px;
  
  /* ===== TRANSITIONS ===== */
  --wf-transition-fast: 0.15s ease;
  --wf-transition-base: 0.2s ease;
  --wf-transition-slow: 0.3s ease;
  
  /* ===== Z-INDEX ===== */
  --wf-z-base: 1;
  --wf-z-dropdown: 100;
  --wf-z-sticky: 200;
  --wf-z-header: 1000;
  --wf-z-modal: 2000;
  --wf-z-tooltip: 3000;
  
  /* ===== BREAKPOINTS ===== */
  --wf-breakpoint-sm: 640px;
  --wf-breakpoint-md: 768px;
  --wf-breakpoint-lg: 1024px;
  --wf-breakpoint-xl: 1280px;
}

/* ==================================================================
   3. TIPOGRAFIA
   ================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--wf-font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: #0b1730;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  font-weight: 700;
  margin: 2em 0 0.75em;
  border-bottom: 2px solid var(--wf-color-border);
  padding-bottom: 0.5em;
}

h3 {
  font-size: clamp(1.15rem, 1.5vw, 1.5rem);
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  color: var(--wf-color-text);
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25em 0 0.5em;
  color: var(--wf-color-text);
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1em 0 0.5em;
  color: var(--wf-color-text);
}

h6 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1em 0 0.5em;
  color: var(--wf-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--wf-color-text);
  margin: 0 0 1.25em;
  font-weight: 400;
}

small, .wf-text-sm {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--wf-color-text-muted);
}

.wf-text-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}

.lead, .wf-lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--wf-color-text);
  font-weight: 400;
  margin-bottom: 1.5em;
}

a {
  color: var(--wf-color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--wf-transition-base);
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--wf-color-accent-strong);
  border-bottom-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--wf-color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 1.25em;
  line-height: 1.75;
  color: var(--wf-color-text);
}

li {
  margin-bottom: 0.5em;
}

ul li::marker {
  color: var(--wf-color-accent);
}

ol li::marker {
  color: var(--wf-color-text-muted);
  font-weight: 600;
}

blockquote {
  border-left: 4px solid var(--wf-color-accent);
  padding-left: 1.5rem;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--wf-color-text);
  background: var(--wf-color-accent-soft);
  padding: 1rem 1.5rem;
  border-radius: var(--wf-radius-sm);
}

code {
  background: #f1f5f9;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: var(--wf-font-mono);
  font-size: 0.9em;
  color: #e11d48;
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--wf-radius-sm);
  overflow-x: auto;
  margin: 1.5em 0;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* ==================================================================
   4. LAYOUT E CONTAINER
   ================================================================== */

.wf-container {
  width: min(var(--wf-max-width-content), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 var(--wf-spacing-md);
}

.wf-container--narrow {
  width: min(var(--wf-max-width-narrow), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 var(--wf-spacing-md);
}

.wf-container--article {
  width: min(var(--wf-max-width-article), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 var(--wf-spacing-md);
}

/* ==================================================================
   5. GRID SYSTEM
   ================================================================== */

.wf-grid {
  display: grid;
  gap: var(--wf-spacing-lg);
}

.wf-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.wf-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.wf-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wf-article-layout {
  display: grid;
  gap: var(--wf-spacing-xl);
}

@media (min-width: var(--wf-breakpoint-lg)) {
  .wf-article-layout {
    grid-template-columns: 1fr var(--wf-max-width-sidebar);
  }
}

/* ==================================================================
   6. CARDS
   ================================================================== */

.wf-card {
  background: var(--wf-color-surface);
  border-radius: var(--wf-radius-card);
  box-shadow: var(--wf-shadow-card);
  padding: var(--wf-spacing-lg);
  transition: transform var(--wf-transition-base), box-shadow var(--wf-transition-base);
}

.wf-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--wf-shadow-hover);
}

.wf-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--wf-spacing-sm);
  line-height: 1.3;
  color: #0b1730;
}

.wf-card__content {
  color: var(--wf-color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.wf-article-card {
  display: flex;
  flex-direction: column;
  background: var(--wf-color-surface);
  border-radius: var(--wf-radius-card);
  overflow: hidden;
  box-shadow: var(--wf-shadow-card);
  transition: transform var(--wf-transition-base);
}

.wf-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wf-shadow-hover);
}

.wf-article-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--wf-color-surface-alt);
}

.wf-article-card__content {
  padding: var(--wf-spacing-lg);
}

.wf-article-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--wf-spacing-sm);
  line-height: 1.3;
}

.wf-article-card__excerpt {
  color: var(--wf-color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ==================================================================
   7. BUTTONS
   ================================================================== */

.wf-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--wf-radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--wf-transition-base);
  border: none;
  text-decoration: none;
  line-height: 1.5;
}

.wf-btn--primary {
  background: var(--wf-color-accent);
  color: white;
}

.wf-btn--primary:hover {
  background: var(--wf-color-accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  color: white;
}

.wf-btn--secondary {
  background: transparent;
  color: var(--wf-color-accent);
  border: 2px solid var(--wf-color-accent);
}

.wf-btn--secondary:hover {
  background: var(--wf-color-accent-soft);
  color: var(--wf-color-accent-strong);
}

.wf-btn--outline {
  background: var(--wf-color-surface);
  color: var(--wf-color-text);
  border: 2px solid var(--wf-color-border);
}

.wf-btn--outline:hover {
  border-color: var(--wf-color-accent);
  color: var(--wf-color-accent);
}

/* ==================================================================
   8. BREADCRUMBS
   ================================================================== */

.wf-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--wf-spacing-sm);
  font-size: 0.875rem;
  color: var(--wf-color-text-muted);
  margin-bottom: var(--wf-spacing-lg);
}

.wf-breadcrumb a {
  color: var(--wf-color-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.wf-breadcrumb a:hover {
  color: var(--wf-color-accent);
}

.wf-breadcrumb__separator {
  color: var(--wf-color-border-strong);
  margin: 0 var(--wf-spacing-xs);
}

.wf-breadcrumb__current {
  color: var(--wf-color-text);
  font-weight: 600;
}

/* ==================================================================
   9. TABELAS
   ================================================================== */

.wf-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--wf-spacing-lg) 0;
  background: var(--wf-color-surface);
  border-radius: var(--wf-radius-sm);
  overflow: hidden;
  box-shadow: var(--wf-shadow-soft);
}

.wf-table thead {
  background: var(--wf-color-accent-soft);
}

.wf-table th {
  padding: var(--wf-spacing-md);
  text-align: left;
  font-weight: 700;
  color: var(--wf-color-text);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wf-table td {
  padding: var(--wf-spacing-md);
  border-top: 1px solid var(--wf-color-border);
}

.wf-table tbody tr:hover {
  background: var(--wf-color-surface-alt);
}

.wf-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================================================================
   10. UTILITÁRIOS
   ================================================================== */

.wf-section {
  padding: var(--wf-spacing-2xl) 0;
}

.wf-section-header {
  display: flex;
  flex-direction: column;
  gap: var(--wf-spacing-xs);
  margin-bottom: var(--wf-spacing-lg);
}

.wf-kicker {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--wf-color-text-muted);
  font-weight: 700;
}

.wf-text-center {
  text-align: center;
}

.wf-text-muted {
  color: var(--wf-color-text-muted);
}

.wf-mt-lg {
  margin-top: var(--wf-spacing-lg);
}

.wf-mb-lg {
  margin-bottom: var(--wf-spacing-lg);
}

/* ==================================================================
   11. RESPONSIVIDADE
   ================================================================== */

@media (max-width: calc(var(--wf-breakpoint-sm) - 1px)) {
  .wf-container {
    padding: 0 var(--wf-spacing-sm);
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .wf-grid--2,
  .wf-grid--3,
  .wf-grid--4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: var(--wf-breakpoint-sm)) {
  .wf-container {
    padding: 0 var(--wf-spacing-lg);
  }
}

/* ==================================================================
   11.5. ESTILOS PARA CONTEÚDO FIFA 2026
   ================================================================== */
   /* MOVIDO PARA: public/css/fifa.css
      Carregar apenas em páginas que usam conteúdo FIFA 2026 */

/* ==================================================================
   11.6. GRUPOS TEMÁTICOS (Category Pages)
   ================================================================== */

.wf-category-theme-group {
  margin: var(--wf-spacing-2xl) 0;
}

.wf-category-theme-group:first-of-type {
  margin-top: var(--wf-spacing-xl);
}

.wf-section-description {
  color: var(--wf-color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: var(--wf-spacing-sm);
  max-width: 65ch;
}

.wf-category-theme-group .wf-section-header {
  margin-bottom: var(--wf-spacing-lg);
}

.wf-category-theme-group .wf-grid {
  gap: var(--wf-spacing-lg);
}

/* ==================================================================
   12. ANIMAÇÕES SUAVES
   ================================================================== */

@keyframes wfFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wf-fade-up {
  animation: wfFadeUp 0.6s ease both;
}

/* ==================================================================
   CTA FUNIL - BOTÕES VERMELHOS
   ================================================================== */

.wf-cta-funil {
  margin: 48px 0;
  padding: 32px;
  background: #fff;
  border: 3px solid #d32f2f;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
  text-align: center;
}

.wf-cta-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  font-weight: 700;
}

.wf-cta-text {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #555;
}

.wf-cta-button--red {
  background-color: #d32f2f;
  color: #ffffff !important;
  padding: 20px 40px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 8px;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wf-cta-button--red:hover {
  background-color: #b71c1c;
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.5);
  transform: translateY(-3px);
  color: #ffffff !important;
}

/* ==================================================================
   12.1 LEGACY VISUAL COMPAT
   Remover quando todo tráfego estiver 100% em V2.
   ================================================================== */
body > nav:not([class]) {
  display: flex;
  align-items: center;
  gap: var(--wf-spacing-sm);
  padding: var(--wf-spacing-sm) var(--wf-spacing-md);
  background: var(--wf-color-surface);
  border-bottom: 1px solid var(--wf-color-border);
  font-weight: 600;
}

body > nav:not([class]) a {
  display: inline-flex;
  align-items: center;
  gap: var(--wf-spacing-xs);
  padding: var(--wf-spacing-xs) var(--wf-spacing-sm);
  border-radius: var(--wf-radius-sm);
  color: var(--wf-color-text);
  text-decoration: none;
  transition: all var(--wf-transition-base);
}

body > nav:not([class]) a:hover {
  background: var(--wf-color-surface-alt);
  color: var(--wf-color-accent);
}
/* ==================================================================
   LEGACY VISUAL COMPAT - remover quando todo tráfego estiver em V2
   Objetivo: evitar que navegações sem classes wf-* apareçam cruas
   ================================================================== */
body > nav:not([class]) {
  display: flex;
  align-items: center;
  gap: var(--wf-spacing-sm);
  padding: var(--wf-spacing-sm) var(--wf-spacing-md);
  background: var(--wf-color-surface);
  border-bottom: 1px solid var(--wf-color-border);
  font-weight: 600;
}

body > nav:not([class]) a {
  display: inline-block;
  padding: var(--wf-spacing-xs) var(--wf-spacing-sm);
  border-radius: var(--wf-radius-sm);
  color: var(--wf-color-text);
  text-decoration: none;
  transition: all var(--wf-transition-base);
}

body > nav:not([class]) a:hover {
  background: var(--wf-color-surface-alt);
  color: var(--wf-color-accent);
}
