/* ============================================
   UCB Brand Theme Override for SLiMS OPAC
   Merah terang (#F4282D) - Hitam (#110C2D) - Putih
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --ucb-primary: #F4282D;
  --ucb-primary-dark: #C81A1F;
  --ucb-primary-light: #FF5A5E;
  --ucb-ink: #110C2D;
}

body {
  font-family: 'Poppins', sans-serif;
}

/* --------------------------------------------------------------------------
   E-Book collection page (index.php?p=ebook)
   -------------------------------------------------------------------------- */
.ucb-ebook-intro p { margin-bottom: 0; }

/* Filter bar: search + fakultas */
.ucb-ebook-filterbar {
  background: #fff;
  border: 1px solid #ECE9E5;
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(17,12,45,.06);
}
.ucb-ebook-filter-label {
  font-size: .78rem;
  font-weight: 700;
  color: #6c6c6c;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .3rem;
}
.ucb-ebook-filterbar .form-control,
.ucb-ebook-filterbar .custom-select {
  border-color: #E4E0DC;
  height: calc(2.25rem + 4px);
}
.ucb-ebook-filterbar .form-control:focus,
.ucb-ebook-filterbar .custom-select:focus {
  border-color: var(--ucb-primary);
  box-shadow: 0 0 0 .2rem rgba(244,40,45,.15);
}
.ucb-ebook-filterbar .btn-primary {
  background: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
  height: calc(2.25rem + 4px);
}
.ucb-ebook-filterbar .btn-primary:hover { background: var(--ucb-primary-dark) !important; }
.ucb-ebook-filter-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #F0ECE9;
  font-size: .85rem;
  color: #6c6c6c;
}
.ucb-ebook-filter-reset {
  color: var(--ucb-primary);
  font-weight: 600;
  text-decoration: none;
}
.ucb-ebook-filter-reset:hover { color: var(--ucb-primary-dark); text-decoration: underline; }

/* Cards */
.ucb-ebook-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ucb-ebook-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--ucb-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .03em;
  padding: .25rem .55rem;
  border-radius: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
/* Fixed aspect-ratio thumbnail box so the grid stays aligned regardless of
   each cover image's real dimensions — this was the main source of the
   ragged/uneven card layout across 3000+ imported covers of every size. */
.ucb-ebook-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #F5F3F1;
}
.ucb-ebook-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.ucb-ebook-card:hover .ucb-ebook-thumb img { transform: scale(1.04); }
.ucb-ebook-noimage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ucb-ink) 0%, var(--ucb-primary-dark) 100%);
  color: rgba(255,255,255,.85);
  font-size: 2.6rem;
}
.ucb-ebook-card .card-body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.ucb-ebook-fakultas {
  font-size: .68rem;
  font-weight: 700;
  color: var(--ucb-primary);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ucb-ebook-title {
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--ucb-ink) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ucb-ebook-title:hover { color: var(--ucb-primary) !important; }
.ucb-ebook-author {
  margin-top: auto;
  padding-top: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Poppins', sans-serif;
}

/* Navbar / hero header */
.navbar.navbar-dark.bg-transparent {
  background: linear-gradient(120deg, var(--ucb-ink) 0%, var(--ucb-primary) 100%) !important;
}
/* White chip behind the logo (navbar + footer) so the red reads as bright as it does on a white background (landing page) */
.navbar-brand img,
footer img[src*="images/default/logo"] {
  background: #fff;
  padding: 4px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.c-header .mask {
  background: linear-gradient(120deg, rgba(17,12,45,.85) 0%, rgba(244,40,45,.75) 100%) !important;
}

/* Links & text */
a, .text-primary {
  color: var(--ucb-primary);
}
a:hover {
  color: var(--ucb-primary-dark);
}

/* Buttons */
.btn-primary {
  background-color: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--ucb-primary-light) !important;
  border-color: var(--ucb-primary-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(244,40,45,.28);
}
.btn-outline-primary {
  color: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
  color: #fff !important;
}

/* Backgrounds */
.bg-primary {
  background-color: var(--ucb-primary) !important;
}

/* Footer */
footer.bg-grey-darkest {
  background: var(--ucb-ink) !important;
}

/* Badges / module label accents */
.badge-primary {
  background-color: var(--ucb-primary) !important;
}

/* Search button on homepage / results */
#button-addon2 {
  background-color: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
  color: #fff !important;
  transition: background-color .18s ease, transform .18s ease;
}
#button-addon2:hover {
  background-color: var(--ucb-primary-light) !important;
  border-color: var(--ucb-primary-light) !important;
  transform: translateY(-1px);
}

/* Card / collection hover */
.card:hover,
.obj_biblio_summary:hover {
  box-shadow: 0 14px 30px rgba(244,40,45,.14);
}

/* Support/Contribute buttons de-emphasized to keep focus on UCB branding */
a[href*="slims.web.id"],
a[href*="github.com/slims"] {
  opacity: 0.7;
}
