:root {
    --maroon: #710c20;
    --maroon-dark: #4f0716;
    --maroon-soft: #8f1831;
    --gold: #f4c430;
    --gold-deep: #d6a712;
    --cream: #fffaf0;
    --paper: #f7f4ee;
    --ink: #211b1d;
    --muted: #6f6568;
    --white: #ffffff;
    --border: rgba(113, 12, 32, .12);
    --shadow-sm: 0 10px 30px rgba(62, 13, 27, .08);
    --shadow-lg: 0 24px 65px rgba(62, 13, 27, .16);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: "Poppins", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--maroon); text-decoration: none; transition: .25s ease; }
a:hover { color: var(--maroon-soft); }
::selection { background: var(--gold); color: var(--maroon-dark); }

.skip-link {
    position: fixed;
    top: -80px;
    left: 20px;
    z-index: 9999;
    padding: .8rem 1rem;
    border-radius: 0 0 10px 10px;
    background: var(--gold);
    color: var(--maroon-dark);
    font-weight: 800;
}
.skip-link:focus { top: 0; }

.utility-bar {
    background: var(--maroon-dark);
    color: rgba(255,255,255,.86);
    font-size: .78rem;
}
.utility-bar .container { min-height: 38px; }
.utility-links, .utility-contact { display: flex; align-items: center; gap: 1.05rem; flex-wrap: wrap; }
.utility-bar a { color: rgba(255,255,255,.82); }
.utility-bar a:hover { color: var(--gold); }
.utility-contact i { color: var(--gold); margin-right: .35rem; }

.site-header {
    background: rgba(255,255,255,.97);
    box-shadow: 0 4px 25px rgba(52, 8, 20, .08);
    backdrop-filter: blur(12px);
}
.navbar { min-height: 86px; }
.navbar-brand img { width: 235px; height: auto; }
.navbar-nav { gap: .15rem; }
.navbar .nav-link {
    position: relative;
    color: #382d30;
    padding: .9rem .72rem !important;
    font-weight: 700;
    font-size: .92rem;
}
.navbar .nav-link::after {
    content: "";
    position: absolute;
    right: .72rem;
    bottom: .48rem;
    left: .72rem;
    height: 3px;
    border-radius: 999px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after { transform: scaleX(1); }
.navbar .nav-link.active { color: var(--maroon); }
.dropdown-toggle::after { position: static !important; display: inline-block !important; width: auto !important; height: auto !important; background: none !important; transform: none !important; margin-left: .35rem !important; vertical-align: .18em !important; }
.dropdown-menu {
    border: 0;
    border-top: 4px solid var(--gold);
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow-lg);
    padding: .6rem;
    min-width: 230px;
}
.dropdown-item { border-radius: 9px; padding: .68rem .85rem; font-weight: 600; color: #4a3c40; }
.dropdown-item:hover { background: var(--cream); color: var(--maroon); }
.navbar-toggler { border-color: rgba(113,12,32,.2); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(244,196,48,.35); }

.btn {
    border-radius: 999px;
    padding: .72rem 1.2rem;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-maroon { background: var(--maroon); border: 1px solid var(--maroon); color: #fff; }
.btn-maroon:hover, .btn-maroon:focus { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; box-shadow: 0 10px 25px rgba(113,12,32,.22); }
.btn-gold { background: var(--gold); border: 1px solid var(--gold); color: var(--maroon-dark); }
.btn-gold:hover, .btn-gold:focus { background: #ffd75a; border-color: #ffd75a; color: var(--maroon-dark); box-shadow: 0 10px 25px rgba(244,196,48,.25); }
.btn-outline-light:hover { color: var(--maroon-dark); }
.btn-outline-maroon { border: 1px solid rgba(113,12,32,.24); color: var(--maroon); background: #fff; }
.btn-outline-maroon:hover, .btn-outline-maroon:focus { background: var(--maroon); border-color: var(--maroon); color: #fff; box-shadow: 0 10px 25px rgba(113,12,32,.18); }

.hero {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(90deg, rgba(54,5,16,.96) 0%, rgba(83,7,25,.88) 43%, rgba(83,7,25,.4) 72%, rgba(83,7,25,.2) 100%), url('../img/library-building.jpg') center/cover no-repeat;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 25% 20%, rgba(244,196,48,.2), transparent 22%), linear-gradient(120deg, transparent 65%, rgba(244,196,48,.15));
}
.hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(244,196,48,.28);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(244,196,48,.06), 0 0 0 110px rgba(244,196,48,.04);
}
.hero .container { position: relative; z-index: 2; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--maroon);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 99px; background: var(--gold); }
.hero .eyebrow { color: var(--gold); }
.hero h1, .page-hero h1, .display-title {
    font-family: "Merriweather", Georgia, serif;
    font-weight: 900;
    letter-spacing: -.035em;
}
.hero h1 { max-width: 850px; margin: 1rem 0 1.25rem; font-size: clamp(2.85rem, 6vw, 5.7rem); line-height: 1.03; }
.hero h1 span { color: var(--gold); }
.hero .lead { max-width: 700px; color: rgba(255,255,255,.85); font-size: 1.12rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-note { display: inline-flex; align-items: center; gap: .75rem; margin-top: 2rem; color: rgba(255,255,255,.78); font-size: .88rem; }
.hero-note i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); color: var(--gold); }

.opac-panel-wrap { position: relative; z-index: 5; margin-top: 0; padding: 46px 0 10px; background: var(--cream); }
.opac-panel {
    position: relative;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    padding: 1.6rem;
    border: 1px solid rgba(113,12,32,.08);
}
.opac-panel .panel-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--cream); color: var(--maroon); font-size: 1.4rem; }
.form-control, .form-select {
    min-height: 52px;
    border: 1px solid #dfd7d9;
    border-radius: 12px;
    padding: .7rem .9rem;
}
.form-control:focus, .form-select:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 .24rem rgba(244,196,48,.22); }

.section { padding: 96px 0; }
.section-sm { padding: 68px 0; }
.section-paper { background: var(--paper); }
.section-cream { background: var(--cream); }
.section-heading { max-width: 760px; margin-bottom: 3rem; }
.section-heading h2 { margin: .75rem 0 1rem; color: var(--maroon-dark); font-family: "Merriweather", Georgia, serif; font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 900; letter-spacing: -.035em; }
.section-heading p { color: var(--muted); font-size: 1.05rem; }

.quick-grid { margin-top: 2rem; }
.quick-card {
    position: relative;
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.quick-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -35px; bottom: -42px; border-radius: 50%; background: rgba(244,196,48,.15); transition: transform .35s ease; }
.quick-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: rgba(113,12,32,.2); }
.quick-card:hover::after { transform: scale(1.25); }
.quick-card .icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: var(--maroon); background: var(--cream); font-size: 1.6rem; }
.quick-card h3 { color: var(--maroon-dark); font-size: 1.2rem; font-weight: 800; }
.quick-card p { color: var(--muted); font-size: .92rem; }
.quick-card .arrow { color: var(--maroon); font-weight: 800; }

.welcome-image { position: relative; }
.welcome-image img { width: 100%; min-height: 520px; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-lg); }
.welcome-image::before { content: ""; position: absolute; z-index: -1; left: -22px; top: 24px; width: 86%; height: 95%; border-radius: 28px; background: var(--gold); }
.floating-quote { position: absolute; right: -35px; bottom: 35px; max-width: 290px; padding: 1.35rem; border-radius: 18px; background: var(--maroon); color: #fff; box-shadow: var(--shadow-lg); }
.floating-quote i { color: var(--gold); font-size: 1.5rem; }
.floating-quote p { margin: .45rem 0 0; font-family: "Merriweather", Georgia, serif; font-size: 1rem; line-height: 1.55; }

.feature-list { display: grid; gap: 1rem; margin-top: 1.75rem; }
.feature-item { display: flex; align-items: flex-start; gap: 1rem; }
.feature-item i { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--cream); color: var(--maroon); font-size: 1.1rem; }
.feature-item strong { display: block; color: var(--maroon-dark); }
.feature-item span { color: var(--muted); font-size: .92rem; }

.collection-card, .service-card, .news-card, .download-card, .staff-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.collection-card:hover, .service-card:hover, .news-card:hover, .download-card:hover, .staff-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(113,12,32,.22); }
.collection-card { position: relative; overflow: hidden; padding: 1.65rem; }
.collection-code { position: absolute; right: 1.4rem; top: 1rem; font-family: "Merriweather", Georgia, serif; font-size: 3rem; font-weight: 900; color: rgba(113,12,32,.06); }
.collection-card .icon, .service-card .icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--maroon); color: var(--gold); font-size: 1.45rem; }
.collection-card h3, .service-card h3 { margin-top: 1.35rem; color: var(--maroon-dark); font-size: 1.15rem; font-weight: 800; }
.collection-card p, .service-card p { color: var(--muted); font-size: .93rem; }

.maroon-band { position: relative; overflow: hidden; background: var(--maroon-dark); color: #fff; }
.maroon-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 10% 20%, rgba(244,196,48,.13), transparent 24%), linear-gradient(135deg, transparent 58%, rgba(244,196,48,.08)); }
.maroon-band .container { position: relative; z-index: 2; }
.maroon-band .section-heading h2 { color: #fff; }
.maroon-band .section-heading p { color: rgba(255,255,255,.72); }
.maroon-band .eyebrow { color: var(--gold); }
.maroon-band .resource-chip { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.06); color: #fff; }
.resource-chip i { color: var(--gold); font-size: 1.3rem; }
.resource-chip:hover { background: rgba(255,255,255,.11); color: #fff; transform: translateX(5px); }

.librarian-photo { position: relative; }
.librarian-photo img { width: 100%; min-height: 520px; object-fit: cover; object-position: center 25%; border-radius: 28px; box-shadow: var(--shadow-lg); }
.librarian-badge { position: absolute; left: 24px; bottom: 24px; padding: 1rem 1.2rem; border-radius: 15px; background: rgba(79,7,22,.92); color: #fff; backdrop-filter: blur(10px); }
.librarian-badge strong { display: block; color: var(--gold); }

.news-card { overflow: hidden; }
.news-card .news-image { height: 230px; overflow: hidden; background: #ddd; }
.news-card .news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-image img { transform: scale(1.05); }
.news-body { padding: 1.5rem; }
.news-meta { display: flex; gap: .7rem; align-items: center; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.news-meta .category { color: var(--maroon); }
.news-card h3 { margin: .8rem 0 .8rem; color: var(--maroon-dark); font-size: 1.2rem; font-weight: 800; line-height: 1.4; }
.news-card p { color: var(--muted); font-size: .92rem; }

.cta-card { position: relative; overflow: hidden; border-radius: 28px; background: var(--gold); color: var(--maroon-dark); padding: 3rem; }
.cta-card::after { content: ""; position: absolute; width: 280px; height: 280px; right: -90px; top: -120px; border: 55px solid rgba(113,12,32,.08); border-radius: 50%; }
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { font-family: "Merriweather", Georgia, serif; font-weight: 900; letter-spacing: -.03em; }

.page-hero { position: relative; overflow: hidden; padding: 94px 0 84px; color: #fff; background: linear-gradient(110deg, rgba(79,7,22,.97), rgba(113,12,32,.9)), url('../img/library-building.jpg') center 46%/cover no-repeat; }
.page-hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -100px; bottom: -170px; border: 1px solid rgba(244,196,48,.3); border-radius: 50%; box-shadow: 0 0 0 55px rgba(244,196,48,.06); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); margin: .7rem 0 1rem; }
.page-hero p { max-width: 750px; color: rgba(255,255,255,.8); font-size: 1.05rem; }
.breadcrumb { margin: 0; }
.breadcrumb-item, .breadcrumb-item a { color: rgba(255,255,255,.7); }
.breadcrumb-item.active { color: var(--gold); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.45); }

.info-card { height: 100%; padding: 1.7rem; border-radius: 20px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.info-card .icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--cream); color: var(--maroon); font-size: 1.45rem; }
.info-card h3 { margin: 1rem 0 .6rem; color: var(--maroon-dark); font-size: 1.1rem; font-weight: 800; }
.info-card p { margin-bottom: 0; color: var(--muted); }

.timeline { position: relative; margin-top: 2rem; }
.timeline::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 22px; width: 3px; background: linear-gradient(var(--gold), var(--maroon)); }
.timeline-item { position: relative; padding-left: 76px; margin-bottom: 2.5rem; }
.timeline-dot { position: absolute; left: 6px; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border: 6px solid #fff; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 2px var(--gold); }
.timeline-item .year { display: inline-block; margin-bottom: .55rem; color: var(--maroon); font-size: .77rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.timeline-item h3 { color: var(--maroon-dark); font-size: 1.25rem; font-weight: 800; }
.timeline-item p { color: var(--muted); }

.service-card { padding: 1.6rem; }
.service-card .service-link { display: inline-flex; gap: .4rem; align-items: center; margin-top: .8rem; font-weight: 800; }
.service-card .service-link i { transition: transform .2s ease; }
.service-card:hover .service-link i { transform: translateX(4px); }

.rule-card { padding: 1.4rem; border-left: 5px solid var(--gold); border-radius: 0 16px 16px 0; background: #fff; box-shadow: var(--shadow-sm); }
.rule-card h3 { color: var(--maroon-dark); font-size: 1.05rem; font-weight: 800; }
.rule-card p { margin: 0; color: var(--muted); }

.staff-card { overflow: hidden; }
.staff-card img { width: 100%; height: 380px; object-fit: cover; object-position: center top; }
.staff-card .staff-body { padding: 1.6rem; }
.staff-card h3 { color: var(--maroon-dark); font-size: 1.25rem; font-weight: 800; }
.staff-role { color: var(--maroon); font-weight: 800; font-size: .88rem; }
.credential { color: var(--muted); font-size: .9rem;  }
.profile-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.profile-links a { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--cream); font-size: .75rem; font-weight: 700; }

.staff-page-hero { padding: 78px 0 72px; }
.staff-hero-stats { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.staff-hero-stats div { min-width: 150px; padding: .95rem 1.05rem; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.08); backdrop-filter: blur(10px); }
.staff-hero-stats strong { display: block; color: var(--gold); font-size: 1.7rem; line-height: 1; font-family: "Merriweather", Georgia, serif; }
.staff-hero-stats span { display: block; margin-top: .3rem; color: rgba(255,255,255,.82); font-size: .8rem; font-weight: 700; }
.staff-lead-section { padding-top: 76px; padding-bottom: 76px; }
.staff-feature-photo { height: 100%; overflow: hidden; border-radius: 24px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.staff-feature-photo img { width: 100%; height: 380px; object-fit: cover; object-position: center top; display: block; }
.staff-member-card { height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.staff-member-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(113,12,32,.24); }
.staff-photo-wrap { position: relative; height: 260px; overflow: hidden; background: linear-gradient(145deg, var(--cream), #fff); }
.staff-photo-wrap::after { content: ""; position: absolute; inset: auto 0 0; height: 52%; background: linear-gradient(transparent, rgba(79,7,22,.68)); }
.staff-photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.staff-photo-wrap.no-photo { display: grid; place-items: center; background: radial-gradient(circle at top left, rgba(244,196,48,.42), transparent 38%), linear-gradient(145deg, var(--maroon), var(--maroon-dark)); }
.staff-photo-wrap.no-photo::after { display: none; }
.staff-initials { width: 108px; height: 108px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--maroon-dark); font-family: "Merriweather", Georgia, serif; font-size: 2.15rem; font-weight: 900; box-shadow: 0 15px 35px rgba(0,0,0,.18); }
.staff-initials-lg { width: 164px; height: 164px; margin: 0 auto; font-size: 3rem; }
.staff-member-card .staff-body { padding: 1.45rem; }
.staff-member-card h3 { margin: .35rem 0 .25rem; color: var(--maroon-dark); font-size: 1.15rem; font-weight: 800; line-height: 1.35; }
.staff-member-card p { color: var(--muted); font-size: .92rem; }
.staff-section { display: inline-flex; align-items: center; gap: .35rem; color: var(--gold-deep); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.staff-modal { border: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-staff-photo { width: 100%; min-height: 280px; max-height: 340px; object-fit: cover; object-position: center top; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.professional-card { border-top: 5px solid var(--gold); }

.download-card { padding: 1.4rem; display: flex; align-items: center; gap: 1rem; }
.download-icon { flex: 0 0 auto; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--maroon); color: var(--gold); font-size: 1.5rem; }
.download-card h3 { margin: 0 0 .25rem; color: var(--maroon-dark); font-size: 1rem; font-weight: 800; }
.download-card .type { color: var(--muted); font-size: .8rem; }
.download-action { margin-left: auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--maroon); }
.download-card.disabled { opacity: .72; }
.download-card.disabled .download-action { cursor: not-allowed; }

.contact-card { height: 100%; padding: 1.75rem; border-radius: 20px; background: var(--maroon-dark); color: #fff; }
.contact-card i { color: var(--gold); font-size: 1.4rem; }
.contact-card h3 { margin: .8rem 0 .35rem; font-size: 1.05rem; font-weight: 800; }
.contact-card p, .contact-card a { color: rgba(255,255,255,.75); }
.contact-card a:hover { color: var(--gold); }
.contact-form { padding: 2rem; border-radius: 24px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.form-label { color: var(--maroon-dark); font-weight: 700; font-size: .88rem; }
.form-note { color: var(--muted); font-size: .82rem; }
.honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none !important; }

.notice-box { padding: 1.2rem 1.3rem; border-radius: 16px; border-left: 5px solid var(--gold); background: var(--cream); }
.notice-box strong { color: var(--maroon-dark); }
.table-responsive { border-radius: 18px; box-shadow: var(--shadow-sm); }
.table { margin-bottom: 0; }
.table thead th { background: var(--maroon); color: #fff; border: 0; padding: 1rem; font-size: .84rem; }
.table tbody td { padding: 1rem; border-color: #efe7e9; vertical-align: middle; }
.table tbody tr:hover td { background: var(--cream); }

.accordion-item { border: 1px solid var(--border); border-radius: 14px !important; overflow: hidden; margin-bottom: .8rem; }
.accordion-button { color: var(--maroon-dark); font-weight: 800; }
.accordion-button:not(.collapsed) { color: var(--maroon-dark); background: var(--cream); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(244,196,48,.25); }

.site-footer { background: #2c0710; color: rgba(255,255,255,.7); }
.footer-main { padding: 75px 0 58px; }
.footer-logo { width: 240px; filter: brightness(0) invert(1); opacity: .92; }
.footer-title { margin-bottom: 1.2rem; color: #fff; font-size: .95rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .65rem; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,.7); }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); padding-left: 4px; }
.footer-contact li { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.footer-contact i { color: var(--gold); }
.social-links { display: flex; gap: .65rem; }
.social-links a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); }
.social-links a:hover { color: var(--maroon-dark); background: var(--gold); transform: translateY(-3px); }
.footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: .78rem; }

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1050;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--maroon-dark);
    background: var(--gold);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: .25s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

.cookie-notice {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1040;
    max-width: 470px;
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.cookie-notice.show { display: flex; }
.cookie-notice strong { color: var(--maroon-dark); }
.cookie-notice p { color: var(--muted); font-size: .8rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1199.98px) {
    .navbar-collapse { padding: 1rem 0 1.4rem; max-height: calc(100vh - 125px); overflow-y: auto; }
    .navbar .nav-link { padding: .75rem .25rem !important; }
    .navbar .nav-link::after { right: auto; left: .25rem; bottom: .35rem; width: 44px; }
    .hero { min-height: 610px; }
}

@media (max-width: 991.98px) {
    .section { padding: 78px 0; }
    .hero { min-height: 560px; }
    .hero h1 { font-size: clamp(2.7rem, 8vw, 4.5rem); }
    .opac-panel-wrap { padding-top: 32px; }
    .welcome-image { margin-bottom: 3rem; }
    .floating-quote { right: 20px; }
    .librarian-photo { margin-bottom: 2rem; }
}

@media (max-width: 767.98px) {
    .utility-links { gap: .65rem; }
    .utility-links a:nth-child(4), .utility-links a:nth-child(5) { display: none; }
    .navbar-brand img { width: 195px; }
    .navbar { min-height: 76px; }
    .hero { min-height: 590px; background-position: 58% center; }
    .hero::after { display: none; }
    .hero h1 { font-size: clamp(2.45rem, 12vw, 3.6rem); }
    .hero .lead { font-size: 1rem; }
    .opac-panel { padding: 1.15rem; border-radius: 18px; }
    .staff-page-hero { padding: 62px 0 58px; }
    .staff-hero-stats div { min-width: 130px; }
    .section { padding: 66px 0; }
    .section-sm { padding: 52px 0; }
    .section-heading { margin-bottom: 2.2rem; }
    .welcome-image img, .librarian-photo img { min-height: 390px; }
    .welcome-image::before { left: -10px; top: 12px; }
    .floating-quote { position: relative; right: auto; bottom: auto; max-width: none; margin: -45px 18px 0; }
    .cta-card { padding: 2rem 1.5rem; }
    .page-hero { padding: 72px 0 64px; }
    .timeline-item { padding-left: 62px; }
    .contact-form { padding: 1.3rem; }
    .cookie-notice { right: 16px; left: 16px; bottom: 16px; max-width: none; flex-direction: column; align-items: stretch; }
    .back-to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
}
.text-maroon { color: var(--maroon-dark) !important; }

/* Updated content blocks: fixed sidebar-card height + homepage image-ready sections */
.content-sidebar { align-self: flex-start; }
.content-sidebar .info-card,
.side-card {
    height: auto !important;
}
.side-card {
    overflow: hidden;
    border-top: 5px solid var(--gold);
}
.side-card .icon {
    background: linear-gradient(145deg, var(--cream), #fff);
}

.new-arrivals-section {
    background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
}
.arrival-card,
.facility-card,
.collection-showcase-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.arrival-card:hover,
.facility-card:hover,
.collection-showcase-card:hover {
    transform: translateY(-7px);
    border-color: rgba(113,12,32,.24);
    box-shadow: var(--shadow-lg);
}
.arrival-cover {
    position: relative;
    padding: 1.1rem 1.1rem 0;
    background: linear-gradient(180deg, var(--cream), #fff);
}
.arrival-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(79,7,22,.13);
}
.arrival-badge {
    position: absolute;
    right: 1.85rem;
    top: 1.85rem;
    max-width: calc(100% - 3.7rem);
    padding: .38rem .65rem;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: var(--maroon);
    font-size: .7rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}
.arrival-body { padding: 1.2rem 1.35rem 1.45rem; }
.arrival-body .accession {
    display: inline-flex;
    margin-bottom: .55rem;
    color: var(--gold-deep);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.arrival-body h3 {
    color: var(--maroon-dark);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
}
.arrival-body .author { color: var(--maroon); font-weight: 700; font-size: .86rem; }
.arrival-body p:not(.author) { color: var(--muted); font-size: .88rem; margin-bottom: 0; }

.facility-image,
.collection-showcase-image {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: var(--cream);
}
.facility-image img,
.collection-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.facility-card:hover .facility-image img,
.collection-showcase-card:hover .collection-showcase-image img { transform: scale(1.06); }
.facility-body,
.collection-showcase-body { position: relative; padding: 1.6rem; }
.facility-icon,
.collection-icon {
    position: absolute;
    top: -31px;
    left: 1.55rem;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 6px solid #fff;
    border-radius: 20px;
    background: var(--maroon);
    color: var(--gold);
    font-size: 1.35rem;
    box-shadow: var(--shadow-sm);
}
.facility-body h3,
.collection-showcase-body h3 {
    margin-top: 1.35rem;
    color: var(--maroon-dark);
    font-size: 1.15rem;
    font-weight: 800;
}
.facility-body p,
.collection-showcase-body p { color: var(--muted); font-size: .92rem; }
.collection-showcase-image .collection-code {
    position: absolute;
    right: 1rem;
    bottom: .8rem;
    top: auto;
    color: rgba(255,255,255,.9);
    text-shadow: 0 10px 24px rgba(0,0,0,.35);
}

@media (max-width: 991.98px) {
    .content-sidebar { margin-top: 1rem; }
    .side-card { position: static !important; }
}

@media (max-width: 575.98px) {
    .facility-image,
    .collection-showcase-image { height: 205px; }
    .arrival-cover img { aspect-ratio: 4 / 4.8; }
}

.collection-detail-visual {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: var(--cream);
    box-shadow: var(--shadow-lg);
}
.collection-detail-visual img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    display: block;
}
.collection-detail-badge {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    min-width: 112px;
    padding: .9rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-sm);
}
.collection-detail-badge span {
    display: block;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.collection-detail-badge strong {
    display: block;
    color: var(--maroon-dark);
    font-family: "Merriweather", Georgia, serif;
    font-size: 2rem;
    line-height: 1;
}

/* Professional news pages */
.news-page-hero, .news-detail-hero {
    background: linear-gradient(90deg, rgba(54,5,16,.96), rgba(83,7,25,.82)), url('../img/library-event.jpg') center/cover no-repeat;
}
.featured-news-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.featured-news-image { height: 100%; min-height: 430px; background: var(--paper); overflow: hidden; }
.featured-news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.featured-news-card:hover .featured-news-image img { transform: scale(1.04); }
.featured-news-body { height: 100%; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.news-featured-label { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; padding: .48rem .8rem; border-radius: 999px; background: var(--cream); color: var(--maroon); font-size: .78rem; font-weight: 800; }
.news-featured-label i { color: var(--gold-deep); }
.featured-news-body h2 { margin: 1rem 0; color: var(--maroon-dark); font-family: "Merriweather", Georgia, serif; font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.1; }
.featured-news-body p { color: var(--muted); font-size: 1.03rem; }
.news-filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 2.2rem; padding: .85rem; border: 1px solid var(--border); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.news-filter { display: inline-flex; align-items: center; gap: .45rem; padding: .68rem .9rem; border: 1px solid transparent; border-radius: 999px; color: var(--maroon-dark); font-size: .86rem; font-weight: 800; background: var(--cream); }
.news-filter i { color: var(--maroon); }
.news-filter:hover, .news-filter.active { color: #fff; background: var(--maroon); border-color: var(--maroon); transform: translateY(-2px); }
.news-filter:hover i, .news-filter.active i { color: var(--gold); }
.news-list-card h3 a { color: var(--maroon-dark); }
.news-list-card h3 a:hover { color: var(--maroon-soft); }
.article-meta-pills { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.article-meta-pills span { display: inline-flex; align-items: center; gap: .45rem; padding: .58rem .85rem; border-radius: 999px; color: rgba(255,255,255,.9); background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.14); font-size: .84rem; font-weight: 700; }
.article-meta-pills i { color: var(--gold); }
.article-card { overflow: hidden; border: 1px solid var(--border); border-radius: 28px; background: #fff; box-shadow: var(--shadow-lg); }
.article-main-image { width: 100%; max-height: 560px; object-fit: cover; display: block; background: var(--paper); }
.article-content { padding: clamp(1.5rem, 4vw, 3rem); }
.article-content p { color: #574c4f; font-size: 1.05rem; line-height: 1.9; text-align: justify; }
.article-content p:first-of-type::first-letter { float: left; margin: .12rem .55rem 0 0; color: var(--maroon); font-family: "Merriweather", Georgia, serif; font-size: 4.2rem; font-weight: 900; line-height: .85; }
.article-content h2 { margin: 2.2rem 0 1rem; color: var(--maroon-dark); font-family: "Merriweather", Georgia, serif; font-weight: 900; }
.article-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.article-gallery-item { overflow: hidden; min-height: 160px; border-radius: 18px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.article-gallery-item img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; transition: transform .4s ease; }
.article-gallery-item:hover img { transform: scale(1.06); }
.article-side-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); }
.article-side-card .icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--cream); color: var(--maroon); font-size: 1.35rem; }
.article-side-card h2 { color: var(--maroon-dark); font-size: 1.18rem; font-weight: 900; }
.article-side-card p { color: var(--muted); font-size: .92rem; }
.article-side-card code { display: block; padding: .85rem; border-radius: 12px; color: var(--maroon-dark); background: var(--cream); white-space: normal; }
.recent-news-list { display: grid; gap: .9rem; }
.recent-news-item { display: flex; gap: .85rem; align-items: center; padding: .75rem; border-radius: 16px; border: 1px solid var(--border); background: var(--cream); }
.recent-news-item:hover { background: #fff; transform: translateX(4px); box-shadow: var(--shadow-sm); }
.recent-news-item img { flex: 0 0 auto; width: 76px; height: 66px; border-radius: 12px; object-fit: cover; background: #fff; }
.recent-news-item strong { display: block; color: var(--maroon-dark); font-size: .88rem; line-height: 1.35; }
.recent-news-item small { display: block; margin-top: .25rem; color: var(--muted); font-size: .72rem; }
@media (max-width: 767.98px) {
    .featured-news-image { min-height: 280px; }
    .news-filter { width: 100%; justify-content: center; }
    .article-gallery { grid-template-columns: 1fr; }
    .article-content p:first-of-type::first-letter { float: none; margin: 0; font-size: inherit; line-height: inherit; }
}

/* News single page layout fix */
.news-detail-section {
    padding-top: 58px;
    padding-bottom: 90px;
}
.article-container {
    max-width: 1180px;
}
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
}
.article-main-figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--paper);
}
.article-main-figure figcaption {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    background: rgba(79, 7, 22, .88);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}
.article-main-image {
    width: 100%;
    height: 430px;
    max-height: none;
    object-fit: cover;
    display: block;
    background: var(--paper);
}
.article-sidebar {
    min-width: 0;
}
.article-gallery-heading {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-gallery-heading h2 {
    margin: .35rem 0 .35rem;
}
.article-gallery-heading p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: .95rem;
}
.article-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.article-gallery-item {
    display: block;
    min-height: 0;
    height: 210px;
}
.article-gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}
.article-side-card {
    overflow-wrap: anywhere;
}
@media (min-width: 1200px) {
    .news-detail-hero .container {
        max-width: 1180px;
    }
}
@media (max-width: 991.98px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    .article-sidebar .article-side-card {
        margin-bottom: 0 !important;
    }
}
@media (max-width: 767.98px) {
    .news-detail-section {
        padding-top: 42px;
    }
    .article-main-image {
        height: 280px;
    }
    .article-gallery {
        grid-template-columns: 1fr;
    }
    .article-gallery-item {
        height: 220px;
    }
    .article-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Library Opening Hours Section */
.library-hours-section {
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 55%, #f8efe8 100%);
    position: relative;
    overflow: hidden;
}

.library-hours-section h2 {
    color: #650016;
    font-weight: 800;
    margin-bottom: 18px;
}

.library-hours-section p {
    color: #5f5a5a;
    font-size: 16px;
    line-height: 1.8;
}

.hours-note {
    margin-top: 24px;
    padding: 18px 20px;
    border-left: 5px solid #f4bd18;
    background: #fff8e6;
    color: #4f1c23;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(101, 0, 22, 0.08);
}

.opening-hours-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 34px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 24px 60px rgba(101, 0, 22, 0.12);
}

.hours-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hours-card-header span {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hours-card-header h3 {
    margin: 0;
    color: #650016;
    font-size: 28px;
    font-weight: 800;
}

.hours-badge {
    background: #650016;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 50px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 12px 25px rgba(101, 0, 22, 0.22);
}

.hours-badge.gold {
    background: #f4bd18;
    color: #3d1419;
}

.hours-divider {
    width: 100%;
    height: 1px;
    background: rgba(101, 0, 22, 0.12);
    margin: 28px 0;
}

.hours-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 30px;
}

.hours-info-box {
    background: #fffaf0;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(244, 189, 24, 0.35);
}

.hours-info-box h4 {
    color: #650016;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 8px;
}

.hours-info-box p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.hours-small-text {
    margin-top: 24px;
    margin-bottom: 0;
    font-size: 14px !important;
    color: #777 !important;
}

@media (max-width: 768px) {
    .opening-hours-card {
        padding: 24px;
    }

    .hours-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hours-card-header h3 {
        font-size: 24px;
    }

    .hours-badge {
        width: 100%;
        text-align: center;
    }

    .hours-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Rules and Regulations Page */
.rules-hero {
    background:
        linear-gradient(120deg, rgba(101, 0, 22, 0.92), rgba(101, 0, 22, 0.72)),
        url("../img/library-building.jpg") center/cover no-repeat;
}

.rules-page-section {
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 55%, #f8efe8 100%);
    padding-top: 80px !important;
    padding-bottom: 110px !important;
}

.rules-intro-card {
    background: #ffffff;
    padding: 36px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.08);
    margin-bottom: 34px;
}

.rules-label {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}

.rules-intro-card h2 {
    color: #650016;
    font-weight: 800;
    margin-bottom: 18px;
}

.rules-intro-card p {
    color: #5f5a5a;
    font-size: 16px;
    line-height: 1.8;
}

.rules-list-wrapper {
    display: grid;
    gap: 18px;
}

.rule-item {
    display: flex;
    gap: 22px;
    background: #ffffff;
    padding: 24px;
    border-radius: 22px;
    border-left: 5px solid #f4bd18;
    box-shadow: 0 16px 42px rgba(101, 0, 22, 0.07);
    transition: 0.3s ease;
    min-height: 92px;
    align-items: flex-start;
}

.rule-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 54px rgba(101, 0, 22, 0.12);
}

.rule-number {
    min-width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #650016;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}

.rule-item h3 {
    color: #650016;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.rule-item p {
    color: #5f5a5a;
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 0;
}

.danger-rule {
    border-left-color: #8b001d;
    background: #fff8f8;
}

.rules-final-note {
    margin-top: 34px;
    
    margin-bottom: 30px;background: #650016;
    color: #ffffff;
    padding: 30px;
    border-radius: 26px;
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.22);
}

.rules-final-note h3 {
    color: #f4bd18;
    font-weight: 800;
    margin-bottom: 10px;
}

.rules-final-note p {
    margin-bottom: 0;
    line-height: 1.8;
}

.rules-sidebar-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 24px 60px rgba(101, 0, 22, 0.10);
    position: sticky;
    top: 140px;
}

.rules-sidebar-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: #fff5d8;
    color: #8b001d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

.rules-sidebar-card h3,
.rules-sidebar-card h4 {
    color: #650016;
    font-weight: 800;
}

.rules-sidebar-card p {
    color: #5f5a5a;
    line-height: 1.75;
}

.rules-alert-box {
    background: #fff8e6;
    border-left: 5px solid #f4bd18;
    padding: 18px;
    border-radius: 16px;
    color: #4f1c23;
    margin: 22px 0;
    line-height: 1.7;
}

@media (max-width: 991px) {
    .rules-sidebar-card {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .rules-intro-card,
    .rules-sidebar-card,
    .rules-final-note {
        padding: 24px;
    }

    .rule-item {
        flex-direction: column;
        gap: 14px;
    }

    .rule-number {
        width: 50px;
        min-width: 50px;
        height: 50px;
    }
}
/* Fix Rules Page Top and Bottom Spacing */
.rules-clean-hero {
    position: relative;
    padding: 120px 0 90px;
    background:
        linear-gradient(120deg, rgba(101, 0, 22, 0.94), rgba(101, 0, 22, 0.78)),
        url("../img/library-building.jpg") center/cover no-repeat;
    overflow: hidden;
}

.rules-clean-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(244, 189, 24, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(101, 0, 22, 0.45), transparent);
    pointer-events: none;
}

.rules-clean-hero .container {
    position: relative;
    z-index: 2;
}

.rules-clean-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin: 12px 0 18px;
}

.rules-clean-hero p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 760px;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 0;
}

.text-gold {
    color: #f4bd18 !important;
}

/* Mobile fix */
@media (max-width: 768px) {
    .rules-clean-hero {
        padding: 90px 0 60px;
    }

    .rules-clean-hero h1 {
        font-size: 42px;
    }

    .rules-page-section {
        padding-top: 55px !important;
        padding-bottom: 80px !important;
    }
}

/* Fines and Payments Page */
.fines-clean-hero {
    position: relative;
    padding: 120px 0 90px;
    background:
        linear-gradient(120deg, rgba(101, 0, 22, 0.94), rgba(101, 0, 22, 0.78)),
        url("../img/library-building.jpg") center/cover no-repeat;
    overflow: hidden;
}

.fines-clean-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(244, 189, 24, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(101, 0, 22, 0.45), transparent);
    pointer-events: none;
}

.fines-clean-hero .container {
    position: relative;
    z-index: 2;
}

.fines-clean-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin: 12px 0 18px;
}

.fines-clean-hero p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 760px;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 0;
}

.fines-page-section {
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 55%, #f8efe8 100%);
    padding-top: 80px !important;
    padding-bottom: 110px !important;
}

.fines-intro-card {
    background: #ffffff;
    padding: 36px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.08);
    margin-bottom: 30px;
}

.fines-label {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}

.fines-intro-card h2 {
    color: #650016;
    font-weight: 800;
    margin-bottom: 18px;
}

.fines-intro-card p {
    color: #5f5a5a;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 0;
}

.fine-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.fine-summary-card {
    background: #650016;
    color: #ffffff;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(101, 0, 22, 0.18);
}

.fine-summary-card span {
    display: inline-block;
    color: #f4bd18;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 10px;
}

.fine-summary-card h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.fine-summary-card p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

.fines-list-wrapper {
    display: grid;
    gap: 22px;
}

.fine-policy-card {
    display: flex;
    gap: 22px;
    background: #ffffff;
    padding: 28px;
    border-radius: 24px;
    border-left: 5px solid #f4bd18;
    box-shadow: 0 18px 48px rgba(101, 0, 22, 0.08);
    transition: 0.3s ease;
}

.fine-policy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(101, 0, 22, 0.13);
}

.fine-policy-icon {
    min-width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #fff5d8;
    color: #8b001d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.fine-policy-card h3 {
    color: #650016;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.fine-policy-card p {
    color: #5f5a5a;
    font-size: 15.5px;
    line-height: 1.75;
    margin-bottom: 12px;
}

.fine-policy-card p:last-child {
    margin-bottom: 0;
}

.serious-fine {
    border-left-color: #8b001d;
    background: #fff8f8;
}

.fine-warning {
    background: #fff8e6;
    border-left: 5px solid #f4bd18;
    padding: 16px 18px;
    border-radius: 16px;
    color: #4f1c23;
    font-size: 14.5px;
    line-height: 1.7;
    margin-top: 14px;
}

.fine-amount-box {
    background: #650016;
    color: #ffffff;
    padding: 18px 20px;
    border-radius: 18px;
    margin-top: 16px;
}

.fine-amount-box span {
    display: block;
    color: #f4bd18;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.fine-amount-box strong {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.fine-amount-box small {
    color: rgba(255, 255, 255, 0.82);
}

.fines-sidebar-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 24px 60px rgba(101, 0, 22, 0.10);
    position: sticky;
    top: 140px;
}

.fines-sidebar-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: #fff5d8;
    color: #8b001d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

.fines-sidebar-card h3,
.fines-sidebar-card h4 {
    color: #650016;
    font-weight: 800;
}

.fines-sidebar-card p {
    color: #5f5a5a;
    line-height: 1.75;
}

.payment-checklist {
    background: #fffaf0;
    border: 1px solid rgba(244, 189, 24, 0.35);
    padding: 20px;
    border-radius: 20px;
    margin: 22px 0;
}

.payment-checklist h4 {
    font-size: 18px;
    margin-bottom: 12px;
}

.payment-checklist ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.payment-checklist li {
    color: #5f5a5a;
    margin-bottom: 8px;
    line-height: 1.6;
}

.payment-checklist li:last-child {
    margin-bottom: 0;
}

.fines-alert-box {
    background: #fff8e6;
    border-left: 5px solid #f4bd18;
    padding: 18px;
    border-radius: 16px;
    color: #4f1c23;
    margin: 22px 0;
    line-height: 1.7;
}

@media (max-width: 991px) {
    .fine-summary-grid {
        grid-template-columns: 1fr;
    }

    .fines-sidebar-card {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .fines-clean-hero {
        padding: 90px 0 60px;
    }

    .fines-clean-hero h1 {
        font-size: 42px;
    }

    .fines-page-section {
        padding-top: 55px !important;
        padding-bottom: 80px !important;
    }

    .fines-intro-card,
    .fine-policy-card,
    .fines-sidebar-card {
        padding: 24px;
    }

    .fine-policy-card {
        flex-direction: column;
        gap: 16px;
    }

    .fine-policy-icon {
        width: 56px;
        min-width: 56px;
    }
}

/* Librarian's Message Page */
.librarian-message-hero {
    position: relative;
    padding: 120px 0 90px;
    background:
        linear-gradient(120deg, rgba(101, 0, 22, 0.94), rgba(101, 0, 22, 0.78)),
        url("../img/library-building.jpg") center/cover no-repeat;
    overflow: hidden;
}

.librarian-message-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(244, 189, 24, 0.2), transparent 32%),
        linear-gradient(90deg, rgba(101, 0, 22, 0.45), transparent);
    pointer-events: none;
}

.librarian-message-hero .container {
    position: relative;
    z-index: 2;
}

.librarian-message-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin: 12px 0 18px;
}

.librarian-message-hero p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 780px;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 0;
}

.librarian-message-section {
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 55%, #f8efe8 100%);
    padding-top: 80px !important;
    padding-bottom: 110px !important;
}

.librarian-profile-card {
    background: #ffffff;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 24px 60px rgba(101, 0, 22, 0.11);
    position: sticky;
    top: 140px;
}

.librarian-profile-img {
    height: 310px;
    overflow: hidden;
    background: #fff5d8;
}

.librarian-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.librarian-profile-content {
    padding: 28px;
}

.librarian-profile-content span {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
}

.librarian-profile-content h3 {
    color: #650016;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 12px;
}

.librarian-profile-content p {
    color: #5f5a5a;
    line-height: 1.7;
    margin-bottom: 22px;
}

.message-content-card {
    background: #ffffff;
    padding: 44px;
    border-radius: 30px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 24px 70px rgba(101, 0, 22, 0.09);
}

.message-title-block {
    margin-bottom: 28px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(101, 0, 22, 0.12);
}

.message-label {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}

.message-title-block h2 {
    color: #650016;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 0;
}

.message-content-card p {
    color: #5f5a5a;
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 20px;
    text-align: justify;
}

.message-highlight {
    background: #650016;
    color: #ffffff;
    padding: 30px;
    border-radius: 24px;
    margin-top: 34px;
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.22);
}

.message-highlight h3 {
    color: #f4bd18;
    font-weight: 900;
    margin-bottom: 12px;
}

.message-highlight p {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0;
    text-align: left;
}

.message-signature {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(101, 0, 22, 0.12);
}

.message-signature strong {
    display: block;
    color: #650016;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 5px;
}

.message-signature span {
    color: #5f5a5a;
    font-weight: 600;
}

@media (max-width: 991px) {
    .librarian-profile-card {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .librarian-message-hero {
        padding: 90px 0 60px;
    }

    .librarian-message-hero h1 {
        font-size: 42px;
    }

    .librarian-message-section {
        padding-top: 55px !important;
        padding-bottom: 80px !important;
    }

    .message-content-card {
        padding: 26px;
    }

    .librarian-profile-img {
        height: 260px;
    }

    .message-content-card p {
        text-align: left;
    }
}

/* Library Classification System Page */
.classification-hero {
    position: relative;
    padding: 120px 0 90px;
    background:
        linear-gradient(120deg, rgba(101, 0, 22, 0.94), rgba(101, 0, 22, 0.78)),
        url("../img/library-building.jpg") center/cover no-repeat;
    overflow: hidden;
}

.classification-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(244, 189, 24, 0.20), transparent 32%),
        linear-gradient(90deg, rgba(101, 0, 22, 0.45), transparent);
    pointer-events: none;
}

.classification-hero .container {
    position: relative;
    z-index: 2;
}

.classification-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin: 12px 0 18px;
}

.classification-hero p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 820px;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 0;
}

.classification-page-section {
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 55%, #f8efe8 100%);
    padding-top: 80px !important;
    padding-bottom: 110px !important;
}

.classification-intro-card,
.call-number-card,
.shelf-guide-card {
    background: #ffffff;
    padding: 36px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.08);
    margin-bottom: 34px;
}

.classification-label {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}

.classification-intro-card h2,
.call-number-card h3,
.shelf-guide-card h2,
.classification-section-title h2 {
    color: #650016;
    font-weight: 900;
}

.classification-intro-card p,
.call-number-card p,
.classification-section-title p {
    color: #5f5a5a;
    font-size: 16px;
    line-height: 1.8;
}

.call-number-demo {
    background: #650016;
    padding: 24px;
    border-radius: 24px;
    display: grid;
    gap: 12px;
    box-shadow: 0 22px 54px rgba(101, 0, 22, 0.20);
}

.call-number-demo div {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 16px 18px;
}

.call-number-demo strong {
    display: block;
    color: #f4bd18;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 6px;
}

.call-number-demo span {
    color: rgba(255, 255, 255, 0.90);
    font-size: 14px;
}

.classification-section-title {
    margin-bottom: 28px;
}

.ddc-main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.classification-card {
    background: #ffffff;
    padding: 26px;
    border-radius: 26px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 18px 48px rgba(101, 0, 22, 0.08);
    transition: 0.3s ease;
}

.classification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 66px rgba(101, 0, 22, 0.13);
}

.classification-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.classification-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #fff5d8;
    color: #8b001d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.classification-number {
    color: #650016;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.classification-range {
    display: inline-block;
    color: #8b001d;
    background: #fff8e6;
    border: 1px solid rgba(244, 189, 24, 0.45);
    padding: 6px 12px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}

.classification-card h3,
.subject-map-card h3 {
    color: #650016;
    font-size: 21px;
    font-weight: 900;
    margin-bottom: 12px;
}

.classification-card p,
.subject-map-card p {
    color: #5f5a5a;
    font-size: 15px;
    line-height: 1.75;
}

.busl-focus-tag {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fffaf0;
    border-left: 4px solid #f4bd18;
    border-radius: 14px;
    color: #4f1c23;
    font-size: 14px;
    line-height: 1.6;
}

.subject-map-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.subject-map-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 24px;
    border-left: 5px solid #f4bd18;
    box-shadow: 0 16px 42px rgba(101, 0, 22, 0.07);
    transition: 0.3s ease;
}

.subject-map-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 54px rgba(101, 0, 22, 0.12);
}

.subject-ddc-number {
    display: inline-block;
    background: #650016;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 40px;
    font-weight: 900;
    margin-bottom: 14px;
}

.shelf-steps {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.shelf-step {
    display: flex;
    gap: 18px;
    background: #fffaf0;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(244, 189, 24, 0.35);
}

.shelf-step span {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: #650016;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.shelf-step h3 {
    color: #650016;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 6px;
}

.shelf-step p {
    color: #5f5a5a;
    line-height: 1.7;
    margin-bottom: 0;
}

.cataloguing-note-card {
    margin-top: 34px;
    background: #650016;
    color: #ffffff;
    padding: 30px;
    border-radius: 26px;
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.22);
}

.cataloguing-note-card h3 {
    color: #f4bd18;
    font-weight: 900;
    margin-bottom: 12px;
}

.cataloguing-note-card p {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.8;
    margin-bottom: 0;
}

.classification-sidebar-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 24px 60px rgba(101, 0, 22, 0.10);
    position: sticky;
    top: 140px;
}

.classification-sidebar-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: #fff5d8;
    color: #8b001d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

.classification-sidebar-card h3,
.classification-sidebar-card h4 {
    color: #650016;
    font-weight: 900;
}

.classification-sidebar-card p {
    color: #5f5a5a;
    line-height: 1.75;
}

.classification-search-box {
    position: relative;
    margin: 22px 0;
}

.classification-search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b001d;
}

.classification-search-box input {
    width: 100%;
    border: 1px solid rgba(101, 0, 22, 0.16);
    border-radius: 50px;
    padding: 14px 18px 14px 46px;
    outline: none;
    color: #4f1c23;
    background: #fffaf0;
}

.classification-search-box input:focus {
    border-color: #f4bd18;
    box-shadow: 0 0 0 4px rgba(244, 189, 24, 0.18);
}

.quick-ddc-list {
    background: #fffaf0;
    border: 1px solid rgba(244, 189, 24, 0.35);
    padding: 20px;
    border-radius: 20px;
    margin: 22px 0;
}

.quick-ddc-list h4 {
    font-size: 18px;
    margin-bottom: 14px;
}

.quick-ddc-list ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.quick-ddc-list li {
    color: #5f5a5a;
    margin-bottom: 9px;
    line-height: 1.6;
}

.quick-ddc-list li:last-child {
    margin-bottom: 0;
}

.quick-ddc-list strong {
    color: #650016;
}

.classification-alert-box {
    background: #fff8e6;
    border-left: 5px solid #f4bd18;
    padding: 18px;
    border-radius: 16px;
    color: #4f1c23;
    margin: 22px 0;
    line-height: 1.7;
}

.classification-hidden {
    display: none;
}

.classification-match {
    outline: 3px solid rgba(244, 189, 24, 0.35);
}

@media (max-width: 991px) {
    .classification-sidebar-card {
        position: relative;
        top: auto;
    }

    .ddc-main-grid,
    .subject-map-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .classification-hero {
        padding: 90px 0 60px;
    }

    .classification-hero h1 {
        font-size: 42px;
    }

    .classification-page-section {
        padding-top: 55px !important;
        padding-bottom: 80px !important;
    }

    .classification-intro-card,
    .call-number-card,
    .shelf-guide-card,
    .classification-sidebar-card,
    .cataloguing-note-card {
        padding: 24px;
    }

    .classification-card,
    .subject-map-card {
        padding: 22px;
    }

    .classification-number {
        font-size: 30px;
    }

    .shelf-step {
        flex-direction: column;
    }
}

/* Library Floor Chart Page */
.floor-chart-hero {
    position: relative;
    padding: 120px 0 90px;
    background:
        linear-gradient(120deg, rgba(101, 0, 22, 0.94), rgba(101, 0, 22, 0.78)),
        url("../img/library-building.jpg") center/cover no-repeat;
    overflow: hidden;
}

.floor-chart-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(244, 189, 24, 0.20), transparent 32%),
        linear-gradient(90deg, rgba(101, 0, 22, 0.45), transparent);
    pointer-events: none;
}

.floor-chart-hero .container {
    position: relative;
    z-index: 2;
}

.floor-chart-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin: 12px 0 18px;
}

.floor-chart-hero p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 820px;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 0;
}

.floor-chart-section {
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 55%, #f8efe8 100%);
    padding-top: 80px !important;
    padding-bottom: 110px !important;
}

.floor-intro-card,
.library-building-illustration,
.floor-help-card {
    background: #ffffff;
    padding: 36px;
    border-radius: 30px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 22px 60px rgba(101, 0, 22, 0.08);
    margin-bottom: 34px;
}

.floor-label {
    display: inline-block;
    color: #8b001d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}

.floor-intro-card h2,
.illustration-header h2,
.floor-section-title h2 {
    color: #650016;
    font-weight: 900;
}

.floor-intro-card p,
.floor-section-title p {
    color: #5f5a5a;
    font-size: 16px;
    line-height: 1.8;
}

.floor-mini-guide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.floor-mini-guide div {
    background: #650016;
    color: #ffffff;
    padding: 24px 16px;
    border-radius: 24px;
    text-align: center;
}

.floor-mini-guide strong {
    display: block;
    color: #f4bd18;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.floor-mini-guide span {
    font-weight: 700;
    font-size: 14px;
}

.building-svg-wrap {
    background:
        radial-gradient(circle at top right, rgba(244, 189, 24, 0.15), transparent 30%),
        #fffaf0;
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(244, 189, 24, 0.35);
    overflow-x: auto;
}

.building-svg-wrap svg {
    width: 100%;
    min-width: 850px;
    height: auto;
    display: block;
}

.floor-section-title {
    margin: 40px 0 28px;
}

.floor-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.floor-card {
    background: #ffffff;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(101, 0, 22, 0.10);
    box-shadow: 0 18px 48px rgba(101, 0, 22, 0.08);
    transition: 0.3s ease;
}

.floor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 66px rgba(101, 0, 22, 0.13);
}

.floor-card-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(101, 0, 22, 0.12);
    margin-bottom: 20px;
}

.floor-card-head > i {
    margin-left: auto;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #fff5d8;
    color: #8b001d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.floor-level {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background: #650016;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(101, 0, 22, 0.20);
}

.floor-card-head span {
    color: #8b001d;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.floor-card-head h3 {
    color: #650016;
    font-size: 24px;
    font-weight: 900;
    margin: 4px 0 0;
}

.floor-location-list {
    padding: 0;
    margin: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.floor-location-list li {
    display: flex;
    gap: 10px;
    color: #5f5a5a;
    font-size: 15.5px;
    line-height: 1.6;
}

.floor-location-list i {
    color: #f4bd18;
    margin-top: 4px;
}

.floor-help-card {
    margin-top: 34px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #650016;
}

.floor-help-card h3 {
    color: #f4bd18;
    font-weight: 900;
    margin-bottom: 8px;
}

.floor-help-card p {
    color: rgba(255, 255, 255, 0.90);
    line-height: 1.8;
    margin-bottom: 0;
}

.floor-help-card .btn-maroon {
    background: #f4bd18;
    color: #3d1419;
    white-space: nowrap;
}

.floor-help-card .btn-maroon:hover {
    background: #ffffff;
    color: #650016;
}

@media (max-width: 991px) {
    .floor-card-grid {
        grid-template-columns: 1fr;
    }

    .floor-help-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .floor-chart-hero {
        padding: 90px 0 60px;
    }

    .floor-chart-hero h1 {
        font-size: 42px;
    }

    .floor-chart-section {
        padding-top: 55px !important;
        padding-bottom: 80px !important;
    }

    .floor-intro-card,
    .library-building-illustration,
    .floor-help-card,
    .floor-card {
        padding: 24px;
    }

    .floor-mini-guide {
        grid-template-columns: 1fr;
    }

    .floor-card-head {
        align-items: flex-start;
    }

    .floor-card-head > i {
        display: none;
    }
}

/* Final cleanup + mobile responsiveness hardening */
.section-padding {
    padding: 96px 0;
}

.container,
.container-fluid {
    min-width: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span,
li,
td,
th,
button {
    overflow-wrap: anywhere;
}

.navbar-collapse {
    min-width: 0;
}

.dropdown-menu {
    max-width: calc(100vw - 2rem);
}

.form-control,
.form-select,
.btn {
    max-width: 100%;
}

.opac-panel .row,
.contact-form .row {
    --bs-gutter-y: 1rem;
}

.article-card,
.message-content-card,
.librarian-profile-card,
.classification-sidebar-card,
.fines-sidebar-card,
.rules-sidebar-card,
.floor-card,
.opening-hours-card {
    min-width: 0;
}

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 1199.98px) {
    .navbar-nav {
        gap: 0;
    }

    .navbar .btn {
        width: fit-content;
        margin-top: .5rem;
    }
}

@media (max-width: 991.98px) {
    .section-padding {
        padding: 78px 0;
    }

    .rules-sidebar-card,
    .fines-sidebar-card,
    .librarian-profile-card,
    .classification-sidebar-card {
        position: relative !important;
        top: auto !important;
    }

    .hero-actions,
    .article-meta-pills {
        gap: .65rem;
    }
}

@media (max-width: 767.98px) {
    html {
        scroll-padding-top: 88px;
    }

    .section-padding {
        padding: 64px 0;
    }

    .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .utility-bar .container {
        justify-content: center !important;
        text-align: center;
    }

    .utility-contact {
        justify-content: center;
        gap: .7rem;
    }

    .utility-contact span,
    .utility-contact a {
        font-size: .72rem;
    }

    .navbar-brand img {
        max-width: 180px;
    }

    .hero {
        min-height: auto;
        padding: 88px 0 72px;
    }

    .hero h1,
    .page-hero h1,
    .rules-clean-hero h1,
    .fines-clean-hero h1,
    .librarian-message-hero h1,
    .classification-hero h1,
    .floor-chart-hero h1 {
        font-size: clamp(2.2rem, 11vw, 3.1rem);
        line-height: 1.08;
    }

    .hero-actions .btn,
    .opac-panel .btn,
    .cta-card .btn,
    .floor-help-card .btn,
    .rules-sidebar-card .btn,
    .fines-sidebar-card .btn,
    .classification-sidebar-card .btn {
        width: 100%;
        justify-content: center;
    }

    .opac-panel {
        padding: 1rem;
    }

    .opac-panel .panel-icon {
        width: 46px;
        height: 46px;
    }

    .news-meta,
    .article-meta-pills {
        align-items: flex-start;
    }

    .news-meta {
        flex-wrap: wrap;
    }

    .download-card {
        align-items: flex-start;
    }

    .download-action {
        margin-left: 0;
    }

    .staff-photo-wrap,
    .staff-card img {
        height: 300px;
    }

    .article-content {
        padding: 1.25rem;
    }

    .article-content p {
        text-align: left;
        font-size: 1rem;
    }

    .building-svg-wrap {
        padding: 14px;
        -webkit-overflow-scrolling: touch;
    }

    .building-svg-wrap svg {
        min-width: 760px;
    }
}

@media (max-width: 575.98px) {
    .hero-note {
        align-items: flex-start;
    }

    .quick-card,
    .collection-card,
    .service-card,
    .arrival-card,
    .facility-card,
    .collection-showcase-card,
    .news-card,
    .download-card,
    .staff-member-card,
    .info-card,
    .rules-intro-card,
    .fines-intro-card,
    .classification-intro-card,
    .call-number-card,
    .shelf-guide-card,
    .floor-intro-card,
    .library-building-illustration,
    .message-content-card {
        border-radius: 18px;
    }

    .hours-card-header,
    .fine-policy-card,
    .rule-item,
    .floor-card-head,
    .shelf-step {
        gap: 12px;
    }

    .article-main-image {
        height: 240px;
    }

    .footer-main {
        padding: 58px 0 44px;
    }
}


/* BUSL Library Chatbot + WhatsApp Handoff */
.library-chatbot {
    position: fixed;
    right: 22px;
    bottom: 84px;
    z-index: 1060;
    font-family: "Poppins", "Inter", system-ui, sans-serif;
}

.chatbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--maroon);
    color: #fff;
    padding: 12px 18px 12px 12px;
    box-shadow: 0 18px 45px rgba(79, 7, 22, .25);
    font-weight: 800;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.chatbot-toggle:hover,
.chatbot-toggle:focus {
    background: var(--maroon-dark);
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(79, 7, 22, .32);
}

.chatbot-toggle-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--maroon-dark);
    font-size: 1.15rem;
}

.chatbot-window {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(380px, calc(100vw - 32px));
    max-height: min(650px, calc(100vh - 150px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(113, 12, 32, .14);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(52, 8, 20, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.96);
    transform-origin: right bottom;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.library-chatbot.is-open .chatbot-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background:
        radial-gradient(circle at 85% 15%, rgba(244, 196, 48, .24), transparent 32%),
        linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    color: #fff;
}

.chatbot-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--gold);
    color: var(--maroon-dark);
    font-size: 1.35rem;
}

.chatbot-header strong {
    display: block;
    font-size: .98rem;
    line-height: 1.25;
}

.chatbot-header span {
    display: block;
    color: rgba(255, 255, 255, .78);
    font-size: .76rem;
    line-height: 1.35;
}

.chatbot-close {
    margin-left: auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    transition: background .2s ease, transform .2s ease;
}

.chatbot-close:hover,
.chatbot-close:focus {
    background: rgba(255,255,255,.18);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    min-height: 260px;
    max-height: 370px;
    overflow-y: auto;
    padding: 18px;
    background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
}

.chatbot-message {
    display: flex;
    margin-bottom: 12px;
}

.chatbot-message-user {
    justify-content: flex-end;
}

.chatbot-bubble {
    max-width: 88%;
    padding: 12px 14px;
    border-radius: 18px;
    color: #4f1c23;
    background: #fff;
    border: 1px solid rgba(113, 12, 32, .08);
    box-shadow: 0 10px 24px rgba(62, 13, 27, .07);
    font-size: .88rem;
    line-height: 1.65;
}

.chatbot-message-user .chatbot-bubble {
    color: #fff;
    background: var(--maroon);
    border-color: var(--maroon);
    border-bottom-right-radius: 6px;
}

.chatbot-message-bot .chatbot-bubble {
    border-bottom-left-radius: 6px;
}

.chatbot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    max-width: 88%;
}

.chatbot-message-user .chatbot-links {
    display: none;
}

.chatbot-links a {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff8e6;
    color: var(--maroon);
    border: 1px solid rgba(244, 196, 48, .45);
    font-size: .73rem;
    font-weight: 800;
}

.chatbot-links a:hover {
    background: var(--gold);
    color: var(--maroon-dark);
}

.chatbot-quick-actions {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    overflow-x: auto;
    border-top: 1px solid rgba(113, 12, 32, .08);
    background: #fff;
}

.chatbot-quick-actions button {
    flex: 0 0 auto;
    border: 1px solid rgba(113, 12, 32, .12);
    border-radius: 999px;
    background: var(--cream);
    color: var(--maroon-dark);
    padding: 8px 11px;
    font-size: .75rem;
    font-weight: 800;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.chatbot-quick-actions button:hover,
.chatbot-quick-actions button:focus {
    background: var(--maroon);
    color: #fff;
    transform: translateY(-2px);
}

.chatbot-form {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid rgba(113, 12, 32, .08);
    background: #fff;
}

.chatbot-form input {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(113, 12, 32, .16);
    border-radius: 999px;
    padding: 11px 14px;
    color: var(--ink);
    outline: none;
    font-size: .88rem;
}

.chatbot-form input:focus {
    border-color: var(--gold-deep);
    box-shadow: 0 0 0 4px rgba(244, 196, 48, .18);
}

.chatbot-form button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--maroon);
    color: #fff;
    transition: background .2s ease, transform .2s ease;
}

.chatbot-form button:hover,
.chatbot-form button:focus {
    background: var(--maroon-dark);
    transform: translateY(-2px);
}

.chatbot-footer {
    padding: 0 14px 14px;
    background: #fff;
}

.chatbot-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 999px;
    background: #25d366;
    color: #062f18;
    font-weight: 900;
    font-size: .85rem;
}

.chatbot-footer a:hover {
    color: #062f18;
    background: #35e378;
    transform: translateY(-2px);
}

@media (max-width: 767.98px) {
    .library-chatbot {
        right: 16px;
        bottom: 78px;
    }

    .chatbot-toggle {
        padding: 10px;
    }

    .chatbot-toggle-text {
        display: none;
    }

    .chatbot-window {
        right: -2px;
        bottom: 62px;
        width: calc(100vw - 28px);
        max-height: calc(100vh - 130px);
        border-radius: 24px;
    }

    .chatbot-messages {
        min-height: 230px;
        max-height: calc(100vh - 390px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-window,
    .chatbot-toggle,
    .chatbot-close,
    .chatbot-form button,
    .chatbot-quick-actions button,
    .chatbot-footer a {
        transition: none !important;
    }
}

/* Final chatbot layout fix: prevents squeezed links and mobile overflow */
.library-chatbot {
    isolation: isolate;
}

.chatbot-window {
    width: min(440px, calc(100vw - 32px));
    max-height: min(720px, calc(100dvh - 120px));
}

.chatbot-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.chatbot-message {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-bottom: 0;
}

.chatbot-message-bot {
    align-items: flex-start;
}

.chatbot-message-user {
    align-items: flex-end;
}

.chatbot-bubble {
    max-width: min(92%, 350px);
    overflow-wrap: break-word;
    word-break: normal;
}

.chatbot-links {
    width: fit-content;
    max-width: 92%;
    align-items: center;
    gap: 8px;
    overflow: visible;
}

.chatbot-message-user .chatbot-links {
    display: none !important;
}

.chatbot-links a {
    max-width: 220px;
    min-height: 34px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.chatbot-quick-actions {
    flex-wrap: wrap;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 104px;
    scrollbar-width: thin;
}

.chatbot-quick-actions button {
    flex: 1 1 calc(50% - 8px);
    min-width: 135px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

.chatbot-form {
    align-items: center;
}

.chatbot-form input {
    min-width: 0;
}

.library-chatbot.is-open .chatbot-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.96);
}

@media (max-width: 575.98px) {
    .library-chatbot {
        right: 12px;
        left: 12px;
        bottom: 74px;
    }

    .chatbot-window {
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: min(76dvh, 680px);
        border-radius: 22px;
        transform-origin: right bottom;
    }

    .chatbot-header {
        padding: 14px;
    }

    .chatbot-avatar {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 14px;
    }

    .chatbot-header strong {
        font-size: .9rem;
    }

    .chatbot-header span {
        font-size: .7rem;
    }

    .chatbot-messages {
        padding: 14px;
    }

    .chatbot-bubble {
        max-width: 94%;
        font-size: .84rem;
    }

    .chatbot-links {
        max-width: 94%;
    }

    .chatbot-links a {
        max-width: 100%;
        font-size: .7rem;
    }

    .chatbot-quick-actions button {
        flex-basis: 100%;
        min-width: 0;
    }

    .chatbot-form,
    .chatbot-footer,
    .chatbot-quick-actions {
        padding-left: 12px;
        padding-right: 12px;
    }
}

a.download-card {
    color: inherit;
    text-decoration: none;
}

a.download-card:hover {
    color: inherit;
}

.download-card.disabled {
    cursor: not-allowed;
}

.download-card.disabled * {
    pointer-events: none;
}
/* Visitor Counter */
.visitor-counter-box {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.visitor-counter-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 190px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.visitor-counter-item i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--gold);
    color: var(--maroon-dark);
    font-size: 22px;
}

.visitor-counter-item strong {
    display: block;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.visitor-counter-item span {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .visitor-counter-box {
        display: grid;
        grid-template-columns: 1fr;
    }

    .visitor-counter-item {
        width: 100%;
    }
}
/* Library Statistics Section */
.library-statistics-section {
    background: #ffffff;
    padding: 0;
    border-top: 1px solid rgba(113, 12, 32, 0.08);
    border-bottom: 1px solid rgba(113, 12, 32, 0.08);
}

.library-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.library-stat-item {
    position: relative;
    min-height: 250px;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    border-right: 1px solid rgba(113, 12, 32, 0.08);
    border-bottom: 1px solid rgba(113, 12, 32, 0.08);
    background: #ffffff;
    overflow: hidden;
    transition: 0.3s ease;
}

.library-stat-item::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -80px;
    bottom: -80px;
    border-radius: 50%;
    background: rgba(244, 196, 48, 0.16);
    transition: 0.3s ease;
}

.library-stat-item:hover {
    background: linear-gradient(135deg, #fffaf0, #ffffff);
}

.library-stat-item:hover::after {
    transform: scale(1.25);
}

.library-stat-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #fff5d8;
    color: #710c20;
    font-size: 26px;
    margin-bottom: 8px;
}

.library-stat-item h3 {
    position: relative;
    z-index: 1;
    color: #4f0716;
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(24px, 5vw, 48px);
    font-weight: 900;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.04em;
}

.library-stat-item p {
    position: relative;
    z-index: 1;
    color: #4f0716;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.library-stats-update {
    padding: 34px 20px;
    text-align: center;
    color: #211b1d;
    font-size: 16px;
    font-weight: 600;
    background: #ffffff;
}

/* Statistics responsive */
@media (max-width: 1199.98px) {
    .library-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .library-stats-grid {
        grid-template-columns: 1fr;
    }

    .library-stat-item {
        min-height: 210px;
        padding: 38px 20px;
    }

    .library-stat-item h3 {
        font-size: 52px;
    }

    .library-stat-item p {
        font-size: 18px;
    }

    .library-stats-update {
        padding: 26px 16px;
        font-size: 14px;
    }
}