/* ==========================================================
   JobsAlertIndia - FINAL DESKTOP / SIDEBAR / HOME LAYOUT
   This file controls ONLY layout and presentation.
   Database, PHP, API, SQL and JavaScript are unchanged.
   Load AFTER style.css and enhancements.css.
   ========================================================== */

@media (min-width:901px){
  .top-quick-nav{display:none!important}

  /* Full desktop grid: sidebar + main content. */
  .layout-grid{
    display:grid!important;
    grid-template-columns:280px minmax(0,1fr)!important;
    gap:20px!important;
    width:min(1500px,calc(100% - 32px))!important;
    max-width:none!important;
    align-items:start!important;
    margin:0 auto 28px!important;
    padding:0!important;
    box-sizing:border-box!important;
  }

  /* Sticky sidebar, but NEVER viewport-height restricted. */
  .sidebar{
    width:280px!important;
    min-width:280px!important;
    height:fit-content!important;
    min-height:0!important;
    max-height:none!important;
    position:sticky!important;
    top:76px!important;
    align-self:start!important;
    overflow:visible!important;
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    padding:10px!important;
    box-sizing:border-box!important;
    z-index:900!important;
  }
  .sidebar::after{display:none!important;content:none!important}

  .sidebar .sidebar-nav-box{order:1!important}
  .sidebar .quick-access-box{order:2!important}
  .sidebar .notification-box{order:3!important}
  .sidebar .sidebar-mock-box{order:4!important}
  .sidebar .sidebar-join-box{order:5!important}
  .sidebar .sidebar-resource-box{order:6!important}

  .sidebar-box{
    width:100%!important;
    margin:0!important;
    flex:0 0 auto!important;
    box-sizing:border-box!important;
  }

  /* Browse Jobs */
  .sidebar-nav-list{
    display:flex!important;
    flex-direction:column!important;
    gap:5px!important;
    padding:9px!important;
    box-sizing:border-box!important;
  }
  .sidebar-nav-list a{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    min-height:34px!important;
    padding:7px 9px!important;
    border:1px solid #e5e7eb!important;
    border-radius:9px!important;
    background:#f8fafc!important;
    color:#334155!important;
    font-size:11px!important;
    font-weight:600!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
  }
  .sidebar-nav-list a:hover{background:#eff6ff!important;border-color:#bfdbfe!important;color:#2563eb!important;transform:translateX(2px)!important}
  .sidebar-nav-list .nav-icon{width:23px!important;height:23px!important;flex:0 0 23px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:7px!important;background:#fff!important}

  /* Quick Access / Mock / Join */
  .sidebar .quick-links{display:flex!important;flex-direction:column!important;gap:6px!important;padding:8px!important;box-sizing:border-box!important}
  .sidebar .q-link{min-height:32px!important;padding:8px 9px!important;border-radius:9px!important;font-size:11px!important;box-sizing:border-box!important}

  /* Live Updates: about 4-5 visible items. */
  .sidebar .notification-box{min-height:0!important;height:auto!important}
  .sidebar .notification-box .marquee-wrapper{height:220px!important;max-height:220px!important;overflow:hidden!important;padding:8px 10px!important;box-sizing:border-box!important}
  .sidebar .notification-box .marquee-wrapper li{padding:9px 4px!important;font-size:11px!important;line-height:1.4!important}

  /* Career Resources: compact and readable. */
  .sidebar-resource-content{padding:10px!important;box-sizing:border-box!important}
  .sidebar-resource-content p{margin:0 0 8px!important;font-size:10px!important;line-height:1.45!important;color:#64748b!important}
  .sidebar-resource-links{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  .sidebar-resource-links a{display:block!important;padding:7px 6px!important;text-align:center!important;border:1px solid #e2e8f0!important;border-radius:8px!important;background:#fff!important;color:#334155!important;text-decoration:none!important;font-size:10px!important;font-weight:600!important;box-sizing:border-box!important}
  .sidebar-resource-links a:hover{border-color:#93c5fd!important;color:#2563eb!important;background:#eff6ff!important}

  /* Main content */
  .main-content{width:100%!important;min-width:0!important;box-sizing:border-box!important}

  /* Central + State = 2 columns. */
  .govt-sections-wrapper{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:16px!important;
    width:100%!important;
    margin-bottom:18px!important;
    align-items:stretch!important;
  }
  .govt-sections-wrapper>.category-block{width:100%!important;min-width:0!important;box-sizing:border-box!important}

  /* All job cards stay horizontal left -> right. */
  .govt-sections-wrapper .jobs-grid,
  .full-width-block .jobs-grid{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    gap:15px!important;
    width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:0 0 12px!important;
    box-sizing:border-box!important;
    scroll-behavior:smooth!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .govt-sections-wrapper .job-card,
  .full-width-block .job-card{
    flex:0 0 260px!important;
    width:260px!important;
    min-width:260px!important;
    max-width:260px!important;
    box-sizing:border-box!important;
  }

  /* Private & MNC = full width below Central + State. */
  .full-width-block{width:100%!important;min-width:0!important;margin-bottom:18px!important;box-sizing:border-box!important}

  /* Closing Soon job cards also remain horizontal. */
  #closingSoonJobs.jobs-grid{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}

  /* Career value cards: restore the designed card UI. */
  .jai-value-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:14px!important;
    margin:0 15px 18px!important;
  }
  .jai-value-card{
    display:block!important;
    background:#fff!important;
    border:1px solid #e2e8f0!important;
    border-radius:16px!important;
    padding:18px!important;
    box-shadow:0 5px 18px rgba(15,23,42,.05)!important;
    box-sizing:border-box!important;
  }
  .jai-value-card .icon{width:38px!important;height:38px!important;border-radius:11px!important;background:#eff6ff!important;color:#2563eb!important;display:flex!important;align-items:center!important;justify-content:center!important;margin-bottom:10px!important}
  .jai-value-card h3{margin:0 0 7px!important;color:#0f172a!important;font-size:15px!important}
  .jai-value-card p{margin:0!important;color:#64748b!important;font-size:12px!important;line-height:1.7!important}
}

@media (min-width:901px) and (max-width:1150px){
  .layout-grid{grid-template-columns:240px minmax(0,1fr)!important;gap:16px!important}
  .sidebar{width:240px!important;min-width:240px!important}
  .govt-sections-wrapper{gap:12px!important}
  .govt-sections-wrapper .job-card,.full-width-block .job-card{flex-basis:230px!important;width:230px!important;min-width:230px!important;max-width:230px!important}
  .jai-value-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
}

@media (max-width:900px){
  .top-quick-nav{display:block!important}
  .layout-grid{display:block!important;width:100%!important}
  .sidebar{position:fixed!important;top:0!important;left:-300px!important;width:280px!important;min-width:0!important;height:100vh!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:10002!important;transition:left .3s ease-in-out!important;box-sizing:border-box!important}
  .sidebar.active{left:0!important}
  .sidebar-mock-box,.sidebar-join-box,.sidebar-resource-box{display:block!important}
  .govt-sections-wrapper{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
  .govt-sections-wrapper>.category-block,.full-width-block{width:100%!important}
  .jobs-grid{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;width:100%!important}
  .job-card{flex:0 0 85vw!important;width:85vw!important;min-width:85vw!important;max-width:85vw!important}
  .jai-value-grid{grid-template-columns:1fr!important;margin-left:0!important;margin-right:0!important;gap:10px!important}
  .jai-value-card{padding:15px!important}
}

@media (max-width:600px){
  .govt-sections-wrapper .jobs-grid,.full-width-block .jobs-grid,#closingSoonJobs.jobs-grid{display:grid!important;grid-template-columns:1fr!important;overflow:visible!important;gap:10px!important;padding-bottom:0!important}
  .govt-sections-wrapper .job-card,.full-width-block .job-card{width:100%!important;min-width:0!important;max-width:none!important;flex:none!important}
}
