/* =========================
   styles-layout-media.css
   (responsive rules only)
   ========================= */

/* Safety: dashboard should be scrollable in every mode */
.dashboard-grid{ height:auto !important; }

/* -----------------------------------------
   MOBILE (ALL PHONES + TABLETS)
   Hamburger visible up to 1600px
   ----------------------------------------- */
@media (max-width:1600px){

  /* Mobile nav */
  body.nav-ready .menu-toggle{ display:inline-flex !important; }
  .top-bar{ gap: 12px; }
  .brand{ flex: 1 0 auto; }

  body.nav-ready .top-nav{
    flex: 0 0 auto;
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 24px 16px 32px;
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    transform: translateY(-120%);
    transition: transform .25s ease;
    pointer-events: none;
    z-index: 995;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px) saturate(125%);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    box-shadow: 0 24px 60px rgba(5, 6, 12, 0.42);
  }

  body.nav-ready.nav-open .top-nav{
    transform: translateY(0);
    pointer-events: auto;
  }

  body.nav-ready .top-nav ul{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  body.nav-ready .top-nav li{ width: 100%; }

  body.nav-ready .top-nav a{
    width: 100%;
    font-size: 1.6rem;
    justify-content: flex-start;
  }

  body.nav-ready .top-nav a .material-symbols-outlined{
    font-size: 22px;
  }

  /* Single-column layout */
  .dashboard-grid{ grid-template-columns: 1fr; }

  html.nav-ready, body.nav-ready{
    overflow-x:hidden;
  }

  /* Fix home-page bottom bunching */
  main,
  .content,
  .home-hero,
  .dashboard {
    padding-bottom: 80px;
  }
}

/* -----------------------------------------
   DESKTOP — 1601px and above
   Hamburger hidden, horizontal nav shown
   ----------------------------------------- */
@media (min-width:1601px) {
  .menu-toggle {
    display: none !important;
  }

  .top-nav {
    display: flex !important;
  }

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

/* -----------------------------------------
   ULTRA-WIDE DESKTOPS (2561px+)
   ----------------------------------------- */
@media (min-width:2561px){
  .dashboard-grid{ grid-template-columns: repeat(4, 1fr); }
}
