/* ==========================================================================
   GUtech Library - main stylesheet (every page)

   Contents
     1. Settings (colours, fonts, sizes) - change the look here
     2. Base elements
     3. Layout helpers
     4. Buttons, forms, small components
     5. Top bar, header, main menu
     6. Footer
     7. Page header, side menu, page content
     8. Home page (banner, trials, online resources, trainings, new arrivals, news, FAQs, visit us)
     9. E-Resources, portal links, news, page-builder blocks
    10. Plugins (Gravity Forms, sliders) and old page content
    11. Accessibility: text size and high contrast
    12. Small screens

   Notes
   - The Discovery Search page has its own file: search.css
   ========================================================================== */


/* 1. Settings
   ========================================================================== */

:root {
    --c-ink: #13212e;          /* headings */
    --c-text: #2b3742;         /* body text */
    --c-muted: #5b6874;        /* secondary text */
    --c-line: #dde3e8;         /* borders */
    --c-soft: #f3f5f7;         /* light section background */
    --c-paper: #ffffff;        /* page background */
    --c-brand: #0b4a7d;        /* GUtech blue: links, buttons */
    --c-brand-dark: #07355b;   /* hover, top bar */
    --c-brand-soft: #e6eef5;   /* light blue background */
    --c-on-brand: #ffffff;     /* text on blue */
    --c-accent: #d4a017;       /* gold: focus outline, small highlights */
    --c-footer: #0f1a24;
    --c-footer-text: #c3ccd5;
    --c-success: #1d6b3a;

    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --radius: 4px;             /* buttons, inputs */
    --radius-lg: 10px;         /* cards, tiles, map */
    --shadow: 0 1px 2px rgba(19, 33, 46, .06), 0 6px 20px rgba(19, 33, 46, .07);
    --shadow-sm: 0 1px 2px rgba(19, 33, 46, .05), 0 2px 6px rgba(19, 33, 46, .04);
    --shadow-lift: 0 2px 4px rgba(19, 33, 46, .06), 0 14px 32px rgba(19, 33, 46, .12);
    --container: 1200px;
    --gutter: clamp(1rem, 3vw, 2rem);
    --section: clamp(2.5rem, 6vw, 4.5rem);
}


/* 2. Base elements
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 1rem;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--c-ink);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.005em;
}
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.75rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p, ul, ol, dl, figure, table, blockquote { margin: 0 0 1rem; }

a { color: var(--c-brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-brand-dark); text-decoration-thickness: 2px; }

img, video, iframe { max-width: 100%; }
img { height: auto; vertical-align: middle; }

[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.icon--back { transform: scaleX(-1); }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -10rem;
    z-index: 1000;
    padding: .75rem 1rem;
    background: var(--c-paper);
    color: var(--c-ink);
    font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.site-main:focus { outline: none; }


/* 3. Layout helpers
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(820px + 2 * var(--gutter)); }

.section { padding-block: var(--section); }
.section--tight { padding-block: 2rem; }
.section--soft { background: var(--c-soft); }
.section--brand { background: var(--c-brand-dark); color: var(--c-on-brand); }
.section--brand .section__title { color: var(--c-on-brand); }

.section__title {
    margin-bottom: 1.75rem;
    font-size: clamp(1.6rem, 1.25rem + 1.3vw, 2.25rem);
    letter-spacing: -.015em;
}

/* Heading row: title (+ intro line) on the left, optional buttons on the right */
.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem 2rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.section__head .section__title { margin: 0; }
.section__intro { flex-basis: 100%; max-width: 62ch; margin: -.25rem 0 0; color: var(--c-muted); font-size: 1.075rem; }

.section__more { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 2rem 0 0; }
.section__note { margin-top: 1.5rem; color: var(--c-muted); }
.section__more .section__note { margin: 0; }
.section__note p { margin: 0; }

.layout-sidebar {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}


/* 4. Buttons, forms, small components
   ========================================================================== */

.button,
.entry-content .btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.15rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.button:hover { border-color: var(--c-brand); color: var(--c-brand); }

.button--primary {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: var(--c-on-brand);
}
.button--primary:hover { background: var(--c-brand-dark); border-color: var(--c-brand-dark); color: var(--c-on-brand); }

.button--small { padding: .45rem .8rem; font-size: .9rem; }

input[type="text"], input[type="search"], input[type="email"], input[type="tel"],
input[type="number"], input[type="url"], input[type="password"], input[type="date"],
select, textarea {
    width: 100%;
    max-width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #b9c3cc;
    border-radius: var(--radius);
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--c-brand);
    outline: 2px solid var(--c-brand-soft);
    outline-offset: 0;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--c-accent); }

label { font-weight: 500; }

.check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-weight: 400;
    cursor: pointer;
}
.check input { margin-top: .3rem; width: 1rem; height: 1rem; accent-color: var(--c-brand); flex-shrink: 0; }

.notice {
    padding: .9rem 1.1rem;
    margin-bottom: 1.5rem;
    border-inline-start: 4px solid var(--c-brand);
    background: var(--c-brand-soft);
    color: var(--c-ink);
}
.notice--success { border-color: var(--c-success); background: #e8f3ec; }

.text-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }

.link-list { list-style: none; padding: 0; }
.link-list li + li { margin-top: .4rem; }
.link-list--large a { font-size: 1.1rem; font-weight: 600; }

.count-badge {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 .35em;
    border-radius: 3px;
    background: var(--c-brand);
    color: var(--c-on-brand);
    font-size: .8em;
    text-align: center;
}

.login-prompt {
    max-width: 560px;
    padding: 2rem;
    border: 1px solid var(--c-line);
    border-top: 4px solid var(--c-brand);
    border-radius: var(--radius);
    background: var(--c-paper);
}
.login-prompt__title { font-size: 1.35rem; }
.login-prompt p { color: var(--c-muted); }

/* The miniOrange SAML button is styled to match the site buttons. */
.login-button a, .login-button input[type="submit"], .login-button button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.25rem !important;
    border: 1px solid var(--c-brand) !important;
    border-radius: var(--radius) !important;
    background: var(--c-brand) !important;
    color: var(--c-on-brand) !important;
    font: inherit !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
}
.login-button a:hover, .login-button input[type="submit"]:hover { background: var(--c-brand-dark) !important; }

.dropdown { position: relative; }
.dropdown__panel {
    position: absolute;
    top: calc(100% + .4rem);
    inset-inline-start: 0;
    z-index: 50;
    min-width: 220px;
    padding: .4rem 0;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
    box-shadow: var(--shadow);
}
.dropdown--end .dropdown__panel { inset-inline-start: auto; inset-inline-end: 0; }
.dropdown__list { list-style: none; margin: 0; padding: 0; }
.dropdown__list a, .dropdown__logout {
    display: block;
    padding: .5rem 1rem;
    color: var(--c-text);
    text-decoration: none;
    font-size: .95rem;
}
.dropdown__list a:hover, .dropdown__logout:hover { background: var(--c-soft); color: var(--c-brand); }
.dropdown__logout { border-top: 1px solid var(--c-line); margin-top: .3rem; }


/* 5. Top bar, header, main menu
   ========================================================================== */

.topbar {
    background: var(--c-brand-dark);
    color: #dbe5ee;
    font-size: .85rem;
}
.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 2.5rem;
}
.topbar__group { display: flex; align-items: center; gap: .25rem; }
.topbar__button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .55rem;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.topbar__button:hover, .topbar__button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.topbar__button .icon { width: 1rem; height: 1rem; }
.topbar .dropdown__panel { font-size: .95rem; }
.a11y-tools__label { margin-inline-end: .25rem; opacity: .8; }

.site-header {
    position: relative;
    z-index: 40;
    background: var(--c-paper);
    border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 5rem;
}

.site-logo { display: block; flex-shrink: 0; color: var(--c-ink); text-decoration: none; }
.site-logo__image { display: block; max-height: 56px; width: auto; }
.site-logo__image--contrast { display: none; }
.site-logo__text { font-size: 1.25rem; font-weight: 600; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-inline-start: auto;
}

.main-nav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.main-nav__list > li { position: relative; display: flex; align-items: center; }
.main-nav__list a {
    display: block;
    padding: .6rem .8rem;
    color: var(--c-ink);
    font-weight: 500;
    text-decoration: none;
}
.main-nav__list > li > a { position: relative; }
.main-nav__list > li > a::after {
    content: "";
    position: absolute;
    inset-inline: .8rem;
    bottom: .25rem;
    height: 2px;
    background: var(--c-brand);
    transform: scaleX(0);
    transition: transform .15s;
}
.main-nav__list > li > a:hover::after,
.main-nav__list > .current-menu-item > a::after,
.main-nav__list > .current-menu-ancestor > a::after { transform: scaleX(1); }
.main-nav__list a:hover { color: var(--c-brand); }
.main-nav__list .menu-icon { max-height: 22px; width: auto; }
/* Language switch: last item, after a thin line (inc/multilingual.php) */
.main-nav__list > .menu-item--language { margin-inline-start: .4rem; padding-inline-start: .4rem; border-inline-start: 1px solid var(--c-line); }
.menu-item--language > a { display: inline-flex; align-items: center; gap: .4rem; }
.menu-item--language .icon { width: 1.05rem; height: 1.05rem; color: var(--c-muted); }
.menu-item--language a:hover .icon { color: var(--c-brand); }
.menu-item--language a[lang="ar"] { font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif; }

.main-nav__toggle {
    display: inline-flex;
    padding: .3rem;
    margin-inline-start: -.5rem;
    border: 0;
    background: none;
    color: var(--c-muted);
    cursor: pointer;
}
.main-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    z-index: 50;
    min-width: 230px;
    margin: 0;
    padding: .4rem 0;
    list-style: none;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
    box-shadow: var(--shadow);
}
.main-nav .sub-menu a { padding: .5rem 1rem; font-weight: 400; }
.main-nav .sub-menu a:hover { background: var(--c-soft); }
.main-nav .menu-item-has-children:hover > .sub-menu,
.main-nav .menu-item-has-children:focus-within > .sub-menu,
.main-nav .menu-item-has-children.is-open > .sub-menu { display: block; }

.account__button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .8rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.account__button:hover { border-color: var(--c-brand); color: var(--c-brand); }
.account__button .icon--chevron { width: 1rem; height: 1rem; }

.menu-button {
    display: none;
    align-items: center;
    gap: .4rem;
    margin-inline-start: auto;
    padding: .5rem .75rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.menu-button__close { display: none; }
.menu-open .menu-button__open { display: none; }
.menu-open .menu-button__close { display: inline; }


/* 6. Footer
   ========================================================================== */

.site-footer {
    margin-top: var(--section);
    background: var(--c-footer);
    color: var(--c-footer-text);
    font-size: .95rem;
}
.site-footer a { color: var(--c-footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-block: 3.5rem;
}
.site-footer__logo { display: block; max-width: 180px; height: auto; margin-bottom: 1.25rem; }
.site-footer__title {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1rem;
}
.site-footer address { font-style: normal; margin-bottom: 1rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li + li { margin-top: .45rem; }

.contact-list { margin: 0; }
.contact-list div { display: flex; gap: .5rem; }
.contact-list dt { min-width: 4.5rem; color: #8d9aa6; }
.contact-list dd { margin: 0; }

.social-links { list-style: none; margin: 0; padding: 0; }
.social-links li + li { margin-top: .45rem; }
.social-links a { display: inline-flex; align-items: center; gap: .6rem; }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .85rem;
    color: #8d9aa6;
}
.site-footer__bottom p { margin: 0; padding-block: 1.25rem; }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 2rem; }
.site-footer__credit a { color: #aab6c1; }
.site-footer__credit a:hover { color: #fff; }
@media (max-width: 760px) {
    .site-footer__bottom-inner { flex-direction: column; }
    .site-footer__bottom-inner p + p { padding-top: 0; }
}

/* Help panel: the "Help" tab on the right edge and the panel it slides out
   (template-parts/help-panel.php, assets/js/site.js section 5) */
.help-tab {
    position: fixed;
    inset-inline-end: 0;
    top: 50%;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: .9rem .55rem;
    border: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: var(--c-brand);
    color: var(--c-on-brand);
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(5, 25, 43, .25);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .15s, padding .15s;
}
.help-tab span { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .02em; }
.help-tab .icon { width: 1.3rem; height: 1.3rem; }
.help-tab:hover { background: var(--c-brand-dark); padding-inline-end: .75rem; }
.help-open .help-tab { visibility: hidden; }

.help-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(5, 25, 43, .35);
}

.help-panel {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    width: min(400px, 100%);
    padding: 1.5rem;
    overflow-y: auto;
    background: var(--c-paper);
    box-shadow: -12px 0 40px rgba(5, 25, 43, .2);
    transform: translateX(100%);
    transition: transform .25s ease;
}
.help-panel.is-open { transform: none; }
.help-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.help-panel__title { margin: 0; font-size: 1.45rem; letter-spacing: -.01em; }
.help-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--c-line);
    border-radius: 50%;
    background: var(--c-paper);
    color: var(--c-ink);
    cursor: pointer;
}
.help-panel__close:hover { border-color: var(--c-brand); color: var(--c-brand); }
.help-panel__intro { margin: .5rem 0 1.5rem; color: var(--c-muted); }

.help-options { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.help-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.help-option:hover { border-color: transparent; box-shadow: var(--shadow-lift); color: var(--c-ink); transform: translateY(-2px); }
.help-option__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--c-brand-soft);
    color: var(--c-brand);
}
.help-option__icon .icon { width: 1.4rem; height: 1.4rem; }
.help-option__icon--whatsapp { background: #e3f4ea; color: #157347; }
.help-option__text { display: grid; gap: .1rem; min-width: 0; }
.help-option__title { font-weight: 600; line-height: 1.3; }
.help-option__desc { color: var(--c-muted); font-size: .9rem; line-height: 1.35; }
.help-option__arrow { width: 1.1rem; height: 1.1rem; margin-inline-start: auto; color: var(--c-muted); transition: transform .15s, color .15s; }
.help-option:hover .help-option__arrow { color: var(--c-brand); transform: translateX(3px); }
.help-option:hover .help-option__arrow.icon--external { transform: none; }


/* 7. Page header, side menu, page content
   ========================================================================== */

.page-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center; /* title in the vertical middle of the header */
    min-height: clamp(120px, 13vw, 150px);
    background: var(--c-brand-dark);
    color: #fff;
}
.page-hero--image { min-height: clamp(190px, 22vw, 300px); }
.page-hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.page-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Darkens the picture evenly (a little more at the bottom) so the white title stays readable on any photo */
.page-hero--image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(5, 25, 43, .8) 0%, rgba(5, 25, 43, .55) 50%, rgba(5, 25, 43, .4) 100%);
}
.page-hero__inner { padding-block: clamp(1.25rem, 3vw, 2rem); }
.page-hero__title {
    max-width: 28ch;
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.6rem);
    letter-spacing: -.02em;
    text-wrap: balance;
}
.page-hero__lead { max-width: 62ch; margin: .6rem 0 0; font-size: 1.075rem; color: rgba(255, 255, 255, .9); }

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    margin: 0 0 .9rem;
    padding: 0;
    list-style: none;
    font-size: .9rem;
}
.breadcrumbs li + li::before { content: "/"; margin-inline-end: .5rem; color: rgba(255, 255, 255, .55); }
.breadcrumbs a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }

.side-menu { position: sticky; top: 1.5rem; }
.side-menu__title {
    margin-bottom: .75rem;
    font-size: .95rem;
    color: var(--c-muted);
    font-weight: 600;
}
.side-menu__list { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--c-line); }
.side-menu__list a {
    display: block;
    margin-inline-start: -1px;
    padding: .5rem 1rem;
    border-inline-start: 3px solid transparent;
    color: var(--c-text);
    text-decoration: none;
}
.side-menu__list a:hover { color: var(--c-brand); border-inline-start-color: var(--c-line); }
.side-menu__list .current-menu-item > a { border-inline-start-color: var(--c-brand); color: var(--c-brand); font-weight: 600; }

.widget + .widget { margin-top: 2rem; }
.widget__title { font-size: 1rem; }
.widget ul { list-style: none; padding: 0; }

/* Text written in the page editor */
/* Buttons made with the editor's "Buttons" block look like the site's own buttons */
.entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem; }
.entry-content .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    padding: .7rem 1.3rem;
    border: 1px solid var(--c-brand);
    border-radius: var(--radius);
    background: var(--c-brand);
    color: var(--c-on-brand);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.entry-content .wp-block-button__link:hover { border-color: var(--c-brand-dark); background: var(--c-brand-dark); color: var(--c-on-brand); }
.entry-content .is-style-outline .wp-block-button__link { background: transparent; color: var(--c-brand); }
.entry-content { overflow-wrap: break-word; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 2rem; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4rem; }
.entry-content li + li { margin-top: .3rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
    padding-inline-start: 1.25rem;
    border-inline-start: 3px solid var(--c-brand);
    color: var(--c-muted);
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .6rem .75rem; border: 1px solid var(--c-line); text-align: start; vertical-align: top; }
.entry-content th { background: var(--c-soft); color: var(--c-ink); }
.entry-content iframe { border: 0; }
.entry-content .alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.entry-content .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.entry-content .aligncenter { display: block; margin-inline: auto; }
.entry-content .wp-caption-text { font-size: .9rem; color: var(--c-muted); }

.post-list { display: grid; gap: 2rem; }
.post-summary { padding-bottom: 2rem; border-bottom: 1px solid var(--c-line); }
.post-summary__title { margin-bottom: .25rem; font-size: 1.3rem; }
.post-summary__title a { color: var(--c-ink); text-decoration: none; }
.post-summary__title a:hover { color: var(--c-brand); text-decoration: underline; }
.post-summary__meta { color: var(--c-muted); font-size: .9rem; }

.site-search { display: flex; gap: .5rem; margin-bottom: 1rem; }
.site-search__hint { color: var(--c-muted); margin-bottom: 2rem; }

.nav-links { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 2rem; }
.nav-links .page-numbers {
    min-width: 2.5rem;
    padding: .45rem .7rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
}
.nav-links .current { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }


/* 8. Home page
   ========================================================================== */

/* Banner: full-width photo/video, the title and search box sit directly on it */
.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(460px, 68vh, 640px);
    background: var(--c-brand-dark);
    color: #fff;
    isolation: isolate;
}
.home-hero--compact { min-height: 340px; }
.home-hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.home-hero__media img, .home-hero__media video { width: 100%; height: 100%; object-fit: cover; }
/* Slow zoom on the banner photo (not on video, which moves already) */
.home-hero__media img {
    transform-origin: 50% 40%;
    animation: gl-hero-zoom 20s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes gl-hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}
/* Darkens the picture on the text side so the white text stays readable */
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(5, 25, 43, .82) 0%, rgba(5, 25, 43, .6) 45%, rgba(5, 25, 43, .25) 100%);
}
.home-hero__inner { width: 100%; padding-block: clamp(3rem, 8vw, 5.5rem); }
.home-hero__panel { max-width: 780px; }
.home-hero__title {
    margin-bottom: 1.75rem;
    color: #fff;
    font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem);
    letter-spacing: -.025em;
    line-height: 1.12;
    text-wrap: balance;
}
.home-hero__title p { margin: 0; }
.home-hero .section__title, .home-hero h2 { color: #fff; }

/* Home search: tabs (where to search), the search bar, a hint line, other collections */
.home-search { margin: 0; }

.home-search__scopes {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.5rem;
    margin: 0 0 .9rem;
    padding: 0;
    border: 0;
}
.home-search__scope { position: relative; cursor: pointer; }
.home-search__scope input { position: absolute; opacity: 0; pointer-events: none; }
.home-search__scope > span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, .78);
    font-weight: 500;
    transition: color .15s, border-color .15s;
}
.home-search__scope > span .icon { width: .9rem; height: .9rem; opacity: .8; }
.home-search__scope:hover > span { color: #fff; }
.home-search__scope input:checked + span { border-bottom-color: var(--c-accent); color: #fff; font-weight: 600; }
.home-search__scope input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 2px; }

.home-search__bar {
    display: flex;
    align-items: center;
    min-height: 4rem;
    padding: .4rem .4rem .4rem .5rem;
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    transition: box-shadow .15s;
}
.home-search__bar:focus-within { box-shadow: 0 0 0 3px var(--c-accent), 0 12px 40px rgba(0, 0, 0, .28); }
.home-search__input {
    flex: 1;
    min-width: 0;
    height: 3.2rem;
    padding: 0 .9rem;
    border: 0;
    background: transparent;
    color: var(--c-ink);
    font-size: 1.15rem;
}
.home-search__input:focus { outline: none; box-shadow: none; }
.home-search__input::placeholder { color: #7c8894; opacity: 1; }
.home-search__voice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-inline-end: .35rem;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--c-muted);
    cursor: pointer;
}
.home-search__voice:hover { background: var(--c-soft); color: var(--c-brand); }
.home-search__voice.is-listening { background: #fdeeed; color: #c62828; }
.home-search__submit {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    height: 3.2rem;
    padding: 0 1.6rem;
    border: 0;
    border-radius: calc(var(--radius-lg) - 3px);
    background: var(--c-brand);
    color: var(--c-on-brand);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s;
}
.home-search__submit .icon { width: 1.15rem; height: 1.15rem; transition: transform .15s; }
.home-search__submit:hover { background: var(--c-brand-dark); }
.home-search__submit:hover .icon { transform: translateX(3px); }

.home-search__help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem 1.5rem;
    min-height: 1.5rem;
    margin-top: .8rem;
    font-size: .92rem;
}
.home-search__hint { margin: 0; color: rgba(255, 255, 255, .78); }
.home-search__advanced {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.home-search__advanced .icon { width: 1rem; height: 1rem; transition: transform .15s; }
.home-search__advanced:hover { color: #fff; text-decoration: underline; }
.home-search__advanced:hover .icon { transform: translateX(3px); }

/* "Also search": other collections, under the search box */
.home-hero__links {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem 1rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
    font-size: .92rem;
}
.home-hero__links-label { color: rgba(255, 255, 255, .7); font-weight: 600; }
.home-hero__links ul { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.home-hero__links a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .35);
    text-underline-offset: .25em;
}
.home-hero__links a:hover { color: #fff; text-decoration-color: #fff; }
.home-hero__links .icon { width: .85rem; height: .85rem; opacity: .75; }
.home-hero .login-button { margin-top: 1.5rem; }

/* Shared card look for the home sections */
.trial-card, .resource-tile, .event, .social-tile {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-sm);
}
.trial-card, .resource-tile, .social-tile {
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.trial-card:hover, .resource-tile:hover, .social-tile:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lift);
    transform: translateY(-3px);
}

/* Trial resources: picture beside the name, end date and a clear call to action */
.trial-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.trial-card {
    display: grid;
    grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
    height: 100%;
    overflow: hidden;
    color: var(--c-ink);
    text-decoration: none;
}
.trial-card:hover { color: var(--c-ink); }
.trial-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 1rem;
    border-inline-end: 1px solid var(--c-line);
    background: #fff;
}
.trial-card__media img { max-width: 100%; max-height: 210px; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.trial-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .55rem;
    padding: 1.5rem;
}
.trial-card__name { font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.trial-card__until { display: flex; align-items: center; gap: .45rem; color: var(--c-muted); font-size: .92rem; }
.trial-card__until .icon { width: 1rem; height: 1rem; color: var(--c-accent); }
.trial-card__action {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .6rem;
    color: var(--c-brand);
    font-weight: 600;
}
.trial-card__action .icon { width: 1.1rem; height: 1.1rem; transition: transform .2s; }
.trial-card:hover .trial-card__action .icon { transform: translateX(4px); }

/* Online resources: logo tiles (logos are 5:3 images, shown whole) */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.resource-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    color: var(--c-ink);
    text-decoration: none;
}
.resource-tile:hover { color: var(--c-brand); }
.resource-tile__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 5 / 3;
    background: #fff;
}
.resource-tile__logo img { width: 100%; height: 100%; object-fit: contain; }
.resource-tile__name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding: .8rem 1rem .9rem;
    border-top: 1px solid var(--c-line);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.3;
}
.resource-tile__name .icon { width: 1.05rem; height: 1.05rem; color: var(--c-brand); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.resource-tile:hover .resource-tile__name .icon,
.resource-tile:focus-visible .resource-tile__name .icon { opacity: 1; transform: none; }

/* Upcoming trainings: date block + details */
.event-list { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.event {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 1.5rem 1.1rem 1.1rem;
}
.event__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .7rem .4rem;
    border-radius: 8px;
    background: var(--c-brand-soft);
    color: var(--c-brand);
    line-height: 1.1;
    text-align: center;
}
.event__day { font-size: 2rem; font-weight: 600; letter-spacing: -.02em; }
.event__month { margin-top: .2rem; font-size: .8rem; font-weight: 600; }
.event__title { margin: 0 0 .3rem; font-size: 1.15rem; }
.event__meta { margin: 0; color: var(--c-muted); font-size: .95rem; }
.event__logo img { display: block; max-width: 120px; max-height: 44px; width: auto; object-fit: contain; }
.event__action { border-color: var(--c-brand); color: var(--c-brand); }
.event__action:hover { background: var(--c-brand); color: var(--c-on-brand); }

/* New arrivals: a shelf of book covers that scrolls sideways */
.shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, calc((100% - 5 * 1.75rem) / 6));
    gap: 1.75rem;
    margin: 0;
    padding: .5rem 0 1.25rem;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.book { scroll-snap-align: start; }
.book__link { display: flex; flex-direction: column; gap: .25rem; color: var(--c-ink); text-decoration: none; }
.book__cover {
    display: block;
    margin-bottom: .75rem;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: var(--c-soft);
    box-shadow: 0 1px 2px rgba(19, 33, 46, .12), 0 10px 22px rgba(19, 33, 46, .14);
    transition: transform .2s, box-shadow .2s;
}
.book__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.book__link:hover .book__cover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(19, 33, 46, .12), 0 18px 34px rgba(19, 33, 46, .2); }
a.book__link:hover .book__title { color: var(--c-brand); }
.book__title, .book__meta {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book__title { font-weight: 600; line-height: 1.3; }
.book__meta { color: var(--c-muted); font-size: .875rem; line-height: 1.35; }

.shelf__controls { display: flex; gap: .5rem; }
.shelf__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--c-line);
    border-radius: 50%;
    background: var(--c-paper);
    color: var(--c-ink);
    cursor: pointer;
    transition: border-color .15s, color .15s, box-shadow .15s;
}
.shelf__button:hover:not(:disabled) { border-color: var(--c-brand); color: var(--c-brand); box-shadow: var(--shadow-sm); }
.shelf__button:disabled { opacity: .35; cursor: default; }

/* Announcements: cards with picture, date, title, excerpt (inc/template-tags.php gl_news_cards) */
.news-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); /* 4 in a row on a wide screen; 2 or 3 posts share the row */
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.news-card:hover { border-color: transparent; box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.news-card:focus-within { box-shadow: 0 0 0 3px var(--c-accent), var(--shadow-lift); }
.news-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-brand-soft); }
.news-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--c-brand); }
.news-card__placeholder .icon { width: 2.5rem; height: 2.5rem; opacity: .5; }
.news-card__body { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: 1.25rem 1.4rem 1.4rem; }
.news-card__date { color: var(--c-muted); font-size: .85rem; font-weight: 500; }
.news-card__title { margin: 0; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; }
.news-card__title a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--c-ink);
    text-decoration: none;
}
/* The whole card is the link (the title's link covers it) */
.news-card__title a::after { content: ""; position: absolute; inset: 0; }
.news-card__title a:focus { outline: none; }
.news-card:hover .news-card__title a { color: var(--c-brand); }
.news-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
    overflow: hidden;
    color: var(--c-text);
}
.news-card__more { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .5rem; color: var(--c-brand); font-weight: 600; }
.news-card__more .icon { width: 1.1rem; height: 1.1rem; transition: transform .2s; }
.news-card:hover .news-card__more .icon { transform: translateX(4px); }

/* A single announcement: one wide card, picture beside the text */
.news-cards--single { grid-template-columns: 1fr; }
.news-cards--single .news-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.news-cards--single .news-card__media { aspect-ratio: auto; min-height: 300px; }
.news-cards--single .news-card__body { justify-content: center; gap: .75rem; padding: clamp(1.5rem, 4vw, 2.75rem); }
.news-cards--single .news-card__title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); }
.news-cards--single .news-card__excerpt { -webkit-line-clamp: 5; font-size: 1.05rem; }
.news-cards--single .news-card__more { margin-top: .5rem; }

/* FAQs: accordion on the home page and the FAQ page (inc/faq.php, template-faq.php) */
.faq-list { display: grid; gap: .75rem; }
.faq {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .2s;
}
.faq:hover { border-color: #c4d3e0; }
.faq[open] { border-color: #b9cde0; box-shadow: var(--shadow); }
.faq[hidden] { display: none; }
.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.25rem 1.05rem 1.4rem;
    border-radius: var(--radius-lg);
    color: var(--c-ink);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover, .faq[open] .faq__question { color: var(--c-brand); }
.faq__question:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.faq__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--c-brand-soft);
    color: var(--c-brand);
    transition: transform .25s ease, background-color .2s, color .2s;
}
.faq__icon .icon { width: 1.1rem; height: 1.1rem; }
.faq[open] .faq__icon { background: var(--c-brand); color: var(--c-on-brand); transform: rotate(45deg); }
.faq__answer { padding: 0 1.4rem 1.25rem; color: var(--c-text); }
.faq[open] .faq__answer { animation: faq-open .25s ease; }
.faq__answer p { margin: 0 0 .75rem; }
.faq__answer p:last-child { margin-bottom: 0; }
.faq__answer a { font-weight: 600; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Home: heading and button on the left, questions on the right, on a light blue band */
.home-faq { background: linear-gradient(160deg, var(--c-brand-soft) 0%, #f6f9fc 70%); }
.home-faq__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.home-faq__intro { position: sticky; top: 1.5rem; }
.home-faq__title { margin-bottom: .75rem; }
.home-faq__lead { margin: 0 0 1.75rem; max-width: 36ch; color: var(--c-muted); font-size: 1.075rem; }

/* FAQ page: search box and categories on the left, questions by category on the right */
.faq-nav { position: sticky; top: 1.5rem; display: grid; gap: 1.25rem; }
.faq-search { position: relative; display: block; }
.faq-search .icon { position: absolute; inset-inline-start: .8rem; top: 50%; color: var(--c-muted); transform: translateY(-50%); }
.faq-search input { width: 100%; padding-inline-start: 2.6rem; }
.faq-nav__list { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.faq-nav__list li[hidden] { display: none; }
.faq-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .85rem;
    border-radius: 8px;
    color: var(--c-text);
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.faq-nav__link:hover { background: var(--c-soft); color: var(--c-ink); }
.faq-nav__link.is-active { background: var(--c-brand-soft); color: var(--c-brand); font-weight: 600; }
.faq-nav__count { min-width: 1.6rem; padding: .05rem .45rem; border-radius: 999px; background: var(--c-soft); color: var(--c-muted); font-size: .8rem; font-weight: 600; text-align: center; }
.faq-nav__link.is-active .faq-nav__count { background: var(--c-paper); color: var(--c-brand); }
.faq-page__intro { margin-bottom: 2rem; }
.faq-page__status { margin: 0 0 1.25rem; color: var(--c-muted); font-weight: 500; }
.faq-page__status:empty { display: none; }
.faq-group { scroll-margin-top: 1.5rem; }
.faq-group[hidden] { display: none; }
.faq-group + .faq-group { margin-top: 2.75rem; }
.faq-group__title { margin: 0 0 1rem; font-size: 1.35rem; letter-spacing: -.01em; }
.faq-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.5rem;
    margin-top: 3.5rem;
    padding: 1.6rem 1.75rem;
    border-radius: var(--radius-lg);
    background: var(--c-brand-dark);
    color: var(--c-on-brand);
}
.faq-help__icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.faq-help__icon .icon { width: 1.4rem; height: 1.4rem; }
.faq-help__text { flex: 1 1 260px; }
.faq-help__title { margin: 0 0 .25rem; color: var(--c-on-brand); font-size: 1.2rem; }
.faq-help__text p { margin: 0; opacity: .85; }
.faq-help__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.faq-help .button { border-color: rgba(255, 255, 255, .5); background: transparent; color: var(--c-on-brand); }
.faq-help .button:hover { border-color: var(--c-on-brand); color: var(--c-on-brand); }
.faq-help .button--primary { border-color: var(--c-paper); background: var(--c-paper); color: var(--c-brand-dark); }
.faq-help .button--primary:hover { background: var(--c-brand-soft); color: var(--c-brand-dark); }

/* Services: on the dark blue band */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.service-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .06);
    color: var(--c-on-brand);
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}
.service-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: var(--c-accent);
}
.service-link__icon .icon { width: 1.5rem; height: 1.5rem; }
.service-link__arrow { margin-inline-start: auto; opacity: .55; transition: transform .2s, opacity .2s; }
.service-link:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: var(--c-on-brand); }
.service-link:hover .service-link__arrow { opacity: 1; transform: translateX(4px); }

/* Visit us: map + address, contact, social links and the visitor counter */
.visit__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: stretch;
}
.visit__grid--no-map { grid-template-columns: minmax(0, 1fr); max-width: calc(760px + 2 * var(--gutter)); }
.visit__map {
    min-height: 460px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-sm);
}
.visit__map iframe { display: block; width: 100%; height: 100%; min-height: 460px; border: 0; }
.visit__info { display: flex; flex-direction: column; gap: 1.4rem; }
.visit__title { margin: 0; }
.visit__address { display: flex; gap: .75rem; margin: 0; color: var(--c-ink); font-size: 1.1rem; font-style: normal; line-height: 1.5; }
.visit__address .icon { margin-top: .2rem; color: var(--c-brand); }
.visit__contacts {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    list-style: none;
}
.visit__contacts li { display: flex; align-items: center; gap: .75rem; }
.visit__contacts .icon { width: 1.1rem; height: 1.1rem; color: var(--c-brand); }
.visit__contact-label { min-width: 3.75rem; color: var(--c-muted); font-size: .9rem; }
.visit__contacts a { color: var(--c-ink); text-decoration: none; font-weight: 500; }
.visit__contacts a:hover { color: var(--c-brand); text-decoration: underline; }
.visit__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.visit__subtitle { margin: .25rem 0 -.5rem; font-size: 1.05rem; }

.social-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.social-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .8rem;
    align-items: center;
    height: 100%;
    padding: .8rem 1rem;
    color: var(--c-ink);
    text-decoration: none;
}
.social-tile:hover { color: var(--c-ink); }
.social-tile .icon { grid-row: span 2; width: 1.6rem; height: 1.6rem; color: var(--c-brand); }
.social-tile__name { font-weight: 600; line-height: 1.25; }
.social-tile__handle { overflow: hidden; color: var(--c-muted); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }

.visitor-count {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .75rem;
    margin: auto 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--c-line);
    color: var(--c-muted);
}
.visitor-count .icon { width: 1.5rem; height: 1.5rem; color: var(--c-accent); }
.visitor-count__number { color: var(--c-ink); font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }

.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

.address-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.address-card { padding: 1.5rem; border: 1px solid var(--c-line); border-radius: var(--radius); }
.address-card__title { font-size: 1.1rem; }


/* 9. E-Resources, portal links, news, page-builder blocks
   ========================================================================== */

/* Expandable rows (E-Resources) */
.resource-list { border-top: 1px solid var(--c-line); }
.resource { border-bottom: 1px solid var(--c-line); }
.resource__summary {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem .25rem;
    cursor: pointer;
    list-style: none;
}
.resource__summary::-webkit-details-marker { display: none; }
.resource__summary:hover .resource__name { color: var(--c-brand); }
.resource__logo { display: flex; align-items: center; justify-content: center; height: 48px; }
.resource__logo img { max-height: 48px; max-width: 88px; object-fit: contain; }
.resource__name { color: var(--c-ink); font-weight: 600; font-size: 1.05rem; }
.resource__icon { color: var(--c-muted); transition: transform .15s; }
.resource[open] .resource__icon { transform: rotate(180deg); }
.resource__body { padding: 0 .25rem 1.5rem calc(88px + 1.5rem); }

.resource-links { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.resource-links a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
}
.resource-links a:hover { border-color: var(--c-brand); }
.resource-links small { color: var(--c-muted); }

.eresources__controls { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.eresources__search { position: relative; display: block; max-width: 520px; }
.eresources__search .icon { position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); }
.eresources__search input { padding-inline-start: 2.6rem; font-size: 1.05rem; }
.eresources__count { color: var(--c-muted); font-size: .9rem; }

/* Tabs: underlined buttons (E-Resources tags) */
.tabs { display: flex; flex-wrap: wrap; gap: 0 1.25rem; border-bottom: 1px solid var(--c-line); }
.tabs__item {
    margin-bottom: -1px;
    padding: .6rem 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--c-muted);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.tabs__item:hover { color: var(--c-ink); }
.tabs__item[aria-pressed="true"] { color: var(--c-brand); border-bottom-color: var(--c-brand); font-weight: 600; }

/* News */
.news-list { border-top: 1px solid var(--c-line); }
.news-item { border-bottom: 1px solid var(--c-line); }
.news-item summary {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: baseline;
    padding: 1rem 0;
    cursor: pointer;
    list-style: none;
}
.news-item summary::-webkit-details-marker { display: none; }
.news-item time { color: var(--c-muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.news-item__title { color: var(--c-ink); font-weight: 600; }
.news-item summary:hover .news-item__title { color: var(--c-brand); }
.news-item__icon { align-self: center; color: var(--c-muted); transition: transform .15s; }
.news-item[open] .news-item__icon { transform: rotate(180deg); }
.news-item__body { padding: 0 0 1.5rem 8.5rem; }

/* Portal (myGUtech links) */
.portal-index {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--c-line);
    font-weight: 500;
}
.portal-group + .portal-group { margin-top: 2.75rem; }
.portal-group__title { font-size: 1.3rem; }
.portal-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.portal-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 100%;
    padding: .75rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    color: var(--c-ink);
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
}
.portal-link:hover { border-color: var(--c-brand); color: var(--c-brand); }
.portal-link__icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 3px; overflow: hidden; background: var(--c-soft); }
.portal-link__icon img { width: 100%; height: 100%; object-fit: cover; }

/* Library staff page (page content uses these classes: .staff, .staff__card ...) */
.entry-content .staff { margin-block: .5rem 1rem; }
.staff__lead {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--c-line);
    border-left: 4px solid var(--c-brand);
    border-radius: var(--radius-lg);
    background: var(--c-brand-soft);
}
.staff__lead .staff__name { margin: .1rem 0 0; font-size: 1.5rem; }
.staff__lead .staff__role { margin: 0; color: var(--c-brand); font-weight: 600; }
.entry-content .staff__heading { margin: 0 0 1.25rem; font-size: 1.25rem; }
.staff__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0 !important;
    list-style: none;
}
.entry-content .staff__grid li + li { margin-top: 0; }
.staff__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.75rem 1.25rem 1.5rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: box-shadow .2s, transform .2s;
}
.staff__card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.staff__avatar {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 50% !important;
    object-fit: cover;
    box-shadow: 0 0 0 4px var(--c-paper), 0 0 0 5px var(--c-line);
}
.staff__card .staff__avatar { margin-bottom: 1rem; }
.staff__avatar--initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    background: var(--c-brand);
    box-shadow: 0 0 0 4px var(--c-brand-soft), 0 0 0 5px rgba(11, 74, 125, .25);
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.staff__card .staff__name { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.3; }
.staff__card .staff__role { margin: 0; color: var(--c-muted); font-size: .92rem; }
@media (max-width: 520px) {
    .staff__lead { flex-direction: column; text-align: center; }
}

/* Opening hours page (page content uses these classes: .hours, .hours__period ...) */
.entry-content .hours { display: grid; gap: 1.5rem; margin-block: .5rem 1rem; }
.hours__period { overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-paper); box-shadow: var(--shadow-sm); }
.hours__head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--c-line); background: var(--c-soft); }
.entry-content .hours__title { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; }
.entry-content .hours__sub { margin: .15rem 0 0; color: var(--c-muted); font-size: .92rem; }
.entry-content .hours__table { width: 100%; margin: 0; border: 0; border-collapse: collapse; }
.entry-content .hours__table th, .entry-content .hours__table td { padding: 1rem 1.4rem; border: 0; border-bottom: 1px solid var(--c-line); background: none; text-align: left; vertical-align: middle; }
.entry-content .hours__table tbody tr:last-child > * { border-bottom: 0; }
.entry-content .hours__table thead th { padding-block: .6rem; color: var(--c-muted); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hours__facility { display: block; color: var(--c-ink); font-weight: 600; }
.hours__floor { margin-inline-start: .35rem; color: var(--c-muted); font-size: .85rem; font-weight: 500; }
.hours__info { display: block; margin-top: .1rem; color: var(--c-muted); font-size: .9rem; font-weight: 400; }
.hours__time { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours__status { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.hours__status--open { background: #e3f1e8; color: var(--c-success); }
.hours__status--closed { background: var(--c-soft); color: var(--c-muted); }

/* Contact page (template-contact.php): details on the left, form on the right, map below */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__title { margin: 0 0 .5rem; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); letter-spacing: -.01em; }
.contact__lead { margin: 0 0 1.75rem; color: var(--c-muted); }
.contact-list { display: grid; gap: 1.1rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.contact-list__item { display: flex; align-items: flex-start; gap: .9rem; }
.contact-list__icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--c-brand-soft); color: var(--c-brand); }
.contact-list__icon .icon { width: 1.15rem; height: 1.15rem; }
.contact-list__text { display: flex; flex-direction: column; padding-top: .05rem; }
.contact-list__label { color: var(--c-muted); font-size: .85rem; font-weight: 500; }
.contact-list__value { color: var(--c-ink); font-style: normal; font-weight: 600; line-height: 1.45; }
.contact-list__value a { color: inherit; text-decoration: none; }
.contact-list__value a:hover { color: var(--c-brand); text-decoration: underline; }
address.contact-list__value { font-weight: 500; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.75rem; }
.contact__actions .icon { width: 1.1rem; height: 1.1rem; }
.contact-links { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.contact-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    color: var(--c-text);
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
.contact-links a:hover { border-color: var(--c-brand); box-shadow: var(--shadow-sm); }
.contact-links strong { display: block; color: var(--c-ink); }
.contact-links .icon { flex: none; width: 1.1rem; height: 1.1rem; color: var(--c-brand); transition: transform .2s; }
.contact-links a:hover .icon { transform: translateX(3px); }
.contact__form { padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-paper); box-shadow: var(--shadow); }
.contact__form .entry-content > :last-child { margin-bottom: 0; }
.contact__map { overflow: hidden; margin-top: clamp(2.5rem, 5vw, 3.5rem); border: 1px solid var(--c-line); border-radius: var(--radius-lg); }
.contact__map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* My Library (template-my-library.php, inc/my-library.php) and the links to it */
.dropdown__feature { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .3rem; padding: .65rem 1rem; border-bottom: 1px solid var(--c-line); color: var(--c-ink); font-weight: 600; text-decoration: none; }
.dropdown__feature:hover { background: var(--c-soft); color: var(--c-brand); }
.dropdown__feature small { display: block; color: var(--c-muted); font-size: .8rem; font-weight: 400; }

.ml-strip { border-bottom: 1px solid var(--c-line); background: var(--c-paper); }
.ml-strip__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding-block: 1rem; }
.ml-strip__hello { margin: 0; color: var(--c-ink); font-size: 1.05rem; font-weight: 600; }
.ml-strip__facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; color: var(--c-muted); font-size: .95rem; list-style: none; }
.ml-strip__facts li { display: inline-flex; align-items: center; gap: .4rem; }
.ml-strip__facts .icon { width: 1rem; height: 1rem; color: var(--c-brand); }
.ml-strip__facts li:first-child .icon { color: var(--c-accent); }
.ml-strip__button { margin-inline-start: auto; }

.my-library__intro { margin-bottom: 2rem; }
.my-library__top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.ml-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.5rem; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-paper); box-shadow: var(--shadow-sm); }
.ml-card__head { display: flex; align-self: stretch; align-items: center; justify-content: space-between; gap: 1rem; }
.ml-card__title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: 1.15rem; }
.ml-card__title .icon { width: 1.2rem; height: 1.2rem; color: var(--c-brand); }
.ml-card__head .ml-card__title { margin: 0; }
.ml-link-button { padding: 0; border: 0; background: none; color: var(--c-brand); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.ml-link-button:hover { text-decoration: underline; }
.ml-empty { margin: 0; color: var(--c-muted); }
.ml-alert { align-self: stretch; margin: 0 0 .5rem; padding: .65rem .9rem; border-radius: 8px; font-size: .92rem; font-weight: 500; }
.ml-alert--ok { background: #e8f3ec; color: var(--c-success); }
.ml-alert--error { background: #fdeeed; color: #8a1c14; }
.ml-booking__label { margin: 0; color: var(--c-muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ml-booking__room { margin: 0; color: var(--c-ink); font-size: 1.25rem; font-weight: 600; }
.ml-booking__when { display: flex; align-items: center; gap: .45rem; margin: 0 0 .5rem; color: var(--c-text); }
.ml-booking__when .icon { width: 1.05rem; height: 1.05rem; color: var(--c-brand); }
.ml-booking__cancel { margin: 0; }
.ml-searches { align-self: stretch; display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.ml-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .1rem 1rem; padding: .6rem .5rem; border-radius: 8px; color: var(--c-text); text-decoration: none; }
.ml-search:hover { background: var(--c-soft); }
.ml-search__label { overflow: hidden; color: var(--c-ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ml-search__meta { grid-column: 1; color: var(--c-muted); font-size: .85rem; }
.ml-search .icon { grid-column: 2; grid-row: 1 / 3; width: 1.1rem; height: 1.1rem; color: var(--c-brand); transition: transform .2s; }
.ml-search:hover .icon { transform: translateX(3px); }

.ml-saved__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ml-saved__title { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); }
.ml-saved__title .icon { width: 1.4rem; height: 1.4rem; color: var(--c-accent); }
.ml-filter { position: relative; display: block; width: min(100%, 320px); }
.ml-filter .icon { position: absolute; inset-inline-start: .75rem; top: 50%; color: var(--c-muted); transform: translateY(-50%); }
.ml-filter input { width: 100%; padding-inline-start: 2.5rem; }
.ml-export { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .85rem 1rem; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-soft); }
.ml-export__all { margin: 0; font-weight: 600; }
.ml-export__count { color: var(--c-muted); font-size: .9rem; }
.ml-export__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-inline-start: auto; }
.ml-export__style { display: flex; align-items: center; gap: .5rem; color: var(--c-muted); font-size: .9rem; }
.ml-export__style select { width: auto; padding: .4rem .6rem; }
.ml-export__status { flex-basis: 100%; margin: 0; color: var(--c-ink); font-weight: 500; }
.ml-export .button:disabled { opacity: .5; cursor: not-allowed; }
.ml-saved__list .ml-item { grid-template-columns: auto minmax(0, 1fr); }
.ml-saved__list .ml-item.result--image { grid-template-columns: auto 72px minmax(0, 1fr); }
.ml-item[hidden] { display: none; }
.ml-item__check { padding-top: .2rem; }
.ml-item__check input { width: 1.1rem; height: 1.1rem; }
.ml-item .result__title { color: var(--c-ink); }
.ml-item__date { color: var(--c-muted); }
.result__action.ml-item__remove { color: var(--c-muted); }
.result__action.ml-item__remove:hover { border-color: #e7a9a4; background: #fdeeed; color: #b3261e; }
.ml-saved__empty { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 3rem 1.5rem; border: 1px dashed #c4ced8; border-radius: var(--radius-lg); text-align: center; }
.ml-saved__empty p { max-width: 52ch; margin: 0; color: var(--c-muted); }
.ml-saved__empty p strong { color: var(--c-ink); font-size: 1.1rem; }
.ml-saved__empty .button { margin-top: 1rem; }
.ml-saved__empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; margin-bottom: .75rem; border-radius: 50%; background: #fdf3d8; color: var(--c-accent); }
.ml-saved__empty-icon .icon { width: 1.6rem; height: 1.6rem; }
[data-saved-empty][hidden] { display: none; }

/* Featured contents */
.feature-list { display: grid; gap: 2rem; }
.feature { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; }
.feature:not(:has(.feature__image)) { grid-template-columns: 1fr; }
.feature__image img { width: 100%; height: auto; border-radius: var(--radius); }
.feature__title { font-size: 1.2rem; }


/* 10. Plugins and old page content
   ========================================================================== */

/* Gravity Forms
   Gravity Forms' own stylesheet is switched off; everything below styles its
   current markup (see inc/gravity-forms.php). Forms show as a card. */
.gform_wrapper {
    max-width: 780px;
    margin-block: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-sm);
}
.entry-content > .gform_wrapper:first-child { margin-top: 0; }
.gform_wrapper form { margin: 0; }
.gform_heading { margin-bottom: 1.5rem; }
.gform_heading:not(:has(.gform_title, .gform_required_legend, .gform_description:not(:empty))) { display: none; }
.gform_title { margin: 0 0 .5rem; font-size: 1.35rem; }
.gform_description:empty { display: none; }
.gform_required_legend { margin: 0; color: var(--c-muted); font-size: .9rem; }

/* Field grid: 12 columns, so "half width" fields sit side by side */
.gform_fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.35rem 1.25rem;
}
.gform_wrapper .gfield { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.gform_wrapper .gfield--width-quarter { grid-column: span 3; }
.gform_wrapper .gfield--width-third { grid-column: span 4; }
.gform_wrapper .gfield--width-five-twelfths { grid-column: span 5; }
.gform_wrapper .gfield--width-half { grid-column: span 6; }
.gform_wrapper .gfield--width-seven-twelfths { grid-column: span 7; }
.gform_wrapper .gfield--width-two-thirds { grid-column: span 8; }
.gform_wrapper .gfield--width-three-quarter { grid-column: span 9; }
.gform_wrapper .gfield--width-eleven-twelfths { grid-column: span 11; }

.gform_wrapper .gfield_label {
    display: block;
    width: 100%;
    margin: 0 0 .45rem;
    padding: 0;
    color: var(--c-ink);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
}
.gform_wrapper .gfield_required { margin-inline-start: .2rem; color: #b3261e; font-weight: 600; }
.gform_wrapper .gfield_required_text { color: var(--c-muted); font-size: .85em; font-weight: 400; }
.gform_wrapper .gfield_required .gfield_required { margin: 0; }
.gform_wrapper .hidden_label > .gfield_label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.gform_wrapper input[type="text"], .gform_wrapper input[type="email"], .gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"], .gform_wrapper input[type="number"], .gform_wrapper input[type="password"],
.gform_wrapper input[type="date"], .gform_wrapper select, .gform_wrapper textarea {
    width: 100%;
    min-height: 2.9rem;
    padding: .7rem .9rem;
    border: 1px solid #b9c3cc;
    border-radius: 8px;
    background-color: var(--c-paper);
    color: var(--c-ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}
.gform_wrapper input:hover, .gform_wrapper select:hover, .gform_wrapper textarea:hover { border-color: #8d9aa6; }
.gform_wrapper input:focus, .gform_wrapper select:focus, .gform_wrapper textarea:focus {
    border-color: var(--c-brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 74, 125, .18);
}
.gform_wrapper ::placeholder { color: #8d9aa6; opacity: 1; }
.gform_wrapper textarea { min-height: 150px; resize: vertical; }
.gform_wrapper select {
    padding-inline-end: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6874' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .8rem center;
    background-size: 1.1rem;
    cursor: pointer;
}
.gform_wrapper .gfield_description { margin-top: .4rem; color: var(--c-muted); font-size: .875rem; }
.gform_wrapper .ginput_complex { display: flex; flex-wrap: wrap; gap: .75rem; }
.gform_wrapper .ginput_complex > span { flex: 1 1 180px; }
.gform_wrapper .ginput_complex label { display: block; margin-top: .3rem; color: var(--c-muted); font-size: .8rem; font-weight: 400; }

/* Section headings inside a form */
.gform_wrapper .gsection {
    margin-top: .75rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--c-line);
}
.gform_wrapper .gform_fields > .gsection:first-child { margin-top: 0; }
.gform_wrapper .gsection_title { margin: 0; font-size: 1.15rem; }
.gform_wrapper .gsection_description { margin-top: .3rem; color: var(--c-muted); }

/* Checkboxes and radio buttons */
.gform_wrapper .gfield_checkbox, .gform_wrapper .gfield_radio { display: grid; gap: .55rem; }
.gform_wrapper .gchoice { display: flex; align-items: center; gap: .65rem; }
.gform_wrapper .gchoice input { width: 1.15rem; height: 1.15rem; margin: 0; flex-shrink: 0; accent-color: var(--c-brand); cursor: pointer; }
.gform_wrapper .gchoice label { font-weight: 400; cursor: pointer; }

/* Buttons and multi-page navigation */
.gform_wrapper .gform_footer, .gform_wrapper .gform_page_footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-line);
}
.gform_wrapper .button { min-height: 2.9rem; padding: .75rem 1.6rem; border-radius: 8px; font-size: 1rem; }
.gform_wrapper .button--primary { box-shadow: 0 1px 2px rgba(11, 74, 125, .25); }
.gform_wrapper .button:disabled { opacity: .6; cursor: progress; }
.gform_wrapper .gform_ajax_spinner { width: 1.25rem; height: 1.25rem; }

.gform_wrapper .gf_progressbar_wrapper { margin-bottom: 1.75rem; }
.gform_wrapper .gf_progressbar_title { margin: 0 0 .5rem; color: var(--c-muted); font-size: .9rem; font-weight: 600; }
.gform_wrapper .gf_progressbar { height: .5rem; overflow: hidden; border-radius: 999px; background: var(--c-soft); }
.gform_wrapper .gf_progressbar_percentage { height: 100%; border-radius: inherit; background: var(--c-brand); transition: width .3s; }
.gform_wrapper .gf_progressbar_percentage span { display: none; }
.gform_wrapper .gf_page_steps { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--c-line); }
.gform_wrapper .gf_step { display: flex; align-items: center; gap: .5rem; color: var(--c-muted); font-weight: 500; }
.gform_wrapper .gf_step_number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--c-soft);
    font-size: .85rem;
    font-weight: 600;
}
.gform_wrapper .gf_step_active { color: var(--c-ink); }
.gform_wrapper .gf_step_active .gf_step_number, .gform_wrapper .gf_step_completed .gf_step_number { background: var(--c-brand); color: var(--c-on-brand); }

/* Errors and confirmation */
.gform_wrapper .gform_validation_errors {
    margin-bottom: 1.5rem;
    padding: .9rem 1.1rem;
    border: 1px solid #f1c2bf;
    border-radius: 8px;
    background: #fdeeed;
    color: #8a1c14;
}
.gform_wrapper .gform_submission_error { margin: 0; color: inherit; font-size: 1rem; font-weight: 600; }
.gform_wrapper .gform-icon { display: none; } /* needs Gravity Forms' icon font, which is not loaded */
.gform_wrapper .gfield_error .gfield_label { color: #b3261e; }
.gform_wrapper .gfield_error input, .gform_wrapper .gfield_error select, .gform_wrapper .gfield_error textarea { border-color: #b3261e; }
.gform_wrapper .validation_message, .gform_wrapper .gfield_validation_message { margin-top: .4rem; color: #b3261e; font-size: .875rem; font-weight: 500; }
.gform_confirmation_message {
    max-width: 780px;
    padding: 1rem 1.25rem;
    border: 1px solid #b9dcc6;
    border-radius: var(--radius-lg);
    background: #e8f3ec;
    color: var(--c-success);
    font-weight: 500;
}

/* Parts Gravity Forms always hides (anti-spam field, hidden fields) */
.gform_wrapper .gform_validation_container,
.gform_wrapper .gfield_visibility_hidden,
.gform_wrapper .gfield--type-honeypot,
.gform_wrapper .gform_hidden,
.gform_wrapper input[type="hidden"] { display: none !important; }

/* Date picker (jQuery UI, opened by date fields) */
.ui-datepicker {
    z-index: 100 !important;
    width: 18.5rem;
    padding: .85rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    box-shadow: var(--shadow-lift);
    font-size: .9rem;
}
.ui-datepicker-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.ui-datepicker-prev { order: 0; }
.ui-datepicker-title { order: 1; display: flex; gap: .35rem; color: var(--c-ink); font-weight: 600; }
.ui-datepicker-next { order: 2; }
.ui-datepicker-prev, .ui-datepicker-next { padding: .3rem .55rem; border-radius: 6px; color: var(--c-brand); font-weight: 600; text-decoration: none; cursor: pointer; }
.ui-datepicker-prev:hover, .ui-datepicker-next:hover { background: var(--c-brand-soft); }
.ui-datepicker-title select { width: auto; min-height: 0; padding: .25rem .4rem; border: 1px solid var(--c-line); border-radius: 6px; font-size: .85rem; }
.ui-datepicker-calendar { width: 100%; margin: 0; border-collapse: collapse; }
.ui-datepicker-calendar th { padding: .3rem 0; color: var(--c-muted); font-size: .75rem; font-weight: 600; text-align: center; }
.ui-datepicker-calendar td { padding: 1px; text-align: center; }
.ui-datepicker-calendar td a, .ui-datepicker-calendar td span { display: block; padding: .4rem 0; border-radius: 6px; color: var(--c-ink); text-decoration: none; }
.ui-datepicker-calendar td a:hover { background: var(--c-brand-soft); }
.ui-datepicker-calendar .ui-datepicker-today a { color: var(--c-brand); font-weight: 700; }
.ui-datepicker-calendar .ui-state-active { background: var(--c-brand); color: var(--c-on-brand); }
.ui-datepicker-calendar .ui-state-disabled span { opacity: .35; }

@media (max-width: 640px) {
    .gform_wrapper .gfield[class*="gfield--width-"] { grid-column: 1 / -1; }
    .gform_wrapper .gform_footer .button, .gform_wrapper .gform_page_footer .button { flex: 1 1 auto; justify-content: center; }
}

/* Old page content written with Bootstrap 4 column classes keeps a simple grid. */
.entry-content .row { display: flex; flex-wrap: wrap; margin-inline: -.75rem; }
.entry-content .row > [class*="col"] { flex: 1 0 0%; min-width: 0; padding-inline: .75rem; }
.entry-content .row > .col-12 { flex: 0 0 100%; }
@media (min-width: 768px) {
    .entry-content .row > .col-md-3 { flex: 0 0 25%; }
    .entry-content .row > .col-md-4 { flex: 0 0 33.333%; }
    .entry-content .row > .col-md-6 { flex: 0 0 50%; }
    .entry-content .row > .col-md-8 { flex: 0 0 66.666%; }
}
.entry-content .text-center { text-align: center; }
.entry-content .img-fluid { max-width: 100%; height: auto; }
.entry-content .d-none { display: none; }


/* 11. Accessibility: text size and high contrast
   (set by the buttons in the top bar, see inc/accessibility.php)
   ========================================================================== */

html[data-text-size="small"] { font-size: 93.75%; }
html[data-text-size="large"] { font-size: 112.5%; }
html[data-text-size="larger"] { font-size: 125%; }

html[data-contrast="high"] {
    --c-ink: #ffffff;
    --c-text: #ffffff;
    --c-muted: #e6e6e6;
    --c-line: #8a8a8a;
    --c-soft: #111111;
    --c-paper: #000000;
    --c-brand: #ffd400;
    --c-brand-dark: #000000;
    --c-brand-soft: #333300;
    --c-on-brand: #000000;
    --c-accent: #00e5ff;
    --c-footer: #000000;
    --c-footer-text: #ffffff;
}
html[data-contrast="high"] .topbar,
html[data-contrast="high"] .site-header,
html[data-contrast="high"] .site-footer { border-bottom: 1px solid var(--c-line); }
html[data-contrast="high"] .section--brand { color: #fff; }
html[data-contrast="high"] .section--brand .service-link,
html[data-contrast="high"] .section--brand .section__title { color: #fff; }
html[data-contrast="high"] .service-link { border-color: #fff; }
html[data-contrast="high"] a:not(.button) { color: var(--c-brand); }
html[data-contrast="high"] .site-logo__image { display: none; }
html[data-contrast="high"] .site-logo__image--contrast { display: block; }
html[data-contrast="high"] .site-logo__image:only-child { display: block; background: #fff; padding: 4px; }
html[data-contrast="high"] input, html[data-contrast="high"] select, html[data-contrast="high"] textarea { border-color: #fff; }
html[data-contrast="high"] .home-hero__media,
html[data-contrast="high"] .page-hero__media { opacity: .3; }
html[data-contrast="high"] .page-hero { background: #000; border-bottom: 1px solid var(--c-line); }
html[data-contrast="high"] .trial-card__logo,
html[data-contrast="high"] .resource-tile__logo { background: #fff; }
html[data-contrast="high"] .help-tab { background: #ffd400; color: #000; }
html[data-contrast="high"] .help-panel { border-inline-start: 1px solid var(--c-line); }
html[data-contrast="high"] .help-option__icon { background: #000; color: var(--c-brand); border: 1px solid var(--c-line); }
html[data-contrast="high"] .home-faq { background: var(--c-paper); }
html[data-contrast="high"] .ml-alert--ok, html[data-contrast="high"] .ml-alert--error, html[data-contrast="high"] .ml-saved__empty-icon { border: 1px solid var(--c-line); background: #000; color: #fff; }
html[data-contrast="high"] .hours__status--open { background: #003300; color: #7dff9b; }
html[data-contrast="high"] .faq:hover, html[data-contrast="high"] .faq[open] { border-color: #fff; }
html[data-contrast="high"] .faq-help { border: 1px solid var(--c-line); color: #fff; }
html[data-contrast="high"] .faq-help__title { color: #fff; }
html[data-contrast="high"] .faq-help .button { border-color: #fff; color: #fff; }
html[data-contrast="high"] .faq-help .button--primary { border-color: var(--c-brand); background: var(--c-brand); color: #000; }


/* 12. Small screens
   ========================================================================== */

@media (max-width: 1080px) {
    .menu-button { display: inline-flex; }
    .site-header__inner { flex-wrap: wrap; gap: 1rem; min-height: 4.25rem; }
    .site-logo__image { max-height: 44px; }

    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin: 0;
        padding-bottom: 1.25rem;
    }
    .menu-open .site-nav { display: flex; }

    .main-nav__list { flex-direction: column; border-top: 1px solid var(--c-line); }
    .main-nav__list > li { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--c-line); }
    .main-nav__list > li > a { flex: 1; padding-inline: 0; }
    .main-nav__list > li > a::after { display: none; }
    .main-nav__list > .menu-item--language { margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0; }
    .main-nav__toggle { padding: .6rem; margin: 0; }
    .main-nav .sub-menu {
        position: static;
        flex-basis: 100%;
        min-width: 0;
        padding: 0 0 .5rem;
        border: 0;
        box-shadow: none;
    }
    .main-nav .menu-item-has-children:hover > .sub-menu { display: none; }
    .main-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
    .account .dropdown__panel { position: static; box-shadow: none; margin-top: .5rem; }

    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .a11y-tools__label, .topbar [data-contrast-toggle] span { display: none; }

    .layout-sidebar { grid-template-columns: minmax(0, 1fr); } /* minmax: wide content (e.g. a scrolling row) must not stretch the page */
    .side-menu { position: static; }

    .home-faq__grid { grid-template-columns: 1fr; }
    .home-faq__intro, .faq-nav { position: static; }
    .faq-nav__list { display: flex; flex-wrap: wrap; gap: .4rem; }
    .faq-nav__link { padding: .4rem .75rem; border: 1px solid var(--c-line); border-radius: 999px; font-size: .9rem; }
    .faq-nav__link.is-active { border-color: var(--c-brand); }
    .faq__question { padding: .95rem 1rem .95rem 1.1rem; font-size: 1rem; }
    .contact__grid { grid-template-columns: 1fr; }
    .ml-strip__button { margin-inline-start: 0; }
    .ml-export__actions { margin-inline-start: 0; }
    .ml-saved__list .ml-item.result--image { grid-template-columns: auto 56px minmax(0, 1fr); }
    .contact__map iframe { height: 300px; }
    .entry-content .hours__table thead { display: none; }
    .entry-content .hours__table tr { display: block; padding: 1rem 1.1rem; border-bottom: 1px solid var(--c-line); }
    .entry-content .hours__table tbody tr:last-child { border-bottom: 0; }
    .entry-content .hours__table th, .entry-content .hours__table td { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .3rem 0; border: 0; }
    .entry-content .hours__table th { display: block; padding-bottom: .5rem; }
    .entry-content .hours__table td::before { content: attr(data-label); color: var(--c-muted); font-size: .9rem; }
    .faq__answer { padding: 0 1.1rem 1.1rem; }

    .home-hero { min-height: 0; }
    .home-hero::before { background: rgba(5, 25, 43, .7); }
    .home-hero__inner { padding-block: 3rem 2.5rem; }
    .home-search__scopes { gap: .25rem 1.1rem; }
    .home-search__bar { min-height: 3.5rem; padding-inline-start: .35rem; }
    .home-search__input { height: 2.8rem; padding: 0 .6rem; font-size: 1rem; }
    .home-search__submit { height: 2.8rem; padding: 0 1rem; }
    .home-search__submit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
    .home-hero__links { margin-top: 1.25rem; }

    .trial-card { grid-template-columns: 1fr; }
    .trial-card__media { min-height: 0; border-inline-end: 0; border-bottom: 1px solid var(--c-line); }
    .trial-card__body { padding: 1.25rem; }

    .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .resource-tile__name { padding: .6rem .75rem .7rem; font-size: .9rem; }
    .resource-tile__name .icon { display: none; }

    .event { grid-template-columns: 4.5rem minmax(0, 1fr); gap: .75rem 1rem; padding: 1rem; }
    .event__day { font-size: 1.6rem; }
    .event__logo { display: none; }
    .event__action { grid-column: 2; justify-self: start; }

    .shelf { grid-auto-columns: 42%; gap: 1rem; }

    .news-cards--single .news-card { grid-template-columns: 1fr; }
    .news-cards--single .news-card__media { min-height: 0; aspect-ratio: 16 / 9; }

    .visit__grid { grid-template-columns: 1fr; }
    .visit__map, .visit__map iframe { min-height: 300px; }

    .resource__summary { grid-template-columns: 64px minmax(0, 1fr) auto; gap: .9rem; }
    .resource__logo img { max-width: 64px; }
    .resource__body { padding: 0 0 1.25rem; }

    .news-item summary { grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; }
    .news-item time { grid-column: 1; }
    .news-item__title { grid-column: 1; }
    .news-item__icon { grid-column: 2; grid-row: 1 / span 2; }
    .news-item__body { padding: 0 0 1.25rem; }

    .feature { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Help tab becomes a round button at the bottom right, so it never covers text */
    .help-tab {
        top: auto;
        bottom: 1rem;
        inset-inline-end: 1rem;
        padding: .9rem;
        border-radius: 50%;
        transform: none;
    }
    .help-tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
    .help-tab:hover { padding: .9rem; }
    .help-tab .icon { width: 1.6rem; height: 1.6rem; }
    .help-panel { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
    .home-hero__media img { animation: none; }
}

@media print {
    .topbar, .site-header, .site-footer, .help-tab, .help-panel, .help-backdrop { display: none; }
}
