/* ═══ AdaptIQ — Layout ════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.page-container {
  min-height: 100vh;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-logo {
  font-size: var(--text-2xl);
}
.nav-title {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  background: linear-gradient(135deg, var(--color-navy-400), var(--color-teal-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: var(--space-1);
  margin-left: var(--space-8);
}
.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active {
  color: var(--color-primary);
  background: rgba(45, 125, 210, 0.1);
}

.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

/* Page with nav offset */
.page-with-nav {
  padding-top: calc(var(--nav-height) + var(--space-8));
}

/* ── Grid Systems ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ── Section ──────────────────────────────────────────────────────────────── */
.section {
  padding: var(--space-20) 0;
}
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header h2 {
  margin-bottom: var(--space-4);
}
.section-header p {
  max-width: 600px;
  margin: 0 auto;
}
.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-teal-400);
  margin-bottom: var(--space-3);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }

  .container { padding: 0 var(--space-4); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-title { font-size: var(--text-lg); }

  .section { padding: var(--space-12) 0; }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }
}
