/* ============================================================
   RESPONSIVE.CSS — Breakpoints: 768px, 1024px, 1280px
   Mobile first approach
   ============================================================ */

/* ========== MOBILE (< 768px) ========== */
/* Default styles are mobile */

.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  z-index: 50;
  transition: left var(--transition-slow);
  padding-top: var(--space-xl);
}

.sidebar--mobile-open {
  left: 0;
}

.hamburger {
  display: flex;
}

.site-header__logo img {
  height: 36px;
}

.content {
  padding: var(--space-lg) var(--space-md);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

/* Tabs: horizontal scroll on mobile */
.tab-bar {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-md);
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab {
  flex-shrink: 0;
}

/* Progress bar: simplified on mobile */
.progress-bar {
  width: 100%;
  margin-left: 0;
  margin-top: var(--space-sm);
}

/* Prompt nav: stack on mobile */
.prompt-nav {
  flex-direction: column;
}

.prompt-nav__link {
  max-width: 100%;
}

.prompt-nav__link--next {
  text-align: left;
}

/* Dashboard: single column */
.prompt-cards-grid {
  grid-template-columns: 1fr;
}

/* Landing page mobile */
.landing-hero__title {
  font-size: 2rem;
}

.landing-stats {
  grid-template-columns: 1fr;
}

.landing-categories__grid,
.landing-categories__grid--11 {
  grid-template-columns: 1fr;
}

.landing-benefits__grid {
  grid-template-columns: 1fr;
}

.landing-demo__code {
  max-height: 300px;
}

/* Global progress: stack */
.global-progress {
  flex-direction: column;
  text-align: center;
}

/* ========== TABLET (>= 768px) ========== */
@media (min-width: 768px) {
  .content {
    padding: var(--space-xl);
  }

  h1 {
    font-size: 2.5rem;
  }

  .prompt-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .prompt-nav {
    flex-direction: row;
  }

  .prompt-nav__link {
    max-width: 45%;
  }

  .prompt-nav__link--next {
    text-align: right;
  }

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

  .landing-categories__grid,
  .landing-categories__grid--11 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .landing-hero__title {
    font-size: 2.5rem;
  }

  .global-progress {
    flex-direction: row;
    text-align: left;
  }
}

/* ========== DESKTOP (>= 1024px) ========== */
@media (min-width: 1024px) {
  .hamburger {
    display: none;
  }

  .sidebar {
    position: sticky;
    left: 0;
  }

  .landing-header ~ .sidebar,
  .landing-header + .sidebar {
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
  }

  .sidebar-overlay {
    display: none !important;
  }

  .site-header__logo img {
    height: 44px;
  }

  .content {
    padding: var(--space-2xl) var(--space-xl);
  }

  h1 {
    font-size: 3rem;
  }

  .tab-bar {
    flex-wrap: wrap;
  }

  .landing-hero__title {
    font-size: 3rem;
  }

  .landing-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .landing-categories__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .landing-categories__grid--11 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== DESKTOP LARGO (>= 1280px) ========== */
@media (min-width: 1280px) {
  .content {
    padding: var(--space-2xl) var(--space-2xl);
  }

  .landing-section {
    padding: var(--space-4xl) var(--space-2xl);
  }
}
