/* ════════════════════════════════════════════════════════════════════
   MAB SERVIÇOS CONTÁBEIS - ESTILO PRINCIPAL
   Design: Profissional, Confiável, Educativo
   Paleta: Verde institucional com toques de cinza refinado
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Paleta de cores exclusiva */
  --primary-dark: #1a4d2e;
  --primary-main: #2d5a3d;
  --primary-light: #4a7c59;
  --accent-gold: #c49a3f;
  --accent-warm: #d4a95f;
  
  /* Neutros refinados */
  --gray-900: #1a1f1e;
  --gray-800: #2d3432;
  --gray-700: #4a524f;
  --gray-600: #6b7471;
  --gray-500: #8b9590;
  --gray-400: #adb5b2;
  --gray-300: #cbd2d0;
  --gray-200: #e3e8e6;
  --gray-100: #f0f4f1;
  --gray-50: #f8faf9;
  
  /* Background variations */
  --bg-primary: #ffffff;
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --bg-dark: var(--primary-dark);
  
  /* Typography */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'Courier New', monospace;
  
  /* Spacing system */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 77, 46, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 77, 46, 0.12);
  --shadow-lg: 0 8px 24px rgba(26, 77, 46, 0.15);
  --shadow-xl: 0 16px 48px rgba(26, 77, 46, 0.18);
}

/* ════════════════════════════════════════════════════════════════════
   RESET E BASE
   ════════════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-800);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

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

h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  max-width: 75ch;
}

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

em {
  font-style: italic;
  color: var(--gray-700);
}

a {
  color: var(--primary-main);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ════════════════════════════════════════════════════════════════════
   HEADER E NAVEGAÇÃO
   ════════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

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

.logo-link {
  display: flex;
  align-items: center;
  transition: opacity var(--transition-fast);
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-link img {
  height: 50px;
  width: auto;
}

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

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  padding: var(--space-xs) 0;
  letter-spacing: 0.01em;
}

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

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

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

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

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--gray-800);
  margin: 5px 0;
  transition: var(--transition-base);
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════════════
   SECTIONS E CONTAINERS
   ════════════════════════════════════════════════════════════════════ */

section {
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.narrow-container {
  max-width: 900px;
  margin: 0 auto;
}

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

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background-color: rgba(196, 154, 63, 0.08);
  border-radius: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--gray-900);
  margin-bottom: var(--space-md);
}

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

/* ════════════════════════════════════════════════════════════════════
   HERO SECTION
   ════════════════════════════════════════════════════════════════════ */

.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-image: url('../assets/hero.svg');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-main);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.2s;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.4s;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  max-width: 600px;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.6s;
}

.hero-cta {
  display: inline-flex;
  gap: var(--space-md);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.8s;
}

/* ════════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

.btn-primary {
  background-color: var(--primary-dark);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary:hover {
  background-color: var(--primary-dark);
  color: white;
}

/* ════════════════════════════════════════════════════════════════════
   CARDS E BOXES
   ════════════════════════════════════════════════════════════════════ */

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

.card {
  background-color: white;
  border-radius: 8px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
}

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

.card-icon {
  width: 56px;
  height: 56px;
  background-color: rgba(26, 77, 46, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.75rem;
  color: var(--primary-dark);
}

.card-title {
  font-size: 1.375rem;
  font-family: var(--font-serif);
  margin-bottom: var(--space-sm);
  color: var(--gray-900);
}

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

/* ════════════════════════════════════════════════════════════════════
   INFO BOXES E ALERTS
   ════════════════════════════════════════════════════════════════════ */

.info-box {
  background-color: var(--gray-50);
  border-left: 4px solid var(--primary-dark);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 4px;
}

.info-box-title {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
  font-size: 1.125rem;
}

.warning-box {
  background-color: rgba(212, 169, 95, 0.08);
  border-left: 4px solid var(--accent-warm);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════════════ */

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

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

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

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

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

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

/* ════════════════════════════════════════════════════════════════════
   FORMULÁRIO
   ════════════════════════════════════════════════════════════════════ */

.form-section {
  background-color: var(--bg-secondary);
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  background-color: white;
  padding: var(--space-xl);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--gray-800);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: all var(--transition-base);
  background-color: white;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-main);
  box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

.form-success,
.form-error {
  padding: var(--space-md);
  border-radius: 6px;
  margin-bottom: var(--space-md);
  display: none;
}

.form-success {
  background-color: rgba(26, 77, 46, 0.1);
  border: 1px solid var(--primary-main);
  color: var(--primary-dark);
}

.form-error {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  color: #dc3545;
}

/* ════════════════════════════════════════════════════════════════════
   FAQ ACCORDION
   ════════════════════════════════════════════════════════════════════ */

.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--primary-light);
}

.faq-question {
  width: 100%;
  padding: var(--space-lg);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  font-family: var(--font-serif);
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary-dark);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--primary-main);
  transition: transform var(--transition-base);
  font-weight: 400;
}

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

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

.faq-answer-content {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--gray-700);
  line-height: 1.7;
}

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

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */

.site-footer {
  background-color: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

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

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

.footer-section p,
.footer-section a {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-section a:hover {
  color: white;
}

.footer-legal {
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.5;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════════════════════════════════ */

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

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

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

.hidden {
  display: none !important;
}

/* Background variants */
.bg-gray {
  background-color: var(--bg-secondary);
}

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

/* ════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════ */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }
  
  .main-nav.active {
    max-height: 500px;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-md) 0;
  }
  
  .main-nav li {
    width: 100%;
    border-bottom: 1px solid var(--gray-200);
  }
  
  .main-nav a {
    display: block;
    padding: var(--space-md) var(--space-lg);
  }
  
  .main-nav a::after {
    display: none;
  }
  
  section {
    padding: var(--space-xl) var(--space-md);
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .form-container {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .hero-section {
    min-height: 70vh;
  }
}