/* ==========================================================================
   Perpustakaan MBIP - site components
   Values replicate the inline <style> blocks of https://library.di.mbip.my/.
   The base theme is the TYPO3 Bootstrap Package (css/vendor/).
   ========================================================================== */

/* The full-bleed banner uses 100vw, which includes the vertical scrollbar's
   width, so the page was ~15px wider than the viewport (also on the
   original). Clip it here; `clip` does not create a scroll container, so
   sticky/fixed elements keep working. */
.body-bg {
    overflow-x: clip;
}

/* =========================================================
   LANGUAGE SWITCH (boxed B.MAS / ENG in the navbar)
   Mobile: next to the hamburger. Desktop (>= 992px): far right,
   after the menu, in the space the menu leaves free.
   ========================================================= */

.navbar-language {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    margin-right: 12px;
}

/* .navbar-language prefix so the theme's link colours/underline don't win */
.navbar-language .navbar-language-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    padding: 0 10px;
    border: 2px solid #003b73;
    border-radius: 6px;
    background: #ffffff;
    color: #003b73;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.navbar-language .navbar-language-option:hover {
    background: #eef6ff;
    color: #003b73;
    transform: translateY(-1px);
}

.navbar-language .navbar-language-option.is-active,
.navbar-language .navbar-language-option.is-active:hover {
    background: #003b73;
    color: #ffffff;
    transform: none;
}

.navbar-language .navbar-language-option:focus-visible {
    outline: 3px solid rgba(0, 87, 168, 0.35);
    outline-offset: 2px;
}

@media (min-width: 992px) {
    .navbar-mainnavigation .navbar-collapse {
        order: 2;
    }

    .navbar-mainnavigation .navbar-language {
        order: 3;
        margin-left: 1.25rem;
        margin-right: 0;
    }
}

/* =========================================================
   PAGE BANNER (shown on every page)
   ========================================================= */

.iplc-page,
.iplc-page * {
    box-sizing: border-box;
}

.iplc-page {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    background: #ffffff;
    line-height: 1.7;
}

.iplc-hero {
    position: relative;
    width: 100vw;
    min-height: 560px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.70) 50%, rgba(0, 0, 0, 0.40) 100%),
        var(--hero-image, url("../banners/mbip.jpeg")) center center / cover no-repeat;
}

/* decorative circle, bottom right */
.iplc-hero::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    right: -250px;
    bottom: -300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.iplc-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.iplc-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding: 80px 0;
    color: #ffffff;
}

.iplc-eyebrow {
    display: inline-block;
    padding: 8px 18px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.iplc-hero h1 {
    margin: 0 0 25px;
    color: #ffffff;
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    overflow-wrap: anywhere;
}

.iplc-hero h1 span {
    display: block;
    color: #8ed8ff;
}

.iplc-hero-description {
    max-width: 800px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
}

@media (max-width: 650px) {
    .iplc-container {
        width: calc(100% - 28px);
    }

    .iplc-hero {
        min-height: 530px;
    }

    .iplc-hero-content {
        padding: 60px 0;
    }

    .iplc-eyebrow {
        font-size: 12px;
        padding: 7px 14px;
    }

    .iplc-hero h1 {
        font-size: 45px;
        letter-spacing: -1px;
    }

    .iplc-hero-description {
        font-size: 16px;
        line-height: 1.7;
    }
}

/* very small phones: long single words (e.g. "PERKHIDMATAN") must not overflow */
@media (max-width: 380px) {
    .iplc-hero h1 {
        font-size: 36px;
    }
}

/* =========================================================
   KOLEKSI TERKINI - 3D CAROUSEL
   ========================================================= */

.koleksi-header {
    text-align: center;
    margin-bottom: 20px;
}

.koleksi-title {
    margin: 0;
    color: #003366;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

#slideshow {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    margin-top: 10px;
}

.entire-content {
    margin: auto;
    width: 140px;
    perspective: 1200px;
    position: relative;
    padding-top: 10px;
}

.content-carrousel {
    width: 100%;
    position: absolute;
    animation: rotate 20s infinite linear;
    transform-style: preserve-3d;
}

.content-carrousel:hover {
    animation-play-state: paused;
    cursor: pointer;
}

.content-carrousel figure {
    width: 120px;
    height: 170px;
    margin: 0;
    position: absolute;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.content-carrousel figure:hover {
    transform: scale(1.03);
}

.content-carrousel figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* nine covers spaced 40deg apart */
.content-carrousel figure:nth-child(1) { transform: rotateY(0deg) translateZ(230px); }
.content-carrousel figure:nth-child(2) { transform: rotateY(40deg) translateZ(230px); }
.content-carrousel figure:nth-child(3) { transform: rotateY(80deg) translateZ(230px); }
.content-carrousel figure:nth-child(4) { transform: rotateY(120deg) translateZ(230px); }
.content-carrousel figure:nth-child(5) { transform: rotateY(160deg) translateZ(230px); }
.content-carrousel figure:nth-child(6) { transform: rotateY(200deg) translateZ(230px); }
.content-carrousel figure:nth-child(7) { transform: rotateY(240deg) translateZ(230px); }
.content-carrousel figure:nth-child(8) { transform: rotateY(280deg) translateZ(230px); }
.content-carrousel figure:nth-child(9) { transform: rotateY(320deg) translateZ(230px); }

@keyframes rotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@media (max-width: 768px) {
    #slideshow {
        height: 180px;
    }

    .entire-content {
        width: 100px;
    }

    .content-carrousel figure {
        width: 90px;
        height: 130px;
    }

    .content-carrousel figure:nth-child(1) { transform: rotateY(0deg) translateZ(160px); }
    .content-carrousel figure:nth-child(2) { transform: rotateY(40deg) translateZ(160px); }
    .content-carrousel figure:nth-child(3) { transform: rotateY(80deg) translateZ(160px); }
    .content-carrousel figure:nth-child(4) { transform: rotateY(120deg) translateZ(160px); }
    .content-carrousel figure:nth-child(5) { transform: rotateY(160deg) translateZ(160px); }
    .content-carrousel figure:nth-child(6) { transform: rotateY(200deg) translateZ(160px); }
    .content-carrousel figure:nth-child(7) { transform: rotateY(240deg) translateZ(160px); }
    .content-carrousel figure:nth-child(8) { transform: rotateY(280deg) translateZ(160px); }
    .content-carrousel figure:nth-child(9) { transform: rotateY(320deg) translateZ(160px); }
}

@media (prefers-reduced-motion: reduce) {
    .content-carrousel {
        animation-duration: 120s;
    }
}

/* =========================================================
   CARIAN PERPUSTAKAAN MBIP (discovery search)
   ========================================================= */

.mbip-discovery,
.mbip-discovery * {
    box-sizing: border-box;
}

.mbip-discovery {
    max-width: 1100px;
    margin: 40px auto;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e8edf3;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 35, 75, 0.07);
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
}

.mbip-discovery-header {
    text-align: center;
    margin-bottom: 28px;
}

.mbip-discovery-header h2 {
    margin: 0 0 10px;
    color: #003b73;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.25;
    font-weight: 700;
}

.mbip-discovery-header p {
    max-width: 700px;
    margin: 0 auto;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.mbip-search-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto 28px;
}

.mbip-search-wrapper input {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0 18px;
    border: 2px solid #dbe3ec;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #1f2937;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mbip-search-wrapper input::placeholder {
    color: #94a3b8;
}

.mbip-search-wrapper input:focus {
    border-color: #0057a8;
    box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.12);
}

.mbip-search-wrapper button {
    height: 54px;
    padding: 0 28px;
    border: none;
    border-radius: 10px;
    background: #003b73;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.mbip-search-wrapper button:hover {
    background: #0057a8;
    transform: translateY(-1px);
}

.mbip-search-wrapper button:focus-visible,
.mbip-result-card a:focus-visible {
    outline: 3px solid rgba(0, 87, 168, 0.3);
    outline-offset: 3px;
}

.mbip-search-status {
    display: none;
    margin: 0 0 24px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #eef6ff;
    color: #174a7c;
    font-size: 14px;
    line-height: 1.5;
}

.mbip-search-status.is-visible {
    display: block;
}

.mbip-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mbip-result-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.mbip-result-card:hover {
    transform: translateY(-4px);
    border-color: #cbdbea;
    box-shadow: 0 8px 24px rgba(0, 35, 75, 0.09);
}

.mbip-result-type {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 11px;
    border-radius: 30px;
    background: #003b73;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.mbip-result-card h3 {
    width: 100%;
    margin: 0 0 10px;
    color: #1e293b;
    font-size: 19px;
    line-height: 1.4;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mbip-result-card p {
    flex: 1;
    width: 100%;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

/* "Buka Carian" button - light grey with white text, as on the original */
.mbip-discovery .mbip-result-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 20px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #d3d3d3 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.mbip-discovery .mbip-result-card a:hover {
    background: #b8b8b8 !important;
    color: #ffffff !important;
}

.mbip-result-card.mbip-koha .mbip-result-type { background: #003b73; }
.mbip-result-card.mbip-pressreader .mbip-result-type { background: #c2410c; }
.mbip-result-card.mbip-upustaka .mbip-result-type { background: #047857; }

.mbip-empty-state {
    display: none;
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 900px) {
    .mbip-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mbip-discovery {
        margin: 24px auto;
        padding: 22px 16px;
        border-radius: 14px;
    }

    .mbip-search-wrapper {
        flex-direction: column;
    }

    .mbip-search-wrapper input,
    .mbip-search-wrapper button {
        width: 100%;
    }

    /* in the stacked layout flex:1 would collapse the input's height to 0
       (a bug on the original); keep its full 54px height */
    .mbip-search-wrapper input {
        flex: none;
    }

    .mbip-result-grid {
        grid-template-columns: 1fr;
    }

    .mbip-result-card {
        padding: 20px;
    }
}

/* =========================================================
   BERITA TERKINI MBIP
   ========================================================= */

.mbip-news-wrap {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    font-family: Arial, sans-serif;
}

.mbip-news-title {
    text-align: center;
    font-size: 38px;
    font-weight: 700;
    color: #003366;
    letter-spacing: 3px;
    margin-bottom: 40px;
}

.mbip-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px 40px;
}

.mbip-news-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: .3s;
}

.mbip-news-item:hover {
    transform: translateY(-4px);
}

.mbip-news-thumb {
    width: 230px;
    min-width: 230px;
    height: 170px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
}

.mbip-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.mbip-news-item:hover img {
    transform: scale(1.08);
}

.mbip-news-content {
    flex: 1;
    min-width: 0;
}

.mbip-news-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.45;
}

.mbip-news-content h3 a {
    text-decoration: none;
    color: #004f9f;
}

.mbip-news-content h3 a:hover {
    color: #f39c12;
}

.mbip-news-date {
    margin-top: 8px;
    color: #888;
    font-size: 15px;
}

.mbip-news-btn {
    text-align: center;
    margin-top: 40px;
}

.mbip-news-btn a {
    display: inline-block;
    padding: 12px 28px;
    background: #003b73;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: .3s;
}

.mbip-news-btn a:hover {
    background: #00284f;
}

@media (max-width: 992px) {
    .mbip-news-grid {
        grid-template-columns: 1fr;
    }

    .mbip-news-item {
        flex-direction: column;
    }

    .mbip-news-thumb {
        width: 100%;
        min-width: 0;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .mbip-news-title {
        font-size: 28px;
        letter-spacing: 2px;
    }
}

/* =========================================================
   PAUTAN AGENSI - logo slider
   ========================================================= */

.footer-agensi {
    background: #FFFFFF;
    padding: 40px 10px;
    border-top: 3px solid #FFFFFF;
    font-family: Arial, sans-serif;
}

.footer-agensi .title {
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #444;
    text-transform: uppercase;
}

.footer-agensi .swiper {
    max-width: 1100px;
    margin: auto;
    position: relative;
    padding: 0 35px;
    box-sizing: border-box;
}

.footer-agensi .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-agensi .swiper-slide a {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.footer-agensi .box {
    width: 160px;
    height: 120px;
    background: #fff;
    border: 1px solid #FFFFFF;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Every logo is scaled to fill the same box (the logo files have their empty
   margins trimmed, assets/images/agencies), so they all look the same size. */
.footer-agensi .logo-container {
    width: 130px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.footer-agensi .logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.footer-agensi .box:hover .logo-container img {
    transform: scale(1.05);
}

.footer-agensi .box:hover {
    transform: translateY(-2px);
}

.footer-agensi .box span {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
    text-decoration: none !important;
    line-height: 16px;
    text-align: center;
}

.footer-agensi .swiper-button-next,
.footer-agensi .swiper-button-prev {
    color: #666;
    transform: scale(0.6);
}

.footer-agensi .swiper-button-next:hover,
.footer-agensi .swiper-button-prev:hover {
    color: #000;
}

@media (max-width: 767px) {
    .footer-agensi .swiper {
        padding: 0 25px;
    }

    .footer-agensi .box {
        width: 140px;
        height: 110px;
    }

    .footer-agensi .logo-container {
        width: 112px;
        height: 56px;
    }

    .footer-agensi .box span {
        font-size: 11px;
    }
}

/* =========================================================
   KOHA MBIP - catalogue search card
   Same visual language as "CARIAN PERPUSTAKAAN MBIP" on the
   homepage: white rounded card, navy #003b73 accents.
   ========================================================= */

.koha-search,
.koha-search * {
    box-sizing: border-box;
}

.koha-search {
    max-width: 1100px;
    margin: 40px auto;
    padding: 36px 32px 28px;
    background: #ffffff;
    border: 1px solid #e8edf3;
    border-top: 4px solid #003b73;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 35, 75, 0.07);
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
}

.koha-search-header {
    text-align: center;
    margin-bottom: 24px;
}

.koha-search-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 30px;
    background: #eef6ff;
    color: #003b73;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.koha-search-header h2 {
    margin: 0 0 10px;
    color: #003b73;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.25;
    font-weight: 700;
}

.koha-search-header p {
    max-width: 700px;
    margin: 0 auto;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

/* search-by pills (real radio buttons, visually replaced by their labels) */
.koha-search-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.koha-search-type-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.koha-search-type {
    padding: 8px 18px;
    border: 2px solid #dbe3ec;
    border-radius: 30px;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.koha-search-type:hover {
    border-color: #0057a8;
    color: #003b73;
}

.koha-search-type-input:checked + .koha-search-type {
    background: #003b73;
    border-color: #003b73;
    color: #ffffff;
}

.koha-search-type-input:focus-visible + .koha-search-type {
    outline: 3px solid rgba(0, 87, 168, 0.3);
    outline-offset: 2px;
}

/* input + button */
.koha-search-field {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

.koha-search-input {
    position: relative;
    flex: 1;
    min-width: 0;
}

.koha-search-input svg {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.koha-search-input input {
    width: 100%;
    height: 54px;
    padding: 0 18px 0 50px;
    border: 2px solid #dbe3ec;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #1f2937;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.koha-search-input input::placeholder {
    color: #94a3b8;
}

.koha-search-input input:focus {
    border-color: #0057a8;
    box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.12);
}

.koha-search-input:focus-within svg {
    color: #0057a8;
}

.koha-search-field button {
    height: 54px;
    padding: 0 32px;
    border: none;
    border-radius: 10px;
    background: #003b73;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.koha-search-field button:hover {
    background: #0057a8;
    transform: translateY(-1px);
}

.koha-search-field button:focus-visible {
    outline: 3px solid rgba(0, 87, 168, 0.3);
    outline-offset: 3px;
}

.koha-search-foot {
    margin: 20px 0 0;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

.koha-search-foot a {
    color: #003b73;
    font-weight: 600;
    white-space: nowrap;
}

.koha-search .koha-alert {
    max-width: 850px;
    margin: 16px auto 0;
}

@media (max-width: 600px) {
    .koha-search {
        margin: 24px auto;
        padding: 26px 16px 20px;
        border-radius: 14px;
    }

    .koha-search-field {
        flex-direction: column;
    }

    .koha-search-field button {
        width: 100%;
    }

    .koha-search-type {
        padding: 7px 14px;
        font-size: 13px;
    }
}

/* on-page Koha results */
.koha-results {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.koha-alert {
    margin: 1rem 0;
    padding: .85rem 1rem;
    border-radius: 6px;
    background: #eef6ff;
    color: #174a7c;
    font-size: .95rem;
}

.koha-alert-error {
    background: #fdecea;
    color: #8a1f17;
}

.koha-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1rem;
    padding-bottom: .75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5eaf0;
}

.koha-results-count {
    margin: 0;
    color: #444;
}

.koha-results-opac {
    font-size: .9rem;
}

.koha-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.koha-result {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #eef1f4;
}

.koha-result-cover {
    flex: 0 0 90px;
    width: 90px;
    height: 130px;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f3f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: transform .2s;
}

.koha-result-cover:hover {
    transform: translateY(-2px);
}

.koha-result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.koha-result-body {
    flex: 1;
    min-width: 0;
}

/* .koha-results prefix: the theme's own heading/link colours would win otherwise */
.koha-results .koha-result-title {
    margin: 0 0 .5rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.koha-results .koha-result-title a {
    color: #003b73;
    text-decoration: none;
}

.koha-results .koha-result-title a:hover {
    color: #0057a8;
    text-decoration: underline;
}

.koha-result-meta {
    margin: 0 0 .2rem;
    color: #555;
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.koha-result-meta span {
    color: #888;
}

.koha-result-btn {
    display: inline-block;
    margin-top: .6rem;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    background: #003b73;
    color: #fff !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s, transform .2s;
}

.koha-result-btn:hover {
    background: #00284f;
    transform: translateY(-1px);
}

.koha-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Laravel's Bootstrap 5 paginator prints a "Showing x to y" line we don't need */
.koha-pagination nav > .d-sm-flex > div:first-child {
    display: none;
}

@media (max-width: 480px) {
    .koha-result {
        gap: .9rem;
    }

    .koha-result-cover {
        flex-basis: 70px;
        width: 70px;
        height: 100px;
    }
}

/* =========================================================
   BROKEN EXTERNAL IMAGES (see app.js)
   ========================================================= */

img.is-broken {
    object-fit: contain !important;
    background: #f1f3f5;
}

/* =========================================================
   ERROR PAGES (404 / 500)
   ========================================================= */

.error-page {
    max-width: 640px;
    margin: 60px auto;
    padding: 0 16px;
}

.error-page-code {
    margin: 0;
    color: #003366;
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
}

.error-standalone {
    margin: 0;
    font-family: "Source Sans Pro", Arial, sans-serif;
    color: #212121;
    background: #ffffff;
}

.error-page-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #003b73;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
}

.error-page-btn:hover {
    background: #00284f;
    color: #fff;
}


/* ===== Rich text edited in the admin panel =====
   The admin editor saves plain markup (no Bootstrap classes), so give bare
   tables the same look as the seeded <table class="table">. */
.accordion-content-text,
.textpic-text {
    overflow-x: auto;
}

.accordion-content-text table:not(.table),
.textpic-text table:not(.table) {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.accordion-content-text table:not(.table) td,
.accordion-content-text table:not(.table) th,
.textpic-text table:not(.table) td,
.textpic-text table:not(.table) th {
    padding: 0.5rem;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
}

.accordion-content-text table:not(.table) p,
.textpic-text table:not(.table) p {
    margin: 0;
}

/* ===== Direktori Perpustakaan (pages/direktori.blade.php) ===== */
.library-directory {
    margin: 1.75rem 0 3rem;
}

.library-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.library-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border: 2px solid #003b73;
    border-radius: 999px;
    color: #003b73;
    background: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.library-filter-chip span {
    min-width: 1.6em;
    padding: 0 0.4em;
    border-radius: 999px;
    background: #eef6ff;
    font-size: 0.85em;
    text-align: center;
}

.library-filter-chip:hover,
.library-filter-chip:focus-visible,
.library-filter-chip.is-active {
    background: #003b73;
    color: #fff;
    text-decoration: none;
}

.library-filter-chip.is-active span {
    background: rgba(255, 255, 255, 0.2);
}

.library-directory-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: start;
}

.library-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.library-hint {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
}

.library-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dfe6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 59, 115, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.library-card.is-selected {
    border-color: #003b73;
    box-shadow: 0 0 0 3px rgba(0, 59, 115, 0.15);
}

.library-card-image {
    flex: 0 0 132px;
}

.library-card-image img {
    width: 132px;
    height: 104px;
    object-fit: cover;
    border-radius: 10px;
}

.library-card-body {
    flex: 1;
    min-width: 0;
}

.library-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: #003b73;
}

.library-badge--agensi { background: #0f766e; }
.library-badge--negeri { background: #b45309; }
.library-badge--akademik { background: #7c3aed; }

.library-name {
    margin: 0.4rem 0 0.35rem;
    font-size: 1.15rem;
    line-height: 1.35;
}

.library-name a {
    color: #003b73;
    text-decoration: none;
}

.library-name a:hover,
.library-name a:focus-visible {
    text-decoration: underline;
}

.library-name svg {
    vertical-align: -2px;
    color: #d9364f;
}

.library-address {
    margin: 0 0 0.6rem;
    color: #444;
    font-size: 0.95rem;
}

.library-section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #003b73;
}

.library-hours {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.1rem 1rem;
    margin: 0.2rem 0 0.6rem;
    font-size: 0.95rem;
}

.library-hours dt {
    font-weight: 600;
}

.library-hours dd {
    margin: 0;
}

.library-contact {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.95rem;
}

.library-contact span {
    font-weight: 600;
}

.library-note {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #8a5a00;
}

.library-empty {
    padding: 2rem 1rem;
    border: 1px dashed #c6d3e1;
    border-radius: 14px;
    text-align: center;
    color: #555;
}

.library-map-wrap {
    position: sticky;
    top: 1rem;
}

.library-map {
    height: 560px;
    border-radius: 14px;
    border: 1px solid #dfe6ee;
    overflow: hidden;
    background: #eef3f7;
}

.library-popup strong {
    display: block;
    color: #003b73;
}

.library-popup-category {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

.library-popup-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

@media (max-width: 991.98px) {
    .library-directory-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .library-map-wrap {
        position: static;
        order: -1;
    }

    .library-map {
        height: 380px;
    }
}

@media (max-width: 575.98px) {
    .library-card {
        flex-direction: column;
    }

    .library-card-image,
    .library-card-image img {
        width: 100%;
        flex-basis: auto;
    }

    .library-card-image img {
        height: 160px;
    }
}

/* ===== Announcement strip under the main menu (components/announcements) ===== */
.site-announcement {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #eef6ff;
    color: #003b73;
}

.site-announcement--warning {
    background: #fff4e0;
    color: #7a4b00;
}

.site-announcement--urgent {
    background: #fde8ea;
    color: #9b1c2c;
}

.site-announcement-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.site-announcement-icon {
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

.site-announcement-text {
    flex: 1;
    margin: 0;
    font-weight: 600;
    line-height: 1.5;
}

.site-announcement-text a {
    margin-left: 0.35rem;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

.site-announcement-close {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.site-announcement-close:hover,
.site-announcement-close:focus-visible {
    background: rgba(0, 0, 0, 0.08);
}

/* ===== Announcement pop-up (components/announcements, <dialog>) ===== */
.site-popup {
    width: min(860px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-top: 6px solid #003b73;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 20, 40, 0.45);
}

.site-popup--warning { border-top-color: #e0a100; }
.site-popup--urgent { border-top-color: #c8102e; }

.site-popup::backdrop {
    background: rgba(0, 25, 50, 0.65);
}

.site-popup-image {
    display: block;
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    background: #fff;
}

.site-popup-body {
    padding: 1.25rem 1.5rem 1.5rem;
    text-align: center;
}

.site-popup-text {
    margin: 0 0 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

.site-popup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

.site-popup-link {
    color: #003b73;
    font-weight: 700;
}

.site-popup-ok {
    min-width: 5rem;
    padding: 0.6rem 1.5rem;
    border: 0;
    border-radius: 6px;
    background: #23a99a;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.site-popup-ok:hover {
    background: #1b8d80;
}

.site-popup-ok:focus-visible {
    outline: 3px solid #b9a7f0;
    outline-offset: 2px;
}

/* Poster pop-up: the image alone over a dark backdrop, X at the top right of the screen */
.site-popup--poster {
    width: fit-content;
    height: fit-content;
    max-width: none;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.site-popup--poster::backdrop {
    background: rgba(0, 0, 0, 0.78);
}

.site-popup-poster {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 48px);
    /* drop-shadow follows the image's shape, so transparent PNG posters get no dark box behind them */
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
}

.site-popup-poster-link {
    display: block;
}

.site-popup-close {
    position: fixed;
    top: 12px;
    right: 20px;
    z-index: 1;
    width: 3rem;
    height: 3rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.site-popup-close:hover {
    color: #ffd54f;
}

/* stays white when it gets focus on opening; a thin ring shows keyboard focus */
.site-popup-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

/* ===== Program Akan Datang (event-card, home/acara, pages/events, pages/event) ===== */
.events-home {
    padding: 0.5rem 0 1rem;
}

.events-home-title {
    margin: 0 0 1.5rem;
    text-align: center;
    color: #003b73;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.events-home-more {
    margin-top: 1.5rem;
    text-align: center;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.event-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dfe6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 59, 115, 0.06);
}

.event-card.is-past {
    opacity: 0.85;
}

.event-card-image img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.event-card-main {
    display: flex;
    flex: 1;
    gap: 1rem;
    padding: 1rem;
}

.event-card-date {
    display: flex;
    flex: 0 0 64px;
    flex-direction: column;
    align-items: center;
    align-self: flex-start;
    padding: 0.4rem 0;
    border-radius: 10px;
    background: #003b73;
    color: #fff;
    line-height: 1.1;
}

.event-card-day {
    font-size: 1.6rem;
    font-weight: 800;
}

.event-card-month {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-card-year {
    font-size: 0.7rem;
    opacity: 0.8;
}

.event-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.event-card-title {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    line-height: 1.35;
}

.event-card-title a {
    color: #003b73;
    text-decoration: none;
}

.event-card-title a:hover,
.event-card-title a:focus-visible {
    text-decoration: underline;
}

.event-card-meta {
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: #444;
}

.event-card-meta li {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
}

.event-card-meta svg {
    flex: 0 0 auto;
    position: relative;
    top: 2px;
    color: #003b73;
}

.event-card-summary {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #333;
}

.event-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
}

.event-btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: 2px solid #003b73;
    border-radius: 999px;
    background: #003b73;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.event-btn:hover,
.event-btn:focus-visible {
    background: #00284f;
    border-color: #00284f;
    color: #fff;
    text-decoration: none;
}

.event-btn--outline {
    background: #fff;
    color: #003b73;
}

.event-btn--outline:hover,
.event-btn--outline:focus-visible {
    background: #eef6ff;
    color: #003b73;
}

.event-btn--link {
    border-color: transparent;
    background: transparent;
    color: #003b73;
}

.event-btn--link:hover,
.event-btn--link:focus-visible {
    border-color: transparent;
    background: #eef6ff;
    color: #003b73;
}

.event-closed {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8a5a00;
}

.events-page {
    margin: 1.75rem 0 3rem;
}

/* Event list (upcoming / past tabs) beside the calendar (pages/events) */
.events-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 1.5rem;
    align-items: start;
}

.events-panel .events-tabs {
    border-bottom-color: #d6dee6;
}

.events-panel .events-tab span {
    background: #fff;
}

.events-panel {
    padding: 1.25rem;
    border-radius: 14px;
    background: #f1f4f7;
}

.events-panel-title {
    margin: 0 0 1rem;
    text-align: center;
    color: #003b73;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.events-panel-empty {
    margin: 0;
    color: #555;
}

.events-next {
    margin: 0;
    padding: 0;
    list-style: none;
}

.events-next li + li {
    margin-top: 0.6rem;
}

.events-next-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.7rem;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.events-next-item:hover,
.events-next-item:focus-visible {
    background: #eef6ff;
    text-decoration: none;
}

.events-next-date {
    display: flex;
    flex: 0 0 52px;
    flex-direction: column;
    align-items: center;
    padding: 0.3rem 0;
    border-radius: 8px;
    background: #003b73;
    color: #fff;
    line-height: 1.1;
}

.events-next-day {
    font-size: 1.3rem;
    font-weight: 800;
}

.events-next-month {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.events-next-year {
    font-size: 0.65rem;
    opacity: 0.8;
}

.events-next-item.is-past .events-next-date {
    background: #5b6b7b;
}

.events-next-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.events-next-name {
    color: #003b73;
    font-weight: 700;
    line-height: 1.3;
}

.events-next-meta {
    display: flex;
    gap: 0.35rem;
    align-items: baseline;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: #555;
}

.events-next-meta svg {
    flex: 0 0 auto;
    position: relative;
    top: 2px;
    color: #003b73;
}

.events-calendar .fc-event-venue {
    font-size: 0.92em;
    line-height: 1.25;
    opacity: 0.9;
    white-space: normal;
}

/* map pin before the venue, in the event's text colour */
.events-calendar .fc-event-venue::before {
    content: "";
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-right: 0.2em;
    vertical-align: -0.05em;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.events-calendar {
    --fc-border-color: #d6dee6;
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: #f7f9fb;
    --fc-today-bg-color: #fdf3d6;
    --fc-button-bg-color: #2c3e50;
    --fc-button-border-color: #2c3e50;
    --fc-button-hover-bg-color: #1f2d3a;
    --fc-button-hover-border-color: #1f2d3a;
    --fc-button-active-bg-color: #003b73;
    --fc-button-active-border-color: #003b73;
    --fc-event-bg-color: #003b73;
    --fc-event-border-color: #003b73;
    --fc-now-indicator-color: #c8102e;
    font-size: 0.95rem;
}

.events-calendar .fc-toolbar-title {
    color: #1f2937;
    font-size: 1.2rem;
    font-weight: 800;
}

.events-calendar .fc-button {
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
}

.events-calendar .fc-scrollgrid {
    background: #fff;
}

.events-calendar .fc-col-header-cell-cushion,
.events-calendar .fc-daygrid-day-number {
    color: #1f2937;
    text-decoration: none;
}

.events-calendar .fc-event {
    cursor: pointer;
}

/* month view: each event a coloured bar, time then title, wrapping instead of being cut off */
.events-calendar .fc-daygrid-block-event .fc-event-main-frame {
    flex-wrap: wrap;
}

.events-calendar .fc-daygrid-block-event .fc-event-time {
    font-weight: 700;
}

.events-calendar .fc-daygrid-block-event .fc-event-title {
    white-space: normal;
    line-height: 1.25;
}

.events-calendar .is-past {
    opacity: 0.6;
}

@media (max-width: 991.98px) {
    .events-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .events-panel {
        padding: 1rem 0.6rem;
    }

    .events-calendar .fc-header-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .events-calendar .fc-toolbar-title {
        font-size: 1.05rem;
    }

    .events-calendar {
        font-size: 0.8rem;
    }
}

.events-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #dfe6ee;
}

.events-tab {
    margin-bottom: -2px;
    padding: 0.6rem 1.1rem;
    border-bottom: 3px solid transparent;
    color: #444;
    font-weight: 700;
    text-decoration: none;
}

.events-tab span {
    margin-left: 0.3rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #eef3f7;
    font-size: 0.8rem;
}

.events-tab.is-active,
.events-tab:hover {
    border-bottom-color: #003b73;
    color: #003b73;
    text-decoration: none;
}

.events-pagination {
    margin-top: 1.5rem;
}

.event-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
    gap: 2rem;
    margin: 2rem 0 3rem;
    align-items: start;
}

.event-detail-summary {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
}

.event-detail-poster {
    display: block;
    max-width: 100%;
    margin-top: 1.5rem;
    border-radius: 10px;
}

.event-detail-info {
    position: sticky;
    top: 1rem;
    padding: 1.25rem;
    border: 1px solid #dfe6ee;
    border-radius: 14px;
    background: #f7faff;
}

.event-detail-info dt {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #003b73;
}

.event-detail-info dd {
    margin: 0 0 0.9rem;
}

.event-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

@media (max-width: 991.98px) {
    .event-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .event-detail-info {
        position: static;
        order: -1;
    }
}
/* ===== Terbitan: PDF buttons on a publication card (components/card-group) ===== */
.card-footer-pdf {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.card-footer-pdf .btn {
    flex: 1 1 auto;
}

.card-file-info {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}
/* ===== Section landing pages: sub-pages from the menu (components/subpage-cards) ===== */
.subpage-cards {
    margin: 0.5rem 0 1.5rem;
}

.subpage-cards-heading {
    margin: 0 0 1rem;
    color: #003b73;
    font-size: 1.35rem;
    font-weight: 800;
}

.subpage-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.subpage-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.1rem 1.25rem;
    border: 1px solid #dfe6ee;
    border-top: 4px solid #003b73;
    border-radius: 12px;
    background: #fff;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 59, 115, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.subpage-card:hover,
.subpage-card:focus-visible {
    color: #333;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 59, 115, 0.14);
    transform: translateY(-2px);
}

.subpage-card-title {
    color: #003b73;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.subpage-card-text {
    margin-top: 0.4rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.subpage-card-more {
    margin-top: auto;
    padding-top: 0.75rem;
    color: #003b73;
    font-size: 0.9rem;
    font-weight: 700;
}
/* ===== Carian laman: bar above the menu (components/navbar) and /carian results ===== */
.site-topbar {
    background: #003b73;
}

.site-topbar-inner {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    padding-bottom: 8px;
}

.site-search-pill {
    display: flex;
    align-items: center;
    width: min(280px, 100%);
    height: 38px;
    margin: 0;
    padding: 0 6px 0 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.site-search-pill input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 1rem;
    outline: none;
}

.site-search-pill input::placeholder {
    color: #9aa5b5;
}

/* hide the browser's own clear button; the pill stays clean like the design */
.site-search-pill input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.site-search-pill button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7a8c;
    cursor: pointer;
}

.site-search-pill button:hover,
.site-search-pill button:focus-visible {
    background: #eef3f7;
    color: #003b73;
}

.site-search-pill:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

@media (max-width: 575.98px) {
    .site-search-pill {
        width: 100%;
    }
}

.site-search {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.site-search-form {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.site-search-form input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 1.1rem;
    border: 2px solid #d6dee6;
    border-radius: 999px;
    font-size: 1.05rem;
}

.site-search-form input:focus {
    border-color: #003b73;
    outline: none;
}

.site-search-form button {
    padding: 0 1.75rem;
    border: 0;
    border-radius: 999px;
    background: #003b73;
    color: #fff;
    font-weight: 700;
}

.site-search-form button:hover,
.site-search-form button:focus-visible {
    background: #00284f;
}

.site-search-message {
    margin: 0 0 1.25rem;
    color: #444;
}

.site-search-message.is-error {
    color: #b42318;
    font-weight: 600;
}

.site-search-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.site-search-group {
    margin-bottom: 2rem;
    scroll-margin-top: 1rem;
}

.site-search-group-title {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #dfe6ee;
    color: #003b73;
    font-size: 1.3rem;
    font-weight: 800;
}

.site-search-group-title span {
    padding: 0 0.55rem;
    border-radius: 999px;
    background: #eef3f7;
    color: #444;
    font-size: 0.85rem;
}

.site-search-results {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-search-result {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eef1f4;
}

.site-search-result-title {
    color: #003b73;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.site-search-result-title:hover,
.site-search-result-title:focus-visible {
    text-decoration: underline;
}

.site-search-result-meta {
    display: block;
    margin-top: 0.15rem;
    color: #5b6b7b;
    font-size: 0.85rem;
}

.site-search-result-text {
    margin: 0.3rem 0 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.55;
}

.site-search mark {
    padding: 0 0.1em;
    border-radius: 3px;
    background: #fff1a8;
    color: inherit;
}

.site-search-koha {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: #f1f4f7;
}

.site-search-koha a {
    color: #003b73;
    font-weight: 700;
}
/* ===== Buttons in the site theme =====
   The Bootstrap Package theme's own buttons (brown btn-secondary, green
   btn-primary, grey btn-default) restyled like the rest of the site (Cari,
   Daftar, Lihat semua): navy #003b73, rounded ends, bold. btn-primary and
   btn-secondary are solid; btn-default is the outlined second choice. */
.btn-primary,
.btn-secondary,
.btn-default {
    --bs-btn-padding-x: 1.2rem;
    --bs-btn-padding-y: 0.45rem;
    --bs-btn-font-weight: 700;
    --bs-btn-border-width: 2px;
    --bs-btn-border-radius: 999px;
    --bs-btn-focus-shadow-rgb: 0, 59, 115;
    --bs-btn-disabled-opacity: 0.55;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.btn-primary,
.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #003b73;
    --bs-btn-border-color: #003b73;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #00284f;
    --bs-btn-hover-border-color: #00284f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #00284f;
    --bs-btn-active-border-color: #00284f;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #003b73;
    --bs-btn-disabled-border-color: #003b73;
}

.btn-default {
    --bs-btn-color: #003b73;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #003b73;
    --bs-btn-hover-color: #003b73;
    --bs-btn-hover-bg: #eef6ff;
    --bs-btn-hover-border-color: #003b73;
    --bs-btn-active-color: #003b73;
    --bs-btn-active-bg: #dcecff;
    --bs-btn-active-border-color: #003b73;
    --bs-btn-disabled-color: #003b73;
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: #003b73;
}

/* The cookie bar is dark, so its button is the inverted version: white, navy text */
.cc-btn.cc-dismiss,
.cc-btn.cc-allow {
    --bs-btn-color: #003b73;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-hover-color: #003b73;
    --bs-btn-hover-bg: #dcecff;
    --bs-btn-hover-border-color: #dcecff;
    --bs-btn-active-color: #003b73;
    --bs-btn-active-bg: #dcecff;
    --bs-btn-active-border-color: #dcecff;
    border-radius: 999px;
    font-weight: 700;
}
/* ===== Program Perpustakaan and Media (pages/program, pages/media-videos) ===== */
.gallery-page {
    margin: 1.75rem auto 3rem;
}

.gallery-page-summary {
    margin: 0 0 1rem;
    color: #5b6b7b;
    font-size: 0.95rem;
}

.album-grid,
.video-grid {
    display: grid;
    gap: 1.5rem;
}

.album-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.video-grid {
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

.album-card,
.video-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dfe6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 59, 115, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.album-card:hover,
.video-card:hover {
    box-shadow: 0 10px 24px rgba(0, 59, 115, 0.14);
    transform: translateY(-2px);
}

.album-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef3f7;
}

.album-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.album-card-cover:hover img,
.album-card-cover:focus-visible img {
    transform: scale(1.04);
}

.album-card-count {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 25, 50, 0.75);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.album-card-open {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 59, 115, 0.45);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.album-card-cover:hover .album-card-open,
.album-card-cover:focus-visible .album-card-open {
    opacity: 1;
}

.album-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem 1.1rem 1.1rem;
}

.album-card-title,
.video-card-title {
    margin: 0;
    color: #003b73;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.album-card-date {
    margin: 0.25rem 0 0;
    color: #5b6b7b;
    font-size: 0.85rem;
}

.album-card-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.85rem;
}

.album-card-thumbs a {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: #eef3f7;
}

.album-card-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.album-card-thumbs a:hover img {
    opacity: 0.85;
}

.album-card-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 25, 50, 0.6);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

/* the video sits inside the 16:9 box, so an upright phone video cannot stretch the card */
.video-card-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-card-player video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-card-title {
    padding: 0.9rem 1.1rem 1.1rem;
}

@media (max-width: 575.98px) {
    .album-grid,
    .video-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* ===== CARIAN PERPUSTAKAAN MBIP results (components/discovery-results) ===== */
.mbip-search-results:empty {
    display: none;
}

.discovery-results {
    margin-top: 1.75rem;
    text-align: left;
}

.discovery-message {
    margin: 0.5rem 0;
    color: #5b6b7b;
    text-align: center;
}

.discovery-message.is-error {
    color: #b42318;
}

.discovery-section + .discovery-section {
    margin-top: 1.75rem;
}

.discovery-section-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: baseline;
    margin-bottom: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #dfe6ee;
}

.discovery-section-head h3 {
    margin: 0;
    color: #003b73;
    font-size: 1.1rem;
    font-weight: 800;
}

.discovery-count,
.discovery-note {
    color: #5b6b7b;
    font-size: 0.85rem;
}

.discovery-books {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.discovery-book {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.discovery-book img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #eef3f7;
    box-shadow: 0 4px 12px rgba(0, 25, 50, 0.15);
    transition: transform 0.2s ease;
}

.discovery-book:hover img,
.discovery-book:focus-visible img {
    transform: translateY(-3px);
}

.discovery-book-title {
    display: -webkit-box;
    margin-top: 0.5rem;
    overflow: hidden;
    color: #003b73;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.discovery-book-meta {
    margin-top: 0.2rem;
    overflow: hidden;
    color: #5b6b7b;
    font-size: 0.78rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.discovery-more {
    display: inline-block;
    margin-top: 0.9rem;
    color: #003b73;
    font-weight: 700;
}

.discovery-portal {
    margin: 0;
    padding: 0;
    list-style: none;
}

.discovery-portal li {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.45rem 0;
    border-bottom: 1px solid #eef1f4;
}

.discovery-portal-group {
    flex: 0 0 auto;
    padding: 0.05rem 0.55rem;
    border-radius: 999px;
    background: #eef3f7;
    color: #003b73;
    font-size: 0.75rem;
    font-weight: 700;
}

.discovery-portal a {
    color: #1f2937;
    font-weight: 600;
}

.discovery-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.discovery-link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dfe6ee;
    border-radius: 10px;
    color: #1f2937;
    text-decoration: none;
}

.discovery-link strong {
    color: #003b73;
}

.discovery-link span {
    color: #5b6b7b;
    font-size: 0.85rem;
}

.discovery-link:hover,
.discovery-link:focus-visible {
    border-color: #003b73;
    background: #f5f9ff;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .discovery-books {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    .discovery-books {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}