/**
 * @Author: Waris Agung Widodo <user>
 * @Date:   2018-01-22T10:46:36+07:00
 * @Email:  ido.alit@gmail.com
 * @Filename: style.css
 * @Last modified by:   user
 * @Last modified time: 2018-01-26T11:08:52+07:00
 *
 * Revisi: modern, responsif, ringan.
 * - Warna & ukuran terpusat di variabel :root (ubah di satu tempat)
 * - Header/slide dikunci setinggi 250px
 * - Aturan ganda digabung, transition: all dibuang, satuan pt -> rem
 */

/* ==========================================================================
   1. Variabel
   ========================================================================== */
:root {
    --header-h: 200px;          /* tinggi header / slide */
    --accent: #0f766e;
    --accent-dark: #115e59;
    --accent-soft: #e6f4f2;
    --accent-ring: rgba(15, 118, 110, .25);
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .1);
    --shadow-lg: 0 14px 32px rgba(0, 0, 0, .16);
    --chat: #0f766e;
    --chat-dark: #0d5f59;
    --chat-soft: #ccfbf1;
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
}

/* Tombol utama mengikuti warna aksen */
.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active:focus {
    box-shadow: 0 0 0 .2rem var(--accent-ring);
}

/* ==========================================================================
   2. Header / slide (tinggi 250px)
   ========================================================================== */
.c-header {
    position: relative;
    height: var(--header-h) !important;
    min-height: 0;
    max-height: var(--header-h);
    background: #0f172a url('../images/slide1.jpg') 50% 90% / cover no-repeat;
}

/* Slide Vegas: dipotong di dalam header, tetapi menu mobile tidak ikut terpotong */
.c-header.vegas-container {
    overflow: visible !important;
    height: var(--header-h) !important;
}
.c-header .vegas-wrapper {
    overflow: hidden;
    z-index: 0;
}

.c-header .mask {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25));
}

.c-header .navbar {
    position: relative;
    z-index: 20;
}

/* ==========================================================================
   3. Pencarian
   ========================================================================== */
.search {
    position: relative;
    z-index: 5;
    margin-top: -30px;
}

.search input {
    padding-right: 35px;
}

.search .input-transparent {
    border: none;
    outline: none;
    background: transparent;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
}

.search .input-transparent::placeholder {
    font-weight: 200;
    color: #9ca3af;
}

.search .card {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    background-image: url('../images/icon/ios7-search.png');
    background-repeat: no-repeat;
    background-position: 98% center;
    background-size: 30px;
}

.advanced-wraper {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    z-index: 999;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   4. Utilitas & komponen umum
   ========================================================================== */
.shadow {
    box-shadow: var(--shadow-sm), 0 6px 10px rgba(0, 0, 0, .06);
}

.text-thin {
    font-weight: 200 !important;
}

.text-label {
    font-weight: 700 !important;
}

.subtitle-section {
    font-size: .75rem;
}

.btn-rounded {
    border-radius: 999px;
    padding-left: 32px;
    padding-right: 32px;
    font-weight: 200;
}

.link-see-more {
    font-style: italic;
    color: #9ca3af;
    text-decoration: none;
}
.link-see-more:hover {
    color: var(--muted);
    text-decoration: none;
}

.highlight {
    color: #dc2626;
}

/* Topik (grid menyesuaikan lebar layar) */
.topic {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}
.topic li {
    width: auto;
    height: auto;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.topic li a {
    font-size: .8rem;
    color: #4b5563;
    text-align: center;
    text-decoration: none;
    opacity: .85;
}
.topic li a:hover {
    text-decoration: none;
    opacity: 1;
}

/* Kartu koleksi */
.card-text.title,
.collection .card-text,
.sugestion .card-text {
    font-size: .75rem;
}

.card-image-rounded {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 50%;
    background: #d1d5db;
}

.card-image {
    overflow: hidden;
    border: 1px solid #f1f1f1;
    border-radius: var(--radius-sm);
}

.card-image img,
.card-image-rounded img {
    display: block;
    width: 102%;
    height: 102%;
    margin-top: -1%;
    margin-left: -1%;
    object-fit: cover;
}

/* Detail koleksi */
.result-search .c-header { min-height: 0; }
.member-area .c-header { min-height: 0; }

.item p {
    font-size: .83rem;
}

.authors a {
    font-size: .75rem;
    margin: 0 8px 8px 0;
    padding-left: 16px;
    padding-right: 16px;
}

.availability {
    text-align: center;
    overflow: hidden;
}
.availability .label {
    font-size: .65rem;
    color: #9ca3af;
}
.availability .value {
    font-size: 2.3rem;
    font-weight: 200;
}

.add-to-chart {
    display: flex;
    position: absolute;
    inset: 0;
    background: #606f7b;
    color: #f8fafc;
    opacity: 0;
    transition: opacity .25s ease-in-out;
}
.add-to-chart .label {
    color: #f8fafc;
}
.availability:hover .add-to-chart {
    opacity: 1;
}
.availability:hover .availability-content {
    filter: blur(6px);
}

.sugestion {
    min-height: 80px;
    margin-top: 16px;
    padding-left: 60px;
}
.sugestion .title {
    font-weight: 600;
}
.sugestion .author {
    color: #839cb5;
}

.container-img {
    position: absolute;
    top: -10px;
    left: 10px;
    width: 60px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.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 #cbd5e0;
}
.comments .comment-member {
    font-size: .83rem;
    font-weight: 700;
}
.comments .comment-content {
    color: #4a5568;
}

/* Grid koleksi (masonry) */
.grid-item {
    font-size: .8rem;
}

.grid-item--title {
    display: -webkit-box;
    max-width: 100%;
    max-height: 100%;
    margin-bottom: 4px;
    overflow: hidden;
    color: #212121;
    line-height: 1.5;
    text-align: left;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    cursor: pointer;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.grid-item .list-group-item {
    display: flex;
    justify-content: space-between;
    padding: .25rem .5rem;
}
.grid-item .list-group-item label {
    margin: 0;
    padding: 0;
    color: #6d7588;
}

img.not-available {
    filter: grayscale(.9);
}

.grid-item--menu {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 10;
}
.grid-item--menu .dropdown-toggle {
    color: inherit;
    text-decoration: none;
}
.grid-item--menu .dropdown-toggle::after {
    display: none;
}

.availability-item {
    padding: 10px;
    color: #fff;
    border-radius: 6px;
}
.item-onloan,
.item-notforloan {
    display: block;
    width: 100%;
    background-color: #dc2626;
}
.item-available {
    background-color: #0891b2;
}

/* ==========================================================================
   5. Paginasi
   ========================================================================== */
.biblioPaging {
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid #dae1e7;
}
.biblioPaging:first-child {
    margin-bottom: 1rem;
    padding-top: 0;
    padding-bottom: 20px;
    border-top: none;
    border-bottom: 1px solid #dae1e7;
}

.biblioPaging .pagingList {
    display: inline-flex;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
    background: #e5e7eb;
    border-radius: 999px;
    scrollbar-width: none;
}
.biblioPaging .pagingList::-webkit-scrollbar {
    display: none;
}

.biblioPaging .pagingList b,
.biblioPaging .pagingList a {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    padding: .375rem .85rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    transition: color .15s, background-color .15s;
}

.biblioPaging .pagingList b {
    min-width: 38px;
    color: #fff;
    background-color: var(--accent);
    border-color: var(--accent);
    border-radius: 999px;
    box-shadow: 0 2px 8px var(--accent-ring);
}

.biblioPaging .pagingList a {
    color: #3d4852;
    background-color: transparent;
}
.biblioPaging .pagingList a:hover {
    color: var(--accent);
}
.biblioPaging .pagingList a.first_link {
    padding-left: 20px;
}
.biblioPaging .pagingList a.last_link {
    padding-right: 20px;
}

.biblioMarkFormAction,
.biblioPagingTop {
    display: none;
}

/* ==========================================================================
   6. Animasi & elevasi
   ========================================================================== */
.slide-fade-enter-active {
    transition: transform .3s ease, opacity .3s ease;
}
.slide-fade-leave-active {
    transition: transform .5s cubic-bezier(1, .5, .8, 1), opacity .5s cubic-bezier(1, .5, .8, 1);
}
.slide-fade-enter,
.slide-fade-leave-to {
    transform: translateX(10px);
    opacity: 0;
}

.elevation-1 {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
    transition: box-shadow .3s cubic-bezier(.25, .8, .25, 1);
}
.elevation-1:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23);
}
.elevation-2 { box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23); }
.elevation-3 { box-shadow: 0 10px 20px rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23); }
.elevation-4 { box-shadow: 0 14px 28px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .22); }
.elevation-5 { box-shadow: 0 19px 38px rgba(0, 0, 0, .3), 0 15px 12px rgba(0, 0, 0, .22); }

/* ==========================================================================
   7. Area member, login, pustakawan
   ========================================================================== */
.page-member-area .memberButton,
.jsonResultLink,
.xmlResultLink {
    display: inline-block;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--accent);
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: .375rem;
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}

.jsonResultLink:hover,
.xmlResultLink:hover {
    color: var(--accent-dark);
    text-decoration: none;
}
.jsonResultLink:focus,
.xmlResultLink:focus {
    text-decoration: none;
    box-shadow: none;
}
.jsonResultLink:disabled,
.xmlResultLink:disabled {
    color: #6c757d;
    pointer-events: none;
}

.memberInfoHead {
    margin-bottom: 16px;
    padding: 2px 4px 2px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    border-left: 4px solid var(--accent);
}

.page-member-area .tagline {
    margin-top: .5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 500;
    line-height: 1.2;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.page-member-area .memberButton {
    margin-top: 1rem;
    color: #fff;
    background-color: var(--accent);
    cursor: pointer;
    transition: background-color .2s ease-in-out, box-shadow .2s ease-in-out;
}
.page-member-area .memberButton:hover {
    background-color: var(--accent-dark);
    box-shadow: var(--shadow-md);
}

.page-member-area .errorBox {
    margin-bottom: 1rem;
    padding: 1rem;
    color: #b91c1c;
    background-color: rgba(239, 68, 68, .14);
    border-radius: var(--radius-sm);
}
.page-member-area .loginInfo {
    padding: .5rem 0;
}
.page-member-area .fieldLabel {
    padding: .2rem 0;
    font-weight: 700;
}
.page-member-area .form-control {
    width: 100%;
    max-width: 320px;
}

.librarian {
    display: flex;
    flex: 0 50%;
    margin-bottom: 1.5rem;
}
.span2 {
    width: 12rem;
}
.span2 div:first-child {
    padding: 2rem;
    background: #dae1e7;
    border-radius: var(--radius-sm);
}
.span2 img {
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .08);
}
.span8 {
    flex: 1;
    min-width: 0;
    padding: 0 1rem;
}
.span8 .row-fluid {
    display: flex;
}
.span8 .row-fluid .key {
    flex: 0 0 100px;
    font-weight: 700;
}
.span8 .row-fluid .value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.span8 .librarian-social {
    margin: 0;
    padding: 0;
    list-style: none;
}

#loginForm form {
    width: 100%;
    max-width: 20rem;
}
#loginForm .heading1 {
    font-weight: 700;
}
#loginForm .login_input input {
    display: block;
    width: 100%;
    height: calc(2.25rem + 2px);
    margin-bottom: 8px;
    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: .375rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
#loginForm .login_input input:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 .2rem var(--accent-ring);
}
#loginForm .homeButton {
    display: none;
}

.loginButton {
    display: inline-block;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: .375rem;
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}
#loginForm .loginButton {
    margin-top: 10px;
    color: #fff;
    background-color: var(--accent);
    border-color: var(--accent);
}
#loginForm .loginButton:hover {
    color: #fff;
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.remember_forgot {
    display: flex;
    justify-content: space-between;
}
.forgotButton {
    float: right;
    padding-top: 16px;
    color: #718096;
    text-decoration: none;
}
.forgotButton:hover {
    color: var(--accent);
    text-decoration: none;
}
.expand {
    margin: 0 -1.25rem -1.25rem;
}

/* ==========================================================================
   8. Modal, banner, colorbox
   ========================================================================== */
#adv-modal .modal-content,
#adv-modal .modal-footer {
    position: relative;
    z-index: 1;
}
#adv-modal .modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url("../images/logo-big.png") no-repeat right 20px bottom 20px / min(50%, 260px);
    opacity: .5;
}

#vio {
    position: relative;
    z-index: 2000;
    width: 100%;
    padding: 8px 0;
    color: #fff5f5;
    text-align: center;
    background: #ef4444;
}
#vio a {
    color: #1f2937;
}

#colorbox {
    border-radius: 6px;
}
#cboxLoadedContent {
    padding: 10px;
}
#cboxOverlay {
    background: #404040;
}
#cboxTitle {
    bottom: 0;
    padding: 15px 0;
    font: 700 .83rem/1.8 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    background: #000;
}
#cboxTopLeft,
#cboxTopRight,
#cboxBottomLeft,
#cboxBottomRight {
    width: 0;
    height: 0;
}
#cboxMiddleLeft,
#cboxMiddleRight {
    width: 0;
}
#cboxBottomCenter,
#cboxTopCenter {
    height: 0;
}

pre.sf-dump,
pre.sf-dump .sf-dump-default {
    z-index: 888 !important;
}

/* ==========================================================================
   9. Navbar (pelengkap _navbar.php)
   ========================================================================== */
#languageMenuButton::after {
    display: none;
}

@media (max-width: 991.98px) {
    /* panel menu mengambang di atas header, tidak menambah tinggi header */
    .c-header .navbar-collapse {
        position: absolute;
        top: 100%;
        left: .75rem;
        right: .75rem;
        z-index: 99;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }
    .navbar-collapse.collapsing,
    .navbar-collapse.collapse.show {
        margin-top: 8px;
        padding: 12px;
        background-color: rgba(15, 23, 42, .95);
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
    }
}

/* ==========================================================================
   10. Widget chat
   ========================================================================== */
.s-chat {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 99;
    width: min(320px, calc(100vw - 32px));
    height: 480px;
    max-height: calc(100vh - 32px);
    padding: 16px;
    overflow: hidden;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
}

.s-chat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
    height: 150px;
    background: var(--chat);
    box-shadow: var(--shadow-sm);
}

.s-chat div,
.s-chat a,
.s-chat footer {
    position: relative;
    z-index: 10;
}

#show-pchat {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    width: 30px;
    height: 30px;
    background-color: #fff;
    border-bottom-left-radius: 4px;
    cursor: pointer;
}
#show-pchat i {
    display: none;
}
#show-pchat:hover {
    opacity: .9;
}
#show-pchat::before {
    content: "\f2d1";
    position: absolute;
    left: 0;
    right: 0;
    font-family: "Font Awesome 5 Free";
    text-align: center;
}

.s-chat-header {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.2;
    color: #ebf8ff;
}

.s-chat-content.text-center {
    position: relative;
}
.s-chat-content.text-center form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 4px;
    padding: 0 16px;
}
.s-chat-content.text-center p:first-of-type {
    margin: 0 -16px;
    font-size: .875rem;
    font-weight: 300;
    line-height: 1;
    text-align: left;
    color: var(--chat-soft);
}
.s-chat-content.text-center hr {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 1;
    height: 378px;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.s-chat-content.text-center label {
    position: relative;
    z-index: 10;
    margin-top: 20px;
    font-size: .875rem;
}
.s-chat-content label {
    position: relative;
    z-index: 10;
}

.s-chat-content input#message,
.s-chat-content.text-center input#message {
    position: relative;
    z-index: 10;
    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: .375rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.s-chat-content input#message {
    display: inline-block;
    margin-bottom: 8px;
}
.s-chat-content.text-center input#message {
    display: block;
    width: 100%;
    margin-bottom: 16px;
}
.s-chat-content input#message:focus,
.s-chat-content.text-center input#message:focus {
    color: #495057;
    background-color: #fff;
    border-color: #5eead4;
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(94, 234, 212, .25);
}

.s-chat-content .btn.btn-block {
    position: relative;
    z-index: 10;
    font-size: .875rem;
    color: #f0fdfa;
    background-color: var(--chat);
    border: 1px solid var(--chat-dark);
}
.s-chat-content .btn.btn-block:hover {
    background-color: var(--chat-dark);
}

.s-chat-content:not(.text-center) {
    height: 370px;
    margin: 8px 0;
    padding: 16px;
    font-size: .875rem;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.s-chat-content #log {
    height: 270px;
    margin: -16px -16px 8px;
    padding: 16px;
    overflow-y: scroll;
    background-color: #fff;
    border-bottom: 1px solid #e3e3e3;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.s-chat footer {
    display: none;
    padding: 16px;
    font-size: .7rem;
}
.s-chat footer:not(.text-center) {
    display: block;
    padding: 0;
}

/* ==========================================================================
   11. Responsif
   ========================================================================== */
@media (max-width: 767.98px) {
    .advanced-wraper {
        left: 8px;
        right: 8px;
    }
    .search .card {
        background-size: 24px;
    }
}

@media (max-width: 575.98px) {
    .librarian {
        flex-direction: column;
    }
    .span2 {
        width: 100%;
        max-width: 12rem;
        margin-bottom: 1rem;
    }
    .span8 {
        padding: 0;
    }
    .span8 .row-fluid .key {
        flex-basis: 80px;
    }
    .topic {
        grid-template-columns: repeat(2, 1fr);
    }
    .availability .value {
        font-size: 1.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Sembunyikan tautan berita (dipertahankan dari versi lama) */
a[href*="p=news"] {
    display: none !important;
}

/* ===========================================================================
   12. Penyempurnaan desain responsif
   ---------------------------------------------------------------------------
   Aturan ini diletakkan paling akhir agar dapat menetralkan ukuran gambar lama
   dan komponen Bootstrap/SLiMS tanpa mengubah struktur atau JavaScript SLiMS.
   =========================================================================== */
:root {
    --header-h: clamp(15.5rem, 27vw, 21rem);
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 0;
    color: var(--ink);
    background: var(--page-bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(15, 118, 110, .42);
    outline-offset: 3px;
}

/* Hero tetap proporsional, tidak terlalu pendek di desktop atau memenuhi layar
   di ponsel. */
.c-header,
.c-header.vegas-container {
    height: var(--header-h) !important;
    min-height: var(--header-h);
    max-height: var(--header-h);
    isolation: isolate;
}

.c-header .mask {
    background: linear-gradient(105deg, rgba(2, 6, 23, .72), rgba(15, 23, 42, .38) 58%, rgba(15, 118, 110, .24));
}

.c-header .navbar {
    padding-top: clamp(.75rem, 2vw, 1.25rem);
    padding-bottom: clamp(.75rem, 2vw, 1.25rem);
}

/* Pencarian menjadi kartu yang mudah disentuh dan tidak membuat horizontal
   scroll pada layar kecil. */
.search {
    width: min(calc(100% - 24px), 1100px);
    margin-right: auto;
    margin-left: auto;
}

.search .card {
    min-height: 4.25rem;
    padding: .55rem 1rem;
    background-position: calc(100% - 1rem) center;
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, .16);
}

.search .input-transparent {
    min-width: 0;
    min-height: 3rem;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.4;
}

.search .input-transparent::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.advanced-wraper {
    top: calc(100% + .6rem);
    left: 0;
    right: 0;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
}

/* Elemen koleksi serta teks panjang tidak boleh mendorong lebar halaman. */
slims-collection,
slims-group-subject,
slims-group-member,
.collection,
.grid-item,
.card,
.card-body,
.card-text,
.grid-item--title {
    min-width: 0;
}

.grid-item--title,
.card-text,
.vs-name {
    overflow-wrap: anywhere;
}

.card-image {
    background: var(--surface-soft);
}

.card-image img,
.card-image-rounded img {
    max-width: none;
    object-fit: cover;
}

/* Menu versi mobile tampil sebagai panel, tanpa merusak tinggi hero. */
@media (max-width: 991.98px) {
    /*
     * Header sebelumnya memakai isolation:isolate. Akibatnya submenu berada
     * di stacking context di bawah .search (z-index: 5), walaupun collapse
     * sudah memiliki z-index besar. Lepaskan isolation pada mobile agar
     * panel hamburger benar-benar tampil paling depan.
     */
    .c-header,
    .c-header.vegas-container {
        isolation: auto;
    }

    .c-header .navbar {
        z-index: 110;
    }

    .c-header .navbar-collapse {
        z-index: 111;
        left: max(.75rem, env(safe-area-inset-left));
        right: max(.75rem, env(safe-area-inset-right));
        max-height: calc(100dvh - 5.5rem);
    }

    .navbar-collapse.collapsing,
    .navbar-collapse.collapse.show {
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, .12);
        background-color: rgba(15, 23, 42, .97);
        backdrop-filter: blur(14px);
    }

    /* Search tidak perlu dapat diakses saat panel menu sedang terbuka. */
    .search {
        z-index: 1;
    }

    /*
     * Pengaman akhir untuk browser mobile modern: .search adalah sibling
     * setelah header. Sembunyikan sebentar ketika Bootstrap memberi class
     * show/collapsing pada hamburger agar input tidak mungkin berada di
     * depan submenu, termasuk bila ada stacking context dari plugin Vegas.
     */
    @supports selector(.c-header:has(.navbar-collapse.show)) {
        .c-header:has(.navbar-collapse.show) + .search,
        .c-header:has(.navbar-collapse.collapsing) + .search {
            visibility: hidden;
            pointer-events: none;
        }
    }
}

@media (max-width: 767.98px) {
    :root {
        --header-h: 15rem;
    }

    body {
        overflow-x: hidden;
    }

    .search {
        width: calc(100% - 20px);
        margin-top: -1.5rem;
    }

    .search .card {
        min-height: 3.75rem;
        padding: .4rem .85rem;
        background-image: none;
    }

    .search .input-transparent {
        min-height: 2.85rem;
        padding-right: 0;
        font-size: 1rem;
    }

    .advanced-wraper {
        left: -2px;
        right: -2px;
    }

    .card-image-rounded {
        width: 4rem;
        height: 4rem;
    }

    .biblioPaging .pagingList {
        justify-content: flex-start;
        width: 100%;
        border-radius: .75rem;
    }

    .biblioPaging .pagingList b,
    .biblioPaging .pagingList a {
        padding: .55rem .8rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-right: .85rem;
        padding-left: .85rem;
    }

    .c-header .navbar-collapse {
        left: .5rem;
        right: .5rem;
    }

    .s-chat {
        right: .75rem;
        bottom: .75rem;
        width: calc(100vw - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        border-radius: 1rem;
    }

    .librarian {
        gap: .75rem;
    }

    /*
     * slims-book membuat kartu dengan .w-48 (lebar tetap 12rem) dan
     * .pr-4. Pada layar sempit, satu kartu menjadi terlihat menempel di
     * sisi kiri. Pusatkan kartu, hilangkan padding kanan warisan, dan
     * samakan area sampul agar koleksi populer maupun terbaru rapi.
     */
    #slims-home .collection {
        justify-content: center !important;
        align-items: stretch;
        gap: 1rem;
        margin: 1.25rem auto 0;
        padding: 0 .25rem;
    }

    #slims-home .collection > .w-48,
    #slims-home .collection > slims-book {
        display: block;
        flex: 0 1 15rem !important;
        width: 100% !important;
        max-width: 15rem;
        padding: 0 !important;
    }

    /* Cadangan untuk versi Vue/SLiMS yang mempertahankan elemen slims-book. */
    #slims-home .collection > slims-book > .w-48 {
        width: 100% !important;
        padding: 0 !important;
    }

    #slims-home .collection .card {
        width: 100%;
        overflow: hidden;
        background: #fff;
        border: 1px solid #dbe4ee !important;
        border-radius: .9rem;
        box-shadow: 0 .45rem 1.25rem rgba(15, 23, 42, .06);
    }

    #slims-home .collection .card-body {
        padding: .75rem;
    }

    #slims-home .collection .card-image {
        display: grid;
        place-items: center;
        width: 100%;
        aspect-ratio: 2 / 3;
        margin: 0 auto;
        padding: .5rem;
        overflow: hidden;
        background: #f8fafc;
        border: 0;
        border-radius: .6rem;
    }

    #slims-home .collection .card-image img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        margin: 0 !important;
        object-fit: contain !important;
        object-position: center;
    }

    #slims-home .collection .card-text {
        display: -webkit-box;
        min-height: 2.8em;
        margin-top: .7rem !important;
        overflow: hidden;
        color: #334155 !important;
        font-size: .82rem;
        font-weight: 650;
        line-height: 1.4;
        text-align: center;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media (hover: none) {
    .topic li a:hover,
    .elevation-1:hover {
        transform: none;
    }

    .availability:hover .add-to-chart {
        opacity: 0;
    }
}

@media (prefers-contrast: more) {
    .topic li,
    .vs-card,
    .location-card {
        border-color: currentColor;
    }
}
/* === Halaman Informasi Perpustakaan (tempel di akhir style.css template) === */
.lib-info{
  --lib-ink:#1f2a37;
  --lib-muted:#5b6776;
  --lib-line:#dfe6ee;
  --lib-card:#ffffff;
  --lib-soft:#f3f7fb;
  --lib-brand:#0f5c6e;
  --lib-brand-soft:#e3f2f5;
  --lib-accent:#c7822b;
  font-family:"Segoe UI","Helvetica Neue",Arial,sans-serif;
  color:var(--lib-ink);
  line-height:1.65;
  max-width:960px;
  margin:0 auto;
  padding:8px 0 24px;
  box-sizing:border-box;
}
.lib-info *{box-sizing:border-box}
.lib-info h3,.lib-info h4{margin:0 0 14px;color:var(--lib-brand);line-height:1.3}
.lib-info h3{font-size:1.25rem}
.lib-info h4{font-size:1.05rem}

.lib-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-bottom:20px}
.lib-card{
  background:var(--lib-card);
  border:1px solid var(--lib-line);
  border-radius:16px;
  padding:22px 24px;
  box-shadow:0 6px 18px rgba(15,92,110,.07);
}
.lib-card.lib-wide{margin-bottom:20px}

.lib-row{display:flex;gap:14px;align-items:flex-start;padding:12px 0;border-bottom:1px dashed var(--lib-line)}
.lib-row:last-child{border-bottom:0;padding-bottom:0}
.lib-row:first-of-type{padding-top:0}
.lib-ico{
  flex:0 0 40px;height:40px;border-radius:12px;
  background:var(--lib-brand-soft);color:var(--lib-brand);
  display:flex;align-items:center;justify-content:center;font-size:1.1rem;
}
.lib-label{display:block;font-size:.85rem;font-weight:600;color:var(--lib-muted)}
.lib-val{display:block;font-size:1rem;font-weight:500;word-break:break-word}
.lib-val a{color:var(--lib-brand);text-decoration:none;font-weight:600}
.lib-val a:hover{text-decoration:underline}

.lib-hours{list-style:none;margin:0;padding:0}
.lib-hours li{
  display:flex;justify-content:space-between;gap:12px;
  padding:10px 14px;margin-bottom:8px;border-radius:10px;background:var(--lib-soft);
}
.lib-hours li:last-child{margin-bottom:0}
.lib-hours .lib-time{font-weight:700;color:var(--lib-brand);white-space:nowrap}
.lib-hours .lib-break{background:#fff6e8}
.lib-hours .lib-break .lib-time{color:var(--lib-accent)}
.lib-day{display:inline-block;margin-bottom:12px;padding:4px 12px;border-radius:999px;background:var(--lib-brand);color:#fff;font-size:.85rem;font-weight:600}

.lib-steps{list-style:none;counter-reset:step;margin:0;padding:0}
.lib-steps li{
  counter-increment:step;position:relative;
  padding:12px 14px 12px 56px;margin-bottom:10px;
  background:var(--lib-soft);border-radius:12px;text-align:left;
}
.lib-steps li:last-child{margin-bottom:0}
.lib-steps li::before{
  content:counter(step);position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:30px;height:30px;border-radius:50%;
  background:var(--lib-brand);color:#fff;font-weight:700;font-size:.9rem;
  display:flex;align-items:center;justify-content:center;
}
.lib-steps.lib-return li::before{background:var(--lib-accent)}
.lib-steps.lib-return + *{margin-top:0}
.lib-card.lib-return-card h4{color:var(--lib-accent)}

@media (max-width:480px){
  .lib-card{padding:18px}
  .lib-hours li{flex-direction:column;gap:2px}
}