/* ============================================================================
   A. SANTOS CONTABILIDADE - DESIGN SYSTEM
   ============================================================================ */

/* --- RESET E BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta de cores exclusiva */
  --cor-primaria: #1a4d2e;
  --cor-primaria-clara: #2d6b47;
  --cor-primaria-escura: #0f3320;
  --cor-secundaria: #c17817;
  --cor-secundaria-clara: #d89635;
  --cor-secundaria-escura: #a06212;
  
  --cor-texto-principal: #2d3748;
  --cor-texto-secundario: #4a5568;
  --cor-texto-suave: #718096;
  
  --cor-fundo-claro: #ffffff;
  --cor-fundo-neutro: #f7fafc;
  --cor-fundo-suave: #edf2f7;
  
  --cor-borda: #e2e8f0;
  --cor-borda-escura: #cbd5e0;
  
  --cor-sucesso: #38a169;
  --cor-alerta: #dd6b20;
  --cor-erro: #c53030;
  
  /* Tipografia */
  --fonte-principal: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fonte-mono: 'Courier New', Courier, monospace;
  
  /* Espaçamentos */
  --espaco-xs: 0.5rem;
  --espaco-sm: 1rem;
  --espaco-md: 1.5rem;
  --espaco-lg: 2rem;
  --espaco-xl: 3rem;
  --espaco-2xl: 4rem;
  --espaco-3xl: 6rem;
  
  /* Raios de borda */
  --raio-sm: 4px;
  --raio-md: 8px;
  --raio-lg: 12px;
  
  /* Sombras */
  --sombra-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --sombra-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --sombra-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  
  /* Transições */
  --transicao-rapida: 0.2s ease;
  --transicao-normal: 0.3s ease;
}

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

body {
  font-family: var(--fonte-principal);
  color: var(--cor-texto-principal);
  line-height: 1.6;
  background-color: var(--cor-fundo-claro);
  -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(--cor-primaria-escura);
  margin-bottom: var(--espaco-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(--espaco-sm);
  color: var(--cor-texto-secundario);
}

a {
  color: var(--cor-primaria);
  text-decoration: none;
  transition: color var(--transicao-rapida);
}

a:hover {
  color: var(--cor-secundaria);
}

strong {
  font-weight: 600;
  color: var(--cor-primaria);
}

/* --- LAYOUT CONTAINERS --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--espaco-lg);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--espaco-lg);
}

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

/* --- HEADER / NAVEGAÇÃO --- */
.header {
  background-color: var(--cor-fundo-claro);
  border-bottom: 1px solid var(--cor-borda);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--sombra-sm);
}

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

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

.nav-menu {
  display: flex;
  gap: var(--espaco-lg);
  list-style: none;
}

.nav-menu a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--cor-texto-principal);
  padding: var(--espaco-xs) var(--espaco-sm);
  border-radius: var(--raio-sm);
  transition: all var(--transicao-rapida);
}

.nav-menu a:hover {
  background-color: var(--cor-fundo-suave);
  color: var(--cor-primaria);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--cor-primaria);
  cursor: pointer;
}

/* --- SEÇÕES --- */
.section {
  padding: var(--espaco-3xl) 0;
}

.section-alt {
  background-color: var(--cor-fundo-neutro);
}

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

.section-header {
  text-align: center;
  margin-bottom: var(--espaco-2xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  color: var(--cor-secundaria);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.875rem;
  margin-bottom: var(--espaco-xs);
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: var(--espaco-md);
}

.section-description {
  font-size: 1.125rem;
  color: var(--cor-texto-secundario);
  line-height: 1.8;
}

/* --- HERO --- */
.hero {
  background: linear-gradient(135deg, var(--cor-primaria-escura) 0%, var(--cor-primaria) 100%);
  color: white;
  padding: var(--espaco-3xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: var(--espaco-2xl) var(--espaco-lg);
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: var(--espaco-md);
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--espaco-xl);
  line-height: 1.7;
}

/* --- CARDS --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--espaco-lg);
  margin-top: var(--espaco-xl);
}

.card {
  background-color: var(--cor-fundo-claro);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio-lg);
  padding: var(--espaco-xl);
  transition: all var(--transicao-normal);
}

.card:hover {
  box-shadow: var(--sombra-lg);
  transform: translateY(-4px);
  border-color: var(--cor-primaria);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-clara) 100%);
  border-radius: var(--raio-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  margin-bottom: var(--espaco-md);
}

.card h3 {
  font-size: 1.375rem;
  margin-bottom: var(--espaco-sm);
}

.card p {
  font-size: 1rem;
  line-height: 1.7;
}

/* --- ALERT BOXES --- */
.alert-box {
  background-color: #fff8f0;
  border-left: 4px solid var(--cor-secundaria);
  padding: var(--espaco-lg);
  border-radius: var(--raio-md);
  margin: var(--espaco-xl) 0;
}

.alert-box-danger {
  background-color: #fff5f5;
  border-left-color: var(--cor-erro);
}

.alert-box-success {
  background-color: #f0fdf4;
  border-left-color: var(--cor-sucesso);
}

.alert-box h4 {
  color: var(--cor-secundaria);
  margin-bottom: var(--espaco-sm);
  display: flex;
  align-items: center;
  gap: var(--espaco-xs);
}

.alert-box-danger h4 {
  color: var(--cor-erro);
}

.alert-box-success h4 {
  color: var(--cor-sucesso);
}

/* --- CONTEÚDO EDUCATIVO --- */
.content-block {
  background-color: var(--cor-fundo-claro);
  border-radius: var(--raio-lg);
  padding: var(--espaco-xl);
  margin-bottom: var(--espaco-xl);
  border: 1px solid var(--cor-borda);
}

.content-block h3 {
  font-size: 1.5rem;
  margin-bottom: var(--espaco-md);
  padding-bottom: var(--espaco-sm);
  border-bottom: 3px solid var(--cor-primaria);
  display: inline-block;
}

.content-block ul, .content-block ol {
  margin-left: var(--espaco-lg);
  margin-bottom: var(--espaco-md);
}

.content-block li {
  margin-bottom: var(--espaco-sm);
  color: var(--cor-texto-secundario);
  line-height: 1.7;
}

.content-block li strong {
  color: var(--cor-primaria);
}

/* --- TABELAS --- */
.table-wrapper {
  overflow-x: auto;
  margin: var(--espaco-xl) 0;
  border-radius: var(--raio-md);
  box-shadow: var(--sombra-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--cor-fundo-claro);
}

thead {
  background-color: var(--cor-primaria);
  color: white;
}

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

td {
  padding: var(--espaco-md);
  border-bottom: 1px solid var(--cor-borda);
  color: var(--cor-texto-secundario);
}

tbody tr:hover {
  background-color: var(--cor-fundo-suave);
}

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

/* --- FAQ / ACCORDION --- */
.faq-container {
  margin: var(--espaco-xl) 0;
}

.faq-item {
  background-color: var(--cor-fundo-claro);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio-md);
  margin-bottom: var(--espaco-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background-color: var(--cor-fundo-neutro);
  border: none;
  padding: var(--espaco-lg);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--cor-primaria);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transicao-rapida);
}

.faq-question:hover {
  background-color: var(--cor-fundo-suave);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform var(--transicao-rapida);
}

.faq-question.active::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transicao-normal);
}

.faq-answer-content {
  padding: var(--espaco-lg);
  color: var(--cor-texto-secundario);
  line-height: 1.7;
}

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

/* --- FORMULÁRIO --- */
.form-container {
  max-width: 700px;
  margin: var(--espaco-xl) auto;
  background-color: var(--cor-fundo-claro);
  padding: var(--espaco-2xl);
  border-radius: var(--raio-lg);
  box-shadow: var(--sombra-md);
}

.form-group {
  margin-bottom: var(--espaco-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--cor-primaria);
  margin-bottom: var(--espaco-xs);
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--espaco-sm);
  border: 2px solid var(--cor-borda);
  border-radius: var(--raio-sm);
  font-family: var(--fonte-principal);
  font-size: 1rem;
  color: var(--cor-texto-principal);
  transition: border-color var(--transicao-rapida);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--cor-primaria);
}

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

.form-error {
  color: var(--cor-erro);
  font-size: 0.875rem;
  margin-top: var(--espaco-xs);
  display: none;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--cor-erro);
}

.form-input.error + .form-error,
.form-select.error + .form-error,
.form-textarea.error + .form-error {
  display: block;
}

.form-button {
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-clara) 100%);
  color: white;
  border: none;
  padding: var(--espaco-md) var(--espaco-xl);
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--raio-md);
  cursor: pointer;
  transition: all var(--transicao-rapida);
  width: 100%;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra-md);
}

.form-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  background-color: #f0fdf4;
  border: 2px solid var(--cor-sucesso);
  color: var(--cor-sucesso);
  padding: var(--espaco-lg);
  border-radius: var(--raio-md);
  text-align: center;
  font-weight: 600;
  display: none;
}

.form-success.show {
  display: block;
}

/* --- CREDENCIAIS --- */
.credentials-box {
  background: linear-gradient(135deg, var(--cor-primaria-escura) 0%, var(--cor-primaria) 100%);
  color: white;
  padding: var(--espaco-2xl);
  border-radius: var(--raio-lg);
  text-align: center;
  margin: var(--espaco-xl) 0;
}

.credentials-box h3 {
  color: white;
  margin-bottom: var(--espaco-md);
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--espaco-lg);
  margin-top: var(--espaco-xl);
}

.credential-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: var(--espaco-lg);
  border-radius: var(--raio-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.credential-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--cor-secundaria-clara);
  margin-bottom: var(--espaco-xs);
}

.credential-item span {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

/* --- FOOTER --- */
.footer {
  background-color: var(--cor-primaria-escura);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--espaco-2xl) 0 var(--espaco-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--espaco-xl);
  margin-bottom: var(--espaco-xl);
}

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

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--cor-secundaria-clara);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--espaco-xs);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--espaco-lg);
  text-align: center;
}

.footer-legal {
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.5;
  max-width: 900px;
  margin: 0 auto;
}

.footer-legal p {
  margin-bottom: var(--espaco-xs);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* --- UTILITÁRIOS --- */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--cor-primaria);
}

.text-secondary {
  color: var(--cor-secundaria);
}

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

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

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--cor-fundo-claro);
    border-bottom: 1px solid var(--cor-borda);
    padding: var(--espaco-md);
    box-shadow: var(--sombra-md);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .table-wrapper {
    font-size: 0.875rem;
  }
  
  th, td {
    padding: var(--espaco-sm);
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow,
  .container-wide {
    padding: 0 var(--espaco-sm);
  }
  
  .section {
    padding: var(--espaco-xl) 0;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .form-container {
    padding: var(--espaco-lg);
  }
}
