/* --- Global Layout Containers --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 40px 0;
}

.section-bg-light {
  background-color: var(--light-bg);
}

.section-bg-dark {
  background-color: var(--dark-bg);
  color: var(--white);
}

.section-bg-dark h2 {
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px auto;
}

.section-header p {
  font-size: 1.1rem;
}

/* --- Header Wrapper --- */
header:not(.mobile-fixed-header):not(.dashboard-top-bar) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

header:not(.mobile-fixed-header):not(.dashboard-top-bar) .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1128px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* --- Footer Wrapper --- */
footer {
  background-color: #0B0F19;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 80px 0 30px 0;
  color: #94A3B8;
}

/* --- Responsive Layout Foundation --- */

/* Viewport Lock */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Bottom Nav (hidden by default) */
.mobile-bottom-nav {
  display: none !important;
}

/* Mobile Breakpoints (max-width: 768px) */
@media (max-width: 768px) {
  header:not(.mobile-fixed-header):not(.dashboard-top-bar) .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.has-bottom-nav {
    padding-bottom: 60px !important;
  }

  /* Global Layout overrides */
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    max-width: 100% !important;
  }

  .section {
    padding: 20px 0 !important;
  }

  body {
    padding-top: 52px;
  }

  /* Grids Stack Foundation */
  .grid,
  .features-grid,
  .showcase-grid,
  .about-meta-list,
  .dash-stats-grid,
  .dash-stats-row,
  .hero-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
}
