/* ==========================================================================
   VARIÁVEIS GLOBAIS
   ========================================================================== */
:root {
  /* Cores - Dark Mode (padrão) */
  --bg-primary: #121212;
  --bg-secondary: #1E1E1E;
  --bg-tertiary: #2A2A2A;
  --text-primary: #E0E0E0;
  --text-secondary: #9E9E9E;
  --accent: #FFD700;
  --accent-light: #FFC000;
  --accent-dark: #FFAA00;
  --white: #FFFFFF;
  --black: #000000;

  /* Tamanhos principais */
  --header-height: 100px;
  --logo-height: 160px;
  --mobile-logo-height: 100px;
  --border-radius: 8px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* ==========================================================================
   ESTILOS BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* ==========================================================================
   TIPOGRAFIA
   ========================================================================== */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.8rem; margin-bottom: 20px; text-align: center; }
h3 { font-size: 1.8rem; margin-bottom: 15px; }
h4 { font-size: 1.4rem; margin-bottom: 10px; }

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.accent {
  color: var(--accent);
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  font-size: 1.2rem;
}

h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent);
  margin: 15px auto 30px;
}

/* ==========================================================================
   HEADER E NAVEGAÇÃO
   ========================================================================== */
header {
  background-color: var(--bg-secondary);
  height: var(--header-height);
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.logo img {
  height: var(--logo-height);
  width: auto;
  transition: transform 0.3s;
  object-fit: contain;
}

.logo img:hover {
  transform: scale(1.05);
}

/* Navegação Desktop */
.desktop-menu ul {
  display: flex;
  gap: 30px;
}

.desktop-menu a {
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  padding: 5px 0;
}

.desktop-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s;
}

.desktop-menu a:hover,
.desktop-menu a.active {
  color: var(--accent);
}

.desktop-menu a:hover::after,
.desktop-menu a.active::after {
  width: 100%;
}

/* Navegação Mobile */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-secondary);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-menu a {
  font-size: 1.2rem;
  font-weight: 500;
  display: block;
  padding: 12px 15px;
  border-radius: var(--border-radius);
}

.mobile-menu a:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}

/* ==========================================================================
   COMPONENTES REUTILIZÁVEIS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--black);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--black);
  transform: translateY(-3px);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--black);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS PARA FERRAMENTAS
   ========================================================================== */

/* Seção Hero */
.category-hero {
  padding: calc(var(--header-height) + 80px) 0 100px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
  position: relative;
}

.category-hero h1 {
  margin-bottom: 20px;
  line-height: 1.2;
}

/* Seletor de Categorias - ATUALIZADO */
.category-selector {
  background-color: var(--bg-secondary);
  padding: 20px 0;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  pointer-events: none; /* Permite clicar nos elementos abaixo */
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  pointer-events: auto; /* Reativa eventos para os botões */
}

.category-tab {
  padding: 15px 25px;
  border-radius: 50px;
  background-color: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  pointer-events: auto; /* Garante que os botões são clicáveis */
  position: relative;
  z-index: 51; /* Garante que fique acima de outros elementos */
}

.category-tab i {
  font-size: 1.2rem;
}

.category-tab:hover {
  background-color: var(--accent-light);
  color: var(--black);
}

.category-tab.active {
  background-color: var(--accent);
  color: var(--black);
  font-weight: 600;
}

/* Conteúdo das Categorias */
.category-content {
  display: none;
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.category-content.active {
  display: block;
}

/* Grid de Ferramentas */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Cards de Ferramentas */
.tool-card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 30px;
  position: relative;
  border: 1px solid var(--bg-tertiary);
  transition: var(--transition);
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
  border-color: var(--accent);
}

.tool-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent);
  color: var(--black);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.tool-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.tool-features {
  margin: 25px 0;
  padding-left: 5px;
}

.tool-features li {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-features i {
  color: var(--accent);
  font-size: 0.9rem;
}

.tool-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.tool-actions .btn {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 0.95rem;
}

/* Seção de Integrações */
.integrations {
  padding: 80px 0;
  background-color: var(--bg-secondary);
  text-align: center;
}

.integration-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.integration-logos img {
  height: 50px;
  opacity: 0.8;
  transition: var(--transition);
  filter: grayscale(100%);
}

.integration-logos img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* Seção CTA */
.tools-cta {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-container {
  background: var(--bg-tertiary);
  padding-top: 60px;
  color: var(--text-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo img {
  margin-bottom: 20px;
  width: 200px;
}

.footer-logo p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: var(--text-primary);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-links h3, 
.footer-contact h3 {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-contact i {
  color: var(--accent);
  margin-top: 3px;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid var(--bg-secondary);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.footer-legal a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ==========================================================================
   COMPONENTES FLUTUANTES
   ========================================================================== */
.theme-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}

#theme-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--black);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

#theme-toggle:hover {
  transform: scale(1.1);
}

#back-to-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: var(--accent);
  color: var(--black);
  transform: translateY(-5px);
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 1200px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.4rem; }
}

@media (max-width: 992px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .tool-actions {
    flex-direction: column;
  }
  
  .tool-actions .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 80px;
    --logo-height: 120px;
  }
  
  .desktop-menu {
    display: none;
  }
  
  .mobile-menu-button {
    display: block;
  }
  
  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }
  
  .category-hero {
    padding: calc(var(--header-height) + 40px) 0 60px;
  }
  
  .category-tabs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .category-tab {
    width: 100%;
    justify-content: center;
  }
  
  .integration-logos img {
    height: 40px;
  }
}

@media (max-width: 576px) {
  :root {
    --mobile-logo-height: 80px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }
  
  .container {
    width: 95%;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-card {
    padding: 20px;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  #back-to-top,
  #theme-toggle {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  #back-to-top {
    bottom: 85px;
    right: 15px;
  }
  
  #theme-toggle {
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 400px) {
  :root {
    --header-height: 70px;
    --mobile-logo-height: 70px;
  }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.6rem; }
  
  .tool-features li {
    font-size: 0.95rem;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }
}