.library-categories{padding:42px 0 48px;background:radial-gradient(ellipse at 45% 0,#edf7fa,transparent 60%),#f7fafb;color:#11273d;min-height:70vh;position:relative}
.library-categories-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}.library-categories-title{display:flex;align-items:center;gap:18px}.library-categories-title>i{font-size:40px;color:#0c6277}.library-categories-title h2{font-size:28px;line-height:1.4;font-weight:900;margin:0 0 5px;color:#11273d}.library-categories-title p{margin:0;color:#526d7b;font-size:16px}.library-categories-motto{display:inline-flex;align-items:center;gap:12px;border-radius:22px;padding:12px 20px;background:#ecf1f8;color:#0c6277;font-size:14px;white-space:nowrap}.library-categories-motto i{font-size:23px;color:#0c6277}
.library-categories-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.library-category{--accent:#003244;--bright:#0c6277;--tint:#edf5f6;--edge:#bfd3d9;--button-text:#fff;position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;padding:24px 26px 18px;background:linear-gradient(135deg,#fff 60%,var(--tint));border:1px solid #e1eaf5;border-radius:23px;box-shadow:0 6px 20px #203c6010;min-width:0}.theme-purple{--accent:#32b2d0;--bright:#32b2d0;--tint:#eaf8fb;--edge:#b7e5ef;--button-text:#003244}.theme-orange{--accent:#0c6277;--bright:#0c6277;--tint:#edf6f8;--edge:#bfdce3;--button-text:#fff}.theme-blue{--accent:#11273d;--bright:#11273d;--tint:#eef2f6;--edge:#c8d2dd;--button-text:#fff}.theme-pink{--accent:#87cee5;--bright:#87cee5;--tint:#effafd;--edge:#c5e9f3;--button-text:#003244}.theme-gold{--accent:#e6a530;--bright:#e6a530;--tint:#fff8eb;--edge:#f4dba9;--button-text:#003244}
.library-category-wave{position:absolute;inset:0 0 auto;width:100%;height:125px;color:var(--tint);z-index:-1}.library-category-motif{position:absolute;top:24px;inset-inline-start:42%;font-size:85px;color:var(--accent);opacity:.07;transform:rotate(-12deg);pointer-events:none}.library-category-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.library-category-icon{display:flex;align-items:center;justify-content:center;width:72px;height:72px;background:var(--tint);border:1px solid var(--edge);border-radius:20px;color:var(--accent);font-size:32px;box-shadow:0 5px 16px #00000005}.library-category-icon img{width:36px;height:36px;object-fit:contain}.library-category-count{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--edge);border-radius:28px;background:#ffffffb3;color:#11273d;padding:9px 14px;font-size:15px;font-weight:800;text-decoration:none}.library-category-count i{color:var(--accent);font-size:19px}.library-category h2{margin:0 0 9px;font-size:25px;font-weight:900;line-height:1.4}.library-category h2 a{color:#11273d;text-decoration:none}.library-category-description{margin:0 0 16px;color:#526d7b;font-size:15px;line-height:1.7;min-height:50px}.library-category-branches{border-top:1px solid #e1eaf5;padding-top:16px;flex-grow:1}.library-category-branches-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;font-weight:700;color:#11273d}.library-category-branches-heading i{color:var(--accent);margin-inline-end:7px}.library-category-track-count{border:1px solid #f4d376;background:#fff8df;color:#7b520b;border-radius:12px;padding:5px 9px;white-space:nowrap}.library-category-children{display:flex;flex-wrap:wrap;gap:7px;margin:13px 0 20px;min-height:32px}.library-category-children a{border:1px solid var(--edge);border-radius:9px;padding:4px 9px;color:var(--accent);background:#fff;font-size:12px;text-decoration:none}.library-category-children p{margin:0;color:#526d7b;font-size:12px;line-height:1.8;font-style:italic}.library-category-children p i{margin-inline-end:7px}.library-category-browse{display:flex;align-items:center;justify-content:center;gap:14px;background:linear-gradient(120deg,var(--bright),var(--accent));color:var(--button-text)!important;border-radius:15px;padding:12px 15px;font-size:18px;font-weight:800;text-decoration:none;box-shadow:0 5px 13px #00000010;transition:transform .15s,filter .15s}.library-category-browse:hover{filter:brightness(.95);transform:translateY(-2px)}.library-category a:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
@media(max-width:991px){.library-categories-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-categories-motto{display:none}.library-categories-title h2{font-size:25px}}@media(max-width:575px){.library-categories{padding:26px 0}.library-categories-grid{grid-template-columns:1fr;gap:16px}.library-category{padding:20px}.library-categories-title>i{font-size:30px}.library-categories-title h2{font-size:22px}.library-categories-title p{font-size:14px}.library-category h2{font-size:23px}}

/* Clear section heading below the main hero. */
.library-categories .library-categories-heading {
    gap: 18px;
    margin-bottom: 24px;
    padding: 20px 24px;
    border: 1px solid #dbe5eb;
    border-inline-start: 4px solid #c5a059;
    border-radius: 14px;
    background: transparent !important;
    box-shadow: none;
    text-align: start;
}
.library-categories-heading .library-categories-title { gap: 14px; min-width: 0; }
.library-categories-heading-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px; background: #edf4f5; color: #0c6277; font-size: 24px; }
.library-categories-heading .library-categories-title h2 { color: #11273d !important; font-size: 25px; font-weight: 800; line-height: 1.5; margin: 0 0 3px; }
.library-categories-heading .library-categories-title p { color: #475569 !important; font-size: 14px; line-height: 1.8; margin: 0; }
.library-categories-heading .library-categories-motto { display: inline-flex; flex-shrink: 0; gap: 8px; padding: 8px 13px; border-radius: 9px; background: #f4f7fa; color: #334155; font-size: 13px; border: 1px solid #dbe5eb; }
.library-categories-heading .library-categories-motto i { color: #0c6277; font-size: 15px; }
.library-categories-heading .library-categories-motto strong { font-size: 16px; color: #11273d; }
@media (max-width: 767px) {
    .library-categories .library-categories-heading { padding: 16px; flex-wrap: wrap; gap: 12px; }
    .library-categories-heading .library-categories-title h2 { font-size: 22px; }
    .library-categories-heading-icon { width: 44px; height: 44px; font-size: 21px; }
    .library-categories-heading .library-categories-motto { margin-inline-start: 58px; }
}

/* Keep ornamental artwork separate from readable badges and controls. */
.library-category-motif {
    inset-inline-start: 50%;
    top: 23px;
    font-size: 64px;
    transform: translateX(50%) rotate(-12deg);
    z-index: -1;
}
.library-categories[dir="ltr"] .library-category-motif { transform: translateX(-50%) rotate(-12deg); }
.library-category-top { position: relative; z-index: 1; }
.library-category-count { background: #fff; }
@media (max-width: 1199px) {
    .library-category-motif { display: none; }
}

/* Light palette accents remain decorative; text uses stronger contrast. */
.library-category.theme-purple .library-category-children a, .library-category.theme-pink .library-category-children a, .library-category.theme-gold .library-category-children a { color: #003244; }
