/* =========================================================
   FINAL SECTION BACKGROUNDS
   ========================================================= */

/* Everything you need, one click away */
.quick-access-section{
  background:
    radial-gradient(circle at 12% 15%,rgba(229,138,0,.10),transparent 28%),
    linear-gradient(180deg,#fffaf2 0%,#fff 100%) !important;
  border-top:1px solid #f1e5cf;
  border-bottom:1px solid #f1e5cf;
}

/* Notice Board & Librarian's Pick */
#curated{
  background:
    radial-gradient(circle at 88% 12%,rgba(15,30,74,.07),transparent 30%),
    linear-gradient(180deg,#f3f6fb 0%,#ffffff 100%) !important;
}

/* Latest Notices card/heading */
#curated .notice-column{
  background:#ffffff !important;
  border:1px solid #dfe6ef !important;
  border-radius:18px !important;
  padding:18px !important;
  box-shadow:0 10px 28px rgba(15,30,74,.07) !important;
}

#curated .notice-column .column-head{
  margin:-18px -18px 16px !important;
  padding:16px 18px !important;
  background:linear-gradient(135deg,#0f1e4a,#173a78) !important;
  border-radius:18px 18px 0 0 !important;
}

#curated .notice-column .column-head h3{
  color:#fff !important;
}

#curated .notice-column .column-label{
  color:#ffc66b !important;
}

#curated .notice-column .column-head .link-arrow{
  color:#fff !important;
}

/* Browse by Subject */
#browse-subject{
  background:
    radial-gradient(circle at 10% 12%,rgba(229,138,0,.08),transparent 28%),
    linear-gradient(180deg,#f8f9fc 0%,#eef3f9 100%) !important;
  overflow:hidden !important;
}

/* =========================================================
   SEARCH BOX — restore old-page placement and appearance
   ========================================================= */
.search-zone{
  position:relative !important;
  z-index:20 !important;
  margin-top:-58px !important;
  margin-bottom:18px !important;
}

.search-zone .search-panel{
  background:#fff !important;
  border:1px solid #e0e6ee !important;
  border-radius:18px !important;
  box-shadow:0 18px 45px rgba(15,30,74,.16) !important;
  padding:22px !important;
}

.search-zone .search-tabs{
  margin-bottom:15px !important;
}

.search-zone .search-row{
  display:grid !important;
  grid-template-columns:180px minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:center !important;
}

.search-zone .summon-search-row{
  grid-template-columns:58px minmax(0,1fr) auto !important;
}

.search-zone .search-row input,
.search-zone .search-row select,
.search-zone .summon-search-icon{
  height:52px !important;
}

@media(max-width:720px){
  .search-zone{
    margin-top:-42px !important;
  }
  .search-zone .search-row,
  .search-zone .summon-search-row{
    grid-template-columns:1fr !important;
  }
  .search-zone .summon-search-icon{
    display:none !important;
  }
}

/* =========================================================
   BROWSE BY SUBJECT — robust 3-row carousel
   ========================================================= */
#browse-subject .container{
  width:min(1180px,calc(100% - 32px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

#browse-subject .subject-carousel-head{
  display:flex !important;
  align-items:flex-end !important;
  justify-content:space-between !important;
  gap:24px !important;
}

/* Hide the duplicate controls in the heading; use the top-right set below */
#browse-subject .subject-carousel-head > .subject-carousel-controls{
  display:none !important;
}

#browse-subject .subject-carousel-fullwidth{
  width:min(1180px,calc(100% - 32px)) !important;
  max-width:1180px !important;
  margin:18px auto 0 !important;
  padding:0 !important;
  overflow:visible !important;
}

#browse-subject .subject-carousel-side-controls{
  position:static !important;
  width:100% !important;
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:8px !important;
  margin:0 0 12px !important;
  padding:0 !important;
  transform:none !important;
  pointer-events:auto !important;
}

#browse-subject .subject-carousel-side-controls .subject-carousel-btn{
  position:static !important;
  width:40px !important;
  height:40px !important;
  flex:0 0 40px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:50% !important;
  border:1px solid #d8e0e9 !important;
  background:#fff !important;
  color:#0f1e4a !important;
  box-shadow:0 6px 18px rgba(15,30,74,.08) !important;
  transform:none !important;
}

#browse-subject .subject-carousel-side-controls .subject-carousel-btn:hover{
  background:#0f1e4a !important;
  border-color:#0f1e4a !important;
  color:#fff !important;
}

/* 4 visible columns x 3 rows */
#browse-subject .subject-carousel-track{
  display:grid !important;
  grid-auto-flow:column !important;
  grid-template-rows:repeat(3,84px) !important;
  grid-auto-columns:calc((100% - 42px)/4) !important;
  gap:14px !important;
  width:100% !important;
  padding:4px 0 10px !important;
  margin:0 !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scroll-snap-type:x mandatory !important;
  scroll-behavior:smooth !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
  cursor:grab;
}

#browse-subject .subject-carousel-track::-webkit-scrollbar{
  display:none !important;
}

#browse-subject .subject-carousel-track.dragging{
  cursor:grabbing !important;
  scroll-behavior:auto !important;
  scroll-snap-type:none !important;
}

#browse-subject .subject-visual-card{
  width:100% !important;
  height:84px !important;
  min-height:84px !important;
  max-width:none !important;
  margin:0 !important;
  padding:12px 13px !important;
  display:grid !important;
  grid-template-columns:68px minmax(0,1fr) 24px !important;
  gap:12px !important;
  align-items:center !important;
  box-sizing:border-box !important;
  scroll-snap-align:start !important;
}

#browse-subject .subject-icon-wrap{
  width:60px !important;
  height:58px !important;
}

#browse-subject .subject-carousel-footer{
  display:none !important;
}

@media(max-width:900px){
  #browse-subject .subject-carousel-track{
    grid-auto-columns:calc((100% - 14px)/2) !important;
  }
}

@media(max-width:580px){
  #browse-subject .subject-carousel-fullwidth{
    width:calc(100% - 24px) !important;
  }

  #browse-subject .subject-carousel-track{
    grid-auto-columns:100% !important;
  }

  #browse-subject .subject-visual-card{
    grid-template-columns:60px minmax(0,1fr) 24px !important;
  }

  #browse-subject .subject-icon-wrap{
    width:54px !important;
    height:52px !important;
  }
}
