/* ═══════════════════════════════════════════════════════════
   ANÁLISE SERVIÇOS CONTÁBEIS - Design System
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta de cores */
  --primary-900: #1e3a8a;
  --primary-800: #1e40af;
  --primary-700: #1d4ed8;
  --primary-600: #2563eb;
  --primary-500: #3b82f6;
  --primary-400: #60a5fa;
  --primary-300: #93c5fd;
  --primary-200: #bfdbfe;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;
  
  --success-700: #047857;
  --success-600: #059669;
  --success-500: #10b981;
  --success-400: #34d399;
  --success-300: #6ee7b7;
  
  --neutral-900: #0f172a;
  --neutral-800: #1e293b;
  --neutral-700: #334155;
  --neutral-600: #475569;
  --neutral-500: #64748b;
  --neutral-400: #94a3b8;
  --neutral-300: #cbd5e1;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --neutral-50: #f8fafc;
  
  /* Tipografia */
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Courier New', monospace;
  
  /* Espaçamento */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Bordas */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-system);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--neutral-800);
  background-color: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografia ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--neutral-900);
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-700);
}

/* ── Layout Containers ───────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── Header & Navigation ─────────────────────────────────── */
.site-header {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
}

.logo {
  height: 50px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.main-nav a {
  color: var(--neutral-700);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary-600);
  background-color: var(--primary-50);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neutral-700);
  margin: 5px 0;
  transition: 0.3s;
}

/* ── Section Styling ─────────────────────────────────────── */
section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: 2.25rem;
  color: var(--neutral-900);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--neutral-600);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-bg-light {
  background-color: var(--neutral-50);
}

.section-bg-pattern {
  background-image: url('../images/pattern.svg');
  background-size: 100px 100px;
  background-repeat: repeat;
}

/* ── Cards & Content Blocks ──────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--neutral-200);
}

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

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.card-title {
  font-size: 1.25rem;
  color: var(--neutral-900);
  margin-bottom: var(--space-sm);
}

.card-text {
  color: var(--neutral-600);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Grid Layouts ────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

thead {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--neutral-200);
}

tbody tr:hover {
  background-color: var(--primary-50);
}

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

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-600);
  border: 2px solid var(--primary-600);
}

.btn-outline:hover {
  background: var(--primary-600);
  color: white;
}

/* ── Alert & Info Boxes ──────────────────────────────────── */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
  border-left: 4px solid;
}

.alert-info {
  background-color: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-900);
}

.alert-success {
  background-color: #ecfdf5;
  border-color: var(--success-500);
  color: var(--success-900);
}

.alert-warning {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}

/* ── FAQ Accordion ───────────────────────────────────────── */
.faq-item {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-md);
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--neutral-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: var(--neutral-50);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--primary-600);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--neutral-600);
  line-height: 1.7;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--neutral-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-system);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
  border-color: #dc2626;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background-color: var(--neutral-900);
  color: var(--neutral-300);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--space-md);
  font-size: 1.125rem;
}

.footer-section p,
.footer-section li {
  color: var(--neutral-400);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--neutral-400);
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-800);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.8rem;
  color: var(--neutral-500);
  opacity: 0.5;
  line-height: 1.4;
}

/* ── Utility Classes ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success-600); }
.text-muted { color: var(--neutral-500); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ── Responsive Design ───────────────────────────────────── */
@media (max-width: 1024px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .main-nav.active {
    max-height: 500px;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-md);
  }
  
  .main-nav a {
    display: block;
    padding: var(--space-md);
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .section-title { font-size: 1.75rem; }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: var(--space-2xl) 0;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .container,
  .container-wide,
  .container-narrow {
    padding: 0 var(--space-sm);
  }
  
  .card {
    padding: var(--space-md);
  }
}