/* ==========================================================================
   BARI-like theme for SLiMS 9.8
   Look modelled on barilibrary.org (SLiMS 8 "default" theme, blue preset)
   ========================================================================== */

/* ---- Font: Open Sans, self-hosted ---- */
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/open-sans-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/open-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/open-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/open-sans-latin-700-normal.woff2') format('woff2'); }

/* ---- Gradient presets (Admin > System > Theme > Customize) ---- */
body.bari                 { --c1: #194FB8; --c2: #05C6D1; }
body.bari.grad-green      { --c1: #44CD9E; --c2: #E7DD4B; }
body.bari.grad-mint       { --c1: #0FA9A8; --c2: #DFCEE5; }
body.bari.grad-red        { --c1: #054365; --c2: #FF0000; }
body.bari.grad-pink       { --c1: #E02D6F; --c2: #FC963F; }
body.bari.grad-purple     { --c1: #8217B7; --c2: #EDAA9C; }
body.bari.grad-beach      { --c1: #2CBEDF; --c2: #E5D8B9; }

body.bari {
  --dark: #222;
  --footer-h: 60px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  color: #555;
  background: #F1F1F1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.bari h1, body.bari h2, body.bari h3, body.bari h4, body.bari h5 { font-family: 'Open Sans', sans-serif; }
body.bari a:not(.btn) { color: var(--c1); }
body.bari strong, body.bari b { font-weight: 600; }

/* ---- Gradient surface (hero, band, login) ---- */
.bari-grad {
  position: relative;
  color: #fff;
  background: linear-gradient(45deg, var(--c1) 0%, var(--c2) 100%);
}
body.has-photo .bari-grad {
  background: #333 var(--bari-photo) center / cover no-repeat;
}
body.has-photo .bari-grad::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, var(--c1) 0%, var(--c2) 100%);
  opacity: .75;
}
.bari-grad > * { position: relative; z-index: 1; }

/* ---- Top bar ---- */
.bari-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
}
.bari-brand { display: flex; align-items: center; text-decoration: none !important; color: #fff !important; min-width: 0; }
.bari-logo {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255,255,255,.95);
  padding: 4px;
  flex: none;
}
.bari-names { display: flex; flex-direction: column; margin-left: 18px; line-height: 1.15; min-width: 0; }
.bari-name { font-size: 34px; font-weight: 300; text-transform: uppercase; letter-spacing: 1px; }
.bari-subname { font-size: 15px; font-weight: 300; opacity: .95; margin-top: 4px; }

.bari-burger {
  background: none; border: 0; padding: 8px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; flex: none;
}
.bari-burger span { display: block; width: 32px; height: 3px; background: #fff; border-radius: 2px; }
.bari-burger:focus { outline: 1px dotted rgba(255,255,255,.6); }

/* ---- Slide-out menu ---- */
.bari-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 25%; min-width: 290px; max-width: 420px;
  background: #F7F7F7;
  color: #444;
  z-index: 1060;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
  padding: 30px 36px;
  box-shadow: -2px 0 12px rgba(0,0,0,.08);
}
.bari-menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  z-index: 1055; opacity: 0; visibility: hidden; transition: opacity .3s;
}
body.bari-menu-open .bari-menu { transform: none; }
body.bari-menu-open .bari-menu-backdrop { opacity: 1; visibility: visible; }
.bari-menu-head {
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase; letter-spacing: 3px; font-size: 13px; font-weight: 600;
  padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #ddd;
}
.bari-menu-close { background: none; border: 0; font-size: 34px; line-height: 1; color: #444; cursor: pointer; padding: 0; }
.bari-menu ul { list-style: none; padding: 0; margin: 0 0 30px; }
.bari-menu li a {
  display: block; padding: 9px 0; font-size: 18px; font-weight: 300;
  color: #444 !important; text-decoration: none;
}
.bari-menu li a:hover, .bari-menu li.active a { color: var(--c1) !important; }
.bari-lang label {
  display: block; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 600; color: #888; margin-bottom: 8px;
}
.bari-lang select {
  width: 100%; padding: 8px 14px; border: 0; border-radius: 20px;
  background: #16A085; color: #fff; font-family: inherit; font-size: 14px;
}

/* ---- Pill search ---- */
.bari-pill {
  display: flex; width: 620px; max-width: 100%; margin: 0 auto;
  border-radius: 40px; overflow: hidden;
}
.bari-pill input[type=text] {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: rgba(255,255,255,.25); color: #fff;
  padding: 14px 26px; font-size: 16px; font-weight: 300; font-family: inherit;
}
.bari-pill input[type=text]::placeholder { color: rgba(255,255,255,.85); }
.bari-pill input[type=text]:focus { background: rgba(255,255,255,.35); }
.bari-pill button {
  border: 0; background: #fff; color: #777; cursor: pointer;
  padding: 0 32px; font-family: inherit; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
}
.bari-pill button:hover { color: var(--c1); }
.bari-adv-link { display: inline-block; margin-top: 14px; color: #fff !important; font-size: 14px; text-decoration: underline; opacity: .95; }
.bari-pill.compact { width: 340px; }
.bari-pill.compact input[type=text] { padding: 9px 18px; font-size: 14px; }
.bari-pill.compact button { padding: 0 18px; font-size: 11px; }

/* ---- Homepage hero ---- */
.bari-hero {
  flex: 1;
  min-height: calc(100vh - var(--footer-h));
  display: flex; flex-direction: column;
}
.bari-hero-center {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 20px 20px 120px;
}
.bari-hero-center h1 {
  font-size: 64px; font-weight: 300; text-transform: uppercase; letter-spacing: 6px; margin: 0 0 6px; color: #fff;
}
.bari-hero-center p { font-size: 15px; margin: 0 0 26px; opacity: .95; }

/* ---- Inner page band ---- */
.bari-band { padding-bottom: 34px; }
.bari-band-row {
  max-width: 1170px; margin: 0 auto; padding: 10px 15px 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.bari-band-title { font-size: 38px; font-weight: 300; margin: 0; color: #fff; }
.bari-band-search { text-align: right; }
.bari-band-search .bari-adv-link { margin-top: 6px; font-size: 12px; }

/* ---- Body ---- */
.bari-body { background: #fff; flex: 1; padding: 44px 0 60px; }
.bari-container { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.bari-main { min-width: 0; }
.bari-main h2, .bari-main h3 { font-weight: 300; color: #333; }
.bari-main img { max-width: 100%; height: auto; }

.bari-side { padding-left: 40px; }
.bari-side-block { margin-bottom: 34px; }
.bari-side-block h3 {
  font-size: 18px; font-weight: 400; color: #333;
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #e3e3e3;
}
.bari-side-block p { font-size: 14px; }
.bari-muted { color: #999; }
.bari-cluster { font-size: 14px; }
.bari-cluster h4, .bari-cluster h5, .bari-cluster h6 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: #777; }

/* ---- Buttons ---- */
.bari-btn-dark, .bari-btn-light, .bari-btn-icon, .bari-body .loginButton {
  display: inline-block; border-radius: 30px; border: 0;
  padding: 7px 18px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  text-decoration: none !important; cursor: pointer; font-family: inherit; line-height: 1.5;
}
.bari-btn-dark { background: var(--dark); color: #fff !important; }
.bari-btn-dark:hover { background: #000; }
.bari-btn-light { background: #ececec; color: #555 !important; }
.bari-btn-light:hover { background: #ddd; }
.bari-btn-icon { background: transparent; color: #999 !important; padding: 7px 10px; }
.bari-btn-icon:hover { color: var(--c1) !important; }
.bari-btn-block { display: block; text-align: center; }
.bari-body .btn { border-radius: 30px; }

/* ---- Search results ---- */
.bari-result-tools {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 14px; font-size: 13px;
}
.bari-result-tools label { margin: 0; text-transform: uppercase; letter-spacing: 1px; font-size: 11px; font-weight: 600; color: #888; }
.bari-result-tools select { width: auto; border-radius: 20px; }
.bari-result-tools form { margin: 0; }

.page-search .biblioResult:not(.row) {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.bari-card {
  display: flex; gap: 16px;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 3px; padding: 16px;
}
.bari-card-cover { flex: 0 0 90px; }
.bari-card-cover img { width: 90px; height: auto; border: 1px solid #eee; }
.bari-card-cover img.not-available { opacity: .5; }
.bari-card-body.card-body { flex: 1; min-width: 0; padding: 0; }
.bari-card-title { font-size: 16px; font-weight: 400; line-height: 1.35; margin: 0 0 6px; }
.bari-card-title a { color: var(--c1) !important; }
.bari-card-authors { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 14px; color: #666; margin-bottom: 6px; }
.bari-card-authors a { color: #666 !important; }
.bari-card-avail { font-size: 12px; color: #999; margin-bottom: 10px; }
.bari-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* search-term highlight */
body.bari .highlight { background: #B4500E; color: #fff; padding: 0 2px; }

/* pagination */
.biblioPaging, .biblioPaging:first-child {
  text-align: left; border: 0; padding: 0; margin: 0 0 18px;
}
.biblioPagingBottom { margin-top: 24px !important; }
body.bari .biblioPaging .pagingList { display: flex; flex-wrap: wrap; gap: 4px; background: none; border-radius: 0; }
body.bari .biblioPaging .pagingList a, body.bari .biblioPaging .pagingList b {
  min-width: 32px; padding: 5px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  border: 1px solid #ddd; border-radius: 0; color: #555; background: #fff; box-shadow: none;
}
body.bari .biblioPaging .pagingList a:hover { border-color: var(--dark); color: #000; }
body.bari .biblioPaging .pagingList b { background: var(--dark); border-color: var(--dark); color: #fff; }

/* filter sidebar */
.bari-cluster .btn-primary { background: var(--dark); border-color: var(--dark); border-radius: 30px; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.bari-cluster .irs--round .irs-bar, .bari-cluster .irs--round .irs-from, .bari-cluster .irs--round .irs-to, .bari-cluster .irs--round .irs-single { background-color: var(--c1); }
.bari-cluster .irs--round .irs-handle { border-color: var(--c1); }
.bari-cluster .irs--round .irs-from:before, .bari-cluster .irs--round .irs-to:before { border-top-color: var(--c1); }

.bari-empty { text-align: center; padding: 30px 0; }
.bari-empty img { max-width: 260px; margin-bottom: 10px; }

/* ---- Record detail ---- */
.bari-detail-head { display: flex; gap: 30px; align-items: flex-start; margin-bottom: 18px; }
.bari-detail-titles { flex: 1; min-width: 0; }
.bari-detail-gmd { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: #999; margin-bottom: 6px; }
.bari-detail-title { font-size: 26px; font-weight: 700 !important; color: #333; margin: 0 0 8px; }
.bari-detail-authors { font-size: 15px; }
.bari-detail-tools { margin-top: 14px; display: flex; gap: 18px; font-size: 13px; }
.bari-detail-tools a { text-decoration: none !important; }
.bari-detail-cover { flex: 0 0 150px; }
.bari-detail-cover img { width: 150px; height: auto; border: 1px solid #eee; }
.bari-detail-notes { color: #666; padding: 14px 0 6px; border-top: 1px solid #eee; }
.bari-h {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #333;
  margin: 30px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #eee;
}
.bari-detail table { width: 100%; font-size: 14px; }
.bari-detail table td, .bari-detail table th { padding: 8px 10px; border-top: 1px solid #eee; }
.bari-dl { margin: 0; font-size: 14px; }
.bari-dl dt {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: #999;
  padding-top: 9px; padding-bottom: 9px; border-top: 1px solid #f0f0f0;
}
.bari-dl dd { padding-top: 7px; padding-bottom: 7px; margin: 0; border-top: 1px solid #f0f0f0; }

/* ---- Librarian profiles ---- */
.bari-librarians { display: flex; flex-wrap: wrap; gap: 20px; }
.bari-librarians .librarian {
  width: calc(33.333% - 14px); min-width: 200px; margin: 0 !important;
  border: 1px solid #e5e5e5; border-radius: 3px; padding: 20px; text-align: center; display: block;
}
.bari-librarians .librarian > div { width: 100% !important; float: none !important; margin: 0 !important; }
.bari-librarians .librarian-image img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.bari-librarians .key { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #999; font-weight: 600; }
.bari-librarians .row-fluid { margin-bottom: 6px; }
.bari-librarians .row-fluid > div { width: 100% !important; float: none !important; }

/* ---- News list ---- */
.bari-main .card.shadow { box-shadow: none !important; border: 1px solid #e5e5e5; }

/* ---- Location map ---- */
.bari-map { position: relative; padding-top: 62%; border: 1px solid #e5e5e5; }
.bari-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Librarian login ---- */
.bari-login { flex: 1; min-height: calc(100vh - var(--footer-h)); display: flex; flex-direction: column; }
.bari-login-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 20px 80px; }
.bari-login-card {
  width: 320px; max-width: 100%; background: #fff; color: #555; border-radius: 4px; overflow: hidden;
  padding: 30px 28px 0; box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.bari-login-card #loginForm form { margin: 0; width: auto; }
.bari-login-card #loginForm .heading1 {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #777; margin: 0 0 6px;
}
.bari-login-card div.login_input { position: relative; margin-bottom: 18px; }
.bari-login-card div.login_input::before {
  font-family: 'Font Awesome 5 Free'; font-weight: 900; content: "\f007";
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--dark); color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.bari-login-card div.login_input:has(input[type=password])::before { content: "\f023"; }
.bari-login-card #loginForm .login_input input {
  width: 100%; border: 1px solid #ddd; border-radius: 30px; padding: 8px 14px 8px 44px;
  font-family: inherit; font-size: 14px; outline: 0;
}
.bari-login-card #loginForm .login_input input:focus { border-color: var(--c1); }
.bari-login-card #loginForm .loginButton {
  display: block; width: 100%; background: var(--dark); color: #fff; border: 0; border-radius: 30px;
  padding: 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; margin-top: 8px;
}
.bari-login-card #loginForm .homeButton {
  display: block; width: calc(100% + 56px); margin: 24px -28px 0; border: 0; border-radius: 0;
  background: #e6e6e6; color: #666; padding: 12px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px; cursor: pointer; text-align: center;
}
.bari-login-card #loginForm .homeButton:hover { background: #ddd; }
.bari-login-card .remember_forgot { font-size: 12px; margin-bottom: 6px; }
.bari-login-card .alert { font-size: 13px; }

/* ---- Advanced Search overlay ---- */
.bari-adv .modal-dialog { max-width: none; width: 100%; height: 100%; margin: 0; }
.bari-adv .modal-content {
  min-height: 100vh; border: 0; border-radius: 0; background: #F1F1F1;
  background-image: url('../images/logo-big.png'); background-repeat: no-repeat;
  background-position: -120px center; background-size: 520px;
}
.bari-adv .modal-content::before {
  content: ""; position: absolute; inset: 0; background: rgba(241,241,241,.9); pointer-events: none;
}
.bari-adv-close {
  position: absolute; top: 20px; right: 34px; z-index: 2;
  background: none; border: 0; font-size: 56px; line-height: 1; color: #555; cursor: pointer; font-weight: 300;
}
.bari-adv-form {
  position: relative; z-index: 1; width: 760px; max-width: 100%; margin: 0 auto; padding: 90px 20px 60px;
}
.bari-adv-form h2 { color: var(--c1); font-weight: 300; font-size: 40px; margin-bottom: 30px; }
.bari-adv-form label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #777; }
.bari-adv-form .form-control { border-radius: 30px; border-color: #ddd; padding-left: 16px; }
.bari-adv-form .bari-btn-dark { padding: 10px 40px; font-size: 12px; margin-top: 10px; }

/* ---- Footer ---- */
.bari-footer { background: #000; color: #aaa; min-height: var(--footer-h); display: flex; align-items: center; }
.bari-footer-inner {
  width: 100%; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
}
.bari-footer-links { display: flex; gap: 22px; }
.bari-footer-links a { color: #ccc !important; text-decoration: none !important; }
.bari-footer-links a:hover { color: #fff !important; }
.bari-footer-links a.bari-rss { color: #F39C12 !important; }

/* ---- Member area tweaks ---- */
.bari-main .member-area, .bari-main .card { border-radius: 3px; }
.page-member .bari-main input.form-control { border-radius: 30px; }
.page-member .memberButton {
  background: var(--dark); color: #fff; border: 0; border-radius: 30px; padding: 8px 34px; margin-top: 14px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; cursor: pointer;
}
.page-member .memberButton:hover { background: #000; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .bari-side { padding-left: 15px; margin-top: 30px; }
}
@media (max-width: 767px) {
  .bari-top { padding: 18px 20px; }
  .bari-logo { width: 56px; height: 56px; }
  .bari-names { margin-left: 12px; }
  .bari-name { font-size: 22px; }
  .bari-subname { font-size: 12px; }
  .bari-hero-center h1 { font-size: 42px; }
  .bari-band-title { font-size: 28px; }
  .bari-band-search, .bari-pill.compact { width: 100%; text-align: left; }
  .page-search .biblioResult:not(.row) { grid-template-columns: 1fr; }
  .bari-detail-head { flex-direction: column-reverse; }
  .bari-footer-inner { padding: 14px 20px; justify-content: center; text-align: center; }
  .bari-menu { width: 85%; }
}
