/* ═══════════════════════════════════════════════════════════════
   AIRES & FONSECA - INTELIGÊNCIA CONTÁBIL
   Sistema de Design e Estilização
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Paleta de Cores - Verde Profissional */
  --primary-dark: #1a4d2e;
  --primary: #2d6a4f;
  --primary-medium: #40916c;
  --primary-light: #52b788;
  --accent: #74c69d;
  --accent-light: #95d5b2;
  --accent-ultra: #b7e4c7;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #6a6a6a;
  --border: #e0e0e0;
  --shadow: rgba(26, 77, 46, 0.08);
  --shadow-medium: rgba(26, 77, 46, 0.12);
  --shadow-strong: rgba(26, 77, 46, 0.18);
  
  /* Tipografia */
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 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;
  
  /* Responsividade */
  --container-width: 1200px;
  --container-narrow: 900px;
  --container-wide: 1400px;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.01em;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h5 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

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

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

/* HEADER E NAVEGAÇÃO */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px var(--shadow);
}

.header-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.main-nav a {
  text-decoration: none;
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

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

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

/* CONTAINER E LAYOUT */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.section {
  padding: var(--space-3xl) 0;
}

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

.section-subtitle {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-description {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-light);
}

/* BACKGROUNDS */
.bg-light {
  background: var(--bg-light);
}

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

.bg-gradient {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

/* CARDS E BOXES */
.card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: var(--space-lg);
  box-shadow: 0 2px 12px var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
}

.card:hover {
  box-shadow: 0 8px 24px var(--shadow-medium);
  transform: translateY(-4px);
}

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

.card-title {
  color: var(--primary-dark);
  font-size: 1.35rem;
  margin-bottom: var(--space-sm);
}

.card-text {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* GRID SYSTEM */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

/* BOTÕES */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

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

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

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
}

/* ALERTAS E AVISOS */
.alert {
  padding: var(--space-md);
  border-radius: 8px;
  margin-bottom: var(--space-md);
  border-left: 4px solid;
}

.alert-warning {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.alert-info {
  background: #d1ecf1;
  border-color: #0dcaf0;
  color: #055160;
}

.alert-success {
  background: var(--accent-ultra);
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

/* LISTAS */
.list-check {
  list-style: none;
  padding: 0;
}

.list-check li {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  position: relative;
  color: var(--text-medium);
}

.list-check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: bold;
  font-size: 1.2rem;
}

/* TABELAS */
.table-responsive {
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: var(--primary-dark);
  color: var(--bg-white);
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  color: var(--text-medium);
}

tr:hover {
  background: var(--bg-light);
}

/* FOOTER */
.site-footer {
  background: var(--primary-dark);
  color: var(--bg-white);
  padding: var(--space-2xl) 0 var(--space-lg);
}

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

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

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

.footer-section a {
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: var(--space-xs);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.5;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
  margin-bottom: var(--space-xs);
  color: inherit;
}

/* RESPONSIVIDADE */
@media (max-width: 968px) {
  :root {
    --space-xl: 2.5rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
  }
  
  .header-container {
    padding: var(--space-sm) var(--space-md);
  }
  
  .main-nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    transition: left 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
  }
  
  .main-nav.active {
    left: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    padding: var(--space-md);
    gap: 0;
  }
  
  .main-nav li {
    border-bottom: 1px solid var(--border);
  }
  
  .main-nav a {
    display: block;
    padding: var(--space-md) 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .container-narrow {
    padding: 0 var(--space-md);
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ANIMAÇÕES */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

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

.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); }
