/* ==========================================================================
   SLiMS 9 Academic & School Library Theme Stylesheet
   Official Oxford University Brand Colour System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;

  /* ── Oxford University Official Brand Colours ── */
  --oxford-blue: #002147;            /* Core Oxford Blue (Pantone 282) */
  --oxford-dark: #001229;            /* Deepened Oxford Blue for gradients */
  --oxford-royal: #1D42A6;           /* Oxford Royal Blue (Pantone 2126C) */
  --oxford-cerulean: #49B6FF;        /* Oxford Cerulean Blue (Pantone 292C) */
  --oxford-sky: #B9D6F2;             /* Oxford Sky Blue (Pantone 277C) */

  /* Legacy aliases (keep for compatibility with var() references) */
  --navy-primary: var(--oxford-blue);
  --navy-dark: var(--oxford-dark);
  --navy-light: #1a3a5c;
  --accent-gold: var(--oxford-royal);
  --accent-gold-hover: #163690;
  --accent-blue: var(--oxford-cerulean);
  --accent-cyan: var(--oxford-sky);

  /* ── Oxford Neutral Tones ── */
  --oxford-charcoal: #211D1C;        /* Pantone 419C */
  --oxford-ash: #61615F;             /* Pantone 6215C */
  --oxford-umber: #89827A;           /* Pantone 403C */
  --oxford-stone: #D9D8D6;           /* Pantone Cool Gray 1C */
  --oxford-shell: #F1EEE9;           /* Pantone Warm Gray 1C */
  --oxford-offwhite: #F2F0F0;        /* Pantone 663C */

  --bg-page: var(--oxford-offwhite);
  --bg-card: #ffffff;
  --bg-subtle: var(--oxford-shell);

  --text-primary: var(--oxford-charcoal);
  --text-secondary: #3d3935;
  --text-muted: var(--oxford-ash);
  --text-white: #ffffff;

  --border-color: var(--oxford-stone);
  --border-light: var(--oxford-shell);

  --shadow-sm: 0 1px 3px rgba(0, 33, 71, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(0, 33, 71, 0.10);
  --shadow-lg: 0 12px 24px -4px rgba(0, 33, 71, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

/* --------------------------------------------------------------------------
   BOOTSTRAP 4 FLEXBOX GAP & GRID COMPATIBILITY UTILITIES
   -------------------------------------------------------------------------- */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 2rem !important; }

/* Grid Gutters Polyfill for BS4 */
.g-2 { margin-left: -0.5rem; margin-right: -0.5rem; }
.g-2 > [class*="col-"] { padding-left: 0.5rem; padding-right: 0.5rem; margin-bottom: 1rem; }

.g-3 { margin-left: -0.75rem; margin-right: -0.75rem; }
.g-3 > [class*="col-"] { padding-left: 0.75rem; padding-right: 0.75rem; margin-bottom: 1.25rem; }

.g-4 { margin-left: -1rem; margin-right: -1rem; }
.g-4 > [class*="col-"] { padding-left: 1rem; padding-right: 1rem; margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   BASE RESETS & TYPOGRAPHY
   -------------------------------------------------------------------------- */
html, body {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--bg-page);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .hero-title, .section-title {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  color: var(--oxford-blue);
}

a {
  color: var(--oxford-royal);
  text-decoration: none;
}

a:hover {
  color: var(--oxford-blue);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   TOP UTILITY BAR
   -------------------------------------------------------------------------- */
.top-utility-bar {
  background: var(--oxford-dark);
  color: var(--oxford-stone);
  font-size: 0.8125rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 !important;
}

.top-utility-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.top-utility-info .top-item {
  display: inline-flex;
  align-items: center;
  margin-right: 1.5rem;
  white-space: nowrap;
  font-weight: 500;
  color: var(--oxford-stone);
}

.top-utility-info .top-item:last-child {
  margin-right: 0;
}

.top-utility-info i {
  color: var(--oxford-cerulean);
  margin-right: 0.4rem;
  font-size: 0.85rem;
}

.top-utility-social {
  display: flex;
  align-items: center;
}

.top-utility-social a {
  color: var(--oxford-stone);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
}

.top-utility-social a:hover {
  background: var(--oxford-royal);
  color: #ffffff;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION BAR (DESKTOP >= 992px)
   -------------------------------------------------------------------------- */
.academic-navbar {
  background: #ffffff !important;
  box-shadow: 0 3px 12px rgba(0, 33, 71, 0.08);
  padding: 0.65rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 3px solid var(--oxford-blue);
}

.academic-navbar .navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
  margin-right: 1.25rem;
  text-decoration: none;
  flex-shrink: 0;
}

.academic-navbar .brand-logo-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: var(--oxford-blue);
  color: var(--oxford-cerulean);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-right: 0.65rem;
  box-shadow: 0 3px 8px rgba(0, 33, 71, 0.22);
  flex-shrink: 0;
}

.academic-navbar .brand-logo-img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
  margin-right: 0.65rem;
  flex-shrink: 0;
}

.academic-navbar .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 320px;
}

.academic-navbar .brand-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--oxford-blue) !important;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.academic-navbar .brand-subtitle {
  font-family: var(--font-primary);
  font-size: 0.625rem;
  color: var(--oxford-ash);
  font-weight: 600;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  margin-top: 1px;
  line-height: 1.2;
  white-space: normal;
}

/* Nav links styling on Desktop */
@media (min-width: 992px) {
  .academic-navbar .navbar-collapse {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }

  .academic-navbar .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.2rem;
  }

  .academic-navbar .nav-link {
    color: var(--oxford-charcoal) !important;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.4rem 0.6rem !important;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .academic-navbar .nav-link .nav-icon {
    font-size: 0.85rem;
    color: var(--oxford-royal);
    transition: transform 0.2s ease;
  }

  .academic-navbar .nav-link:hover {
    color: var(--oxford-blue) !important;
    background-color: var(--oxford-shell);
  }

  .academic-navbar .nav-link:hover .nav-icon {
    transform: translateY(-1px);
  }

  .academic-navbar .nav-item.active .nav-link {
    color: #ffffff !important;
    font-weight: 700;
    background: var(--oxford-blue);
    box-shadow: 0 2px 6px rgba(0, 33, 71, 0.2);
  }

  .academic-navbar .nav-item.active .nav-link .nav-icon {
    color: var(--oxford-cerulean) !important;
  }
}

.btn-member-portal {
  background: linear-gradient(135deg, var(--oxford-blue) 0%, var(--oxford-royal) 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.825rem;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 33, 71, 0.2);
  transition: all 0.2s ease;
  line-height: 1.2;
}

.btn-member-portal:hover {
  background: linear-gradient(135deg, var(--oxford-royal) 0%, var(--oxford-dark) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(29, 66, 166, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.academic-navbar .lang-btn {
  padding: 0.4rem 0.55rem !important;
  border-radius: 8px;
  background-color: var(--oxford-offwhite);
  border: 1px solid var(--oxford-stone);
}

.academic-navbar .lang-btn:hover {
  background-color: var(--oxford-stone);
}

.academic-navbar .flag-icon {
  width: 1.25em;
  height: 0.95em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Custom Hamburger Toggler Button */
.academic-navbar .custom-toggler {
  background: var(--oxford-blue) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.45rem 0.75rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 33, 71, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
}

.academic-navbar .custom-toggler:hover,
.academic-navbar .custom-toggler:focus {
  background: var(--oxford-royal) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(29, 66, 166, 0.35);
  outline: none !important;
}

.academic-navbar .custom-toggler .toggler-icon {
  color: #ffffff !important;
  font-size: 1.25rem;
  line-height: 1;
}

.academic-navbar .custom-toggler[aria-expanded="true"] {
  background: var(--oxford-royal) !important;
}

/* Mobile & Tablet Navigation Drawer (< 992px) */
@media (max-width: 991.98px) {
  .academic-navbar {
    padding: 0.5rem 0;
  }

  .academic-navbar .navbar-brand {
    max-width: calc(100% - 110px);
    margin-right: 0;
  }

  .academic-navbar .brand-logo-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    border-radius: 8px;
  }

  .academic-navbar .brand-logo-img {
    max-height: 36px;
    margin-right: 0.5rem;
  }

  .academic-navbar .brand-title {
    font-size: 0.9rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .academic-navbar .brand-subtitle {
    font-size: 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .academic-navbar .navbar-collapse {
    background: #ffffff;
    border: 1px solid var(--oxford-stone);
    border-radius: 14px;
    box-shadow: 0 14px 35px rgba(0, 33, 71, 0.18);
    margin-top: 0.75rem;
    padding: 1rem 0.85rem;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  .academic-navbar .navbar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
  }

  .academic-navbar .nav-item {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .academic-navbar .nav-link {
    padding: 0.7rem 0.9rem !important;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--oxford-charcoal) !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }

  .academic-navbar .nav-link .nav-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    color: var(--oxford-royal);
  }

  .academic-navbar .nav-link:hover {
    background-color: var(--oxford-shell);
    color: var(--oxford-blue) !important;
  }

  .academic-navbar .nav-item.active .nav-link {
    background: var(--oxford-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 33, 71, 0.2);
  }

  .academic-navbar .nav-item.active .nav-link .nav-icon {
    color: var(--oxford-cerulean) !important;
  }

  .btn-member-portal {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    justify-content: center;
  }

  .academic-navbar .lang-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 0.9rem !important;
    border-radius: 10px;
    background-color: var(--oxford-offwhite);
  }

  .academic-navbar .dropdown-menu {
    border-radius: 12px !important;
    margin-top: 0.4rem !important;
    border: 1px solid var(--oxford-stone) !important;
    box-shadow: 0 8px 24px rgba(0, 33, 71, 0.14) !important;
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   HERO SEARCH BANNER
   -------------------------------------------------------------------------- */
.academic-hero {
  background: linear-gradient(135deg, var(--oxford-dark) 0%, var(--oxford-blue) 55%, #1a3a5c 100%);
  color: #ffffff;
  padding: 4rem 0 5rem 0;
  position: relative;
  overflow: hidden;
}

.academic-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
}

.academic-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(29, 66, 166, 0.25);
  border: 1px solid rgba(73, 182, 255, 0.4);
  color: var(--oxford-cerulean);
  padding: 0.4rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.academic-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.85rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.academic-hero-subtitle {
  font-size: 1.125rem;
  color: var(--oxford-sky);
  margin-bottom: 2.25rem;
  font-weight: 400;
}

/* Search Box & Tabs */
.search-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-tab-btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--oxford-shell);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.55rem 1.35rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.search-tab-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.search-tab-btn.active {
  background: var(--oxford-royal);
  color: #ffffff;
  border-color: var(--oxford-royal);
  box-shadow: 0 4px 12px rgba(29, 66, 166, 0.4);
}

.search-box-academic {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 12px 30px rgba(0, 33, 71, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 820px;
  margin: 0 auto;
}

.search-scope-select {
  border: none !important;
  border-right: 1px solid var(--oxford-stone) !important;
  width: 140px;
  min-width: 140px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--oxford-blue);
  background-color: transparent !important;
  height: 42px !important;
  padding: 0 0.5rem 0 0.75rem !important;
  cursor: pointer;
  outline: none !important;
}

.search-input-wrapper {
  padding: 0 0.5rem;
}

.search-main-input {
  border: none !important;
  box-shadow: none !important;
  font-size: 0.9rem;
  padding: 0.5rem 0.5rem;
  color: var(--text-primary);
  height: 42px !important;
  width: 100%;
  background: transparent;
  outline: none !important;
}

.btn-search-academic {
  background: var(--oxford-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0 1.25rem;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-search-academic:hover {
  background: var(--oxford-royal);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(29, 66, 166, 0.35);
}

.search-bottom-bar {
  padding: 0.4rem 0.6rem 0.1rem 0.6rem;
  margin-top: 0.4rem;
  border-top: 1px solid var(--oxford-shell);
}

.filter-label {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--oxford-ash);
  margin-right: 0.5rem;
}

.filter-pill-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin-right: 0.3rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--oxford-charcoal);
  background-color: var(--oxford-offwhite);
  border: 1px solid var(--oxford-stone);
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.filter-pill-badge:hover,
.filter-pill-badge.active {
  background-color: var(--oxford-blue);
  color: #ffffff !important;
  border-color: var(--oxford-blue);
  text-decoration: none;
}

.btn-adv-search {
  background: transparent;
  border: none;
  color: var(--oxford-royal);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-adv-search:hover {
  color: var(--oxford-blue);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   AUTHENTIC & CLEAN SERVICES SECTION
   -------------------------------------------------------------------------- */
.services-section {
  background-color: var(--oxford-offwhite);
  border-bottom: 1px solid var(--oxford-stone);
  border-top: 1px solid var(--oxford-stone);
  position: relative;
  z-index: 5;
}

.service-card {
  background: #ffffff;
  border: 1px solid var(--oxford-stone);
  border-radius: 12px;
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none !important;
  transition: all 0.2s ease-in-out;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0, 33, 71, 0.04);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 33, 71, 0.10);
  border-color: var(--oxford-umber);
}

/* Icon Box Color Variants — using Oxford secondary palette */
.service-icon-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.icon-emerald { background: #ecfdf5; color: #426A5A !important; border: 1px solid #a7f3d0; }
.icon-amber { background: #fdf8ed; color: #E2C044 !important; border: 1px solid #E2C044; }
.icon-indigo { background: #e8ecf8; color: #1D42A6 !important; border: 1px solid #B9D6F2; }
.icon-sky { background: #edf7ff; color: #49B6FF !important; border: 1px solid #B9D6F2; }
.icon-rose { background: #fdf2f3; color: #AA1A2D !important; border: 1px solid #fecdd3; }
.icon-violet { background: #f4f0f7; color: #776885 !important; border: 1px solid #D1BDD5; }

.service-icon-box i { color: inherit !important; }

/* Badge Variants — using Oxford secondary palette */
.badge-emerald { background: #e3f2ed; color: #426A5A; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px; }
.badge-amber { background: #fdf5db; color: #92400e; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px; }
.badge-indigo { background: #e8ecf8; color: #1D42A6; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px; }
.badge-sky { background: #edf7ff; color: #002147; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px; }
.badge-rose { background: #fde8ea; color: #AA1A2D; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px; }
.badge-violet { background: #f0ebf2; color: #776885; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px; }

.service-content {
  flex-grow: 1;
}

.service-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--oxford-blue);
}

.service-desc {
  font-size: 0.825rem;
  color: var(--oxford-ash);
  line-height: 1.4;
  margin: 0;
}

/* --------------------------------------------------------------------------
   SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-header-academic {
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--oxford-stone);
  padding-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title-group {
  border-left: 4px solid var(--oxford-blue);
  padding-left: 0.85rem;
}

.section-title-group h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--oxford-blue);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--oxford-ash);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   BIBLIO COLLECTION CARDS & VUE COMPONENT OVERRIDES
   -------------------------------------------------------------------------- */
.flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.cursor-pointer { cursor: pointer; }

slims-collection {
  display: block;
  width: 100%;
}

slims-collection .collection {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  margin-top: 1rem !important;
}

/* Book item card sizing */
slims-book,
.w-48 {
  width: 20% !important; /* 5 books per row on large screens */
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  margin-bottom: 1.5rem !important;
  box-sizing: border-box !important;
  display: flex !important;
}

@media (max-width: 1200px) {
  slims-book, .w-48 {
    width: 25% !important; /* 4 books per row */
  }
}

@media (max-width: 992px) {
  slims-book, .w-48 {
    width: 33.333% !important; /* 3 books per row */
  }
}

@media (max-width: 576px) {
  slims-book, .w-48 {
    width: 50% !important; /* 2 books per row on mobile */
  }
}

slims-book > div,
.w-48 > div {
  width: 100%;
  display: flex;
  flex-direction: column;
}

slims-book .card,
.collection .card {
  background: var(--bg-card);
  border: 1px solid var(--oxford-stone) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.25s ease !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
}

slims-book .card:hover,
.collection .card:hover,
.hover\:shadow:hover,
.hover\:shadow-md:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 24px -4px rgba(0, 33, 71, 0.18) !important;
  border-color: var(--oxford-umber) !important;
}

slims-book .card-body {
  padding: 0.85rem !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

slims-book .card-image.fit-height {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--oxford-offwhite);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
}

slims-book .card-image.fit-height img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

slims-book .card:hover .card-image.fit-height img {
  transform: scale(1.04);
}

slims-book .card-text {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--oxford-blue);
  line-height: 1.35;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Member Grid Leaderboard Cards (slims-group-member & slims-member) */
slims-group-member {
  display: block;
  width: 100%;
}

slims-member {
  display: block;
}

.member-card-academic {
  background: #ffffff !important;
  border: 1px solid var(--oxford-stone) !important;
  border-radius: 16px !important;
  padding: 1.75rem 1.25rem 1.5rem 1.25rem !important;
  position: relative !important;
  text-align: center !important;
  box-shadow: 0 4px 14px rgba(0, 33, 71, 0.08) !important;
  transition: all 0.25s ease !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.member-card-academic:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 25px rgba(0, 33, 71, 0.15) !important;
  border-color: var(--oxford-royal) !important;
}

/* Rank badges — Oxford palette */
.rank-badge-pill {
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.rank-badge-gold { background: #e8ecf8; color: var(--oxford-royal); border: 1px solid #B9D6F2; }
.rank-badge-silver { background: var(--oxford-shell); color: var(--oxford-ash); border: 1px solid var(--oxford-stone); }
.rank-badge-bronze { background: #edf7ff; color: var(--oxford-blue); border: 1px solid var(--oxford-sky); }

/* Member Avatar */
.member-avatar-container {
  width: 72px;
  height: 72px;
  position: relative;
  margin: 0.25rem auto 1rem auto;
}

.member-avatar-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.skeleton-avatar-svg {
  border-radius: 50%;
  display: block;
}

.member-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--oxford-royal);
  box-shadow: 0 4px 10px rgba(0, 33, 71, 0.12);
}

.member-card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--oxford-blue);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.member-card-dept {
  font-size: 0.825rem;
  color: var(--oxford-ash);
  font-weight: 500;
  line-height: 1.4;
  min-height: 2.4em;
  margin-bottom: 1.25rem;
}

.member-card-stats {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.stat-badge-box {
  background: var(--oxford-offwhite);
  border: 1px solid var(--oxford-stone);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--oxford-charcoal);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.stat-badge-box i {
  margin-right: 0.45rem !important;
  font-size: 0.85rem;
}

/* Subject tags */
slims-group-subject {
  display: block;
  margin-bottom: 1rem;
}

slims-group-subject .btn {
  background: var(--oxford-shell);
  color: var(--oxford-charcoal);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: none;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  transition: all 0.2s ease;
}

slims-group-subject .btn:hover,
slims-group-subject .btn.active {
  background: var(--oxford-blue);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   FOOTER (Academic School Style)
   -------------------------------------------------------------------------- */
.academic-footer {
  background: var(--oxford-dark);
  color: var(--oxford-umber);
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-top: 4px solid var(--oxford-blue);
}

.academic-footer .footer-heading {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--oxford-cerulean);
  padding-left: 0.75rem;
  line-height: 1.2;
}

.academic-footer a {
  color: var(--oxford-stone);
  transition: color 0.2s ease;
}

.academic-footer a:hover {
  color: var(--oxford-cerulean);
}

.footer-hours-table {
  font-size: 0.85rem;
  width: 100%;
}

.footer-hours-table td {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   RESPONSIVE MODIFICATIONS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .academic-hero-title {
    font-size: 1.75rem;
  }
  .search-box-academic select.form-control {
    max-width: 100%;
    border-right: none !important;
    border-bottom: 1px solid var(--oxford-stone) !important;
  }
  .services-section {
    margin-top: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   SEARCH RESULTS PAGE
   -------------------------------------------------------------------------- */

/* Filter Sidebar Container */
.result-search .col-lg-3 .card,
.result-search .col-md-4 .card {
  border: 1px solid var(--oxford-stone) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 4px 18px rgba(0, 33, 71, 0.05) !important;
  padding: 1.25rem !important;
}

/* Filter Header ("Filter Pencarian") */
.result-search .col-lg-3 h5,
.result-search .col-md-4 h5 {
  font-family: var(--font-heading) !important;
  color: var(--oxford-blue) !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  border-bottom: 2px solid var(--oxford-shell) !important;
  padding-bottom: 0.85rem !important;
  margin-bottom: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.result-search .col-lg-3 h5 i,
.result-search .col-md-4 h5 i {
  color: var(--oxford-royal) !important;
}

/* Filter Section Titles / Accordions */
.result-search .col-lg-3 h6,
.result-search .col-md-4 h6,
.result-search .col-lg-3 .filter-title,
.result-search .col-md-4 .filter-title {
  font-family: var(--font-heading) !important;
  color: var(--oxford-blue) !important;
  font-weight: 700 !important;
  font-size: 0.925rem !important;
  margin-top: 1.2rem !important;
  margin-bottom: 0.6rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
}

/* Input Fields (Tahun Penerbitan, etc.) */
.result-search .col-lg-3 input[type="text"],
.result-search .col-lg-3 input[type="number"],
.result-search .col-lg-3 select,
.result-search .col-md-4 input[type="text"],
.result-search .col-md-4 input[type="number"],
.result-search .col-md-4 select {
  background-color: var(--oxford-offwhite) !important;
  border: 1px solid var(--oxford-stone) !important;
  border-radius: 8px !important;
  padding: 0.45rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: var(--oxford-charcoal) !important;
  font-weight: 500 !important;
  width: 100% !important;
  height: 38px !important;
  margin-bottom: 0.4rem !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.result-search .col-lg-3 input[type="text"]:focus,
.result-search .col-lg-3 input[type="number"]:focus,
.result-search .col-lg-3 select:focus,
.result-search .col-md-4 input[type="text"]:focus,
.result-search .col-md-4 input[type="number"]:focus,
.result-search .col-md-4 select:focus {
  border-color: var(--oxford-royal) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(29, 66, 166, 0.12) !important;
  outline: none !important;
}

/* Range Slider Overrides (noUiSlider / jQuery UI Slider) */
.noUi-target,
.ui-slider,
.slider {
  background: var(--oxford-stone) !important;
  border-radius: 9999px !important;
  border: none !important;
  box-shadow: none !important;
  height: 6px !important;
  margin: 1.5rem 0.5rem 1rem 0.5rem !important;
}

.noUi-connect,
.ui-slider-range,
.slider-selection {
  background: var(--oxford-royal) !important;
  border-radius: 9999px !important;
  box-shadow: none !important;
}

.noUi-handle,
.ui-slider-handle,
.slider-handle {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 3px solid var(--oxford-royal) !important;
  box-shadow: 0 2px 6px rgba(0, 33, 71, 0.25) !important;
  top: -6px !important;
  right: -9px !important;
  cursor: pointer !important;
  outline: none !important;
}

.noUi-handle::before,
.noUi-handle::after {
  display: none !important;
}

.noUi-tooltip,
.slider-badge,
.badge-danger,
.bg-danger,
.badge-primary {
  background-color: var(--oxford-royal) !important;
  color: #ffffff !important;
  font-size: 0.725rem !important;
  font-weight: 700 !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 6px !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(0, 33, 71, 0.15) !important;
}

/* Checkboxes & Radio Buttons */
.result-search .col-lg-3 input[type="checkbox"],
.result-search .col-lg-3 input[type="radio"],
.result-search .col-md-4 input[type="checkbox"],
.result-search .col-md-4 input[type="radio"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
  accent-color: var(--oxford-royal) !important;
  margin-right: 0.5rem !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

.result-search .col-lg-3 label,
.result-search .col-md-4 label {
  font-size: 0.85rem !important;
  color: var(--oxford-charcoal) !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  margin-bottom: 0.35rem !important;
  transition: color 0.15s ease !important;
}

.result-search .col-lg-3 label:hover,
.result-search .col-md-4 label:hover {
  color: var(--oxford-royal) !important;
}

/* Dividers & Expand Links */
.result-search .col-lg-3 hr,
.result-search .col-md-4 hr {
  border-top: 1px solid var(--oxford-shell) !important;
  margin: 0.85rem 0 !important;
}

.result-search .col-lg-3 a,
.result-search .col-md-4 a {
  color: var(--oxford-royal) !important;
  font-size: 0.825rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.result-search .col-lg-3 a:hover,
.result-search .col-md-4 a:hover {
  color: var(--oxford-blue) !important;
  text-decoration: underline !important;
}

/* Search result list items */
.result-search .item {
  background: #ffffff;
  border: 1px solid var(--oxford-stone);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  display: flex;
  gap: 1.25rem;
}

.result-search .item:hover {
  border-color: var(--oxford-royal);
  box-shadow: 0 4px 16px rgba(0, 33, 71, 0.10);
}

/* Book cover image in results */
.result-search .item .card-image,
.result-search .item img[src*="image"] {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--oxford-stone) !important;
  flex-shrink: 0;
}

/* Title */
.result-search .item .title,
.result-search .item h4,
.result-search .item h5 {
  font-family: var(--font-heading);
  color: var(--oxford-blue) !important;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.result-search .item .title a,
.result-search .item h4 a,
.result-search .item h5 a {
  color: var(--oxford-blue) !important;
  text-decoration: none;
}

.result-search .item .title a:hover,
.result-search .item h4 a:hover,
.result-search .item h5 a:hover {
  color: var(--oxford-royal) !important;
}

/* Author tags */
.result-search .authors a,
.result-search .item a.btn-sm,
.result-search .item .badge {
  background: var(--oxford-shell) !important;
  color: var(--oxford-charcoal) !important;
  border: 1px solid var(--oxford-stone) !important;
  border-radius: 20px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.25rem 0.75rem !important;
  text-decoration: none !important;
  display: inline-block;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  transition: all 0.15s ease;
}

.result-search .authors a:hover,
.result-search .item a.btn-sm:hover {
  background: var(--oxford-blue) !important;
  color: #ffffff !important;
  border-color: var(--oxford-blue) !important;
}

/* Detail fields (Edisi, ISBN, etc.) */
.result-search .item table,
.result-search .item .text-label {
  font-size: 0.85rem;
  color: var(--oxford-ash);
}

.result-search .item .text-label {
  color: var(--oxford-blue) !important;
  font-weight: 700 !important;
  font-size: 0.825rem !important;
}

/* Availability badge */
.result-search .availability {
  background: var(--oxford-shell);
  border: 1px solid var(--oxford-stone);
  border-radius: 12px;
  min-width: 90px;
  padding: 0.75rem;
  text-align: center;
}

.result-search .availability .label {
  font-size: 0.7rem;
  color: var(--oxford-ash);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.result-search .availability .value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--oxford-blue);
  font-family: var(--font-heading);
}

/* Action buttons (Unduh MARC, Sitasi) */
.result-search .xmlResultLink,
.result-search .jsonResultLink {
  background: transparent !important;
  color: var(--oxford-royal) !important;
  border: 1px solid var(--oxford-stone) !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.75rem !important;
  transition: all 0.15s ease;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.result-search .xmlResultLink:hover,
.result-search .jsonResultLink:hover {
  background: var(--oxford-blue) !important;
  color: #ffffff !important;
  border-color: var(--oxford-blue) !important;
}

/* Pagination */
.biblioPaging {
  border-top: 1px solid var(--oxford-stone) !important;
  padding-top: 1.5rem !important;
}

.biblioPaging:first-child {
  border-bottom: 1px solid var(--oxford-stone) !important;
  border-top: none !important;
}

.biblioPaging .pagingList {
  background: var(--oxford-shell) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.biblioPaging .pagingList b {
  background-color: var(--oxford-blue) !important;
  border-color: var(--oxford-blue) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0, 33, 71, 0.25) !important;
}

.biblioPaging .pagingList a {
  color: var(--oxford-charcoal) !important;
  font-weight: 500;
}

.biblioPaging .pagingList a:hover {
  color: var(--oxford-royal) !important;
  background: var(--oxford-stone) !important;
}

/* Comment/Penanda/Bagikan action links */
.result-search .item a[href*="comment"],
.result-search .item a[href*="bookmark"],
.result-search .item a[onclick] {
  color: var(--oxford-ash) !important;
  font-size: 0.825rem;
  font-weight: 600;
}

.result-search .item a[href*="comment"]:hover,
.result-search .item a[href*="bookmark"]:hover,
.result-search .item a[onclick]:hover {
  color: var(--oxford-royal) !important;
}

/* Member info head (used on various pages) */
.memberInfoHead {
  border-left: 4px solid var(--oxford-blue) !important;
  color: var(--oxford-blue);
  font-family: var(--font-heading);
}

/* Page member area */
.page-member-area .memberButton {
  background-color: var(--oxford-royal) !important;
  border-radius: 8px;
}

.page-member-area .memberButton:hover {
  background-color: var(--oxford-blue) !important;
}

/* ==========================================================================
   THEME SWITCHER & DARK MODE EXTENSION
   ========================================================================== */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none !important;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(15deg) scale(1.08);
}

/* Dark Theme Variables & Component Overrides */
[data-theme="dark"] {
  --bg-page: #0b1320;
  --bg-card: #132238;
  --bg-subtle: #1c2e4a;

  --text-primary: #f0f4f8;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --border-color: #1e3a5f;
  --border-light: #254670;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] body {
  background-color: var(--bg-page) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, 
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] .detail-title, [data-theme="dark"] .section-heading,
[data-theme="dark"] .modal-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .text-secondary {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .table {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .bg-light,
[data-theme="dark"] .detail-image-box,
[data-theme="dark"] .detail-attachment-box {
  background-color: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .theme-toggle-btn {
  background: rgba(243, 156, 18, 0.2);
  border-color: rgba(243, 156, 18, 0.4);
  color: #f39c12;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(243, 156, 18, 0.35);
  color: #ffd166;
}

/* Citation Card Styles */
.citation-style-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.citation-style-card:hover {
  border-color: var(--oxford-cerulean);
  box-shadow: 0 4px 14px rgba(0, 33, 71, 0.08);
}

[data-theme="dark"] .citation-style-card {
  background: var(--bg-subtle) !important;
  border-color: var(--border-color) !important;
}

/* Call Number Copy Pill */
.call-number-badge {
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.5px;
  background-color: var(--oxford-blue) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .call-number-badge {
  background-color: var(--oxford-royal) !important;
}

.btn-copy-callnum:hover {
  color: var(--oxford-cerulean) !important;
  transform: scale(1.1);
}

/* ==========================================================================
   MOBILE RESPONSIVE OPTIMIZATIONS (< 768px & < 576px)
   ========================================================================== */

/* Search Tabs Touch Scroll Container */
.search-tabs-scroll-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.search-tabs-scroll-container::-webkit-scrollbar {
  display: none;
}

@media (max-width: 767.98px) {
  /* Hero & Academic Search Form Mobile Stack */
  .academic-hero {
    padding-top: 1.5rem !important;
    padding-bottom: 2rem !important;
  }

  .academic-hero-title {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  .search-box-academic {
    padding: 1rem !important;
    border-radius: 16px !important;
  }

  .search-scope-select {
    width: 100% !important;
    border-radius: 10px !important;
    margin-bottom: 0.5rem !important;
    height: 44px !important;
  }

  .search-main-input {
    border-radius: 10px !important;
    height: 44px !important;
    font-size: 0.9rem !important;
  }

  .btn-search-academic {
    width: 100% !important;
    border-radius: 10px !important;
    height: 44px !important;
    margin-top: 0.5rem !important;
    justify-content: center !important;
  }

  /* Filter pill badges wrap */
  .quick-search-tags {
    gap: 4px;
  }

  .filter-pill-badge {
    padding: 0.3rem 0.75rem !important;
    font-size: 0.775rem !important;
  }

  /* Search item card stack */
  .search-result-item .row.no-gutters {
    flex-direction: column !important;
  }

  .search-result-item .col-md-3 {
    max-width: 100% !important;
    width: 100% !important;
  }

  .search-result-item .col-md-9 {
    padding: 1.25rem !important;
  }

  /* Detail Card adjustments */
  .detail-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
  }

  .detail-title {
    font-size: 1.4rem !important;
  }

  /* Modals max width on mobile */
  .modal-dialog {
    margin: 0.75rem auto !important;
    max-width: 94vw !important;
  }

  /* Mobile Navigation Drawer Dropdown */
  .navbar-collapse {
    background: var(--bg-card) !important;
    padding: 1rem !important;
    border-radius: 16px !important;
    margin-top: 0.75rem !important;
    box-shadow: 0 10px 25px rgba(0, 33, 71, 0.15) !important;
    border: 1px solid var(--border-color) !important;
  }

  .academic-navbar .nav-link {
    color: var(--text-primary) !important;
    padding: 0.6rem 0.75rem !important;
    border-radius: 8px !important;
  }

  .academic-navbar .nav-link:hover {
    background: var(--bg-subtle) !important;
  }
}

@media (max-width: 575.98px) {
  .academic-navbar .brand-title {
    font-size: 0.95rem !important;
  }

  .brand-logo-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.95rem !important;
  }

  .top-utility-bar {
    display: none !important;
  }

  /* Grid item spacing */
  .collection .col-6 {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .detail-table th, .detail-table td {
    padding: 0.5rem 0.25rem !important;
    font-size: 0.85rem !important;
  }
}

/* ==========================================================================
   TOPIC CATEGORIES & UNIFIED HEADER POLISH
   ========================================================================== */

/* Subject Topic Pills (slims-subject) */
.topic-pill-item {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 33, 71, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-pill-item:hover {
  background: var(--oxford-royal);
  color: #ffffff !important;
  border-color: var(--oxford-royal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 66, 166, 0.25);
}

.topic-pill-item:hover i {
  color: #ffffff !important;
}

[data-theme="dark"] .topic-pill-item {
  background: var(--bg-subtle) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Modal Topic Grid Cards */
.topic-grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-grid-card:hover {
  border-color: var(--oxford-cerulean);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 33, 71, 0.12);
}

.topic-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.topic-ddc-code {
  font-family: 'Courier New', monospace;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--oxford-ash);
  background: var(--bg-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.topic-grid-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Subtitles / Icon Color Accents */
.bg-indigo-subtle { background: rgba(29, 66, 166, 0.1); }
.text-indigo { color: #1D42A6; }
.bg-violet-subtle { background: rgba(124, 58, 237, 0.1); }
.text-violet { color: #7C3AED; }
.bg-emerald-subtle { background: rgba(16, 185, 129, 0.1); }
.text-emerald { color: #10B981; }
.bg-amber-subtle { background: rgba(245, 158, 11, 0.1); }
.text-amber { color: #F59E0B; }
.bg-rose-subtle { background: rgba(244, 63, 94, 0.1); }
.text-rose { color: #F43F5E; }
.bg-sky-subtle { background: rgba(14, 165, 233, 0.1); }
.text-sky { color: #0EA5E9; }
.bg-teal-subtle { background: rgba(20, 184, 166, 0.1); }
.text-teal { color: #14B8A6; }
.bg-coral-subtle { background: rgba(236, 72, 153, 0.1); }
.text-coral { color: #EC4899; }

/* Navbar Right Actions Spacing */
.navbar-right-actions {
  max-width: 100%;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.academic-navbar .nav-link {
  font-size: 0.875rem !important;
  padding-left: 0.6rem !important;
  padding-right: 0.6rem !important;
}

.btn-member-portal {
  padding: 0.45rem 1rem !important;
  font-size: 0.825rem !important;
  white-space: nowrap !important;
}



