/* Match Browse by Subject width with the normal page sections above */
#browse-subject .subject-carousel-fullwidth{
  width:100% !important;
  max-width:1180px !important;
  margin:20px auto 0 !important;
  padding:0 !important;
}

/* Place BOTH arrows together at the top-left of the carousel */
#browse-subject .subject-carousel-side-controls{
  position:relative !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;
  transform:none !important;
  width:auto !important;
  display:flex !important;
  justify-content:flex-start !important;
  gap:8px !important;
  padding:0 !important;
  margin:0 0 12px 0 !important;
  pointer-events:auto !important;
}

/* Prevent the old absolute side-arrow layout */
#browse-subject .subject-carousel-side-controls .subject-carousel-btn{
  position:relative !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  transform:none !important;
  width:40px;
  height:40px;
}

/* Carousel itself uses exactly the same contained width */
#browse-subject .subject-carousel-track{
  width:100% !important;
  box-sizing:border-box;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* Footer/progress aligns to the same section width */
#browse-subject .subject-carousel-footer{
  width:100%;
  max-width:1180px !important;
  margin:8px auto 0 !important;
}

@media(max-width:1220px){
  #browse-subject .subject-carousel-fullwidth,
  #browse-subject .subject-carousel-footer{
    width:calc(100% - 40px) !important;
  }
}

@media(max-width:580px){
  #browse-subject .subject-carousel-fullwidth,
  #browse-subject .subject-carousel-footer{
    width:calc(100% - 24px) !important;
  }
  #browse-subject .subject-carousel-side-controls .subject-carousel-btn{
    width:36px;
    height:36px;
  }
}
