/**
 * ========================================
 * CERRADÃO - CUSTOMIZAÇÃO DE CORES
 * ========================================
 * 
 * Este arquivo sobrescreve as cores primárias do tema original (azul)
 * com as cores oficiais do Cerradão (verde #42783c e marrom #9b6432).
 * 
 * IMPORTANTE: Este arquivo deve ser carregado DEPOIS do style.css
 * para garantir que as customizações sobrescrevam os estilos padrão.
 * 
 * Baseado em: docs/cerradao-design-system.md
 */

:root {
  /* ========================================
   * CORES PRIMÁRIAS - VERDE CERRADÃO
   * ======================================== */
  
  --primary-50: #e8f5e6;   /* Verde mais claro */
  --primary-100: #c1e1bc;
  --primary-200: #9acd95;
  --primary-300: #73b96d;
  --primary-400: #5a9253;
  --primary-500: #42783c;  /* Verde Principal Cerradão */
  --primary-600: #356030;
  --primary-700: #284824;
  --primary-800: #1b3018;
  --primary-900: #0e180c;  /* Verde mais escuro */

  /* ========================================
   * CORES SECUNDÁRIAS - MARROM CERRADÃO
   * ======================================== */
  
  --secondary-50: #f4e9df;
  --secondary-100: #e4d0b9;
  --secondary-200: #d4b793;
  --secondary-300: #c49e6d;
  --secondary-400: #b48247;
  --secondary-500: #9b6432;  /* Marrom Principal Cerradão */
  --secondary-600: #7c5028;
  --secondary-700: #5d3c1e;
  --secondary-800: #3e2814;
  --secondary-900: #1f140a;

  /* ========================================
   * CORES COMPLEMENTARES
   * ======================================== */
  
  /* Terracota (tons avermelhados naturais) */
  --terracota: #c07855;
  --terracota-light: #d49377;
  --terracota-dark: #9a5f42;
  
  /* Sage (verde suave/folhagem) */
  --sage: #87a96b;
  --sage-light: #9db87f;
  --sage-dark: #6d8854;

  /* Olive (verde seco/maduro) */
  --olive: #6b7c32;
  --olive-light: #8a9d4a;
  --olive-dark: #535f26;

  /* ========================================
   * APLICAÇÕES PRINCIPAIS
   * ======================================== */
  
  /* Sobrescreve a cor principal do tema */
  --primary: var(--primary-500);
  --brand: var(--primary-600);
  --primary-light: rgba(66, 120, 60, 0.15);
  --primary-light-white: rgba(66, 120, 60, 0.25);
  --button-secondary: var(--primary-50);
}

/* ========================================
 * MODO ESCURO
 * ======================================== */

[data-theme="dark"] {
  /* Ajustes para melhor contraste no modo escuro */
  --primary-50: #e8f5e60f;
  --primary-100: #c1e1bc25;
  --primary-light: rgba(154, 205, 149, 0.15);
  --primary-light-white: rgba(154, 205, 149, 0.25);
}

/* ========================================
 * CLASSES UTILITÁRIAS - CORES CERRADÃO
 * ======================================== */

/* Backgrounds */
.bg-cerradao-green { background-color: var(--primary-500) !important; }
.bg-cerradao-brown { background-color: var(--secondary-500) !important; }
.bg-terracota { background-color: var(--terracota) !important; }
.bg-sage { background-color: var(--sage) !important; }
.bg-olive { background-color: var(--olive) !important; }

/* Textos */
.text-cerradao-green { color: var(--primary-500) !important; }
.text-cerradao-brown { color: var(--secondary-500) !important; }
.text-terracota { color: var(--terracota) !important; }
.text-sage { color: var(--sage) !important; }
.text-olive { color: var(--olive) !important; }

/* Borders */
.border-cerradao-green { border-color: var(--primary-500) !important; }
.border-cerradao-brown { border-color: var(--secondary-500) !important; }
.border-terracota { border-color: var(--terracota) !important; }

/* Hover States */
.bg-hover-cerradao-green:hover { background-color: var(--primary-600) !important; }
.bg-hover-cerradao-brown:hover { background-color: var(--secondary-600) !important; }
.text-hover-cerradao-green:hover { color: var(--primary-600) !important; }
.text-hover-cerradao-brown:hover { color: var(--secondary-600) !important; }

/* ========================================
 * BOTÕES
 * ======================================== */

.btn-primary {
  background-color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
  color: white !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  color: white !important;
}

.btn-primary:active {
  background-color: var(--primary-700) !important;
  border-color: var(--primary-700) !important;
}

.btn-outline-primary {
  border-color: var(--primary-500) !important;
  color: var(--primary-500) !important;
}

.btn-outline-primary:hover {
  background-color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
  color: white !important;
}

/* ========================================
 * LINKS E INTERAÇÕES
 * ======================================== */

.text-hover-primary-600:hover {
  color: var(--primary-600) !important;
}

a.text-primary:hover {
  color: var(--primary-600) !important;
}

/* ========================================
 * BADGES E PILLS
 * ======================================== */

.badge-primary {
  background-color: var(--primary-500) !important;
  color: white !important;
}

.badge-terracota {
  background-color: var(--terracota) !important;
  color: white !important;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-terracota:hover {
  background-color: var(--terracota-dark) !important;
  text-decoration: none;
}

/* ========================================
 * FORMULÁRIOS
 * ======================================== */

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-500) !important;
  box-shadow: 0 0 0 0.2rem rgba(66, 120, 60, 0.25) !important;
}

.form-check-input:checked {
  background-color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
}

/* ========================================
 * PAGINAÇÃO
 * ======================================== */

.pagination .page-item.active .page-link {
  background-color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
}

.pagination .page-link:hover {
  color: var(--primary-600) !important;
}

/* ========================================
 * ALERTAS E NOTIFICAÇÕES
 * ======================================== */

.alert-primary {
  background-color: var(--primary-50) !important;
  border-color: var(--primary-200) !important;
  color: var(--primary-700) !important;
}

/* ========================================
 * NAVEGAÇÃO
 * ======================================== */

.nav-pills .nav-link.active {
  background-color: var(--primary-500) !important;
}

.nav-tabs .nav-link.active {
  color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
}

/* ========================================
 * PROGRESSOS E LOADERS
 * ======================================== */

.progress-bar {
  background-color: var(--primary-500) !important;
}

.spinner-border.text-primary {
  color: var(--primary-500) !important;
}

/* ========================================
 * CARDS E CONTAINERS
 * ======================================== */

.card-primary {
  border-color: var(--primary-500) !important;
}

.card-header.bg-primary {
  background-color: var(--primary-500) !important;
  color: white !important;
}

/* ========================================
 * MODO RESPONSIVO
 * ======================================== */

@media (max-width: 768px) {
  .badge-terracota {
    font-size: 0.75rem;
    padding: 2px 8px;
  }
}

/* ========================================
 * MODO DARK - AJUSTES ESPECÍFICOS
 * ======================================== */

[data-theme="dark"] .btn-primary {
  background-color: var(--primary-400) !important;
  border-color: var(--primary-400) !important;
}

[data-theme="dark"] .btn-primary:hover {
  background-color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
}

[data-theme="dark"] .text-primary {
  color: var(--primary-300) !important;
}

[data-theme="dark"] .badge-terracota {
  background-color: var(--terracota-light) !important;
  color: var(--neutral-900) !important;
}

[data-theme="dark"] .text-sage {
  color: var(--sage-light) !important;
}

/* ========================================
 * FIM DA CUSTOMIZAÇÃO
 * ======================================== */

/* ========================================
 * COMPONENTES RAÍZES CERRADÃO
 * ======================================== */

/* Header da Campanha */
.raizes-header {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  padding: 2rem;
  border-radius: 8px;
  color: white;
  margin-bottom: 2rem;
}

.raizes-header h1,
.raizes-header h2 {
  color: white !important;
  margin-bottom: 0.5rem;
}

.raizes-tagline {
  color: var(--primary-100);
  font-size: 1.125rem !important;
  font-style: italic;
}

/* Cards Raízes */
.raizes-card {
  border: 2px solid var(--primary-200);
  border-radius: 12px;
  padding: 1.5rem;
  background: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.raizes-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.raizes-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(66, 120, 60, 0.15);
}

.raizes-card:hover::before {
  transform: scaleY(1);
}

/* Valores Cards */
.valor-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.valor-card.respeito {
  border-color: var(--sage);
}

.valor-card.cuidado {
  border-color: var(--primary-500);
}

.valor-card.etica {
  border-color: var(--secondary-500);
}

.valor-card.trabalho {
  border-color: var(--terracota);
}

.valor-card.atitude {
  border-color: var(--olive);
}

.valor-card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.valor-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

/* Seções com Elementos Gráficos */
.raizes-section {
  position: relative;
  padding: 3rem 0;
}

.raizes-section.pattern-cana::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    var(--primary-100) 0px,
    var(--primary-100) 10px,
    var(--primary-200) 10px,
    var(--primary-200) 12px,
    transparent 12px,
    transparent 22px
  );
  opacity: 0.3;
  pointer-events: none;
}

.raizes-section.pattern-sol::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -100px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--terracota-light) 0%, transparent 70%);
  opacity: 0.2;
  pointer-events: none;
}

/* Timeline Raízes */
.raizes-timeline {
  position: relative;
  padding: 2rem 0;
}

.raizes-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-500), var(--secondary-500));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding: 0 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 4px solid white;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Citações Raízes */
.raizes-quote {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  position: relative;
}

.raizes-quote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  color: var(--primary-300);
  line-height: 1;
}

.raizes-quote-author {
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--primary-700);
}

/* Destaque de Informações */
.raizes-highlight {
  background: linear-gradient(135deg, var(--sage-light) 0%, var(--sage) 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  margin: 1rem 0;
}

.raizes-info-box {
  background: white;
  border: 2px solid var(--primary-200);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.raizes-info-box-title {
  color: var(--primary-600);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Botões Específicos da Campanha */
.btn-raizes {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white !important;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(66, 120, 60, 0.3);
}

.btn-raizes:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(66, 120, 60, 0.4);
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
}

.btn-raizes-secondary {
  background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
  color: white !important;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-raizes-outline {
  background: transparent;
  color: var(--primary-600) !important;
  border: 2px solid var(--primary-500);
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-raizes-outline:hover {
  background: var(--primary-500);
  color: white !important;
}

/* Ícones da Campanha */
.raizes-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.5rem;
}

.raizes-icon.verde {
  background: var(--primary-100);
  color: var(--primary-600);
}

.raizes-icon.marrom {
  background: var(--secondary-100);
  color: var(--secondary-600);
}

.raizes-icon.terracota {
  background: var(--terracota-light);
  color: var(--terracota-dark);
}

/* Grid de Valores */
.valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* Selo Raízes Inline */
.selo-raizes-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-50);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-700);
}

/* Divider com Tema */
.raizes-divider {
  height: 3px;
  background: linear-gradient(to right, 
    var(--primary-500) 0%, 
    var(--sage) 25%, 
    var(--terracota) 50%, 
    var(--secondary-500) 75%, 
    var(--primary-500) 100%
  );
  margin: 2rem 0;
  border: none;
  border-radius: 2px;
}

/* Banner de Valores */
.valores-banner {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--secondary-600) 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.valores-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

/* Elementos Decorativos */
.raizes-pattern-bg {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 10px, var(--primary-50) 10px, var(--primary-50) 11px);
}

/* Tags de Valores */
.valor-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0.25rem;
}

.valor-tag.respeito {
  background: var(--sage-light);
  color: var(--sage-dark);
}

.valor-tag.cuidado {
  background: var(--primary-100);
  color: var(--primary-700);
}

.valor-tag.etica {
  background: var(--secondary-100);
  color: var(--secondary-700);
}

.valor-tag.trabalho {
  background: var(--terracota-light);
  color: var(--terracota-dark);
}

.valor-tag.atitude {
  background: var(--olive-light);
  color: var(--olive-dark);
}

/* ========================================
 * ANIMAÇÕES RAÍZES CERRADÃO
 * ======================================== */

@keyframes raizes-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes raizes-grow {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-raizes-fade {
  animation: raizes-fade-in 0.6s ease-out;
}

.animate-raizes-grow {
  animation: raizes-grow 0.4s ease-out;
}

/* ========================================
 * UTILITÁRIOS EXTRAS
 * ======================================== */

/* Espaçamentos da Campanha */
.raizes-spacing-sm { margin: 1rem 0; }
.raizes-spacing-md { margin: 2rem 0; }
.raizes-spacing-lg { margin: 3rem 0; }

/* Gradientes Temáticos */
.gradient-verde {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
}

.gradient-marrom {
  background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-700) 100%);
}

.gradient-natural {
  background: linear-gradient(135deg, var(--sage) 0%, var(--olive) 100%);
}

/* Sombras Customizadas */
.shadow-raizes {
  box-shadow: 0 4px 12px rgba(66, 120, 60, 0.15);
}

.shadow-raizes-lg {
  box-shadow: 0 8px 24px rgba(66, 120, 60, 0.2);
}

/* ========================================
 * AJUSTES PARA MODO DARK - VGO E USUARIOS
 * ======================================== */

/* Melhorar contraste das cores success no modo dark */
[data-theme="dark"] .bg-success-focus {
  background-color: rgba(34, 197, 94, 0.2) !important; /* Verde mais claro e visível */
}

[data-theme="dark"] .text-success-600 {
  color: #4ade80 !important; /* Verde mais claro para melhor contraste */
}

[data-theme="dark"] .bg-warning-focus {
  background-color: rgba(245, 158, 11, 0.2) !important; /* Amarelo mais claro */
}

[data-theme="dark"] .text-warning-600 {
  color: #fbbf24 !important; /* Amarelo mais claro */
}

[data-theme="dark"] .bg-info-focus {
  background-color: rgba(59, 130, 246, 0.2) !important; /* Azul mais claro */
}

[data-theme="dark"] .text-info-600 {
  color: #60a5fa !important; /* Azul mais claro */
}

[data-theme="dark"] .bg-danger-focus {
  background-color: rgba(239, 68, 68, 0.2) !important; /* Vermelho mais claro */
}

[data-theme="dark"] .text-danger-600 {
  color: #f87171 !important; /* Vermelho mais claro */
}

/* Bordas para modo dark */
[data-theme="dark"] .border-success-main {
  border-color: #4ade80 !important; /* Verde mais claro para borda */
}

[data-theme="dark"] .border-warning-main {
  border-color: #fbbf24 !important; /* Amarelo mais claro para borda */
}

[data-theme="dark"] .border-info-main {
  border-color: #60a5fa !important; /* Azul mais claro para borda */
}

[data-theme="dark"] .border-danger-main {
  border-color: #f87171 !important; /* Vermelho mais claro para borda */
}

/* ========================================
 * FIM DA CUSTOMIZAÇÃO RAÍZES CERRADÃO
 * ======================================== */