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

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

/* -----------------------------------------
   MOBILE (ALL PHONES)  — up to 1220px wide
   ----------------------------------------- */
@media (max-width:1220px){

  /* Mobile nav */
  body.nav-ready .menu-toggle{ display:inline-flex; }
  .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 for mobile */
  .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;
  }
}

/* -----------------------------------------
   TABLETS / SMALL LAPTOPS — 1221px to 1920px
   ----------------------------------------- */
@media (min-width:1221px) and (max-width:1920px){
  .dashboard-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* -----------------------------------------
   DESKTOP — 1921px to 2560px
   ----------------------------------------- */
@media (min-width:1921px) and (max-width:2560px){
  .dashboard-grid{ grid-template-columns: repeat(3, 1fr); }
}

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