/* ===== PC Sticky Sidebar Layout ===== */

/* Center the page-with-sidebar wrapper */
.page-with-sidebar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-with-sidebar > .container {
  padding: 2.5rem 0;
}

/* Hide sidebar on mobile/tablet */
@media (max-width: 1023px) {
  .sidebar,
  .page-sidebar {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .page-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 2rem;
    max-width: 1200px;
  }
  .page-with-sidebar > .container {
    max-width: none;
    padding: 2.5rem 0;
    width: 100%;
  }
  .sidebar {
    display: block !important;
    position: sticky;
    top: 80px;
    align-self: start;
  }
  .page-sidebar {
    display: flex !important;
    position: sticky;
    top: 80px;
    align-self: start;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 1rem;
    max-height: calc(100vh - 100px);
  }
  .sidebar-ad-slot {
    background: var(--bg-card, #161b22);
    border: 1px solid var(--border-primary, #30363d);
    border-radius: 12px;
    padding: .8rem;
    text-align: center;
  }
  .sidebar-ad-slot img {
    max-width: 100%;
    height: auto;
  }
}

/* Wide screens: keep main content centered */
@media (min-width: 1400px) {
  .page-with-sidebar {
    max-width: 1280px;
  }
}


.ad-placeholder {
  width: 160px;
  height: 600px;
  border: 2px dashed var(--border-primary, #30363d);
  border-radius: 8px;
  background: var(--bg-card, #161b22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #8b949e);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.6;
  margin: 0 auto 1rem;
}
