/**
 * Custom modern & responsive theme for SLiMS OPAC
 * Mobile-first overrides on top of Bootstrap 4 + Tailwind utility classes
 * already loaded by parts/header.php.
 */

@import url('../../../../css/core.css');

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-800: #3730a3;
    --brand-900: #312e81;

    /* Universitas Gajayana Malang campus accent */
    --accent: #8acff8;
    --accent-dark: #2b9fd8;
    --accent-100: #eaf7ff;

    --ink-900: #111827;
    --ink-700: #374151;
    --ink-500: #6b7280;
    --ink-300: #d1d5db;
    --ink-100: #f3f4f6;

    --surface: #ffffff;
    --surface-muted: #f8fafc;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06), 0 1px 3px rgba(17, 24, 39, .08);
    --shadow-md: 0 4px 12px rgba(17, 24, 39, .08), 0 2px 4px rgba(17, 24, 39, .06);
    --shadow-lg: 0 12px 32px rgba(17, 24, 39, .14), 0 4px 10px rgba(17, 24, 39, .06);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --header-height: 72px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--ink-700);
    overflow-x: hidden;
    /* Sticky footer: body is a column flexbox, .page-wrap (everything
       between <body> and <footer>, see header.php/footer.php) grows to
       fill any leftover viewport height, so the footer never floats up
       on short-content pages (e.g. an empty Librarian/News listing). */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

.page-wrap {
    flex: 1 0 auto;
    width: 100%;
    min-width: 0;
}

footer.py-4 {
    flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--ink-900);
    font-weight: 700;
}

a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
}

.container, .container-fluid {
    max-width: 100%;
}

@media (min-width: 576px) {
    .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* Prevent iOS auto-zoom on inputs smaller than 16px */
input, select, textarea, button {
    font-size: 16px;
}

/* ==========================================================================
   2. Buttons & form controls
   ========================================================================== */

.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: .01em;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

.btn-outline-primary {
    color: var(--brand-600);
    border-color: var(--brand-600);
}

.btn-outline-primary:hover {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}

.btn-rounded {
    border-radius: var(--radius-pill);
    padding-left: 32px;
    padding-right: 32px;
    font-weight: 500;
}

/* Comfortable, thumb-friendly tap targets on touch devices */
@media (max-width: 767.98px) {
    .btn,
    .form-control,
    .custom-select,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .dropdown-item,
    .btn-block,
    .form-control,
    .custom-select {
        display: flex;
    }
}

.form-control,
.custom-select {
    border-radius: var(--radius-sm);
    border-color: var(--ink-300);
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-100);
}

/* ==========================================================================
   3. Navbar
   ========================================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: .85rem 1rem;
    transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease, backdrop-filter .25s ease;
}

.navbar.bg-transparent {
    background: linear-gradient(180deg, rgba(17, 24, 39, .55) 0%, rgba(17, 24, 39, .15) 100%) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.navbar.is-scrolled {
    background-color: rgba(17, 24, 39, .96) !important;
    box-shadow: var(--shadow-md);
    padding: .55rem 1rem;
    border-bottom: 2px solid var(--accent);
}

.navbar-brand {
    min-width: 0;
}

.navbar-brand img {
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-brand h1 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 46vw;
}

.navbar-brand h2 {
    color: rgba(255, 255, 255, .75);
    font-size: .78rem;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 46vw;
}

@media (max-width: 575.98px) {
    .navbar-brand h1,
    .navbar-brand h2 {
        max-width: 60vw;
    }
}

.navbar-toggler {
    border: none;
    border-radius: var(--radius-sm);
    padding: .4rem .55rem;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, .88) !important;
    font-weight: 500;
    padding: .5rem .9rem !important;
    border-radius: var(--radius-sm);
}

.navbar-nav .nav-item.active .nav-link,
.navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .12);
}

.navbar-nav .nav-item.active .nav-link {
    box-shadow: inset 0 -3px 0 var(--accent);
}

.navbar-collapse.collapsing,
.navbar-collapse.collapse.show {
    background-color: #1f2537;
    padding: 12px;
    z-index: 99;
    border-radius: var(--radius-md);
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
}

/* Desktop sub menu (white floating card): icons in the campus accent blue.
   Darker accent tone because the light #8acff8 is too pale on white. The
   mobile block below switches them to the light accent on the dark panel. */
.navbar-nav .dropdown-menu .dropdown-item i {
    color: var(--accent-dark);
}

.navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar-nav .dropdown-menu .dropdown-item:focus {
    background-color: var(--accent-100);
    color: var(--ink-900, #0f172a);
}

@media (max-width: 991.98px) {
    .navbar-nav {
        width: 100%;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    /* Every menu row is a full-width block-like flex row. The site-wide
       mobile tap-target rule makes .nav-link `inline-flex`, which shrinks
       rows with an icon/avatar (basket, profile, flag) to their content
       width so they looked cramped and glued together. */
    .navbar-nav .nav-item + .nav-item {
        margin-top: .35rem;
    }

    .navbar-nav .nav-link {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        padding: .75rem 1rem !important;
    }

    .navbar-nav .nav-link img {
        flex-shrink: 0;
    }

    .navbar-nav .nav-link.dropdown-toggle::after {
        margin-left: auto;
    }

    /* Sub menu (profile / language) sits inside the dark mobile panel, so
       its items need light text -- Bootstrap's default dark item colour was
       invisible on this background. */
    .navbar-nav .dropdown-menu {
        border: none;
        background: rgba(255, 255, 255, .06);
        box-shadow: none;
        margin: .35rem 0 .15rem;
        padding: .35rem;
        border-radius: var(--radius-sm);
    }

    .navbar-nav .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, .9);
        font-weight: 500;
        min-height: 46px;
        padding: .65rem .85rem;
        border-radius: var(--radius-sm);
        white-space: normal;
    }

    .navbar-nav .dropdown-menu .dropdown-item i {
        width: 1.25rem;
        text-align: center;
        margin-right: .75rem !important;
        color: var(--accent);
    }

    .navbar-nav .dropdown-menu .dropdown-item:hover,
    .navbar-nav .dropdown-menu .dropdown-item:focus,
    .navbar-nav .dropdown-menu .dropdown-item:active {
        color: #fff;
        background-color: rgba(138, 207, 248, .18);
    }

    .navbar-nav .dropdown-menu .dropdown-divider {
        margin: .2rem .5rem;
        border-top-color: rgba(255, 255, 255, .12);
    }

    .navbar-nav .dropdown-menu .dropdown-header {
        color: rgba(255, 255, 255, .6);
        padding: .5rem .85rem .35rem;
    }
}

#languageMenuButton::after {
    display: none;
}

/* ==========================================================================
   4. Hero / header banner
   ========================================================================== */

.c-header {
    min-height: 460px;
    background: url('../images/slide1.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 90%;
    position: relative;
}

.c-header .mask {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .55) 0%, rgba(15, 23, 42, .35) 45%, rgba(15, 23, 42, .65) 100%);
}

.result-search .c-header {
    min-height: 190px;
}

.member-area .c-header {
    min-height: 64px;
}

@media (max-width: 767.98px) {
    .c-header {
        min-height: 340px;
    }

    .result-search .c-header {
        min-height: 150px;
    }

    .member-area .c-header {
        min-height: 56px;
    }
}

/* Full-screen hero (home page only).
   Note: the background/slideshow layer (.c-header) is kept as a pure
   background INSIDE this wrapper, deliberately separate from the nav/search
   content, because the Vegas.js slideshow plugin rebuilds .c-header's DOM
   for its crossfade effect - that would silently break Vue's binding on the
   search form if the form lived inside it.

   This uses CSS Grid (all children sharing grid-column/row 1) rather than
   position:absolute to achieve the overlap: Vegas's own stylesheet requires
   its container (.c-header here) to stay `position: relative` for its
   fade-in transition to work (`body .vegas-container{position:relative}`),
   and forcing it to `position:absolute` breaks that - the slide gets stuck
   permanently at opacity:0 (never receives Vegas's `-in` transition class). */
.hero-fullscreen {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    overflow: hidden;
}

.hero-fullscreen > * {
    grid-column: 1;
    grid-row: 1;
}

.hero-fullscreen > .c-header {
    min-height: 0;
    height: 100%;
    z-index: 0;
    background-position: 50% 55%;
}

.hero-fullscreen > .navbar {
    align-self: start;
    /* NOTE: do not set z-index here - the base .navbar rule already sets
       z-index:1030, which must stay HIGHER than .hero-tagline's z-index:2
       (that div stretches to fill the whole grid cell, so if it ever ties
       or beats the navbar's z-index, it silently sits on top and swallows
       clicks meant for the navbar toggler/links underneath it). */
}

.hero-fullscreen > .hero-scroll-hint {
    align-self: end;
    justify-self: center;
}

@media (max-height: 560px) {
    .hero-fullscreen {
        min-height: auto;
        padding-top: 96px;
        padding-bottom: 120px;
    }
}

.hero-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 2;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .85);
    font-size: 1.35rem;
    animation: heroScrollBounce 2s ease-in-out infinite;
}

.hero-scroll-hint:hover {
    color: #fff;
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll-hint {
        animation: none;
    }
}

.hero-tagline {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-tagline h2 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.hero-tagline h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 14px auto 0;
    background: var(--accent);
    border-radius: var(--radius-pill);
}

.hero-tagline p {
    color: rgba(255, 255, 255, .88);
    font-size: 1rem;
    max-width: 560px;
    margin: .35rem auto 0;
}

@media (max-width: 575.98px) {
    .hero-tagline h2 {
        font-size: 1.35rem;
    }

    .hero-tagline p {
        font-size: .9rem;
    }
}

/* ==========================================================================
   5. Search card
   ========================================================================== */

.search {
    margin-top: -30px;
    position: relative;
    z-index: 3;
    padding-left: 1rem;
    padding-right: 1rem;
    /* Reset to a normal dark color regardless of ancestor context (e.g.
       sitting inside .hero-tagline, which is white text on a dark hero) -
       the search card/dropdown is always a light-background UI panel, and
       some of its buttons are <a> tags without href, which Bootstrap makes
       `color: inherit` (its non-link-anchor accessibility rule), so without
       this they'd silently inherit invisible white text. */
    color: var(--ink-700);
}

.search .card {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    transition: box-shadow .2s ease;
}

.search .card:focus-within {
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent) !important;
}

.search input {
    padding-right: 35px;
}

.search .input-transparent {
    border: none;
    outline: none;
    background: transparent;
    font-size: 16pt;
}

.search .input-transparent::placeholder {
    font-weight: 200;
    color: #ccc;
}

.search .card.border-0 {
    background-image: url('../images/icon/ios7-search.png');
    background-repeat: no-repeat;
    background-position: 97% center;
    background-size: 26px;
}

@media (max-width: 575.98px) {
    .search {
        margin-top: -22px;
    }

    .search .input-transparent {
        font-size: 14pt;
    }

    .search .card.border-0 {
        background-size: 20px;
        background-position: 96% center;
    }
}

/* Inside the full-screen hero the search bar is part of the centered
   content itself, not overlapping below it, so it needs none of the
   "peek over the section boundary" negative margin. */
.hero-tagline .search {
    margin-top: 1.75rem;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.hero-tagline .search .container {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 575.98px) {
    .hero-tagline .search {
        margin-top: 1.25rem;
    }
}

.hero-topic-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .4);
    padding-bottom: 2px;
    transition: color .15s ease, border-color .15s ease;
}

.hero-topic-link:hover,
.hero-topic-link:focus {
    color: #fff;
    border-color: #fff;
    text-decoration: none;
}

.advanced-wraper {
    background: var(--surface);
    padding: 18px;
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    border-radius: var(--radius-md);
    z-index: 999;
}

@media (max-width: 575.98px) {
    .advanced-wraper {
        left: 8px;
        right: 8px;
        top: 58px;
        max-height: 70vh;
        overflow-y: auto;
    }
}

.shadow {
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   6. Topic grid (home page)
   ========================================================================== */

.topic {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.topic li {
    /* Fixed px size instead of CSS Grid + aspect-ratio: with
       `grid-template-columns: repeat(auto-fit, minmax(...,1fr))`, each
       item's aspect-ratio was resolving against an auto-sized row height
       computed independently per item, so widths ended up inconsistent
       (verified: heights matched at 140px, widths ranged 94-140px). A
       fixed flex-basis guarantees every tile is identically sized. */
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--ink-100);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    margin: 0 !important;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.topic li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.topic li a {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-900);
    text-align: center;
    text-decoration: none;
    opacity: 1;
    padding: 12px 10px 8px;
    width: 100%;
    height: 100%;
    /* column flex: without align-items:center the fixed-width icon circle
       sticks to the left edge while the label text is centered */
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
}

.topic:not(.topic-modal) li a .topic-label {
    -webkit-line-clamp: 3;
    line-height: 1.25;
    /* a -webkit-box with overflow:hidden has min-height 0, so in this fixed-height
       column it was squashed to 2 lines and clipped the 3rd ("Olahraga") */
    flex-shrink: 0;
}

.topic-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-dark);
    transition: background-color .25s ease, transform .25s ease;
}

.topic li:hover .topic-icon {
    background: var(--accent);
    transform: scale(1.08);
}

.topic-icon img {
    width: 32px !important;
    margin: 0 !important;
}

/* "see more" tile reads as a distinct action, not another topic */
.topic-see-more {
    border: 2px dashed var(--ink-300) !important;
    box-shadow: none !important;
}

.topic-see-more:hover {
    border-color: var(--accent-dark) !important;
    border-style: dashed !important;
}

.topic-see-more a {
    color: var(--ink-500);
}

.topic-see-more .topic-icon {
    background: transparent;
    color: var(--ink-500);
}

.topic-see-more:hover .topic-icon {
    background: transparent;
    color: var(--accent-dark);
    transform: scale(1.15);
}

/* "see more" modal grid (_modal_topic.php) - reuses .topic-icon/.topic
   styling but labels vary a lot in length ("Computer Science, Information
   & General Works" vs "Religion"), so the icon must be anchored at a
   fixed offset from the top instead of vertically centered with the
   label as one flex block - otherwise the icon's position shifts up/down
   card-to-card depending on how many lines the label wraps to. */
.topic-modal li {
    height: auto;
    min-height: 152px;
}

.topic-modal li a {
    padding-top: 18px;
}

.topic-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

@media (max-width: 575.98px) {
    .topic-modal li {
        min-height: 118px;
    }

    .topic-modal li a {
        padding-top: 10px;
    }
}

@media (max-width: 575.98px) {
    .topic {
        gap: 10px;
        max-width: 100%;
    }

    .topic li {
        flex-basis: calc(33.333% - 7px);
        width: calc(33.333% - 7px);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    /* modal labels can wrap to 2 lines - don't force square aspect-ratio
       or the longer labels would get clipped/overflow the tile */
    .topic-modal li {
        aspect-ratio: auto;
        min-height: 118px;
    }

    .topic li a {
        font-size: 10.5px;
        padding: 8px;
        gap: .4rem;
    }

    .topic-icon {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .topic-icon img {
        width: 26px !important;
    }
}

/* ==========================================================================
   7. Section headings & spacing
   ========================================================================== */

.text-thin {
    font-weight: 200 !important;
}

.subtitle-section {
    font-size: 13px;
    color: var(--ink-500);
    font-weight: 400;
}

section.mt-5 h4:not(.text-secondary):not(.text-center) {
    position: relative;
    padding-left: 18px;
}

section.mt-5 h4:not(.text-secondary):not(.text-center)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: var(--radius-pill);
    background: var(--accent);
}

@media (max-width: 575.98px) {
    section.mt-5 {
        margin-top: 2.5rem !important;
    }

    h4 {
        font-size: 1.15rem;
    }
}

/* ==========================================================================
   8. Cards / collection grid (book covers, members)
   ========================================================================== */

.card-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--ink-100);
    aspect-ratio: 3 / 4;
    background: var(--surface-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    margin: 0 !important;
}

.card-image-rounded {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--ink-300);
}

.card-image-rounded img {
    width: 102%;
    height: 102%;
    margin-top: -1%;
    margin-left: -1%;
}

.collection {
    display: flex;
    flex-wrap: wrap;
    margin: 1rem -8px 0;
}

.collection > div {
    box-sizing: border-box;
    padding: 0 8px;
    margin-bottom: 16px;
    width: 50%;
}

.collection .card {
    border-radius: var(--radius-md);
    height: 100%;
    transition: box-shadow .2s ease, transform .2s ease;
}

.collection a.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.collection .card-text {
    font-size: 12.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 576px) {
    .collection > div { width: 33.333%; }
}

@media (min-width: 768px) {
    .collection > div { width: 25%; }
}

@media (min-width: 992px) {
    .collection > div { width: 16.666%; }
}

.link-see-more {
    font-style: italic;
    color: var(--ink-500);
    text-decoration: none;
}

.link-see-more:hover {
    color: var(--ink-700);
    text-decoration: none;
}

/* Member cards */
.card-text.title {
    font-size: 12px;
}

/* ==========================================================================
   9. Availability widget & result list
   ========================================================================== */

.item p {
    font-size: 10pt;
}

.authors a {
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: var(--radius-pill);
}

.availability {
    text-align: center;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.availability .label {
    font-size: 7pt;
    color: var(--ink-500);
}

.availability .value {
    font-size: 28pt;
    font-weight: 200;
}

.add-to-chart {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--brand-700);
    color: #f8fafc;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.add-to-chart .label {
    color: #f8fafc;
}

.availability:hover .add-to-chart {
    opacity: 1;
}

.availability:hover .availability-content {
    filter: blur(8px);
    -webkit-filter: blur(8px);
}

/* Item / result card (list view) */
.card.item {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 767.98px) {
    /* Fix: content column was hard-locked to col-8 with no responsive
       breakpoint, leaving an empty gap where the availability column
       (hidden below md) used to sit. Let it use the full row width. */
    .card.item .row > .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .card.item .col-12.col-md-2 {
        margin-bottom: .75rem;
        max-width: 140px;
    }

    .card.item .authors a {
        font-size: 11px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Grid view: 2 columns on phones instead of a single stacked column */
@media (max-width: 767.98px) {
    .grid-item.col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 400px) {
    .grid-item.col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.biblioPaging {
    text-align: center;
    border-top: 1px solid var(--ink-100);
    padding-top: 20px;
}

.biblioPaging:first-child {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ink-100);
    border-top: none;
    padding-bottom: 20px;
    padding-top: 0px;
}

.biblioPaging .pagingList {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--ink-100);
    border-radius: var(--radius-pill);
}

.biblioPaging .pagingList b,
.biblioPaging .pagingList a {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none;
    position: relative;
    -webkit-box-flex: 0;
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
}

.biblioPaging .pagingList b {
    color: #fff;
    background-color: var(--brand-600);
    border-color: var(--brand-600);
    border-radius: var(--radius-pill);
    min-width: 38px;
    box-shadow: 0 0 10px rgba(79, 70, 229, .35);
}

.biblioPaging .pagingList a {
    color: var(--ink-700);
    background-color: transparent;
}

.biblioPaging .pagingList a:hover {
    color: var(--brand-600);
}

.biblioPaging .pagingList a.first_link {
    padding-left: 20px;
}

.biblioPaging .pagingList a.last_link {
    padding-right: 20px;
}

@media (max-width: 575.98px) {
    .biblioPaging .pagingList b,
    .biblioPaging .pagingList a {
        padding: 0.3rem 0.55rem;
        font-size: .9rem;
    }
}

.sugestion {
    min-height: 80px;
    margin-top: 16px;
    padding-left: 60px;
}

.sugestion .title {
    font-weight: 600;
}

.sugestion .author {
    color: #839CB5;
}

.container-img {
    width: 60px;
    position: absolute;
    top: -10px;
    left: 10px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.sugestion .card-text {
    font-size: 12px;
}

.text-label {
    font-weight: bold !important;
}

/* ==========================================================================
   10. Detail page
   ========================================================================== */

.detail-cover {
    width: 256px;
}

@media (max-width: 767.98px) {
    .detail-wrap {
        flex-direction: column;
        align-items: center;
    }

    .detail-wrap .detail-cover {
        width: 100%;
        max-width: 260px;
        margin: 0 auto 1rem;
    }

    .detail-wrap > .flex-1 {
        width: 100%;
    }

    .detail-wrap dl.row dt,
    .detail-wrap dl.row dd {
        max-width: 100%;
    }
}

/* ==========================================================================
   11. Footer
   ========================================================================== */

footer.py-4 {
    background: #111827 !important;
    border-top: 4px solid var(--accent);
}

footer.py-4 h4 {
    color: #fff;
    font-size: 1.05rem;
}

footer.py-4 a.text-light:hover {
    color: var(--brand-100) !important;
    text-decoration: none;
}

footer.py-4 .list-reset li {
    margin-bottom: .4rem;
}

footer.py-4 .footer-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

footer.py-4 .footer-links a {
    display: inline-flex;
    align-items: center;
    font-size: .9rem;
}

footer.py-4 .footer-links i {
    color: var(--accent);
}

@media (max-width: 767.98px) {
    footer.py-4 .col-md-3,
    footer.py-4 .col-md-5,
    footer.py-4 .col-md-4 {
        text-align: center;
        margin-bottom: 2rem;
    }

    footer.py-4 .authors,
    footer.py-4 .input-group {
        justify-content: center;
    }

    footer.py-4 .flex.font-thin {
        flex-direction: column;
        text-align: center;
        gap: .35rem;
    }
}

/* ==========================================================================
   12. Member area / login
   ========================================================================== */

.page-member-area .memberButton,
.jsonResultLink,
.xmlResultLink {
    font-weight: 400;
    color: var(--brand-600);
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.jsonResultLink:hover,
.xmlResultLink:hover {
    color: var(--brand-700);
    text-decoration: none;
}

.jsonResultLink:focus,
.xmlResultLink:focus {
    text-decoration: none;
    box-shadow: none;
}

.jsonResultLink:disabled,
.xmlResultLink:disabled {
    color: #6c757d;
    pointer-events: none;
}

.biblioMarkFormAction {
    display: none;
}

.memberInfoHead {
    font-size: 22px;
    font-weight: bold;
    border-left: 4px solid var(--accent);
    padding: 2px 4px 2px 16px;
    margin-bottom: 16px;
}

/* Member profile area (lib/contents/member.inc.php) - retint the default
   Bootstrap "primary" indigo buttons to the campus accent blue so this
   page matches the rest of the site's accent color. */
.member-area .btn-primary,
.member-area .btn-primary:not(:disabled):not(.disabled) {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.member-area .btn-primary:hover,
.member-area .btn-primary:focus {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

.member-area .btn-outline-primary {
    color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.member-area .btn-outline-primary:hover,
.member-area .btn-outline-primary:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.page-member-area .tagline {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    padding-bottom: 1.5rem;
}

.page-member-area .memberButton {
    background-color: var(--brand-600);
    color: white;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    border-radius: var(--radius-sm);
}

.page-member-area .memberButton:hover {
    background-color: var(--brand-700);
    box-shadow: var(--shadow-sm);
}

.page-member-area .errorBox {
    color: #dc2626;
    padding: 1rem;
    background-color: rgba(220, 38, 38, .1);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.page-member-area .loginInfo {
    padding: 0.5rem 0;
}

.page-member-area .fieldLabel {
    font-weight: bold;
    padding: 0.2rem 0;
}

.page-member-area .form-control {
    width: 320px;
    max-width: 100%;
}

.librarian {
    display: flex;
    margin-bottom: 1.5rem;
    flex: 0 50%;
}

@media (max-width: 575.98px) {
    .librarian {
        flex: 0 0 100%;
        flex-direction: column;
        text-align: center;
    }
}

.span2 {
    width: 12rem;
}

@media (max-width: 575.98px) {
    .span2 {
        width: 100%;
        margin-bottom: 1rem;
    }
}

.span2 div:first-child {
    padding: 2rem;
    background: var(--ink-100);
    border-radius: var(--radius-sm);
}

.span2 img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.span8 {
    flex: 1;
    padding: 0 1rem 0 1rem;
    min-width: 0;
}

.span8 .row-fluid {
    display: flex;
    flex-wrap: wrap;
}

.span8 .row-fluid .key {
    flex: 0 0 100px;
    font-weight: bold;
}

.span8 .row-fluid .value {
    flex: 1;
    min-width: 200px;
}

.span8 .librarian-social {
    list-style: none;
    padding: 0;
    margin: 0;
}

#loginForm form {
    width: 20rem;
    max-width: 100%;
}

#loginForm .heading1 {
    font-weight: bold;
}

#loginForm .login_input input {
    display: block;
    width: 100%;
    height: calc(2.25rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--ink-300);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-bottom: 8px;
}

#loginForm .homeButton {
    display: none;
}

.loginButton {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#loginForm .loginButton {
    margin-top: 10px;
    color: #fff;
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}

#loginForm .loginButton:hover {
    color: #fff;
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

.remember_forgot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
}

.forgotButton {
    float: right;
    text-decoration: none;
    padding-top: 16px;
    color: var(--ink-500);
}

.forgotButton:hover {
    text-decoration: none;
    color: var(--brand-500);
}

/* ==========================================================================
   13. Modals
   ========================================================================== */

#adv-modal .modal-content,
#adv-modal .modal-footer {
    position: relative;
    z-index: 1;
}

#adv-modal .modal-content:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-image: url("../images/logo-big.png");
    background-repeat: no-repeat;
    background-size: 50%;
    background-position-x: 500px;
    background-position-y: 250px;
    z-index: 0;
    opacity: 0.5;
}

.modal-content {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: .6rem;
    }

    #adv-modal .modal-content:before {
        background-position-x: center;
        background-position-y: center;
    }
}

.attachList {
    padding: 4px 24px;
}

.attachList li {
    padding: 4px 0;
}

.comment-found {
    display: inline-block;
    margin-bottom: 8px;
}

.comments {
    padding: 8px 0;
    border-top: 1px dotted var(--ink-300);
}

.comments .comment-member {
    font-size: 10pt;
    font-weight: bold;
}

.comments .comment-content {
    color: var(--ink-700);
}

/* ==========================================================================
   14. Colorbox lightbox
   ========================================================================== */

#colorbox {
    border-radius: 5px;
}

#cboxLoadedContent {
    padding: 10px;
}

#cboxOverlay {
    background: #404040;
}

#cboxTitle {
    font: 10pt/1.8 var(--font-sans);
    font-weight: bold;
    padding: 15px 0;
    background: #000000;
    bottom: 0;
    color: #ffffff;
}

#cboxTopLeft,
#cboxTopRight,
#cboxBottomLeft,
#cboxBottomRight {
    width: 0;
    height: 0;
}

#cboxMiddleLeft,
#cboxMiddleRight {
    width: 0;
}

#cboxBottomCenter,
#cboxTopCenter {
    height: 0;
}

/* ==========================================================================
   15. Live chat widget
   ========================================================================== */

.s-chat {
    display: none;
    flex-direction: column;
    width: 320px;
    height: 480px;
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow: hidden;
    z-index: 99;
}

@media (max-width: 575.98px) {
    .s-chat {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 12px;
        height: min(480px, 70vh);
    }
}

.s-chat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: var(--brand-700);
    z-index: 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.s-chat div,
.s-chat a,
.s-chat footer {
    position: relative;
    z-index: 10;
}

#show-pchat {
    display: block;
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 20;
    top: 0;
    right: 0;
    background-color: white;
    border-bottom-left-radius: var(--radius-sm);
    cursor: pointer;
}

#show-pchat i {
    display: none;
}

#show-pchat:hover {
    opacity: .9;
}

#show-pchat:before {
    font-family: Font Awesome\ 5 Free;
    content: "\f2d1";
    text-align: center;
    position: absolute;
    left: 0;
    right: 0;
}

.s-chat-header {
    font-size: 22px;
    font-weight: 300;
    color: #ebf8ff;
    line-height: 1.2;
}

.s-chat-content.text-center {
    position: relative;
}

.s-chat-content.text-center form {
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: 0 16px;
    margin-top: 4px;
}

.s-chat-content.text-center p:first-of-type {
    text-align: left;
    font-size: 14px;
    color: #FFE0B2;
    font-weight: 300;
    margin: 0 -16px;
    line-height: 1;
}

.s-chat-content.text-center hr {
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 378px;
    z-index: 1;
}

.s-chat-content.text-center label {
    z-index: 10;
    position: relative;
    margin-top: 20px;
    font-size: 14px;
}

.s-chat-content.text-center input#message {
    z-index: 10;
    position: relative;
    display: block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    margin-bottom: 16px;
}

.s-chat-content input#message:focus,
.s-chat-content.text-center input#message:focus {
    color: #495057;
    background-color: #fff;
    border-color: #FFCC80;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(255,204,128,.25);
}

.s-chat-content label {
    z-index: 10;
    position: relative;
}

.s-chat-content input#message {
    z-index: 10;
    position: relative;
    display: inline-block;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    margin-bottom: 8px;
}

.s-chat-content .btn.btn-block {
    border: 1px solid #E65100;
    position: relative;
    z-index: 10;
    font-size: 14px;
    background-color: #EF6C00;
    color: #FFF3E0;
}

.s-chat-content .btn.btn-block:hover {
    background-color: #F57C00;
}

.s-chat-content:not(.text-center) {
    border-radius: var(--radius-md);
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    height: 370px;
    margin: 8px 0;
    padding: 16px;
    font-size: 14px;
}

.s-chat-content #log {
    height: 270px;
    background-color: white;
    margin: -16px -16px 8px -16px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 16px;
    border-bottom: 1px solid #e3e3e3;
    overflow-y: scroll;
}

.s-chat footer {
    font-size: 11px;
    padding: 16px;
    display: none;
}

.s-chat footer:not(.text-center) {
    font-size: 11px;
    padding: 0;
    display: block;
}

/* ==========================================================================
   16. Card elevation utilities
   ========================================================================== */

.elevation-1 {
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}

.elevation-1:hover {
    box-shadow: var(--shadow-md);
}

.elevation-2 { box-shadow: var(--shadow-md); }
.elevation-3 { box-shadow: var(--shadow-lg); }
.elevation-4 { box-shadow: var(--shadow-lg); }
.elevation-5 { box-shadow: var(--shadow-lg); }

.expand {
    margin: 0 -1.25rem -1.25rem -1.25rem;
}

/* Enter and leave animations can use different durations/timing */
.slide-fade-enter-active {
    transition: all .3s ease;
}

.slide-fade-leave-active {
    transition: all .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}

.slide-fade-enter, .slide-fade-leave-to {
    transform: translateX(10px);
    opacity: 0;
}

.highlight {
    color: red;
}

.biblioPagingTop {
    display: none;
}

.grid-item {
    font-size: 12.04px;
    font-family: var(--font-sans);
}

.grid-item .card {
    border-radius: var(--radius-md);
}

.grid-item--title {
    box-sizing: border-box;
    color: var(--ink-900);
    cursor: pointer;
    display: -webkit-box;
    line-height: 18.0667px;
    margin-bottom: 4px;
    max-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: pre-wrap;
    word-break: keep-all;
    -moz-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.grid-item .list-group-item {
    padding: .25rem .5rem;
    display: flex;
    justify-content: space-between;
}

.grid-item .list-group-item label {
    color: #6D7588;
    padding: 0;
    margin: 0;
}

img.not-available {
    filter: grayscale(.9);
}

.grid-item--menu {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 10;
}

.grid-item--menu .dropdown-toggle {
    text-decoration: none;
    color: inherit;
}

.grid-item--menu .dropdown-toggle::after {
    display: none;
}

pre.sf-dump, pre.sf-dump .sf-dump-default {
    z-index: 888 !important;
}

.availability-item {
    color: white;
    padding: 10px;
    border-radius: var(--radius-sm);
}

.item-onloan, .item-notforloan {
    background-color: #ef4444;
    width: 100%;
    display: block;
}

.item-available {
    background-color: var(--accent-dark);
}

.item-onreserve {
    background-color: #f59e0b;
}

/* ==========================================================================
   17. Misc small-screen safety net
   ========================================================================== */

@media (max-width: 575.98px) {
    .flex.flex-row.flex-wrap > .librarian {
        width: 100%;
    }

    dl.row dt {
        margin-top: .5rem;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   18. Campus identity accents (selection, scrollbar)
   ========================================================================== */

::selection {
    background: var(--accent);
    color: var(--ink-900);
}

html {
    scrollbar-color: var(--accent) var(--ink-100);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ink-100);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* ==========================================================================
   19. Modern landing-page sections (hero CTA, stats, features, CTA band)
   ========================================================================== */

.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--ink-900);
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

.hero-cta .btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, .7);
}

.hero-cta .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, .15);
    color: #fff;
}

@media (max-width: 575.98px) {
    .hero-cta {
        margin-top: 1.1rem;
    }

    .hero-cta .btn {
        padding-left: 20px;
        padding-right: 20px;
        font-size: .9rem;
    }
}

/* Stats strip */
.stats-strip-section {
    position: relative;
    z-index: 3;
    margin-top: 24px;
}

.stats-strip {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 1.5rem 1rem;
}

.stat-card {
    text-align: center;
    padding: .5rem;
    border-right: 1px solid var(--ink-100);
}

.stat-card:last-child {
    border-right: none;
}

.stat-icon {
    color: var(--accent-dark);
    font-size: 1.4rem;
    margin-bottom: .5rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1.1;
}

.stat-label {
    font-size: .75rem;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .25rem;
}

@media (max-width: 767.98px) {
    .stats-strip-section {
        margin-top: 16px;
    }

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 0;
        border-radius: var(--radius-md);
        padding: 1.25rem .5rem;
    }

    .stat-card {
        border-right: none;
        border-bottom: 1px solid var(--ink-100);
        padding-bottom: 1rem;
    }

    .stat-card:nth-last-child(-n+2) {
        border-bottom: none;
        padding-bottom: .5rem;
    }

    .stat-card:nth-child(odd) {
        border-right: 1px solid var(--ink-100);
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

/* Features / why-us grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-100);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    background: var(--accent-100);
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.feature-card h5 {
    font-weight: 700;
    margin-bottom: .6rem;
}

.feature-card p {
    color: var(--ink-500);
    font-size: .9rem;
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem 1.25rem;
    }
}

/* Map / about card */
.map-about-card iframe {
    border-radius: var(--radius-lg);
    width: 100%;
}

/* CTA band - a floating card (not edge-to-edge) so it reads as one more
   modern section instead of a flat full-bleed color bar. */
.cta-band {
    padding: 0 1rem;
    margin: 4rem 0;
}

.cta-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.75rem 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 55%, var(--accent-dark) 100%);
    color: #fff;
    text-align: left;
}

.cta-card::before,
.cta-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.cta-card::before {
    width: 320px;
    height: 320px;
    top: -160px;
    right: -40px;
}

.cta-card::after {
    width: 200px;
    height: 200px;
    bottom: -120px;
    left: 12%;
    background: rgba(255, 255, 255, .06);
}

.cta-card-icon {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
}

.cta-card-text {
    flex: 1;
    min-width: 0;
}

.cta-card-text h3 {
    color: #fff;
    font-weight: 800;
    margin-bottom: .4rem;
    font-size: 1.4rem;
}

.cta-card-text p {
    color: rgba(255, 255, 255, .85);
    margin-bottom: 0;
}

.cta-card-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.cta-card-btn i {
    transition: transform .2s ease;
}

.cta-card-btn:hover i {
    transform: translateX(3px);
}

@media (max-width: 767.98px) {
    .cta-band {
        margin: 2.5rem 0;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 2.25rem 1.5rem;
        gap: 1.1rem;
    }

    .cta-card-text h3 {
        font-size: 1.2rem;
    }

    .cta-card-btn {
        white-space: normal;
    }
}

/* ==========================================================================
   20. Scroll-reveal animations
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.21, .6, .35, 1), transform .7s cubic-bezier(.21, .6, .35, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.21, .6, .35, 1), transform .7s cubic-bezier(.21, .6, .35, 1);
}

.reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .19s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .26s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .33s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   21. Content pages (Information / News / Help / Librarian)
   ========================================================================== */

.page-heading-accent {
    position: relative;
    padding-left: 20px;
    font-weight: 800;
}

.page-heading-accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 5px;
    border-radius: var(--radius-pill);
    background: var(--accent);
}

.page-content-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem 2.5rem;
}

.page-content-card h3 {
    position: relative;
    padding-left: 18px;
    margin-top: 2rem;
    margin-bottom: .9rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.page-content-card h3:first-child {
    margin-top: 0;
}

.page-content-card h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: var(--radius-pill);
    background: var(--accent);
}

.page-content-card p {
    color: var(--ink-700);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.page-content-card p:last-child {
    margin-bottom: 0;
}

.page-content-card strong {
    color: var(--ink-900);
}

.page-content-card hr {
    border-color: var(--ink-100);
    margin: 1.5rem 0;
}

/* Librarian directory cards inside the flex-wrap wrapper */
.page-content-card .librarian {
    background: var(--surface-muted);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

@media (max-width: 575.98px) {
    .page-content-card {
        padding: 1.5rem 1.25rem;
    }
}

/* ==========================================================================
   22. Member profile page (lib/contents/member.inc.php - core file, not a
   theme template, so everything here is a scoped CSS-only fix/restyle
   rather than a markup change)
   ========================================================================== */

/* The sidebar (#member_sidebar, fixed 16rem via inline style) + content
   (#member_content) sit in a plain .d-flex row with no responsive
   breakpoint at all, so on mobile the content column was squeezed to a
   sliver. :has() lets us target that specific flex row without touching
   every other .d-flex utility on the site. */
.member-area .d-flex:has(> #member_sidebar) {
    gap: 1.5rem;
    align-items: flex-start;
}

.member-area #member_sidebar {
    width: 240px !important;
    background: var(--surface) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.member-area #member_sidebar > div:first-child {
    padding: 0 0 1rem !important;
}

/* Bootstrap's `.rounded` on the <img> is !important, so it needs an
   !important radius to actually become a circle. */
.member-area #member_sidebar img {
    width: 104px;
    height: 104px;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 50% !important;
    margin: 0 auto;
    border: 3px solid var(--accent);
    box-shadow: none !important;
}

/* Simple, light "tonal" buttons instead of two heavy solid color blocks:
   soft blue for the card, soft red for logout. */
.member-area #member_sidebar .btn {
    border-radius: var(--radius-pill);
    border: 0;
    font-weight: 600;
    font-size: .875rem;
    padding: .55rem 1rem;
    box-shadow: none;
}

.member-area #member_sidebar .btn-primary,
.member-area #member_sidebar .btn-primary:not(:disabled):not(.disabled) {
    background-color: var(--accent-100);
    color: var(--accent-dark);
}

.member-area #member_sidebar .btn-primary:hover,
.member-area #member_sidebar .btn-primary:focus {
    background-color: var(--accent);
    color: var(--ink-900);
}

.member-area #member_sidebar .btn-danger,
.member-area #member_sidebar .btn-danger:not(:disabled):not(.disabled) {
    background-color: #fef2f2;
    color: #dc2626;
}

.member-area #member_sidebar .btn-danger:hover,
.member-area #member_sidebar .btn-danger:focus {
    background-color: #dc2626;
    color: #fff;
}

.member-area #member_sidebar .btn + .btn {
    margin-top: .6rem;
}

.member-area #member_content {
    min-width: 0;
}

.member-area #member_content h1 {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.member-area #member_content h1 .btn-primary {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Modern pill-style nav tabs instead of flat Bootstrap tabs, and let them
   scroll horizontally rather than wrapping/squeezing on narrow screens */
.member-area .nav-tabs {
    border-bottom: 2px solid var(--ink-100);
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.member-area .nav-tabs::-webkit-scrollbar {
    display: none;
}

.member-area .nav-tabs .nav-item {
    flex: 0 0 auto;
}

.member-area .nav-tabs .nav-link {
    border: none;
    border-radius: var(--radius-pill);
    color: var(--ink-500);
    font-weight: 600;
    white-space: nowrap;
    margin: 0 .25rem .35rem;
    padding: .5rem 1.1rem;
    transition: background-color .15s ease, color .15s ease;
}

.member-area .nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--accent-dark);
}

.member-area .nav-tabs .nav-link.active {
    background: var(--accent-100);
    color: var(--accent-dark);
    border-color: transparent;
}

/* Tab content card - swap the flat left/right/bottom borders for a
   proper rounded, shadowed card matching the rest of the site */
.member-area .bg-white.border-right.border-bottom.border-left {
    border: none !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Wide data tables (loan list, bookmarks, basket) shouldn't be able to
   blow out the page width on mobile - scroll them within their own box */
@media (max-width: 767.98px) {
    .member-area .d-flex:has(> #member_sidebar) {
        flex-direction: column;
    }

    /* Compact profile header: avatar on top, the two actions side by side
       in one row (was a tall stack of a big photo + two full-width blocks). */
    .member-area #member_sidebar {
        width: 100% !important;
        padding: 1.25rem 1rem !important;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .6rem;
    }

    .member-area #member_sidebar > div:first-child {
        grid-column: 1 / -1;
        padding-bottom: .25rem !important;
    }

    .member-area #member_sidebar img {
        width: 88px;
        height: 88px;
    }

    .member-area #member_sidebar .btn,
    .member-area #member_sidebar .btn + .btn {
        margin: 0;
        width: 100%;
        min-height: 42px;
        justify-content: center;
        padding: .5rem .6rem;
        font-size: .8rem;
        white-space: nowrap;
    }

    .member-area #member_sidebar .btn i {
        margin-right: .35rem !important;
    }

    .member-area #member_content {
        width: 100%;
        padding: 1.25rem !important;
    }

    .member-area #member_content h1 {
        font-size: 1.35rem;
    }

    .member-area #member_content p#info,
    .member-area #member_content .w-75 {
        width: 100% !important;
    }

    .member-area #member_content {
        overflow-x: auto;
    }

    /* Member Detail / Change Password tables are a fixed 4-column
       (label, value, label, value) layout designed for desktop widths.
       Reflow every cell into its own full-width line on mobile instead
       of letting the table force a horizontal scroll. */
    .member-area table.memberDetail,
    .member-area table.memberDetail tbody,
    .member-area table.memberDetail tr {
        display: block;
        width: 100%;
    }

    .member-area table.memberDetail td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .member-area table.memberDetail td.value {
        margin-bottom: .5rem;
    }
}

/* Action button rows in the member tabs (basket actions, download buttons).
   The core markup just puts inline .btn links next to each other separated
   by a space, so once they wrap onto a second line there is no vertical
   gap and they touch. Make the rows real wrapping flex rows with a gap. */
.member-area .memberBasketAction,
.member-area .memberLoanListInfo,
.member-area .memberLoanHistInfo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

@media (max-width: 575.98px) {
    /* one full-width, easy-to-tap button per line on phones */
    .member-area .memberBasketAction .btn,
    .member-area .memberLoanListInfo .btn,
    .member-area .memberLoanHistInfo .btn {
        flex: 1 1 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================================================
   23. International journal references (home section + "jurnal" page)
   ========================================================================== */

.journal-section {
    padding: 0 0 4rem;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1140px;
    margin: 0 auto;
}

.journal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .35rem;
    padding: 1.5rem 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--ink-900);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.journal-card:hover,
.journal-card:focus {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    color: var(--ink-900);
    text-decoration: none;
}

.journal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 76px;
    margin-bottom: .5rem;
}

.journal-logo img {
    /* wordmarks have very different shapes (DOAJ is tall, Springer Nature is a thin
       strip): cap the height so none dominates the row */
    width: auto;
    max-width: 85%;
    max-height: 44px;
    object-fit: contain;
}

/* shown when there is no logo file yet */
.journal-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 76px;
    padding: 0 .75rem;
    border-radius: 50%;
    background: var(--accent-100);
    border: 2px solid var(--accent);
    color: var(--accent-dark);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: .02em;
}

.journal-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
}

.journal-name i {
    margin-left: .25rem;
    font-size: .7rem;
    color: var(--accent-dark);
}

.journal-desc {
    color: var(--ink-500);
    font-size: .8rem;
    line-height: 1.35;
}

.journal-more i {
    transition: transform .2s ease;
}

.journal-more:hover i {
    transform: translateX(3px);
}

@media (max-width: 991.98px) {
    .journal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .journal-section {
        padding-bottom: 2.5rem;
    }

    .journal-grid {
        gap: .75rem;
    }

    .journal-card {
        padding: 1.1rem .6rem 1rem;
    }

    .journal-logo,
    .journal-mark {
        height: 60px;
    }

    .journal-logo img {
        max-height: 34px;
    }

    .journal-mark {
        min-width: 60px;
        font-size: .9rem;
    }
}

/* full list page (HTML stored in the `content` table, path "jurnal") */
.page-content-card .journal-list {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.page-content-card .journal-list li {
    margin: 0;
}

.page-content-card .journal-list a {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    height: 100%;
    padding: .95rem 1.1rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink-900);
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.page-content-card .journal-list a:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.page-content-card .journal-list .jl-logo {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 56px;
    padding: 6px 8px;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-sm);
    background: #fff;
}

.page-content-card .journal-list .jl-logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* initials, shown when a journal has no logo file */
.page-content-card .journal-list .jl-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .5rem;
    border-radius: 50%;
    background: var(--accent-100);
    border: 2px solid var(--accent);
    color: var(--accent-dark);
    font-weight: 800;
    font-size: .8rem;
}

.page-content-card .journal-list .jl-body {
    min-width: 0;
}

.page-content-card .journal-list strong {
    display: block;
    line-height: 1.3;
}

.page-content-card .journal-list small {
    display: block;
    color: var(--accent-dark);
    word-break: break-all;
}

.page-content-card .journal-list .jl-desc {
    display: block;
    margin-top: .2rem;
    color: var(--ink-500);
    font-size: .85rem;
    line-height: 1.4;
}

@media (max-width: 767.98px) {
    .page-content-card .journal-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    /* logo on top, text below at full width (side by side leaves ~110px for the text) */
    .page-content-card .journal-list a {
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
    }

    .page-content-card .journal-list .jl-logo {
        width: 100%;
        height: 60px;
    }
}
