/* ========================================================================== 
   LAU LIBRARIES â€” SITE-SPECIFIC STYLES
   ========================================================================== 

   Purpose
   -------
   Site-specific layout and component overrides for the LAU Libraries website.
   This stylesheet also contains targeted overrides for legacy site CSS and
   third-party LibCal widgets.

   Maintenance notes
   -----------------
   - Breakpoints intentionally remain in px to match the existing site layout.
   - :has() selectors are retained where they are part of the current behavior.
   - !important is retained only where the original stylesheet uses it to
     override inherited, legacy, or third-party styles.
   - The broad global `i` selector near the end is preserved for compatibility;
     verify all dependent pages before narrowing its scope.
   - LibCal selectors include generated IDs/classes and should be reviewed if
     the external widget configuration changes.

   Section index
   -------------
   01. Font Definitions
   02. Base / Global Layout
   03. Global Header / Branding
   04. Main Navigation â€” Shared
   05. Aside / Supporting Content
   06. Main Navigation â€” Desktop
   07. Main Navigation â€” Tablet / Mobile
   08. Section Navigation / Related Links
   09. Number / Stat Cards
   10. Card Components
   11. Page Header / Hero Banner
   12. Library Hours Panel
   13. LibCal Hours Widget
   14. Footer
   15. Upcoming Events
   16. Software / Help Components

   ========================================================================== */

/* ==========================================================================
   01. FONT DEFINITIONS
   ========================================================================== */

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url(https://libraries.lau.edu.lb/_css/fonts/fa-regular-400.woff2) format("woff2"),
        url(https://libraries.lau.edu.lb/_css/fonts/fa-regular-400.ttf) format("truetype");
}

/* ==========================================================================
   02. BASE / GLOBAL LAYOUT
   ========================================================================== */

/* Enables container query units (cqw/cqh) used by the header layout. */
body {
    container-type: size;
}

main h2 {
    margin-top: 2em;
    margin-bottom: 1em;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 0;
    /* Gradient text treatment for section headings. */
    text-decoration: underline double rgba(120, 190, 32, 0.1);
    background-image: linear-gradient(var(--primarygreen70percent) 0, var(--primarygreen) 80%);
    background-clip: text;
    color: transparent;
}

main > h2:first-child {
    margin-top: 0;
}

.grid,
.grid2 {
    margin-bottom: 1rem;
}

.icon {
    width: 1rem;
    margin-right: 0.5rem;
}

.secondary_callout .green_button .fa-solid, .secondary_callout .green_button .fas {
    color: var(--secondarygreen10)!important;
}
.secondary_callout .green_button:hover .fa-solid, .secondary_callout .green_button:hover .fas {
    color: var(--primarygreen)!important;
}
/* ==========================================================================
   03. GLOBAL HEADER / BRANDING
   ========================================================================== */

.lau_logo {
    width: var(--toplogosize-dep);
    margin-bottom: 3rem;
}

/* Complete right-hand column beside the LAU logo. */
.site-subtitle {
    position: relative;
    margin-left: calc(var(--toplogosize-dep) + var(--toplogomarginright));
    padding-top: 1rem;
    padding-left: 1rem;
}

.site-subtitle > a {
    position: relative;
    z-index: 2;
    display: inline-block;
    color: var(--primarygreen);
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
}

/* Decorative horizontal bar below the site title. */
.site-subtitle::after {
    content: "";
    position: absolute;
    top: 2.9rem;
    left: 0;
    z-index: 0;
    width: calc(100% + ((100cqw - var(--toplogosize-dep)) - var(--toplogomarginright) - 100%) / 2);
    height: 0.8rem;
    background: var(--anthracitelightgrey);
}

.top_nav_group {
    margin-left: -0.35rem;
}
.secondary_nav {
    font-size: .8rem;
    z-index: 100;
    position: relative;
    }
.secondary_nav li:last-of-type {
    margin-left: 0;
}
@media only screen and (min-width: 981px) 
{
.lau_logo {

    background-position: 0 .8rem;

}
.site-subtitle {
    margin-top: .9em;

}
}

@media only screen and (max-width: 980px) {
   .js_off .secondary_nav a:first-of-type {
        float: right;
    }
    .js_on .secondary_nav {
        position: relative;
        border-top: none;
    }
    body form.gsc-search-box, body table.gsc-search-box { margin-left: 0; max-width:380px;}
    .js_on .secondary_nav {
        min-height: 2em;
    }
}

/* ==========================================================================
   04. MAIN NAVIGATION â€” SHARED
   ========================================================================== */
.main_nav{
    margin-bottom: 2em;
}
.main_nav,
.page-nav,
#section_nav {
    font-size: 0.8rem;
}

details {
    position: static;
}

summary {
    padding-block: 0.2em;
    color: var(--anthracite80percent);
    font-weight: bold;
    list-style: none;
}

/* Restore nested lists hidden by legacy .main_nav ul ul rules. */
.main_nav .dropdown_menu ul,
.main_nav .mega_menu ul {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-top: .2em;
}

.main_nav .mainNavChildToggle {
    border: none;
}

/* Accessible text that remains available to screen readers only. */
.main_nav .mainNavChildToggle span.visually_hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main_nav ul ul li.active a {
    color: var(--secondarygreen9);
}

aside,
aside:not(.skip_style) {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1rem 2rem;
    background: var(--primarygreen);
    color: var(--white);
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* ==========================================================================
   05. ASIDE / SUPPORTING CONTENT
   ========================================================================== */

aside > * {
    color: var(--white) !important;
}

aside a {
    color: var(--secondarygreen9);
}

aside a:hover {
    text-decoration: underline;
    color: var(--secondarygreen7) !important;
}

/* ==========================================================================
   06. MAIN NAVIGATION â€” DESKTOP (981px+)
   ========================================================================== */

@media only screen and (min-width: 981px) {
	.main_nav{
	
		width: 100%;
	}
	.main_nav > ul {
	
		/* float:right; */
	}
    .main_nav > ul > li {
        padding: 0 0.7rem;
    }
    .main_nav > ul > li:hover ul li:hover {
        background-color: transparent;
    }

    .main_nav > ul > li:hover ul li:hover a {
        text-decoration: underline;
    }

    .main_nav > ul > li:hover summary,
    .main_nav > ul > li:focus-within summary,
    .main_nav > ul > li:active summary {
        color: var(--white) !important;
    }

    /* Mega menus need the parent list item to participate in the wider layout. */
    .main_nav > ul > li:has(.mega_menu) {
        position: static;
    }

    .main_nav > ul > li.account_item {
        border: 1px solid var(--primarygreen);
        margin-left: 0.3rem;
    }

    .main_nav > ul > li > a.active {
        background: linear-gradient(var(--primarygreen), var(--primarygreen));
        background-position: 50% 95%;
        background-repeat: no-repeat;
        background-size: 100% 3px;
    }

    /* Open dropdowns on hover and keyboard focus. */
    .main_nav > ul > li:hover > .dropdown_menu,
    .main_nav > ul > li:focus-within > .dropdown_menu,
    .main_nav > ul > li > a:focus ~ .dropdown_menu {
        display: block;
    }

    .main_nav .dropdown_menu {
        position: absolute;
        left: 0;
        z-index: 1000;
        box-sizing: border-box;
        min-width: 18rem;
        margin-top: 0;
        padding: 0.8rem 0;
        background-color: var(--anthracitelightgrey);
        box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.15);
    }
/* 
    .main_nav li:last-of-type .dropdown_menu {
       left: auto;
       right: 0;
    }
 */
    .main_nav .dropdown_menu > ul > li {
        margin: 0;
        padding: 0;
    }

    .main_nav .dropdown_menu > ul > li > a {
        padding: 0.2rem 1rem;
    }

    .main_nav .mega_menu {
        left: 0;
        display: flex;
        box-sizing: border-box;
        min-width: 0;
        max-width: none;
        margin: 0;
        padding: 2rem;
        gap: 2rem;
        background-color: var(--anthracitelightgrey);
    }

    .main_nav .mega_menu > div {
        min-width: 0;
    }

    .main_nav .mega_menu h2 {
        margin: 0 0 0.75rem;
        padding: 0 0 0.6rem;
        color: var(--primarygreen);
        font-size: 1.15rem;
        line-height: 1.25;
        border-bottom: 3px solid var(--primarygreen);
    }

    .main_nav .mega_menu li {
        display: block;
        margin: 0;
        padding: 0;
    }

    .main_nav .mega_menu li a {
        padding: 0.2em 0;
    }
    

/* ----------------------------------------------------------
   Mega Menu - Nested Flyout
   Example: Suggest a Purchase
   ---------------------------------------------------------- */

/* Parent item containing the nested submenu */
.main_nav .mega_menu > div > ul > li:has(> ul) {
    position: relative;
    color: var(--primarygreen);
    text-decoration: none;
    cursor: pointer;
}

/* Arrow after "Suggest a Purchase" */
.main_nav .mega_menu > div > ul > li:has(> ul)::after {
    content: "›";
    display: inline-block;
    margin-left: 0.4rem;
    color: var(--primarygreen);
    font-size: 1.2em;
    line-height: 1;
    text-decoration: none;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

/* Suggest a Purchase - hover */
.main_nav .mega_menu > div > ul > li:has(> ul):hover {
    color: var(--secondarygreen9);
    text-decoration: underline;
}

/* Arrow - hover */
.main_nav .mega_menu > div > ul > li:has(> ul):hover::after {
    color: var(--secondarygreen9);
    text-decoration: underline;
    transform: translateX(0.2rem);
}

/* Hide nested submenu by default */
.main_nav .mega_menu > div > ul > li > ul {
    display: none;
    position: absolute;
    top: 0;
    left: 80%;
    z-index: 1100;
    min-width: 14rem;
    margin: 0;
    padding: 0.5rem 0;
    background-color: var(--anthracitelightgrey);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.15);
}
/* Keep submenu links at their DEFAULT state,
   even while the parent li is hovered */
.main_nav .mega_menu > div > ul > li:has(> ul):hover > ul > li > a {
    color: var(--primarygreen);
    text-decoration: none;
}
/* Show nested submenu on hover/focus */
.main_nav .mega_menu > div > ul > li:hover > ul,
.main_nav .mega_menu > div > ul > li:focus-within > ul {
    display: block;
}

/* Nested submenu items */
.main_nav .mega_menu > div > ul > li > ul > li {
    margin: 0;
    padding: 0;
}

/* Nested submenu links - default */
.main_nav .mega_menu > div > ul > li > ul > li > a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--primarygreen);
    text-decoration: none;
    white-space: nowrap;
}

/* Nested submenu links - hover/focus */
.main_nav .mega_menu > div > ul > li > ul > li > a:hover,
.main_nav .mega_menu > div > ul > li > ul > li > a:focus-visible {
    color: var(--secondarygreen9);
    text-decoration: underline !important;
}


}

/* ==========================================================================
   07. MAIN NAVIGATION â€” TABLET / MOBILE (â‰¤980px)
   ========================================================================== */

@media only screen and (max-width: 980px) {
    .js_on .secondary_nav li:last-of-type {
        float: none;
    }
    .top_nav_group {
        margin-left: 0;
    }

    /* Hide the browser's default details marker. */
    details > summary::-webkit-details-marker {
        display: none;
    }

    details > summary::after {
        content: "+";
        float: right;
        margin-left: auto;
        padding-inline: 0.5rem;
        border: 1px solid var(--anthracite);
    }

    details[open] > summary::after {
        content: "âˆ’";
    }

    .site-subtitle {
        margin-left: 0;
        padding-top: 81px;
        padding-left: 0;
    }

    .site-subtitle::after {
        top: 7rem;
        width: 100%;
        background: var(--lightgreenbg);
    }

    .lau_logo {
        position: absolute;
        z-index: 9;
        width: 50%;
        margin-bottom: 1rem;
    }

    .nav_toggle {
        position: absolute;
        right: 2rem;
        z-index: 1;
    }

    .main_nav {
        width: 100%;
        margin: 0;
        font-size: inherit;
    }

    .main_nav > ul > li > a {
        font-weight: 700;
    }

    .main_nav .dropdown_menu {
        position: static;
        padding: 1rem;
    }

    .main_nav .dropdown_menu.mainNavChildOpen,
    .main_nav .dropdown_menu.is-open {
        display: block;
    }

    .main_nav .dropdown_menu ul {
        display: block;
        margin: 0;
        padding: 0;
    }

    .main_nav .dropdown_menu li {
        margin: 0;
        padding: 0;
    }

    .main_nav .dropdown_menu li a {
        display: block;
        padding: 0.5rem 0;
        line-height: 1.35;
    }
    .js_on .main_nav ul li > ul > li {
        padding-left: 1rem;
    }
    .main_nav .mega_menu.mainNavChildOpen,
    .main_nav .mega_menu.is-open {
        display: block;
    }

    .main_nav .mega_menu > div {
        margin-bottom: 1rem;
    }

    .main_nav .mega_menu > div:last-child {
        margin-bottom: 0;
    }

    .main_nav .mega_menu h2 {
        margin: 0;
        padding: 0.75rem 0 0.3rem;
        color: var(--primarygreen);
        font-size: 1rem;
    }

    .mainNavChildToggle {
        position: absolute;
        top: 0.55rem;
        right: 0;
        display: block;
        box-sizing: border-box;
        width: 2.25rem;
        height: 2.25rem;
        margin: 0;
        padding: 0;
        color: var(--anthracite);
        background: transparent;
        border: 1px solid var(--anthracite40percent);
        cursor: pointer;
    }

    .mainNavChildToggle::after {
        content: "+";
        display: block;
        font-size: 1.4rem;
        line-height: 2rem;
        text-align: center;
    }

    .mainNavChildToggle.btn_active::after {
        content: "âˆ’";
    }
}

/* ==========================================================================
   08. SECTION NAVIGATION / RELATED LINKS
   ========================================================================== */

/* Hide the active item and all menu items after the fourth item. */
#section_nav ul[role="menu"] > li.active,
#section_nav ul[role="menu"] > li:nth-child(n+5 of :not(.active)) {
    display: none;
}

#section_nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6em;
    margin: 0;
    padding: 0;
    list-style: none;
}

#section_nav li {
    position: relative;
    box-sizing: border-box;
    margin: 0;
    padding: 1rem 2rem;
    background: var(--white);
    border-left: 5px solid var(--primarygreen);
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.08);
}

#section_nav li a {
    display: block;
    text-decoration: none;
    transition: color 0.2s ease;
}

#section_nav li a:hover,
#section_nav li a:focus {
    text-decoration: underline;
}

@media screen and (max-width: 640px) {
    #section_nav ul {
        grid-template-columns: 1fr;
    }

    #section_nav li {
        min-height: auto;
        padding: 1rem;
    }

    #section_nav .dropdown_menu li a {
        margin-top: 0.5rem;
    }

    #section_nav .dropdown_menu h3 {
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   09. NUMBER / STAT CARDS
   ========================================================================== */

.numbers_list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.numbers_list p {
    display: flex;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f4f4f4;
    border-radius: 8px;
}

.numbers_list strong {
    font-size: 2rem;
}

.numbers_list small {
    margin-top: 8px;
}

/* Two cards per row. */
@media (min-width: 481px) {
    .numbers_list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Three cards per row. */
@media (min-width: 741px) {
    .numbers_list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Five cards per row. */
@media (min-width: 981px) {
    .numbers_list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* ==========================================================================
   10. CARD COMPONENTS
   ========================================================================== */
.homepage main a.green_button {
    font-size: 0.8rem;
}

.form_iframe {
    text-align: center;
    overflow: scroll;
}
.green_button {
    margin-top: -1.5rem;
    z-index: 1000;
    position: relative;
}

/* ----------------------------------------------------------
   Service cards
   ---------------------------------------------------------- */

.service-cards {
    margin-top: 2rem;
    grid-gap: 1rem !important;
}

.service-cards > div {
    display: grid !important;
    grid-row: span 3;
    grid-template-rows: subgrid;
    box-sizing: border-box;
    min-width: 0;
    height: 100%;
    padding: 1rem;
    gap: 1rem;
    border: 2px solid var(--anthracite15percent);
}

.service-cards > div > h3,
.service-cards > div > p {
    margin: 0;
    text-align: left;
    align-self: start;
}

.service-cards > div > .green_button {
    align-self: end;
    justify-self: center;
    margin: 0;
    white-space: nowrap;
}

.service-cards .green_button::after {
    display: none !important;
}

@media only screen and (max-width: 980px) {
    .grid.service-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media only screen and (max-width: 480px) {
    .grid.service-cards {
        grid-template-columns: 1fr;
    }
}

/* Remove default list padding when cards are authored as a <ul>. */
ul.grid.cards {
    padding: 0;
}

/* Normalize supported card wrappers regardless of source element. */
.cards > :is(li, h2, h3, div, p) {
    box-sizing: border-box;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.cards.grid > :is(li, h2, h3, div, p),
.cards.grid2 > :is(li, h2, h3, div, p) {
    display: grid !important;
    grid-template-rows: subgrid;
    grid-row: auto / span 1;
}

#looking-for-information-on-your-citation-counts ~ .cards.grid > :is(li, h2, h3, div, p),
#looking-for-information-on-your-citation-counts ~ .cards.grid2 > :is(li, h2, h3, div, p) {
    grid-row: auto / span 2;
}

#need-help ~ .cards.grid > :is(li, h2, h3, div, p),
#need-help ~ .cards.grid2 > :is(li, h2, h3, div, p) {
    grid-row: auto / span 5;
}

/* Direct-link cards: the anchor itself becomes the visual card. */
.cards > :is(li, h2, h3, div, p) > a:not(.green_button) {
    display: flex !important;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100%;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--anthracite15percent);
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
    font-size: 0.9rem;
}

/* ----------------------------------------------------------
   Hover state
   Applies only when the card does not contain .green_button
   ---------------------------------------------------------- */

.cards > :is(li, h2, h3, div, p):not(:has(.green_button)) > a:hover,
.cards > :is(li, h2, h3, div, p):not(:has(.green_button)) > a:focus-visible {
    color: var(--white);
    background: var(--secondarygreen9);
}

/* ----------------------------------------------------------
   Cards containing a green button
   ---------------------------------------------------------- */

.cards > :is(li, h2, h3, div, p):has(.green_button) {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 1rem;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid var(--anthracite15percent);
}

/* Green button stays responsible for its own hover */
.cards .green_button {
    width: auto !important;
    height: auto;
}

/* ==========================================================================
   11. PAGE HEADER / HERO BANNER
   ========================================================================== */

.page_header {
    display: grid;
    position: relative;
    width: 100%;
    min-width: 0;
    max-height: 630px;
    overflow: hidden;
}

/*
   Banner, overlay and header content
   all occupy the same grid cell.

   This works whether page-nav exists or not.
*/
.page_header > .banner_image,
.page_header > .page-header-content,
.page_header::before {
    grid-column: 1;
    grid-row: 1;
}

/* ---------------------------------------
   Banner Image
--------------------------------------- */

.page_header > .banner_image {
    display: block;
    width: 100%;
    min-width: 0;
    z-index: 0;
}

.page_header > .banner_image img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------------------------------------
   Banner Overlay
--------------------------------------- */

.page_header::before {
    content: "";
    z-index: 1;
    background: rgb(0 0 0 / 35%);
    pointer-events: none;
}
.search-container {
    padding-top: 1rem;
}

.collection-search {
    --surface-color: transparent;
    --text-color: var(--anthracite);
    --primary-color: var(--primarygreen);
    --secondary-action: var(--primarygreen);
}

.collection-search * {
    font-size: 0.7rem !important;
}
.collection-search input[type="text"], .collection-search input[type="password"], .collection-search input[type="tel"], .collection-search input[type="email"], .collection-search select{
    
    font-weight: bold;
}
.collection-search input::placeholder {
    
    font-weight: bold;
    font-style: normal;
    color:var(--anthracite);
    font-size: 0.7rem !important;
}
.filter-item input[type="checkbox"] {
    accent-color: var(--primarygreen);
}

.collection-title {
    text-align: center;
    margin: 0 0 1rem;
    color: var(--text-color);
}

.hidden {
    display: none !important;
}

.tablist {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    width: calc(100% - 22px);
    background: var(--white);
    padding: 10px 10px 0;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--anthracitelightgrey);
    border-bottom: 0;
}

.tab-btn {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    padding: .5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    background: transparent;
    color: var(--anthracite);
    flex: 1 1 auto;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 700px) {
    .tablist {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 auto;
        padding: 8px 10px;
        margin-right: 0;
    }
}

.tab-active {
    background: var(--primarygreen);
    color: #fff;
}

.tab-inactive:hover {
    background: #f0f4f2;
}

.tab-desc-wrap {
    margin-bottom: 12px;
    min-height: 32px;
}

.tab-desc {
    margin: 0;
}

.search-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrap {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-input {
    width: calc(100% - 12px);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .55;
}

.search-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 700;
    color: var(--white);
    background: var(--secondary-action);
    cursor: pointer;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}

.search-btn:hover {
    filter: brightness(1.06);
}

.filter-options {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.filter-item {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-color);
}

.filter-item span {
    min-width: inherit;
}

.filter-item input {
    width: 16px;
    height: 16px;
}

.advanced-link {
    margin-left: auto;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    color: var(--anthracite);
}

.advanced-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--anthracitelightgrey);
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.advanced-panel label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
}

.advanced-panel input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--anthracitelightgrey);
}

@media (max-width: 700px) {
    .dropdown-select {
        min-width: 160px;
    }

    .search-input-wrap {
        min-width: 220px;
    }

    .advanced-grid {
        grid-template-columns: 1fr;
    }
}

.hero p.tab-desc {
    line-height: 1.5;
    margin: 0;
    opacity: 1;
    color: var(--anthracite);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-search .search-panel {
    background: var(--white) !important;
    padding: 1rem;
    border: 1px solid var(--anthracitelightgrey);
    border-radius: 0 0 16px 16px;
}

/* ---------------------------------------
   Banner Content: Crumbs + H1
--------------------------------------- */

.page_header > .page-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 1rem 2rem;
    box-sizing: border-box;

}
body.homepage .page_header > .page-header-content {
    justify-content: flex-start;
    padding: 3rem 2rem 1rem 2rem;
}


.page-header-content h1 {
    margin: 2rem 0;
    color: var(--white);
}
body:not(.homepage) .page-header-content h1 {
    margin-top:4rem;
}

@media only screen and (min-width: 981px) {
	 body:not(.homepage) .page_header > .page-header-content {
		position: relative;
		z-index: 2;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 100%;
		min-width: 0;
		padding: 1rem 2rem;
		box-sizing: border-box;
	}
	
	.page-header-content h1,
	body:not(.homepage) .page-header-content h1 {
		margin: 0;
		color: var(--white);
		text-align: center;
	}
}
/* ==========================================================================
   12. LIBRARY HOURS PANEL
   ========================================================================== */

/* Keep inherited text within the hours panel on the standard dark palette. */
section.hours-section,
section.hours-section > *:not(a) {
    color: var(--anthracite) !important;
}

.hours-section {
    width: 100%;
    padding-top: 1rem;
}

/* ---------------------------------------
   Hours Container
--------------------------------------- */

.hours-section .container {
    width: 100%;
    max-width: 90%;
    margin-inline: auto;
    padding: 1em;
    box-sizing: border-box;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 15%);
}

/* ---------------------------------------
   Hours Section Title
--------------------------------------- */

.hours-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--anthracite);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Hours Grid
   -------------------------------------------------------------------------- */

.hours-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 0;
}

@media only screen and (min-width: 981px) {
    .hours-grid.grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

/* ---------------------------------------
   Individual Hours Cards
--------------------------------------- */

.hours-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
    text-align: center;
}

.hours-card > *:not(a) {
    color: var(--anthracite);
}

.hours-card > * {
    font-size: 0.7rem !important;
}

/* Divider before Chat with a Librarian */
.hours-card:last-child {
    border-left: 0.1rem dashed var(--anthracite60percent);
}

#lc-hours-data {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ---------------------------------------
   Library Name
--------------------------------------- */

.hours-card h3 {
    margin: 0 0 0.35rem;
}

/* ---------------------------------------
   Opening Time
--------------------------------------- */

.hours-card .time {
    margin: 0 0 0.35rem;
}

/* ---------------------------------------
   Open / Closed Status
--------------------------------------- */

.hours-card .status.open {
    color: var(--secondarygreen3);
}

.hours-card .status.closed {
    color: var(--burgundy);
}

/* ---------------------------------------
   Opening Hours / Chat Links
--------------------------------------- */

.hours-card .card-hours-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    text-decoration: none;
}

/* Arrow */
.hours-card .card-hours-link::after {
    content: "➔";
    transition: transform 0.2s ease;
}

.hours-card .card-hours-link:hover,
.hours-card .card-hours-link:focus-visible {
    text-decoration: underline;
}

.hours-card .card-hours-link:hover::after,
.hours-card .card-hours-link:focus-visible::after {
    transform: translateX(0.2rem);
}

@media screen and (max-width: 980px) {
    .page-header-content h1 {
        margin: 1rem 0;
    }

    .page_header {
        width: 92%;
        max-height: fit-content;
        box-sizing: content-box;
        margin-inline: auto;
        padding: 0 4%;
        overflow: visible;
    }

    .page_header > .page-header-content {
        padding: 2rem;
    }

    /* Make the banner fill the full height created by the header content. */
    .page_header > .banner_image {
        width: 100%;
        height: 100%;
        margin-top: 0;
    }

    .page_header > .banner_image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Hours panel: two cards per row on tablet-sized screens. */
    .hours-section {
        padding-top: 2rem;
    }

    .hours-section .container {
        max-width: 90%;
        padding: 1.75rem 1.5rem;
    }

    .hours-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        row-gap: 0;
    }

    .hours-card {
        padding: 0.75rem 1rem;
    }

    /* Remove the desktop-only divider. */
    .hours-card:last-child {
        border-left: 0;
    }

    /* Divider between the two tablet columns. */
    .hours-card:nth-child(even) {
        border-left: 1px solid var(--anthracite15percent);
    }

    /* Divider between tablet rows. */
    .hours-card:nth-child(n + 3) {
        border-top: 1px solid var(--anthracite15percent);
    }
}

/* --------------------------------------------------------------------------
   Hours â€” Mobile
   -------------------------------------------------------------------------- */

@media screen and (max-width: 580px) {
    .hours-section {
        padding-top: 1rem;
    }

    .hours-section .container {
        padding: 1rem;
        border-radius: 1rem;
    }

    .hours-section .section-title {
        margin-bottom: 0.5rem;
    }

    .hours-grid {
        grid-template-columns: 1fr;
        row-gap: 0;
    }

    .hours-card {
        padding: 0.8rem 0;
    }

    /* Horizontal separators */
    .hours-card + .hours-card {
        border-top: 1px solid var(--anthracite15percent);
    }

    .hours-card:nth-child(even),
    .hours-card:last-child {
        border-left: 0;
    }
}

/* ==========================================================================
   13. LIBCAL HOURS WIDGET
   ========================================================================== */

.s-lc-fhw-map {
    width: 100%;
    height: 350px;
    border: none;
}

.s-lc-fhw-pills {
    padding: 10px 0;
}

/* Weekly hours view */

.s-lc-whw-head-date {
    font-style: italic;
}

.s-lc-whw-today-h, .s-lc-whw-today {
    background-color: var(--anthracite15percent);
    color: var(--primarygreen);
}

.s-lc-whw-bh {
    text-align: right;
    white-space: nowrap;
}

.s-lc-whw-locname {
    font-weight: bold;
}

.s-lc-whw-sublocname {
    padding-left: 10px !important;
}

.s-lc-whw-footnote {
    color: var(--anthracite);
    font-size: 80%;
}

.s-lc-whw-footnote td:hover {
    background-color: var(--white) !important;
}

.s-lc-whw-loc-tr-23883 {
    display: none !important
}

.s-lc-whw-libbg-23883 {
    display: none !important
}

/* Monthly hours view */
.s-lc-mhw-tb {
    width: 100%;
    border: 1px solid var(--anthracite15percent);
    border-collapse: collapse;
    border-spacing: 0;
}

.s-lc-mhw-tb th,
.s-lc-mhw-tb td {
    border: 1px solid var(--anthracite15percent);
    vertical-align: top;
}
.s-lc-mhw-today {
    background: var(--primarygreen);
    color: var(--white);
}

.s-lc-mhw-header {
    text-align: center;
}

.s-lc-mhw-header-date {
    text-align: center;
    display: inline-block;
    margin-top: 5px;
    font-size: 130%;
}

.s-lc-mhw-days th {
    text-align: center;
    font-weight: bold;
    min-width: 14.28%;
    max-width: 14.28%;
    width: 14.28%;
}

.s-lc-mhw-day-l {
    text-align: right;
    padding: 2px;
}

.s-lc-mhw-cells {
    height: 50px;
}

.s-lc-mhw-fnc {
    color: var(--anthracite);
}

.s-lc-mhw-loc {
    padding: 2px;
    border-radius: 4px;
    margin-bottom: 1rem;
    line-height: normal;
    font-size: .7rem;
}

.s-lc-mhw-subloc {
    margin-left: 5px;
}

.s-lc-mhw-footnote-cal {
    font-size: 86%;
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.footer_links h4 {
    margin-top: 0;
    color: inherit;
}

.footer_links ul {
    display: flex;
    flex-direction: column;
}

.footer_links a,
.footer_links a:visited {
    font-size: 0.85rem;
}
.footer_links a i {
    color: var(--secondarygreen7) !important;
}
@media (min-width: 981px) {
    .footer_links.grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   15. UPCOMING EVENTS
   ========================================================================== */
/* =========================================================
   LibCal Upcoming Events
   ========================================================= */

#api_upc_cid21473_iid954 *:not(h2) {
    box-sizing: border-box;
    font-size: 1rem !important;
}

#api_upc_cid21473_iid954 i[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* =========================================================
   Events Grid
   ========================================================= */

#api_upc_cid21473_iid954 .gt-events-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin: 2.5rem auto;
}

#api_upc_cid21473_iid954 .gt-events-heading {
    grid-column: 1 / -1;
    margin: 0 0 0.4rem;
}

/* =========================================================
   Event Card
   ========================================================= */

#api_upc_cid21473_iid954 .gt-event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 0.9rem 2.5rem rgba(0, 0, 0, 0.08);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

#api_upc_cid21473_iid954 .gt-event-card:hover {
    transform: translateY(-0.4rem);
    box-shadow: 0 1.4rem 3.4rem rgba(0, 0, 0, 0.14);
}

/* =========================================================
   Event Image
   ========================================================= */

#api_upc_cid21473_iid954 .gt-event-bg {
    position: relative;
    height: 10.6rem;
    overflow: hidden;
    background-color: #e6f4f1;
}

#api_upc_cid21473_iid954 .gt-event-bg::before {
    content: "";
    position: absolute;
    inset: -0.4rem;
    background-image: inherit;
    background-position: center;
    background-size: cover;
    filter: blur(0rem) brightness(0.86) saturate(1.1);
    transform: scale(1.05);
}

#api_upc_cid21473_iid954 .gt-event-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.35) 60%,
            #fff 100%);
}

/* No-image fallback */

#api_upc_cid21473_iid954 .gt-no-image .gt-event-bg {
    background: linear-gradient(135deg,
            #006751,
            #00a081);
}

#api_upc_cid21473_iid954 .gt-no-image .gt-event-bg::before {
    display: none;
}

#api_upc_cid21473_iid954 .gt-no-image .gt-event-bg::after {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.2) 60%,
            #fff 100%);
}

/* =========================================================
   Date
   ========================================================= */

#api_upc_cid21473_iid954 .gt-date-badge {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 1.3rem;
    line-height: 1;
}

#api_upc_cid21473_iid954 .gt-day,
#api_upc_cid21473_iid954 .gt-month,
#api_upc_cid21473_iid954 .gt-year {
    color: #f5efe0;
    text-shadow: 0 0.1rem 0.6rem rgba(0, 0, 0, 0.45);
}

#api_upc_cid21473_iid954 .gt-day {
    font-size: 3.4rem;
    font-weight: 800;
}

#api_upc_cid21473_iid954 .gt-month {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

#api_upc_cid21473_iid954 .gt-year {
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    opacity: 0.9;
}

/* =========================================================
   Card Content
   ========================================================= */

#api_upc_cid21473_iid954 .gt-event-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem 1.1rem;
}

/* Category */

#api_upc_cid21473_iid954 .gt-category {
    align-self: flex-start;
    padding: 0.2rem 0.5rem;
    background: var(--secondarygreen5);
    border-radius: 1.3rem;
    color: var(--white);
    font-size: 0.7rem !important;
    letter-spacing: 0.03rem;
    line-height: normal;
    display: none;
}

/* Title */

#api_upc_cid21473_iid954 .gt-title {
    margin: 0;
}

#api_upc_cid21473_iid954 .gt-title a {
    text-decoration: none;
}

/* =========================================================
   Time / Location
   ========================================================= */

#api_upc_cid21473_iid954 .gt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#api_upc_cid21473_iid954 .gt-meta i {
    width: 0.8rem;
    margin-right: 0.3rem;
    color: var(--primarygreen);
    font-size: 1.1rem;
    text-align: center;
}

/* =========================================================
   Learn More
   ========================================================= */

#api_upc_cid21473_iid954 .gt-learn-more {
    display: inline-block;
    margin-top: auto;
    padding-top: 0.5rem;
    text-decoration: none;
}

#api_upc_cid21473_iid954 .gt-learn-more:hover,
#api_upc_cid21473_iid954 .gt-learn-more:focus {
    text-decoration: underline;
}

/* =========================================================
   Spotlight
   ========================================================= */

.spotlight .container {
    gap: 0.8rem;
}

.spotlight-items {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-top: 0;
}

.spotlight-items img {
    flex-shrink: 0;
    width: 45%;
    max-width: 30rem;
    height: auto;
    object-fit: cover;
    border-radius: 0.8rem;
}

.spotlight-items .text-block {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 980px) {
    #api_upc_cid21473_iid954 .gt-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
    #api_upc_cid21473_iid954 .gt-events-grid {
        grid-template-columns: 1fr;
        gap: 1.3rem;
        margin: 2rem auto;
        padding: 0 1rem;
    }

    #api_upc_cid21473_iid954 .gt-events-heading {
        font-size: 1.6rem;
    }

    #api_upc_cid21473_iid954 .gt-event-bg {
        height: 11.3rem;
    }

}

/* ========================================================================== 
   16. SOFTWARE / HELP COMPONENTS
   ========================================================================== */

/* Responsive software list. Columns expand automatically as space allows. */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px 20px;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--anthracite15percent);
    border-radius: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.software-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    color: var(--anthracite);
    font-weight: 700;
    border-radius: 40px;
    transition: 0.1s ease;
}

/* Category heading spanning the complete software grid. */
.cat-label {
    grid-column: 1 / -1;
    margin: 20px 0 6px;
    padding-bottom: 8px;
    color: var(--primarygreen);
    font-weight: 700;
    border-bottom: 2px solid var(--anthracite15percent);
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/*
 * Legacy global icon treatment.
 * Intentionally retained because other existing page content may rely on it.
 * Scope this selector only after verifying every page that uses this stylesheet.
 */
i {
    width: 28px;
    color: var(--primarygreen) !important;
    text-align: center;
}

.help-item i {
    width: 36px;
    margin-top: 30px;
    font-size: 1.5rem;
}

.help-item h4 {
    margin-bottom: 4px;
    color: var(--primarygreen);
    font-size: 1rem;
    font-weight: 700;
}

.help-item p {
    color: var(--anthracite);
    font-size: 0.8rem;
}

.help-item a {
    color: var(--primarygreen);
    font-weight: 700;
    text-decoration: none;
}

.help-item a:hover {
    text-decoration: underline;
}
/* ========================================================================== 
   17. Homepage Blocks white and Grey 
   ========================================================================== */

.homepage main.full_width > div{
    padding: 1rem 0;
}
.homepage main.full_width > div:nth-child(odd) {
    background-color: #ffffff;
}

.homepage main.full_width > div:nth-child(even) {
    background-color: var(--anthracitelightgrey);
}
/* ========================================================================== 
   18. Staff & Administration Grid 
   ========================================================================== */
.staff {
    border: 2px solid var(--anthracite15percent);
    padding: 1rem;
}

.staff h3 {
    color:var(--primarygreen);
    margin-top: 0;
}

.staff p {
    font-size: .9rem;
    display: block;
    text-align: left;
}
.staff span.dir-ext {
    display: block;
    text-align: left;
}