/* ==========================================================================
   Perpustakaan UCB — palet & tipografi mengikuti identitas resmi ucb.ac.id
   Merah terang (#F4282D) - Hitam (#110C2D) - Putih, font Montserrat/Poppins.
   ========================================================================== */

:root {
  --ucb-primary: #F4282D;
  --ucb-primary-dark: #C81A1F;
  --ucb-primary-light: #FF5A5E;
  --ucb-ink: #110C2D;
  --ucb-ink-soft: #262626;
  --ucb-line: #E7E4E1;
  --ucb-paper: #FBF9F7;
}

body {
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  color: var(--ucb-ink-soft);
  background: #fff;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .section-title, .stat-box .num {
  font-family: 'Montserrat', 'Poppins', sans-serif;
}

/* --------------------------------------------------------------------------
   Navbar — putih bersih, teks gelap, aksen merah saat hover/aktif
   -------------------------------------------------------------------------- */
.navbar-ucb {
  background: #fff;
  box-shadow: 0 2px 16px rgba(17, 12, 45, .06);
  border-bottom: 1px solid var(--ucb-line);
}
.navbar-ucb.ucb-navbar-scrolled {
  box-shadow: 0 6px 24px rgba(17, 12, 45, .12) !important;
}
.navbar-ucb .navbar-brand {
  color: var(--ucb-ink);
  font-weight: 800;
  letter-spacing: .01em;
}
.navbar-ucb .navbar-brand img {
  height: 40px;
  width: auto;
}
.navbar-ucb .nav-link {
  color: var(--ucb-ink-soft) !important;
  font-weight: 600;
  font-size: .92rem;
  padding: .6rem .9rem !important;
  position: relative;
}
.navbar-ucb .nav-link:hover,
.navbar-ucb .nav-link:focus {
  color: var(--ucb-primary) !important;
}
.navbar-ucb .nav-link::after {
  content: "";
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: .25rem;
  height: 2px;
  background: var(--ucb-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.navbar-ucb .nav-link:hover::after {
  transform: scaleX(1);
}
.navbar-ucb .navbar-toggler {
  border-color: var(--ucb-line);
}
.navbar-ucb .dropdown-menu {
  border: none;
  box-shadow: 0 12px 32px rgba(17,12,45,.14);
  border-radius: .6rem;
  padding: .5rem;
}
.navbar-ucb .dropdown-item {
  border-radius: .4rem;
  font-size: .9rem;
  padding: .55rem .8rem;
}
.navbar-ucb .dropdown-item:hover {
  background: var(--ucb-paper);
  color: var(--ucb-primary);
}

/* --------------------------------------------------------------------------
   Hero — full-bleed gelap dengan overlay merah-hitam & motif halus
   -------------------------------------------------------------------------- */
.hero-ucb {
  position: relative;
  background:
    linear-gradient(120deg, rgba(17,12,45,.94) 0%, rgba(244,40,45,.88) 100%),
    radial-gradient(circle at 15% 20%, rgba(255,90,94,.35) 0, transparent 45%);
  color: #fff;
  padding: 6rem 0 5rem;
  overflow: hidden;
}
/* When an admin-uploaded hero photo is set (--hero-photo custom property), layer
   a darker tint over it so the white headline text stays readable on any photo. */
.hero-ucb.has-bg-photo {
  background:
    linear-gradient(120deg, rgba(17,12,45,.72) 0%, rgba(244,40,45,.62) 100%),
    var(--hero-photo);
  background-size: cover;
  background-position: center;
}
.hero-ucb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,255,255,.06) 25%, transparent 25%);
  background-position: 30px 0, 30px 0, 0 0, 0 0;
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-ucb h1 {
  font-weight: 800;
  letter-spacing: -.01em;
}
.hero-ucb .lead {
  color: rgba(255,255,255,.85);
  font-weight: 300;
}

.hero-search-card {
  background: #fff;
  border-radius: .75rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(17,12,45,.22);
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Tombol
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
  font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn-primary:hover,
.btn-primary:focus {
  background: 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;
  font-weight: 600;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background: var(--ucb-primary) !important;
  border-color: var(--ucb-primary) !important;
  color: #fff !important;
  transform: translateY(-2px);
}
.btn-outline-light:hover {
  color: var(--ucb-ink);
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.section-title {
  font-weight: 800;
  color: var(--ucb-ink);
  margin-bottom: .5rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--ucb-primary);
  margin: .6rem auto 0;
  border-radius: 2px;
}
.section-subtitle {
  color: #6c6c6c;
  margin-bottom: 2.5rem;
}

/* --------------------------------------------------------------------------
   Kartu layanan / koleksi / berita
   -------------------------------------------------------------------------- */
.card-layanan {
  border: none;
  border-radius: .85rem;
  box-shadow: 0 2px 14px rgba(17,12,45,.07);
  transition: transform .22s ease, box-shadow .22s ease;
  height: 100%;
}
.card-layanan:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(244,40,45,.16);
}
.card-layanan .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(244,40,45,.08);
  color: var(--ucb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-koleksi {
  border: none;
  border-left: 4px solid var(--ucb-ink);
  border-radius: .6rem;
  box-shadow: 0 2px 14px rgba(17,12,45,.07);
  height: 100%;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card-koleksi:hover {
  transform: translateY(-4px);
  border-left-color: var(--ucb-primary);
  box-shadow: 0 14px 30px rgba(17,12,45,.12);
}

.card-berita {
  border: none;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(17,12,45,.07);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card-berita:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(17,12,45,.14);
}
.card-berita img {
  height: 180px;
  object-fit: cover;
}

.badge-agenda {
  background: var(--ucb-ink);
}
.badge-berita {
  background: var(--ucb-primary);
}

/* --------------------------------------------------------------------------
   Footer — hitam pekat khas identitas UCB
   -------------------------------------------------------------------------- */
.footer-ucb {
  background: var(--ucb-ink);
}
.footer-link {
  color: rgba(255,255,255,.68);
  text-decoration: none;
}
.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Widget WhatsApp — tetap hijau (identitas platform), posisi tetap
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  z-index: 1050;
  animation: wa-pulse 2s infinite;
}
.wa-float:hover {
  color: #fff;
  transform: scale(1.05);
}
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* --------------------------------------------------------------------------
   Page header (halaman dalam)
   -------------------------------------------------------------------------- */
.page-header {
  background: linear-gradient(120deg, var(--ucb-ink) 0%, var(--ucb-primary-dark) 100%);
  color: #fff;
  padding: 3rem 0;
  position: relative;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
}
.stat-box .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ucb-primary);
}
