.modern-header{
  background:#fff;
  border-bottom:1px solid #e7ebf0;
  box-shadow:0 4px 18px rgba(15,30,74,.05);
}
.modern-header .nav-wrap{
  min-height:82px;
  justify-content:space-between;
}
.brand-image-style{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.brand-seal{
  width:165px;
  height:54px;
  display:flex;
  align-items:center;
  overflow:hidden;
}
.brand-seal img{
  width:100%;
  height:auto;
  object-fit:contain;
  filter:none;
}
.brand-divider{
  width:1px;
  height:48px;
  background:#d6dce5;
}
.library-word{
  color:var(--navy);
  font-family:Georgia,"Times New Roman",serif;
  font-size:27px;
  font-weight:700;
  letter-spacing:.02em;
}
.hamburger-btn{
  width:46px;
  height:46px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  cursor:pointer;
  box-shadow:0 4px 13px rgba(15,30,74,.05);
}
.hamburger-btn span{
  width:22px;
  height:2px;
  background:var(--navy);
  border-radius:2px;
}
.hamburger-btn:hover{
  background:var(--cream);
  border-color:#edc477;
}
.hamburger-menu{
  position:fixed;
  top:0;
  right:-380px;
  width:min(360px,88vw);
  height:100vh;
  z-index:200;
  background:#fff;
  box-shadow:-18px 0 45px rgba(15,30,74,.16);
  transition:right .3s ease;
  display:flex;
  flex-direction:column;
}
.hamburger-menu.open{right:0}
.hamburger-menu-head{
  background:linear-gradient(135deg,var(--navy-dark),var(--navy));
  color:#fff;
  min-height:78px;
  padding:0 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.hamburger-menu-head strong{
  font-size:20px;
}
.hamburger-menu-head button{
  border:0;
  background:transparent;
  color:#fff;
  font-size:32px;
  line-height:1;
  cursor:pointer;
}
.hamburger-menu-body{
  padding:16px;
  overflow:auto;
  flex:1;
}
.hamburger-menu-body a{
  display:block;
  padding:13px 14px;
  color:var(--navy);
  border-radius:9px;
  font-weight:600;
  border-bottom:1px solid #f0f2f6;
}
.hamburger-menu-body a:hover{
  background:var(--cream);
  color:var(--orange-dark);
}
.hamburger-menu-foot{
  padding:16px;
  border-top:1px solid var(--border);
}
.menu-login{
  display:block;
  text-align:center;
  background:var(--orange);
  color:#fff;
  padding:12px;
  border-radius:9px;
  font-weight:700;
}
.menu-backdrop{
  position:fixed;
  inset:0;
  background:rgba(3,12,32,.45);
  z-index:190;
  opacity:0;
  pointer-events:none;
  transition:.3s ease;
}
.menu-backdrop.show{
  opacity:1;
  pointer-events:auto;
}
@media(max-width:720px){
  .topbar-links a:not(:last-child){display:none}
  .brand-seal{width:135px}
  .library-word{font-size:22px}
  .brand-divider{height:40px}
}


#hamburgerMenu .hamburger-menu-foot{
  background:#fff;
}
#hamburgerMenu .menu-library-address{
  margin-top:14px;
  padding:14px 12px 2px;
  border-top:1px solid #e6eaf0;
  color:#66748a;
}
#hamburgerMenu .menu-address-title{
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:#0f1e4a;
  font-size:12px;
  line-height:1.4;
}
#hamburgerMenu .menu-address-title i{
  color:#e58a00;
  margin-top:2px;
}
#hamburgerMenu .menu-library-address p{
  margin:7px 0 0 20px;
  font-size:11px;
  line-height:1.65;
  color:#6c788c;
}


/* =========================================================
   HAMBURGER MENU — 8 ITEMS VISIBLE + SCROLL
   Footer/login/address always fully visible
   ========================================================= */

#hamburgerMenu.menu-eight-visible-layout{
  display:flex !important;
  flex-direction:column !important;
  height:100vh !important;
  max-height:100vh !important;
  overflow:hidden !important;
}

/* Keep the menu title/header fixed */
#hamburgerMenu .hamburger-menu-head{
  flex:0 0 auto !important;
}

/*
  Show about 8 menu rows before scrolling.
  Each item is ~51px high including spacing/border.
*/
#hamburgerMenu .menu-eight-scroll-area{
  flex:0 0 auto !important;
  max-height:408px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-right:6px !important;
  scrollbar-width:thin !important;
  scrollbar-color:#8a8f98 transparent !important;
}

/* Chrome/Edge scrollbar */
#hamburgerMenu .menu-eight-scroll-area::-webkit-scrollbar{
  width:7px !important;
}
#hamburgerMenu .menu-eight-scroll-area::-webkit-scrollbar-track{
  background:transparent !important;
}
#hamburgerMenu .menu-eight-scroll-area::-webkit-scrollbar-thumb{
  background:#92979f !important;
  border-radius:10px !important;
}

/* Keep menu item heights consistent */
#hamburgerMenu .menu-eight-scroll-area > a{
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  padding:0 14px !important;
  margin:0 !important;
  border-bottom:1px solid #edf0f4 !important;
}

/* Footer does not scroll */
#hamburgerMenu .menu-fixed-footer{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  background:#fff !important;
  border-top:1px solid #e4e8ee !important;
  padding:16px 16px 14px !important;
  overflow:visible !important;
}

/* Library Login button */
#hamburgerMenu .menu-fixed-footer > a,
#hamburgerMenu .menu-fixed-footer .library-login{
  flex:0 0 auto !important;
  margin:0 0 14px !important;
}

/* Address — fully visible */
#hamburgerMenu .menu-library-address{
  flex:0 0 auto !important;
  margin:0 !important;
  padding:14px 10px 4px !important;
  border-top:1px solid #e6eaf0 !important;
  color:#66748a !important;
  background:#fff !important;
}

#hamburgerMenu .menu-address-title{
  display:flex !important;
  align-items:flex-start !important;
  gap:8px !important;
  color:#0f1e4a !important;
  font-size:12px !important;
  line-height:1.4 !important;
}

#hamburgerMenu .menu-address-title i{
  color:#e58a00 !important;
  margin-top:2px !important;
  flex:0 0 auto !important;
}

#hamburgerMenu .menu-library-address p{
  margin:7px 0 0 20px !important;
  font-size:11px !important;
  line-height:1.55 !important;
  color:#6c788c !important;
}

/* Avoid floating Ask a Librarian button covering the address */
#hamburgerMenu ~ #askLibrarianFab,
#askLibrarianFab{
  z-index:9000 !important;
}

/* On shorter screens, reduce menu viewport slightly but preserve footer */
@media(max-height:760px){
  #hamburgerMenu .menu-eight-scroll-area{
    max-height:360px !important;
  }
}

@media(max-height:680px){
  #hamburgerMenu .menu-eight-scroll-area{
    max-height:310px !important;
  }
}

/* Mobile drawer width remains unchanged; only behavior is fixed */
@media(max-width:480px){
  #hamburgerMenu .menu-eight-scroll-area > a{
    min-height:48px !important;
  }
}


/* Our Libraries — campus names only */
#our-libraries .our-library-name-banner{display:flex!important;align-items:center!important;justify-content:center!important;min-height:58px!important;padding:14px 18px!important;text-align:center!important}
#our-libraries .our-library-campus-only{display:block!important;color:#0f1e4a!important;font-size:18px!important;font-weight:850!important;line-height:1.25!important}

/* Campus popup gallery carousel */
#oldLibraryModalGallery.campus-modal-carousel{position:relative!important;display:block!important;overflow:hidden!important;padding:0 48px!important}
.campus-modal-carousel-viewport{overflow:hidden!important;width:100%!important}
.campus-modal-carousel-track{display:flex!important;gap:14px!important;transition:transform .38s ease!important;will-change:transform}
.campus-modal-photo{flex:0 0 calc((100% - 28px)/3)!important;margin:0!important;min-width:0!important}
.campus-modal-photo button{width:100%!important;border:0!important;padding:0!important;background:none!important;cursor:pointer!important;text-align:left!important}
.campus-modal-photo img{display:block!important;width:100%!important;height:160px!important;object-fit:cover!important;border-radius:10px!important}
.campus-modal-photo figcaption{margin-top:8px!important;color:#0f1e4a!important;font-size:12.5px!important;font-weight:800!important;text-align:center!important;line-height:1.35!important}
.campus-modal-carousel-arrow{position:absolute!important;top:78px!important;z-index:5!important;width:36px!important;height:36px!important;border:0!important;border-radius:50%!important;background:#0f1e4a!important;color:#fff!important;font-size:24px!important;display:grid!important;place-items:center!important;cursor:pointer!important}
.campus-modal-carousel-arrow.prev{left:4px!important}.campus-modal-carousel-arrow.next{right:4px!important}
.campus-modal-carousel-arrow:hover{background:#e58a00!important}

/* Campus slideshow */
.campus-library-lightbox{position:fixed;inset:0;z-index:2147483600;display:none;align-items:center;justify-content:center;padding:18px}
.campus-library-lightbox.open{display:flex}
.campus-library-lightbox-backdrop{position:absolute;inset:0;background:rgba(3,8,20,.94);backdrop-filter:blur(6px)}
.campus-library-lightbox-shell{position:relative;z-index:2;width:min(1180px,calc(100vw - 36px));height:min(92vh,880px);display:grid;grid-template-rows:56px minmax(0,1fr) auto 32px;background:#090f1e;border-radius:16px;overflow:hidden;box-shadow:0 30px 100px rgba(0,0,0,.48)}
.campus-library-lightbox-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 13px 0 18px;background:#111a2e;color:#fff}
.campus-library-lightbox-toolbar strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.campus-library-lightbox-tools{display:flex;gap:6px}.campus-library-lightbox-tools button{width:37px;height:37px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.13);border-radius:8px;background:#1a253b;color:#fff;cursor:pointer}.campus-library-lightbox-tools button:hover{background:#e58a00}
.campus-library-lightbox-stage{position:relative;min-width:0;min-height:0;display:grid;place-items:center;overflow:hidden;background:#070c17}
.campus-library-lightbox-image-wrap{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:auto;padding:18px 72px;box-sizing:border-box}
#campusLibraryLightboxImage{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;object-position:center;transform-origin:center;transition:transform .15s ease}
.campus-library-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:46px;height:46px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(15,30,74,.94);color:#fff;cursor:pointer}.campus-library-lightbox-nav:hover{background:#e58a00}.campus-library-lightbox-nav.prev{left:12px}.campus-library-lightbox-nav.next{right:12px}
.campus-library-lightbox-title{padding:10px 18px 4px;background:#111a2e;color:#fff;text-align:center;font-size:14px;font-weight:850}.campus-library-lightbox-counter{padding:3px 18px 9px;background:#111a2e;color:#aeb7c7;text-align:center;font-size:11px}body.campus-library-lightbox-open{overflow:hidden!important}

/* Banner starts immediately under header; image/video slides are identical height */
#home.video-banner-slider{margin-top:0!important;padding-top:0!important;height:540px!important;min-height:540px!important;max-height:540px!important}
#home .banner-slide{height:540px!important;min-height:540px!important;max-height:540px!important;top:0!important;bottom:auto!important}
#home .banner-image,#home .banner-video{position:absolute!important;inset:0!important;width:100%!important;height:540px!important;min-height:540px!important;max-height:540px!important;object-fit:cover!important;object-position:center!important;display:block!important}
.site-header,.modern-header,header{margin-bottom:0!important}.site-header + #home,.modern-header + #home,header + #home{margin-top:0!important}
@media(max-width:900px){.campus-modal-photo{flex-basis:calc((100% - 14px)/2)!important}}
@media(max-width:760px){#home.video-banner-slider,#home .banner-slide,#home .banner-image,#home .banner-video{height:420px!important;min-height:420px!important;max-height:420px!important}.campus-modal-photo{flex-basis:100%!important}#oldLibraryModalGallery.campus-modal-carousel{padding:0 42px!important}.campus-library-lightbox{padding:8px}.campus-library-lightbox-shell{width:calc(100vw - 16px);height:calc(100vh - 16px)}.campus-library-lightbox-image-wrap{padding:12px 48px}}

/* Staff page: make the imported home-page header authoritative */
.site-header.modern-header{
  position:sticky !important;
  top:0 !important;
  z-index:100 !important;
}
.site-header.modern-header .hamburger-menu-body a.active{
  background:var(--cream) !important;
  color:var(--orange-dark) !important;
}
.topbar .topbar-brand{
  font-weight:500;
}
