/* Library site (/library). Colours follow the main site: navy #011166, orange #fd540f, cyan #20b1db */
.lib {
    --lib-navy: #011166;
    --lib-navy-2: #0a2a8a;
    --lib-orange: #fd540f;
    --lib-cyan: #20b1db;
    --lib-bg: #f5f7fb;
    --lib-text: #1f2937;
    --lib-muted: #6b7280;
    --lib-border: #e5e7eb;
    --lib-radius: 14px;
    --lib-shadow: 0 6px 24px rgba(1, 17, 102, .08);
    color: var(--lib-text);
    background: var(--lib-bg);
}
.lib a { text-decoration: none; }
.lib [hidden] { display: none !important; }

/* ---------- header ---------- */
.lib-header { background: linear-gradient(120deg, var(--lib-navy), var(--lib-navy-2)); color: #fff; }
.lib-header__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.lib-brand { display: flex; align-items: center; gap: .8rem; color: #fff !important; }
.lib-brand__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--lib-orange); display: grid; place-items: center; font-size: 1.3rem; }
.lib-brand__name { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.lib-brand__tagline { display: block; font-size: .85rem; opacity: .8; }

.lib-status { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: rgba(255, 255, 255, .12); color: #fff !important; }
.lib-status__dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.lib-status.is-open .lib-status__dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .3); }
.lib-page-head .lib-status { background: #fff; color: var(--lib-text) !important; border: 1px solid var(--lib-border); }

.lib-nav { background: rgba(0, 0, 0, .18); }
.lib-nav__inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
/* Wraps only until library.js moves the overflow into "More" */
.lib-nav__list { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; gap: .15rem; flex: 1 1 0; min-width: 0; }
.lib-nav__list > li > a { display: block; padding: .8rem .85rem; color: rgba(255, 255, 255, .88); font-weight: 500; font-size: .95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.lib-nav__more .dropdown-item.active { background: #eef2ff; color: var(--lib-navy); font-weight: 600; }
.lib-nav__sub { padding-left: 1.6rem !important; font-size: .92rem; }
.lib-nav__list > li > a:hover, .lib-nav__list > li > a.active { color: #fff; border-bottom-color: var(--lib-orange); }
.lib-nav .dropdown-menu { border: 0; border-radius: 10px; box-shadow: var(--lib-shadow); padding: .4rem; }
.lib-nav .dropdown-item { border-radius: 6px; padding: .5rem .8rem; }
.lib-nav .dropdown-item:hover { background: #eef2ff; color: var(--lib-navy); }
.lib-nav__search { display: flex; background: #fff; border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.lib-nav__search input { border: 0; padding: .45rem .9rem; outline: none; width: 200px; font-size: .9rem; }
.lib-nav__search button { border: 0; background: var(--lib-orange); color: #fff; padding: 0 .9rem; }

/* ---------- hero ---------- */
.lib-hero { position: relative; background: var(--lib-navy) center / cover no-repeat; padding: 5rem 0 4.5rem; color: #fff; }
.lib-hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(1, 17, 102, .88), rgba(1, 17, 102, .55) 60%, rgba(253, 84, 15, .35)); }
.lib-hero__inner { position: relative; max-width: 860px; text-align: center; }
.lib-hero__title { font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 800; color: #fff; margin-bottom: .4rem; }
.lib-hero__tagline { font-size: 1.1rem; opacity: .9; margin-bottom: 1.8rem; }

.lib-search__tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: .7rem; flex-wrap: wrap; }
.lib-search__tab input { position: absolute; opacity: 0; pointer-events: none; }
.lib-search__tab span { display: inline-block; padding: .4rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .15); cursor: pointer; font-size: .9rem; }
.lib-search__tab input:checked + span { background: #fff; color: var(--lib-navy); font-weight: 600; }
.lib-search__tab input:focus-visible + span { outline: 3px solid var(--lib-cyan); }
.lib-search__box { display: flex; background: #fff; border-radius: 999px; padding: .35rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.lib-search__box input { flex: 1; border: 0; outline: none; padding: .7rem 1.2rem; font-size: 1.05rem; border-radius: 999px; min-width: 0; color: var(--lib-text); }
.lib-search__box button { border: 0; background: var(--lib-orange); color: #fff; border-radius: 999px; padding: .7rem 1.5rem; font-weight: 600; }
.lib-search__box button:hover { background: #e14708; }
.lib-search__extra { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1rem; flex-wrap: wrap; font-size: .9rem; }
.lib-search__extra a { color: #fff; opacity: .9; border-bottom: 1px dashed rgba(255, 255, 255, .5); }
.lib-search--inline { max-width: 720px; margin-top: 1rem; }
.lib-search--inline .lib-search__box { box-shadow: var(--lib-shadow); border: 1px solid var(--lib-border); }

/* ---------- quick links ---------- */
.lib-quick { margin-top: -2.2rem; position: relative; z-index: 2; }
.lib-quick__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.lib-tile { background: #fff; border-radius: var(--lib-radius); padding: 1.2rem; box-shadow: var(--lib-shadow); display: flex; flex-direction: column; gap: .3rem; color: var(--lib-text) !important; transition: transform .2s, box-shadow .2s; }
.lib-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(1, 17, 102, .14); }
.lib-tile__icon { width: 44px; height: 44px; border-radius: 12px; background: #fff1ea; color: var(--lib-orange); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: .3rem; }
.lib-tile__title { font-weight: 700; color: var(--lib-navy); }
.lib-tile__text { font-size: .85rem; color: var(--lib-muted); }

/* ---------- sections, cards, typography ---------- */
.lib-section { padding: 3rem 0; }
.lib-section--tint { background: #eaf0fb; }
.lib-section__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.lib-h2 { font-size: 1.45rem; font-weight: 700; color: var(--lib-navy); margin-bottom: 1rem; }
.lib-h3 { font-size: 1.15rem; font-weight: 700; color: var(--lib-navy); }
.lib-count { display: inline-block; font-size: .8rem; background: #e0e7ff; color: var(--lib-navy); border-radius: 999px; padding: .1rem .55rem; vertical-align: middle; }
.lib-card { background: #fff; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow); padding: 1.4rem; margin-bottom: 1.2rem; }
.lib-card__title { font-weight: 700; color: var(--lib-navy); margin-bottom: .7rem; }
.lib-card__title i { color: var(--lib-orange); margin-right: .3rem; }
.lib-today { font-size: 1.35rem; font-weight: 700; color: var(--lib-navy); }
.lib-link-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; font-weight: 600; color: var(--lib-orange) !important; }
.lib-prose { line-height: 1.75; }
.lib-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.lib-prose h2, .lib-prose h3, .lib-prose h4 { color: var(--lib-navy); margin-top: 1.4rem; }
.lib-prose table { width: 100%; border-collapse: collapse; }
.lib-prose td, .lib-prose th { border: 1px solid var(--lib-border); padding: .5rem; }
.lib-btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--lib-orange); color: #fff !important; border-radius: 999px; padding: .6rem 1.3rem; font-weight: 600; border: 2px solid var(--lib-orange); transition: background .2s; }
.lib-btn:hover { background: #e14708; }
.lib-btn--sm { padding: .35rem .95rem; font-size: .88rem; }
.lib-btn--ghost { background: transparent; color: var(--lib-orange) !important; }
.lib-btn--ghost:hover { background: #fff1ea; }

.lib-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.lib-page-card { background: #fff; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow); padding: 1.3rem; display: flex; flex-direction: column; gap: .35rem; color: var(--lib-text) !important; transition: transform .2s; }
.lib-page-card:hover { transform: translateY(-3px); }
.lib-page-card__icon { color: var(--lib-cyan); font-size: 1.5rem; }
.lib-page-card__title { font-weight: 700; color: var(--lib-navy); font-size: 1.05rem; }
.lib-page-card__text { font-size: .9rem; color: var(--lib-muted); }

.lib-news-mini { display: block; padding: .65rem 0; border-bottom: 1px solid var(--lib-border); color: var(--lib-text) !important; }
.lib-news-mini:last-of-type { border-bottom: 0; }
.lib-news-mini__date { display: block; font-size: .78rem; color: var(--lib-muted); }
.lib-news-mini__title { font-weight: 600; color: var(--lib-navy); }
.lib-news-mini:hover .lib-news-mini__title { color: var(--lib-orange); }

/* ---------- inner page head ---------- */
.lib-page-head { background: #fff; border-bottom: 1px solid var(--lib-border); padding: 1.8rem 0 1.5rem; }
.lib-breadcrumb { font-size: .85rem; color: var(--lib-muted); margin-bottom: .5rem; }
.lib-breadcrumb a { color: var(--lib-navy); }
.lib-breadcrumb i { margin: 0 .35rem; font-size: .7rem; }
.lib-page-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--lib-navy); margin: 0; }
.lib-page-title i { color: var(--lib-orange); }
.lib-page-lead { font-size: 1.05rem; color: var(--lib-muted); margin: .5rem 0 0; }
.lib-article__image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-bottom: 1.2rem; }

.lib-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.lib-gallery__item img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; transition: transform .2s; }
.lib-gallery__item:hover img { transform: scale(1.03); }

.lib-aside-links { list-style: none; padding: 0; margin: 0; }
.lib-aside-links li a { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 8px; color: var(--lib-text) !important; }
.lib-aside-links li a:hover, .lib-aside-links li a.active { background: #eef2ff; color: var(--lib-navy) !important; font-weight: 600; }
.lib-aside-links i { color: var(--lib-orange); width: 18px; text-align: center; }

/* ---------- e-resources ---------- */
.lib-filter { background: #fff; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow); padding: 1rem; margin-bottom: 1.8rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.lib-filter__search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: .5rem; background: var(--lib-bg); border-radius: 999px; padding: 0 1rem; }
.lib-filter__search input { border: 0; background: transparent; padding: .65rem 0; outline: none; width: 100%; }
.lib-filter__chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.lib-chip { border: 1px solid var(--lib-border); background: #fff; border-radius: 999px; padding: .4rem .9rem; font-size: .85rem; }
.lib-chip.active { background: var(--lib-navy); color: #fff; border-color: var(--lib-navy); }
.lib-resource-group { margin-bottom: 2rem; }
.lib-resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.lib-resource { background: #fff; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow); padding: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.lib-resource__head { display: flex; gap: .8rem; align-items: center; }
.lib-resource__logo { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--lib-border); flex-shrink: 0; }
.lib-resource__logo--text { display: grid; place-items: center; background: linear-gradient(135deg, var(--lib-navy), var(--lib-cyan)); color: #fff; font-weight: 800; border: 0; }
.lib-resource__name { font-size: 1.02rem; font-weight: 700; color: var(--lib-navy); margin: 0 0 .2rem; }
.lib-resource__text { font-size: .9rem; color: var(--lib-muted); margin: 0; flex: 1; }
.lib-resource__note { font-size: .82rem; background: #fff8e1; border-radius: 8px; padding: .4rem .6rem; margin: 0; }
.lib-resource .lib-btn { align-self: flex-start; }
.lib-badge { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: .15rem .6rem; background: #e0e7ff; color: var(--lib-navy); }
.lib-badge--open { background: #dcfce7; color: #166534; }
.lib-badge--subscription { background: #ffedd5; color: #9a3412; }
.lib-badge--campus { background: #e0f2fe; color: #075985; }
.lib-badge--pinned { background: #fff1ea; color: var(--lib-orange); margin-left: .3rem; }
.lib-badge--special { background: #fef3c7; color: #92400e; margin-left: .4rem; }
.lib-empty { text-align: center; color: var(--lib-muted); padding: 2rem 0; }

/* ---------- news ---------- */
.lib-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.lib-news-card { background: #fff; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow); overflow: hidden; display: flex; flex-direction: column; color: var(--lib-text) !important; transition: transform .2s; }
.lib-news-card:hover { transform: translateY(-3px); }
.lib-news-card__image { width: 100%; height: 180px; object-fit: cover; }
.lib-news-card__image--blank { display: grid; place-items: center; background: linear-gradient(135deg, var(--lib-navy), var(--lib-cyan)); color: #fff; font-size: 2.2rem; }
.lib-news-card__body { padding: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.lib-news-card__title { font-weight: 700; color: var(--lib-navy); font-size: 1.05rem; }
.lib-news-card__text { font-size: .9rem; color: var(--lib-muted); }

/* ---------- hours ---------- */
.lib-table { width: 100%; }
.lib-table th, .lib-table td { padding: .6rem .4rem; border-bottom: 1px solid var(--lib-border); vertical-align: top; }
.lib-table th { font-weight: 600; width: 45%; }
.lib-table tr.today { background: #eef2ff; }
.lib-table tr.today th { color: var(--lib-navy); }
.lib-closures { padding-left: 1.1rem; margin: 0; }
.lib-closures li { margin-bottom: .4rem; }

/* ---------- staff ---------- */
.lib-staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.lib-staff { background: #fff; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow); padding: 1.5rem 1.2rem; text-align: center; }
.lib-staff__photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto .8rem; display: block; border: 4px solid #eef2ff; }
.lib-staff__photo--blank { display: grid; place-items: center; background: #eef2ff; color: var(--lib-navy); font-size: 2.6rem; }
.lib-staff__name { font-size: 1.05rem; font-weight: 700; color: var(--lib-navy); margin: 0; }
.lib-staff__position { color: var(--lib-orange); font-weight: 600; font-size: .9rem; margin: .2rem 0 .5rem; }
.lib-staff__bio { font-size: .88rem; color: var(--lib-muted); }
.lib-staff__contact { display: flex; justify-content: center; gap: .5rem; }
.lib-staff__contact a { width: 36px; height: 36px; border-radius: 50%; background: #eef2ff; color: var(--lib-navy); display: grid; place-items: center; }

/* ---------- faq, search, map ---------- */
.lib-accordion .accordion-item { border: 0; margin-bottom: .6rem; border-radius: 12px !important; overflow: hidden; box-shadow: var(--lib-shadow); }
.lib-accordion .accordion-button { font-weight: 600; color: var(--lib-navy); }
.lib-accordion .accordion-button:not(.collapsed) { background: #eef2ff; color: var(--lib-navy); box-shadow: none; }
.lib-results { list-style: none; padding: 0; }
.lib-results li { background: #fff; border-radius: 12px; box-shadow: var(--lib-shadow); padding: 1rem 1.2rem; margin-bottom: .8rem; }
.lib-results__title { display: block; font-weight: 700; color: var(--lib-navy); font-size: 1.05rem; margin: .3rem 0; }
.lib-results p { margin: 0; color: var(--lib-muted); font-size: .9rem; }
.lib-callout { display: flex; align-items: center; gap: 1rem; }
.lib-callout > i { font-size: 1.6rem; color: var(--lib-cyan); }
.lib-map iframe { width: 100%; min-height: 320px; border: 0; border-radius: var(--lib-radius); }

/* ---------- footer ---------- */
.lib-footer { background: #0b1437; color: rgba(255, 255, 255, .82); padding: 2.5rem 0; }
.lib-footer h5 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.lib-footer a { color: rgba(255, 255, 255, .85); }
.lib-footer a:hover { color: var(--lib-orange); }
.lib-contact, .lib-footer-links, .lib-hours-mini { list-style: none; padding: 0; margin: 0 0 1rem; }
.lib-contact li, .lib-footer-links li { margin-bottom: .55rem; }
.lib-contact i, .lib-footer-links i { color: var(--lib-orange); width: 20px; }
.lib-hours-mini li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); font-size: .9rem; }
.lib-hours-mini li.today { color: #fff; font-weight: 700; }
.lib-social { display: flex; gap: .5rem; }
.lib-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; }

@media (max-width: 991px) {
    .lib-nav__search { width: 100%; margin-top: 0; }
    .lib-nav__search input { width: 100%; }
}
@media (max-width: 575px) {
    .lib-hero { padding: 3.5rem 0 3.5rem; }
    .lib-search__box button span { display: none; }
    .lib-quick__grid { grid-template-columns: repeat(2, 1fr); }
}
