

/* ═════════════════════════════════════════════════════════════
   SIDEBAR LAYOUT — layout-main-wrapper two-column grid
   Applied globally wherever layout-sidebar-second is present.
   Scoped to specific page body classes to avoid affecting
   pages that don't use a sidebar.
═════════════════════════════════════════════════════════════ */

/* Episodes page */
body:has(div.episodes-list):not(:has(div.series-hero)) .layout-main-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
}

/* Main content column — prevent grid blowout */
.layout-main {
  min-width: 0;
}

/* Sidebar — sticky, stacked blocks with gap */

body:has(div.episodes-list) .layout-sidebar-second {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 80px;
  align-self: start;
}


/* ─────────────────────────────────────────────────────────────
   SIDEBAR BLOCK SHELL
   Shared styling for any block placed in layout-sidebar-second
───────────────────────────────────────────────────────────── */

.layout-sidebar-second > div {
  background: #fff;
  /* border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px; */
  overflow: hidden;
}

/* Block title (h2) — consistent heading style */
.layout-sidebar-second h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0a0a0a;
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 2px solid #1a4acc;
  margin: 0;
}


/* ─────────────────────────────────────────────────────────────
   BROWSE BY SERIES BLOCK
   View CSS class: series-sidebar-block-list
   Already styled via related-series-block rules — confirmed
   consistent. Just needs the sidebar shell above to contain it.
───────────────────────────────────────────────────────────── */

/* Remove extra padding Drupal adds inside the block wrapper */
.layout-sidebar-second .views-element-container {
  padding: 0;
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — collapse sidebar below main on smaller screens
───────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  body.path-episodes .layout-main-wrapper,
  body.path-updates .layout-main-wrapper,
  body.path-taxonomy .layout-main-wrapper {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
    gap: 2rem;
  }

  body.path-episodes .layout-sidebar-second,
  body.path-updates .layout-sidebar-second,
  body.path-taxonomy .layout-sidebar-second {
    position: static;
  }
}

@media (max-width: 600px) {
  body.path-episodes .layout-main-wrapper,
  body.path-updates .layout-main-wrapper,
  body.path-taxonomy .layout-main-wrapper {
    padding: 0 1rem;
  }
}
