/* assets/css/main.css */
/* Estilos Globais */

:root {
  /* Cores */
  --primary: #3498db;
  --primary-dark: #2980b9;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --white: #ffffff;
  --gray: #95a5a6;
  --gray-light: #ecf0f1;
  --gray-dark: #34495e;
  
  /* Tipografia */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 3rem;
  
  /* Espaçamento */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Transições */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
}

/* Utilitários */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

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

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

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

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

.btn-secondary {
  background-color: var(--gray);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  min-width: 300px;
  animation: slideIn 0.3s ease;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Alpine.js cloak */
[x-cloak] {
  display: none !important;
}

/* ============================================================
   HERO SECTION GLOBAL (aplicado em todas as páginas)
   ============================================================ */

.hero-section {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-title i {
  font-size: 3rem;
  opacity: 0.9;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 3rem;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Responsividade do Hero */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0 !important;
    overflow: hidden !important;
  }
  
  .hero-background {
    overflow: hidden !important;
  }
  
  .hero-content {
    padding: 0 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .hero-title {
    font-size: 2rem !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    text-align: center !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .hero-title i {
    font-size: 1.75rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
    padding: 0 0.5rem !important;
    text-align: center !important;
    word-wrap: break-word !important;
  }
  
  .hero-stats {
    gap: 1.5rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 0 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .stat-item {
    min-width: 80px !important;
    flex: 0 0 auto !important;
  }
  
  .stat-number {
    font-size: 1.75rem !important;
  }
  
  .stat-label {
    font-size: 0.7rem !important;
  }
}

/* Garantir que legendas sempre apareçam */
.timeline-legend,
.timeline-legend * {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.timeline-legend .row {
  display: flex !important;
}

.timeline-legend .legend-group {
  display: flex !important;
}

.timeline-legend .badge,
.timeline-legend .filter-badge,
.timeline-legend span {
  display: inline-flex !important;
}

/* Footer */
.footer {
  position: relative;
}

.footer .btn-link {
  transition: opacity 0.2s ease, color 0.2s ease;
  color: #6c757d !important;
  opacity: 0.7;
}

.footer .btn-link:hover {
  opacity: 1 !important;
  color: #ffffff !important;
}

.footer .btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsividade */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .footer .btn-link {
    font-size: 0.7rem !important;
  }
}

