/* TLAQ Mobile Responsive — applied to all templates */

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #c9a84c;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {

  /* Show hamburger, hide nav by default */
  .nav-toggle { display: flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #161b27;
    border-bottom: 0.5px solid #2a3148;
    flex-direction: column;
    padding: 12px 20px 20px;
    gap: 0;
    z-index: 200;
  }

  .header-nav.open { display: flex; }

  .header-nav a {
    padding: 10px 0;
    border-bottom: 0.5px solid #2a3148;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: #a0b0cc !important;
  }

  .header-nav a:last-child { border-bottom: none; }
  .header-nav a:hover { color: #e8c96a !important; }
  .header-nav a.active { color: #c9a84c !important; }

  /* Site header — keep logo + toggle on one row */
  .site-header {
    position: relative;
    flex-wrap: nowrap;
    padding: 12px 20px;
  }

  /* Content padding */
  .content, .wrap { padding-left: 20px !important; padding-right: 20px !important; }

  /* Hero padding */
  .hero { padding: 48px 20px 36px !important; }

  /* Grids — stack on mobile */
  .forces-grid,
  .gates-row,
  .entry-grid,
  .token-grid,
  .basket-grid,
  .stack-grid,
  .enter-grid,
  .books-grid,
  .meta-grid,
  .stats-row,
  .profile-grid,
  .checkout-grid,
  .maniac-grid,
  .actor-row { grid-template-columns: 1fr !important; }

  /* Book layout — stack cover above info */
  .book-layout { grid-template-columns: 1fr !important; }
  .book-cover { width: 100% !important; height: 220px !important; }

  /* Order card — unstick */
  .order-card { position: static !important; }

  /* Tables — allow horizontal scroll */
  .table-wrap, .critique-table, .status-table, .earn-table, .comp-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Hero title size */
  .hero-title { font-size: 26px !important; }

  /* Buttons — full width on mobile */
  .btn-row { flex-direction: column; }
  .btn-row .btn, .btn-row button { width: 100%; justify-content: center; }

  /* Pipeline */
  .pipe-arrow { margin-left: 20px !important; }

  /* Phase stack */
  .phase-row { gap: 12px; }

  /* Footer */
  footer { flex-direction: column; gap: 6px; padding: 24px 20px; }

  /* App grid */
  .app-grid { grid-template-columns: 1fr !important; }

  /* WBS canvas */
  #wbs-canvas { min-width: 100%; }

  /* MDB layout */
  .mdb-layout, .mdb-grid { grid-template-columns: 1fr !important; }

  /* Lightbox image */
  .lightbox img { max-width: 95vw; max-height: 80vh; }

  /* Preview modal */
  .preview-inner { margin: 10px; }
  .preview-body iframe { height: 400px; }

  /* Cart item */
  .cart-item { flex-wrap: wrap; }

  /* SPH dashboard table — scroll */
  .listings-table { display: block; overflow-x: auto; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 22px !important; }
  .hero-symbol { font-size: 48px !important; }
  .section h2 { font-size: 20px !important; }
  .page-title { font-size: 22px !important; }
}
