/* Base.css - Estilos fundamentais e variáveis */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Cores principais */
  --primary-color: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  
  /* Cores de texto */
  --text-color: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  
  /* Cores de fundo */
  --background-light: #ffffff;
  --background-dark: #f1f5f9;
  --background-card: #ffffff;
  
  /* Cores de estado */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  /* 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 -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Bordas */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-full: 9999px;
  
  /* Espaçamentos */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Tipografia */
  --font-family: 'Poppins', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Layout */
  --container-width: 1200px;
  --header-height: 70px;
  --z-index-header: 100;
  --z-index-modal: 1000;
  --z-index-floating: 9999;
  --z-index-preloader: 9999;
}

/* Variáveis para modo escuro */
.dark-mode {
  --primary-color: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #93c5fd;
  
  --text-color: #f1f5f9;
  --text-light: #cbd5e1;
  --text-lighter: #94a3b8;
  
  --background-light: #0f172a;
  --background-dark: #1e293b;
  --background-card: #1e293b;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Reset básico */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevenir scroll horizontal */
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-light);
  overflow-x: hidden; /* Prevenir scroll horizontal */
  transition: background-color var(--transition-slow), color var(--transition-slow);
  width: 100%;
  min-height: 100%;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

button {
  cursor: pointer;
  font-family: var(--font-family);
}

ul, ol {
  list-style: none;
}

/* Container principal */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Utilitários de acessibilidade */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.focusable:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Utilitários de layout */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

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

.hidden {
  display: none;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* Utilitários de espaçamento */
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-4 { margin-top: var(--spacing-md); }
.mt-6 { margin-top: var(--spacing-lg); }
.mt-8 { margin-top: var(--spacing-xl); }
.mt-12 { margin-top: var(--spacing-2xl); }
.mt-16 { margin-top: var(--spacing-3xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-4 { margin-bottom: var(--spacing-md); }
.mb-6 { margin-bottom: var(--spacing-lg); }
.mb-8 { margin-bottom: var(--spacing-xl); }
.mb-12 { margin-bottom: var(--spacing-2xl); }
.mb-16 { margin-bottom: var(--spacing-3xl); }

.py-2 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-4 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-8 { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }
.py-16 { padding-top: var(--spacing-3xl); padding-bottom: var(--spacing-3xl); }

.px-2 { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.px-4 { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.px-6 { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }
.px-8 { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }

/* Utilitários de tipografia */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

/* Grid básico */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

/* Media queries base */
@media (max-width: 480px) {
  html {
    font-size: 14px; /* Reduzir tamanho da fonte em telas muito pequenas */
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .text-5xl { font-size: 2.5rem; }
  .text-4xl { font-size: 2rem; }
  .text-3xl { font-size: 1.75rem; }
}

@media (min-width: 640px) {
  .sm\:flex {
    display: flex;
  }
  
  .sm\:hidden {
    display: none;
  }
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  
  .md\:hidden {
    display: none;
  }
  
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex;
  }
  
  .lg\:hidden {
    display: none;
  }
  
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
