/* Estrutura principal - OTIMIZADO PARA RESPONSIVIDADE */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  overflow-x: hidden;
  background-color: var(--bg-color);
  min-height: calc(100vh - var(--footer-height, 320px));
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Grids - DINÂMICOS PARA TODOS OS TAMANHOS */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.main-dashboard {
  grid-template-columns: 1fr;
}

.free-dashboard {
  grid-template-columns: 1fr;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pricing-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

/* Seções - PADDING RESPONSIVO */
section {
  padding: 1.5rem 0 1rem 0;
  position: relative;
  word-wrap: break-word;
}

section:nth-child(even) {
  background: linear-gradient(145deg, var(--bg-secondary), var(--bg-color));
}

section:nth-child(odd) {
  background: var(--bg-color);
}

.section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
}

.section-header p {
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  margin: 0;
  word-wrap: break-word;
}

/* Tablet breakpoints - 2 colunas */
@media (min-width: 640px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .how-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .pricing-table {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .free-dashboard {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: 2rem 0 1.5rem 0;
  }
}

/* Medium devices - 3 colunas para grids */
@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .pricing-table {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .main-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .free-dashboard {
    grid-template-columns: 2fr 1fr;
  }

  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: 2.5rem 0 2rem 0;
  }
}

/* Large desktop - 4 colunas máximo */
@media (min-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .container {
    padding: 0 2rem;
  }
}

/* Extra large - manter max-width */
@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
    padding: 0 auto;
  }
}

/* Garantir que última seção não tenha padding-bottom excessivo */
.main-content section:last-child {
  padding-bottom: 0;
}

.main-content section + section {
  margin-top: 0;
}
