:root {
  /* Brand Colors - DNA learnTECH Blue Edition */
  --body-bg-color: #020b14;
  --bg-cards: rgba(10, 25, 41, 0.7); /* Transparência para Glassmorphism */
  --bg-card-hover: rgba(16, 42, 67, 0.9);
  
  --accent: #00d7ff;
  --accent-hover: #00a3cc;
  --accent-rgb: 0, 215, 255; /* Para controle de opacidade em sombras */

  /* Typography & UI */
  --text-primary: #ffffff;
  --text-color: #8eacc5;
  --text-secondary: #5c7a94;
  --border-radius: 12px;
  
  /* Header heights */
  --header-height-desktop: 80px;
  --header-height-mobile: 130px;
  
  /* Glassmorphism Effect */
  --glass-blur: blur(12px);
  --card-border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  --body-bg-color: #f8fafc;
  --bg-cards: rgba(255, 255, 255, 0.8);
  --bg-card-hover: #f1f5f9;
  --accent: #007bff;
  --text-primary: #0f172a;
  --text-color: #475569;
  --card-border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Reset & Base */
body {
  background-color: var(--body-bg-color);
  color: var(--text-primary);
  margin: 0;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease;
}

body.menu-open { overflow: hidden; }

/* Estrutura Principal */
.home-section {
  padding-top: var(--header-height-desktop);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section Header Otimizado */
.section-header {
  padding: 60px 0 20px;
  animation: fadeIn 0.8s ease-out forwards;
}

.section-header h1 {
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 650px;
  margin-top: 10px;
}

.section-header::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--accent);
  margin-top: 25px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.6);
}

/* Grid de Projetos - Foco em Performance e Responsividade */
.box-projects {
  display: grid;
  /* O repeat(auto-fill) é melhor que auto-fit para listas dinâmicas */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  width: 100%;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

#items-counter {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(var(--accent-rgb), 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Paginação */
.pagination-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
}

.end-message {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  opacity: 0.7;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======================= */
/* RESPONSIVIDADE (MOBILE) */
/* ======================= */

@media (max-width: 768px) {
  .home-section {
    padding-top: var(--header-height-mobile);
  }

  .container { padding: 0 1.5rem; }

  .section-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .box-projects {
    grid-template-columns: 1fr; /* Força uma coluna no mobile */
    gap: 1.5rem;
  }

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