/* =============================================================================
   MuCOHAS e-Library — modern public-site design layer
   Loaded last on public/ pages. Keeps the brand blue / green / yellow and adds
   a modern type scale, glass navbar, hero search, quick-access tiles, dark mode.
   Dark mode uses Bootstrap's native data-bs-theme="dark" on <html>.
   ============================================================================= */

:root {
    --ml-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --ml-font-display: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;

    --ml-brand: #1454a8;
    --ml-brand-deep: #0b2f66;
    --ml-brand-soft: #e8f0fb;
    --ml-green: #22a047;
    --ml-green-soft: #e6f6ec;
    --ml-yellow: #f4c430;
    --ml-yellow-soft: #fff7dc;

    --ml-bg: #f5f7fb;
    --ml-surface: #ffffff;
    --ml-surface-2: #f0f4fa;
    --ml-text: #0f172a;
    --ml-muted: #5b6b82;
    --ml-border: #e3e9f3;

    --ml-radius: 18px;
    --ml-radius-sm: 12px;
    --ml-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 8px rgba(15, 23, 42, .05);
    --ml-shadow: 0 10px 30px -12px rgba(11, 47, 102, .22);
    --ml-shadow-lg: 0 24px 48px -18px rgba(11, 47, 102, .35);
    --ml-ease: cubic-bezier(.22, .8, .24, 1);
}

[data-bs-theme="dark"] {
    --ml-brand-soft: rgba(30, 111, 212, .16);
    --ml-green-soft: rgba(34, 160, 71, .16);
    --ml-yellow-soft: rgba(244, 196, 48, .12);
    --ml-bg: #0a1220;
    --ml-surface: #111c30;
    --ml-surface-2: #16233b;
    --ml-text: #e8eefb;
    --ml-muted: #9fb0cc;
    --ml-border: #22324f;
    --ml-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --ml-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --ml-shadow-lg: 0 24px 48px -18px rgba(0, 0, 0, .7);
}

/* ---------- Base ---------- */
html body {
    font-family: var(--ml-font);
    background: var(--ml-bg);
    color: var(--ml-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
html { scroll-padding-top: 90px; }
a { text-underline-offset: 3px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--ml-yellow);
    outline-offset: 2px;
    border-radius: 8px;
}

.ml-skip {
    position: fixed; left: 12px; top: -60px; z-index: 2000;
    background: var(--ml-yellow); color: #0b1b36; font-weight: 700;
    padding: .6rem 1rem; border-radius: 10px; transition: top .2s;
}
.ml-skip:focus { top: 12px; color: #0b1b36; }

.text-primary { color: var(--ml-brand) !important; }
[data-bs-theme="dark"] .text-primary { color: #6aa5f5 !important; }
.text-muted { color: var(--ml-muted) !important; }
[data-bs-theme="dark"] .bg-light { background: var(--ml-surface-2) !important; color: var(--ml-text) !important; }

/* ---------- Buttons ---------- */
html body .btn {
    border-radius: 12px; font-weight: 600; letter-spacing: .005em;
    padding: .6rem 1.15rem;
    transition: transform .2s var(--ml-ease), box-shadow .2s var(--ml-ease), background-color .2s;
}
html body .btn-lg { padding: .8rem 1.5rem; border-radius: 14px; }
html body .btn-sm { padding: .4rem .8rem; border-radius: 10px; }
html body .btn:hover { transform: translateY(-1px); }
html body .btn-primary {
    background: linear-gradient(135deg, var(--ml-brand) 0%, #1e6fd4 100%) !important;
    border: 0 !important;
    box-shadow: 0 8px 18px -8px rgba(20, 84, 168, .7);
}
html body .btn-primary:hover { box-shadow: 0 12px 22px -8px rgba(20, 84, 168, .8); }
html body .btn-success {
    background: linear-gradient(135deg, #1a8038, var(--ml-green)) !important; border: 0 !important;
}
html body .btn-outline-primary { border-width: 1.5px; }
.btn-ml-yellow { background: var(--ml-yellow); color: #0b1b36; border: 0; }
.btn-ml-yellow:hover { background: #ffd24d; color: #0b1b36; }
.btn-ml-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-ml-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- Forms ---------- */
html body input[type="search"] { box-sizing: border-box; -webkit-appearance: none; appearance: none; }
html body .form-control, html body .form-select {
    border-radius: 12px; border: 1.5px solid var(--ml-border);
    background-color: var(--ml-surface); color: var(--ml-text);
    padding: .65rem .95rem;
}
html body .form-control:focus, html body .form-select:focus {
    border-color: var(--ml-brand);
    box-shadow: 0 0 0 4px rgba(20, 84, 168, .15);
}

/* ---------- Navbar ---------- */
.navbar-spacer { height: 72px !important; }
html body .navbar-modern {
    background: rgba(8, 36, 82, .88) !important;
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid rgba(255,255,255,.1) !important;
    box-shadow: none; padding: .55rem 0;
    transition: padding .25s var(--ml-ease), box-shadow .25s, background .25s;
}
html body .navbar-modern.is-scrolled {
    padding: .3rem 0; box-shadow: 0 10px 30px -12px rgba(0,0,0,.55);
    background: rgba(6, 28, 66, .96) !important;
}
.navbar-modern .mucohas-stripe { height: 3px; }
.navbar-modern .navbar-brand-text span:first-child {
    font-family: var(--ml-font-display); font-weight: 800; letter-spacing: .02em;
}
.navbar-modern .nav-link {
    color: rgba(255,255,255,.82) !important; font-weight: 600; font-size: .92rem;
    border-radius: 999px; padding: .5rem .95rem !important; margin: 0 .1rem;
    display: inline-flex; align-items: center; gap: .4rem; position: relative; white-space: nowrap;
}
/* six menu items plus status, theme and sign-in: tighten between laptop and wide-desktop widths so labels stay on one line */
@media (min-width: 992px) and (max-width: 1599.98px) {
    .navbar-modern .nav-link { padding: .5rem .65rem !important; font-size: .88rem; gap: .3rem; margin: 0; }
    .navbar-modern .ml-nav-status { padding: .3rem .65rem; }
}
@media (min-width: 992px) and (max-width: 1499.98px) {
    .navbar-modern .nav-link > i { display: none; }
    .navbar-modern .ml-nav-status { display: none !important; }
    .navbar-modern .navbar-nav { flex-wrap: nowrap; min-width: 0; }
    .navbar-modern .btn-signin { padding-left: .8rem !important; padding-right: .8rem !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-modern .navbar-brand-text { display: none !important; }
}
@media (min-width: 1500px) {
    .navbar-modern .ml-nav-status { display: inline-flex !important; }
}
.navbar-modern .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.1); }
.navbar-modern .nav-link.active {
    color: #fff !important; background: rgba(255,255,255,.14);
}
.navbar-modern .nav-link.active::after {
    content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 3px;
    margin-left: -9px; border-radius: 3px; background: var(--ml-yellow);
}
.navbar-modern .dropdown-menu {
    border: 1px solid var(--ml-border); border-radius: 16px; padding: .5rem;
    box-shadow: var(--ml-shadow-lg); background: var(--ml-surface); margin-top: .6rem;
}
.navbar-modern .dropdown-item { border-radius: 10px; padding: .55rem .8rem; font-weight: 500; color: var(--ml-text); }
.navbar-modern .dropdown-item:hover { background: var(--ml-brand-soft); color: var(--ml-brand); }
.navbar-modern .dropdown-item i { color: var(--ml-brand); }
.ml-nav-actions { display: flex; align-items: center; gap: .35rem; }
.ml-nav-status {
    align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    color: #bbf7d0; background: rgba(34,160,71,.22); border: 1px solid rgba(125,255,165,.35); text-decoration: none;
}
.ml-nav-status .ml-dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffa5; box-shadow: 0 0 0 3px rgba(125,255,165,.25); animation: ml-pulse 2s infinite; }
.ml-nav-status.is-closed { color: #fecaca; background: rgba(220,53,69,.2); border-color: rgba(255,138,138,.35); }
.ml-nav-status.is-closed .ml-dot { background: #ff8a8a; box-shadow: 0 0 0 3px rgba(255,138,138,.25); animation: none; }
.ml-nav-status:hover { color: #fff; }
@keyframes ml-pulse { 50% { box-shadow: 0 0 0 6px rgba(125,255,165,0); } }
.ml-icon-btn {
    width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer; transition: background .2s;
}
.ml-icon-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.navbar-modern .btn-signin {
    background: var(--ml-yellow); color: #0b1b36 !important; border-radius: 999px;
    padding: .45rem 1.05rem !important; font-weight: 700;
}
.navbar-modern .btn-signin:hover { background: #ffd24d; }
.navbar-modern .btn-signin.active::after { display: none; }
@media (max-width: 991.98px) {
    .navbar-modern .navbar-collapse {
        margin-top: .6rem; padding: .75rem; border-radius: 16px; background: rgba(255,255,255,.07);
    }
    .navbar-modern .nav-link { padding: .7rem .9rem !important; }
    .navbar-modern .nav-link.active::after { display: none; }
    .ml-nav-actions { margin-top: .5rem; }
}

/* ---------- Reveal animation ---------- */
.ml-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ml-ease), transform .6s var(--ml-ease); }
.ml-reveal.is-visible { opacity: 1; transform: none; }
.ml-reveal[data-delay="1"] { transition-delay: .08s; }
.ml-reveal[data-delay="2"] { transition-delay: .16s; }
.ml-reveal[data-delay="3"] { transition-delay: .24s; }

/* ---------- Home hero ---------- */
.ml-hero {
    position: relative; isolation: isolate; color: #fff; overflow: hidden;
    padding: 3.5rem 0 7rem;
    background: #0b2f66 url('../images/slide/slide1.jpg') center / cover no-repeat;
}
.ml-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(900px 420px at 12% 8%, rgba(34,160,71,.35), transparent 60%),
        radial-gradient(800px 480px at 95% 90%, rgba(244,196,48,.22), transparent 60%),
        linear-gradient(135deg, rgba(8,36,82,.94), rgba(20,84,168,.84) 55%, rgba(6,28,66,.92));
}
.ml-hero__eyebrow {
    display: inline-flex; align-items: center; gap: .55rem; font-size: .8rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--ml-yellow);
}
.ml-hero__eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--ml-yellow); border-radius: 2px; }
.ml-hero .ml-hero__title {
    font-family: var(--ml-font-display); font-weight: 800; color: #fff !important;
    font-size: clamp(2rem, 4.4vw, 3.4rem) !important; line-height: 1.12 !important; letter-spacing: -.02em;
    margin: .9rem 0 1rem;
}
.ml-hero .ml-hero__title em { font-style: normal; color: var(--ml-yellow); }
.ml-hero .ml-hero__lead { color: rgba(255,255,255,.86) !important; font-size: 1.125rem; max-width: 36rem; }
.ml-status {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem; border-radius: 999px;
    font-size: .82rem; font-weight: 600; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
}
.ml-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #7dffa5; box-shadow: 0 0 0 4px rgba(125,255,165,.2); }
.ml-status.is-closed::before { background: #ff8a8a; box-shadow: 0 0 0 4px rgba(255,138,138,.2); }

.ml-search {
    display: flex; align-items: center; gap: .5rem; background: var(--ml-surface); border-radius: 18px;
    padding: .45rem .45rem .45rem 1.1rem; box-shadow: var(--ml-shadow-lg); max-width: 38rem; margin-top: 1.5rem;
}
.ml-search > i { color: var(--ml-muted); font-size: 1.15rem; }
.ml-search input {
    flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent !important;
    color: var(--ml-text); font-size: 1.02rem; padding: .7rem .4rem !important;
}
.ml-search input::placeholder { color: var(--ml-muted); }
.ml-search .btn { border-radius: 13px; padding: .75rem 1.4rem; white-space: nowrap; }
.ml-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; align-items: center; }
.ml-chips__label { font-size: .8rem; color: rgba(255,255,255,.7); font-weight: 600; }
.ml-chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px;
    font-size: .82rem; font-weight: 600; text-decoration: none; transition: all .2s;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff;
}
.ml-chip:hover { background: #fff; color: var(--ml-brand); }

.ml-glass {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-radius: 22px; padding: 1.4rem; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5);
}
.ml-glass__logo { width: 76px; height: 76px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); object-fit: contain; background: rgba(255,255,255,.08); }
.ml-glass__title { font-family: var(--ml-font-display); font-weight: 700; font-size: 1.05rem !important; color: #fff; margin: .8rem 0 .15rem; }
.ml-glass__motto { color: var(--ml-yellow); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.ml-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.1rem; }
.ml-stat { text-align: center; padding: .8rem .4rem; border-radius: 14px; background: rgba(255,255,255,.1); }
.ml-stat b { display: block; font-family: var(--ml-font-display); font-size: 1.6rem; line-height: 1.1; color: #fff; font-weight: 800; }
.ml-stat span { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 600; }
.ml-hours { display: flex; align-items: center; gap: .7rem; margin-top: .9rem; padding: .75rem .9rem; border-radius: 14px; background: rgba(255,255,255,.1); font-size: .9rem; }
.ml-hours i { color: var(--ml-yellow); font-size: 1.2rem; }
.ml-hours small { display: block; color: rgba(255,255,255,.7); }

/* ---------- Quick access tiles (overlap the hero) ---------- */
.ml-tiles { margin-top: -4.2rem; position: relative; z-index: 3; }
.ml-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; height: 100%;
    background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: var(--ml-radius);
    padding: 1.15rem 1.1rem; text-decoration: none; color: var(--ml-text);
    box-shadow: var(--ml-shadow-sm); transition: transform .25s var(--ml-ease), box-shadow .25s, border-color .25s;
}
.ml-tile:hover { transform: translateY(-6px); box-shadow: var(--ml-shadow-lg); border-color: transparent; color: var(--ml-text); }
.ml-tile__icon {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem;
    background: var(--ml-brand-soft); color: var(--ml-brand);
}
.ml-tile--green .ml-tile__icon { background: var(--ml-green-soft); color: var(--ml-green); }
.ml-tile--yellow .ml-tile__icon { background: var(--ml-yellow-soft); color: #b58900; }
.ml-tile__title { font-weight: 700; font-size: .98rem; line-height: 1.2; }
.ml-tile__sub { font-size: .8rem; color: var(--ml-muted); line-height: 1.35; }
.ml-tile__arrow { margin-top: auto; color: var(--ml-brand); font-size: 1rem; transition: transform .2s; }
.ml-tile:hover .ml-tile__arrow { transform: translateX(4px); }

/* ---------- Sections ---------- */
.ml-section { padding: 4.5rem 0 0; }
.ml-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.ml-kicker { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ml-green); }
.ml-section-head h2 {
    font-family: var(--ml-font-display); font-weight: 800; letter-spacing: -.015em;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem) !important; margin: .25rem 0 0; color: var(--ml-text);
}
.ml-link { font-weight: 700; text-decoration: none; color: var(--ml-brand); display: inline-flex; align-items: center; gap: .35rem; }
[data-bs-theme="dark"] .ml-link { color: #6aa5f5; }
.ml-link:hover { gap: .6rem; }

/* ---------- Category cards ---------- */
.ml-cat {
    position: relative; display: flex; gap: 1rem; align-items: flex-start; height: 100%;
    background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: var(--ml-radius);
    padding: 1.2rem; text-decoration: none; color: var(--ml-text); box-shadow: var(--ml-shadow-sm);
    transition: transform .25s var(--ml-ease), box-shadow .25s, border-color .25s;
}
.ml-cat:hover { transform: translateY(-5px); box-shadow: var(--ml-shadow-lg); border-color: transparent; color: var(--ml-text); }
.ml-cat__icon {
    flex: 0 0 52px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem;
    background: var(--ml-brand-soft); color: var(--ml-brand);
}
.ml-cat:nth-child(3n+2) .ml-cat__icon, .col-lg-4:nth-child(3n+2) .ml-cat__icon { background: var(--ml-green-soft); color: var(--ml-green); }
.col-lg-4:nth-child(3n+3) .ml-cat__icon { background: var(--ml-yellow-soft); color: #b58900; }
.ml-cat__name { font-weight: 700; font-size: 1.02rem !important; margin: 0 0 .15rem; line-height: 1.25; color: var(--ml-text); }
.ml-cat__desc { font-size: .86rem; color: var(--ml-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ml-cat__count { display: inline-block; margin-top: .55rem; font-size: .75rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px; background: var(--ml-surface-2); color: var(--ml-muted); }
.ml-cat__code { position: absolute; top: .9rem; right: 1rem; font-size: .7rem; font-weight: 700; color: var(--ml-muted); }

/* ---------- Book cards ---------- */
.ml-book {
    display: flex; flex-direction: column; height: 100%; background: var(--ml-surface); border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius); overflow: hidden; box-shadow: var(--ml-shadow-sm);
    transition: transform .25s var(--ml-ease), box-shadow .25s, border-color .25s;
}
.ml-book:hover { transform: translateY(-6px); box-shadow: var(--ml-shadow-lg); border-color: transparent; }
.ml-book__cover {
    position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
    background: linear-gradient(135deg, #0b2f66, #1454a8 60%, #22a047);
}
.ml-book__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ml-ease); }
.ml-book:hover .ml-book__cover img { transform: scale(1.06); }
.ml-book__cover > i { font-size: 3.4rem; color: rgba(255,255,255,.85); }
.ml-book__type {
    position: absolute; top: .7rem; left: .7rem; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: .25rem .6rem; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--ml-brand);
}
.ml-book__type.is-ebook { color: #15803d; }
.ml-book__types { position: absolute; top: .7rem; left: .7rem; right: .7rem; display: flex; flex-wrap: wrap; gap: .35rem; pointer-events: none; }
.ml-book__types .ml-book__type { position: static; }
.ml-book__body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.ml-book__title {
    font-weight: 700; font-size: 1.02rem !important; line-height: 1.3 !important; margin: 0; color: var(--ml-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ml-book__meta { font-size: .84rem; color: var(--ml-muted); display: flex; gap: .45rem; align-items: center; }
.ml-book__meta i { color: var(--ml-brand); }
.ml-book__foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.ml-pill { font-size: .72rem; font-weight: 700; padding: .22rem .65rem; border-radius: 999px; }
.ml-pill--ok { background: var(--ml-green-soft); color: #15803d; }
.ml-pill--no { background: #fde8e8; color: #b42318; }
[data-bs-theme="dark"] .ml-pill--no { background: rgba(220,53,69,.18); color: #ff9aa5; }
[data-bs-theme="dark"] .ml-pill--ok { color: #6ee7a0; }
.ml-pill--info { background: var(--ml-brand-soft); color: var(--ml-brand); }
[data-bs-theme="dark"] .ml-pill--info { color: #8db9f8; }
.ml-book .stretched-link::after { border-radius: var(--ml-radius); }

/* ---------- Inner page hero + breadcrumb ---------- */
.ml-page-hero {
    position: relative; isolation: isolate; color: #fff; padding: 2.6rem 0 3.4rem; overflow: hidden;
    background: linear-gradient(135deg, #0b2f66, #1454a8 60%, #187a3a);
}
.ml-page-hero::after {
    content: ""; position: absolute; z-index: -1; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(244,196,48,.35), transparent 65%);
}
.ml-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 .8rem; font-size: .84rem; }
.ml-crumbs a { color: rgba(255,255,255,.8); text-decoration: none; }
.ml-crumbs a:hover { color: #fff; text-decoration: underline; }
.ml-crumbs li + li::before { content: "/"; margin-right: .4rem; color: rgba(255,255,255,.45); }
.ml-crumbs li[aria-current] { color: var(--ml-yellow); font-weight: 600; }
.ml-page-hero .ml-page-title {
    font-family: var(--ml-font-display); font-weight: 800; letter-spacing: -.02em; color: #fff !important;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem) !important; margin: 0 0 .4rem;
}
.ml-page-hero p { color: rgba(255,255,255,.85); margin: 0; max-width: 40rem; }
.ml-page-body { margin-top: -1.6rem; position: relative; z-index: 2; padding-bottom: 1rem; }

/* ---------- Toolbar, filters ---------- */
.ml-panel { background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: var(--ml-radius); box-shadow: var(--ml-shadow-sm); }
.ml-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; padding: .85rem; }
.ml-toolbar .ml-search-inline { position: relative; flex: 1 1 260px; }
.ml-toolbar .ml-search-inline i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ml-muted); }
.ml-toolbar .ml-search-inline input { padding-left: 2.6rem; }
.ml-result-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 1rem; color: var(--ml-muted); font-size: .92rem; }
.ml-result-meta b { color: var(--ml-text); }
.ml-active-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.ml-filter-chip {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; text-decoration: none;
    padding: .28rem .7rem; border-radius: 999px; background: var(--ml-brand-soft); color: var(--ml-brand);
}
[data-bs-theme="dark"] .ml-filter-chip { color: #8db9f8; }
.ml-filter-chip:hover { background: var(--ml-brand); color: #fff; }
.ml-side { padding: 1.1rem; position: sticky; top: 92px; }
.ml-side h2, .ml-side h3 { font-size: .78rem !important; letter-spacing: .12em; text-transform: uppercase; color: var(--ml-muted); font-weight: 800; margin: 0 0 .7rem; }
.ml-side__list { list-style: none; margin: .7rem 0 0; padding: 0; max-height: 52vh; overflow: auto; }
.ml-side__list a {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .65rem; border-radius: 10px;
    color: var(--ml-text); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.ml-side__list a:hover { background: var(--ml-surface-2); }
.ml-side__list a.is-active { background: var(--ml-brand-soft); color: var(--ml-brand); font-weight: 700; }
[data-bs-theme="dark"] .ml-side__list a.is-active { color: #8db9f8; }
.ml-side__count { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--ml-surface-2); color: var(--ml-muted); }
.ml-empty { text-align: center; padding: 3.5rem 1.5rem; }
.ml-empty i { font-size: 3rem; color: var(--ml-brand); opacity: .8; }
.ml-empty h3 { font-weight: 800; margin: .8rem 0 .3rem; font-size: 1.25rem !important; }

/* ---------- Book detail ---------- */
.ml-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem 1.5rem; margin: 0 0 1.4rem; }
.ml-details dt { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ml-muted); }
.ml-details dd { margin: .15rem 0 0; font-weight: 600; color: var(--ml-text); overflow-wrap: anywhere; }

/* ---------- Portal band & CTA ---------- */
.ml-portals { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.ml-portal {
    display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--ml-radius);
    background: var(--ml-surface); border: 1px solid var(--ml-border); text-decoration: none; color: var(--ml-text);
    transition: transform .25s var(--ml-ease), box-shadow .25s, border-color .25s;
}
.ml-portal:hover { transform: translateY(-4px); box-shadow: var(--ml-shadow); border-color: var(--ml-brand); color: var(--ml-text); }
.ml-portal__icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.2rem; background: var(--ml-brand-soft); color: var(--ml-brand); flex: 0 0 auto; }
.ml-portal--green .ml-portal__icon { background: var(--ml-green-soft); color: var(--ml-green); }
.ml-portal--yellow .ml-portal__icon { background: var(--ml-yellow-soft); color: #b58900; }
.ml-portal--dark .ml-portal__icon { background: var(--ml-surface-2); color: var(--ml-text); }
.ml-portal b { display: block; font-size: .95rem; }
.ml-portal span { font-size: .78rem; color: var(--ml-muted); }
.ml-portal > .bi-arrow-right { margin-left: auto; color: var(--ml-muted); }

.ml-cta {
    position: relative; overflow: hidden; border-radius: 26px; padding: 2.6rem; color: #fff;
    background: linear-gradient(135deg, #0b2f66, #1454a8 55%, #1a8038);
}
.ml-cta::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(244,196,48,.4), transparent 65%); }
.ml-cta h2 { font-family: var(--ml-font-display); font-weight: 800; color: #fff !important; font-size: clamp(1.4rem, 2.6vw, 2rem) !important; }
.ml-cta p { color: rgba(255,255,255,.85); max-width: 34rem; }

/* ---------- Announcements ---------- */
html body .announcement-card {
    border-radius: 16px; background: var(--ml-surface); border: 1px solid var(--ml-border);
    border-left: 4px solid var(--ml-green); box-shadow: var(--ml-shadow-sm);
}
html body .announcement-card.featured { border-left-color: var(--ml-yellow); background: linear-gradient(135deg, var(--ml-yellow-soft), var(--ml-surface) 60%); }
html body .announcement-card h6 { color: var(--ml-text); }

/* ---------- Tables / info cards (library info page) ---------- */
html body .card { background: var(--ml-surface); border-color: var(--ml-border); border-radius: var(--ml-radius); color: var(--ml-text); }
html body .card.shadow-sm { box-shadow: var(--ml-shadow-sm) !important; }
html body .card-header {
    background: linear-gradient(135deg, #0b2f66, #1454a8) !important; border: 0; padding: .95rem 1.25rem;
}
html body .table > :not(caption) > * > * { background-color: transparent; color: var(--ml-text); border-color: var(--ml-border); }
html body .table-primary > td, html body tr.table-primary > td { background: var(--ml-brand-soft) !important; }

/* ---------- Footer ---------- */
html body .footer-modern { background: #061c42; margin-top: 5rem; }
html body .footer-modern .footer-heading { font-family: var(--ml-font-display); font-weight: 700; letter-spacing: .02em; }
html body .footer-social-links a { border-radius: 12px; }
html body .footer-list a { transition: padding-left .2s, color .2s; }
html body .footer-list a:hover { padding-left: 4px; color: var(--ml-yellow); }

/* ---------- Floating: back to top ---------- */
html body .footer-back-top {
    opacity: 0; pointer-events: none; transform: translateY(10px); border-radius: 14px; right: auto; left: 1.2rem; bottom: 1.2rem;
    background: var(--ml-brand); transition: opacity .25s, transform .25s;
}
html body .footer-back-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .ml-hero { padding: 2.2rem 0 6.5rem; }
    .ml-tiles { margin-top: -3.6rem; }
}
@media (max-width: 575.98px) {
    .ml-search { flex-wrap: wrap; padding: .6rem; }
    .ml-search > i { display: none; }
    .ml-search input { flex: 1 1 100%; }
    .ml-search .btn { width: 100%; }
    .ml-section { padding-top: 3.2rem; }
    .ml-cta { padding: 1.8rem 1.4rem; }
    .ml-tile { padding: .95rem; }
}

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

@media print {
    .navbar-modern, .footer-modern, .footer-back-top, .mucohas-support-fab-stack, .ml-icon-btn { display: none !important; }
}

/* ---------- Newer platform features (progressive: ignored by older browsers) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.ml-hero__title, .ml-page-title, .ml-section-head h2, .ml-cta h2 { text-wrap: balance; }
.ml-cat__desc, .ml-hero__lead, .ml-page-hero p { text-wrap: pretty; }
html { color-scheme: light dark; scrollbar-gutter: stable; }
html[data-bs-theme="light"] { color-scheme: light; }
html[data-bs-theme="dark"] { color-scheme: dark; }
html body .navbar-modern { view-transition-name: ml-nav; }
::view-transition-group(ml-nav) { animation-duration: 0s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Library information (hours, holidays, events) ---------- */
.ml-info { padding: 1.4rem 1.5rem 1.2rem; }
.ml-info__head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--ml-border); }
.ml-info__head h2 { margin: 0; font-family: var(--ml-font-display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; color: var(--ml-text); }
.ml-info__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; background: var(--ml-brand-soft); color: var(--ml-brand); flex: 0 0 auto; }
.ml-info__icon.is-green { background: var(--ml-green-soft); color: #15803d; }
.ml-info__icon.is-yellow { background: var(--ml-yellow-soft); color: #a16207; }
.ml-info__empty { margin: .4rem 0 .6rem; color: var(--ml-muted); }

.ml-sched { list-style: none; margin: 0; padding: 0; }
.ml-sched__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .85rem; }
.ml-sched__row:not(:last-child) { border-bottom: 1px dashed var(--ml-border); }
.ml-sched__row.is-today { background: var(--ml-brand-soft); border-bottom-color: transparent; border-radius: 12px; box-shadow: inset 3px 0 0 var(--ml-yellow); }
.ml-sched__day { font-weight: 700; color: var(--ml-text); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ml-sched__day small { flex-basis: 100%; font-weight: 500; color: var(--ml-muted); font-size: .78rem; }
.ml-today { background: var(--ml-yellow); color: #3b2f00; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; }
.ml-sched__time { text-align: right; font-size: .95rem; color: var(--ml-text); white-space: nowrap; }
.ml-sched__time span { color: var(--ml-muted); margin: 0 .15rem; }
.ml-sched__row.is-closed .ml-sched__day { color: var(--ml-muted); }

.ml-dates { list-style: none; margin: 0; padding: 0; }
.ml-dates li { display: flex; gap: 1rem; padding: .85rem 0; }
.ml-dates li + li { border-top: 1px dashed var(--ml-border); }
.ml-date { flex: 0 0 56px; height: 62px; border-radius: 14px; background: linear-gradient(160deg, #1454a8, #0b2f66); color: #fff; display: grid; place-content: center; text-align: center; line-height: 1.05; box-shadow: 0 10px 18px -12px rgba(11,47,102,.8); }
.ml-date b { font-size: 1.35rem; font-family: var(--ml-font-display); }
.ml-date span { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.ml-date.is-yellow { background: linear-gradient(160deg, #f4c430, #e0a800); color: #3b2f00; box-shadow: 0 10px 18px -12px rgba(160,110,0,.8); }
.ml-dates strong { display: block; color: var(--ml-text); font-size: 1rem; }
.ml-dates small { display: block; color: var(--ml-muted); font-size: .82rem; margin-top: .1rem; }
.ml-dates p { margin: .35rem 0 0; font-size: .88rem; color: var(--ml-muted); }
@media (max-width: 575px) { .ml-info { padding: 1.1rem 1rem; } .ml-sched__time { font-size: .88rem; } }
.ml-page-body.ml-page-body--gap { margin-top: 0; padding-top: 2.25rem; padding-bottom: 3rem; }

/* Where to find a book on the shelves */
.ml-findit { display: flex; gap: .85rem; align-items: flex-start; padding: .85rem 1rem; margin: 0 0 1rem; border-radius: 14px; background: linear-gradient(135deg, #fff8e1, #fffdf5); border: 1px solid #f3dd9a; color: #5c4300; }
.ml-findit > i { font-size: 1.4rem; color: #c58b00; line-height: 1.2; }
.ml-findit strong { display: block; color: #3b2f00; }
.ml-findit span { font-size: .92rem; }
[data-bs-theme="dark"] .ml-findit { background: #2a2411; border-color: #5b4a12; color: #f1dca0; }
[data-bs-theme="dark"] .ml-findit strong { color: #ffe9a8; }

/* footer contact lines: icon and text stay together on one line */
html body .footer-list li, html body .footer-list li a { display: flex; align-items: center; gap: .65rem; }
html body .footer-list li a { white-space: nowrap; }
html body .footer-list li i { flex: 0 0 1.2rem; text-align: center; }
html body .footer-list li a[href^="mailto:"] { font-size: .93em; letter-spacing: -.005em; }
@media (max-width: 420px) { html body .footer-list li a[href^="mailto:"] { white-space: normal; overflow-wrap: anywhere; } }
