/*
 * Health Innovation North West Coast shared 2024 chrome.
 * Loaded on every public template so header, primary navigation and footer
 * remain visually consistent across the site.
 */

.hia-site-container {
    width: 100%;
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Header */
header {
    margin: 0;
    padding: 26px 0 22px;
    background: #fff;
    position: relative;
    z-index: 100;
}

header > div {
    width: 100%;
    max-width: 75rem;
    min-height: 70px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-flow: row nowrap;
    gap: 24px;
    position: relative;
}

header > div > div:first-child {
    display: block;
    flex: 0 0 auto;
}

header > div > div:first-child a {
    display: block;
}

header > div > div:first-child img {
    display: block;
    width: 250px;
    max-width: 250px !important;
    height: auto;
}

header > div > div:nth-child(2) {
    flex: 1 1 auto;
}

header .hia-header-search-link {
    display: none;
}

header .hia-nhs-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

header .hia-nhs-logo svg {
    display: block;
    width: 110px;
    height: auto;
}

header .burger-menu-area {
    display: none;
}

/* Keep the skip link accessible without allowing it to overlap the search box. */
header > div .skip-link {
    position: fixed;
    left: 16px;
    top: -100px;
    right: auto;
    bottom: auto;
    z-index: 10050;
    padding: 9px 13px;
    background: #fff;
    color: #0f9894;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    text-decoration: none;
}

header > div .skip-link:focus {
    top: 10px;
    color: #4f5c6c;
}

/* Primary navigation */
navigation {
    margin: 0 !important;
    width: 100%;
    min-height: 50px;
    background: #0f9894;
    position: relative;
    z-index: 90;
}

navigation > .row:first-child {
    width: 100%;
    max-width: 75rem;
    min-height: 50px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
}

navigation > .row:first-child > .large-10.columns {
    width: auto;
    max-width: none;
    flex: 1 1 auto;
    padding: 0;
    display: flex;
    align-items: stretch;
}

navigation > .row:first-child > .large-2.columns {
    width: 265px;
    max-width: 265px;
    flex: 0 0 265px;
    padding: 0 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

navigation > .row:first-child .core-nav {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

navigation ul li {
    margin: 0;
}

navigation > .row:first-child .core-nav > li {
    display: flex;
    align-items: stretch;
}

navigation ul li a {
    margin: 0;
    padding: 16px 14px 15px;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600 !important;
    text-transform: none;
    text-decoration: none;
    transition: none !important;
}

navigation ul li a:hover,
navigation ul .active > a {
    color: #fff;
    background: rgba(255,255,255,.12);
    text-decoration: none;
}

navigation ul .active:after {
    height: 5px;
    top: calc(100% - 5px);
    background: #fff;
}

#search-box {
    width: 100%;
    margin: 0;
}

#search-box form {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

#search-box form input {
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 5px 36px 5px 11px;
    border: 0;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
    font-size: 13px;
    line-height: 1.2;
}

#search-box form button {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 19px;
    height: 21px;
    padding: 0;
    margin: -10px 0 0;
    border: 0;
    background: transparent;
}

#search-box form button svg {
    width: 15px;
    height: 16px;
}

/* Shared quick links */
.hia-site-shortcuts {
    margin: 4px 0 34px;
    background: #fff;
}

.hia-site-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 22px;
}

.hia-site-shortcut {
    min-height: 58px;
    display: flex;
    align-items: stretch;
    background: #5b6670;
    color: #fff !important;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.hia-site-shortcut:hover,
.hia-site-social-pair a:hover {
    background: #14a490;
    color: #fff !important;
    text-decoration: none !important;
}

.hia-site-shortcut > span:last-child {
    padding: 10px 12px;
    display: flex;
    align-items: center;
}

.hia-site-shortcut-icon {
    width: 58px;
    min-width: 58px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #7c858d;
}

.hia-site-shortcut-icon i {
    color: #fff;
    font-size: 24px;
}

.hia-site-shortcut-logo {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hia-site-shortcut-logo > span {
    display: block !important;
    width: 100%;
    padding: 10px 12px !important;
    font-size: 15px;
    font-weight: 300;
}

.hia-site-shortcut-logo em {
    font-weight: 700;
}

.hia-site-social-pair {
    min-height: 58px;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 2px;
}

.hia-site-social-pair a {
    min-width: 0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5b6670;
    color: #fff !important;
    text-decoration: none !important;
}

.hia-site-social-pair img {
    width: auto;
    height: auto;
    max-width: 80px;
    max-height: 24px;
}

.hia-site-social-single {
    grid-template-columns: 1fr;
}

/* The client no longer uses X/Twitter. Hide it from the legacy ShareThis widget on inner pages. */
.sharethis-inline-share-buttons .st-btn[data-network="twitter"],
.sharethis-inline-share-buttons .st-btn[data-network="x"] {
    display: none !important;
}

/* Newsletter band */
.hia-site-newsletter {
    margin: 0;
    background: #5b6670;
    color: #fff;
}

.hia-site-newsletter .hia-site-container {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.hia-site-newsletter p {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 500;
}

.hia-site-newsletter a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    background: #14a49f;
    color: #fff !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Shared footer */
.hia-site-footer {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #ededed;
    color: #5b6670;
}

.hia-site-footer-main {
    padding-top: 40px;
    padding-bottom: 46px;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 90px;
    align-items: start;
}

.hia-site-footer h2 {
    margin: 0 0 18px;
    color: #0f9894;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
}

.hia-site-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 45px;
}

.hia-site-footer p,
.hia-site-footer a,
.hia-site-footer li {
    color: #5b6670;
    font-size: 12.5px;
    line-height: 1.45;
}

.hia-site-footer p {
    margin: 0 0 13px;
}

.hia-site-footer a {
    font-weight: 400 !important;
    text-decoration: underline;
}

.hia-site-footer strong,
.hia-site-footer strong a {
    color: #0f9894;
    font-weight: 700 !important;
}

.hia-site-footer-about .core-nav {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 45px;
    row-gap: 7px;
    list-style: none;
}

.hia-site-footer-about .core-nav li {
    margin: 0;
    padding: 0;
}

.hia-site-footer-about .core-nav li:after {
    display: none;
}

.hia-site-footer-about .core-nav a {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    font-weight: 400 !important;
    text-decoration: none;
}

.hia-site-footer-about .core-nav ul {
    display: none;
}

.hia-site-footer-bottom {
    min-height: 72px;
    padding-top: 15px;
    padding-bottom: 21px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    color: #5b6670;
    font-size: 10.5px;
}

.hia-site-footer-bottom a {
    color: inherit;
    font-size: inherit;
}

@media screen and (max-width: 63.9375em) {
    header {
        min-height: 76px;
        padding: 12px 0;
    }

    header > div {
        min-height: 52px;
        padding: 0 15px;
        gap: 14px;
        flex-wrap: nowrap;
    }

    header > div > div:first-child {
        flex: 1 1 auto;
        order: 1;
    }

    header > div > div:first-child img {
        width: 220px;
        max-width: 220px !important;
    }

    header > div > div:nth-child(2) {
        display: none !important;
    }

    header .hia-header-search-link {
        display: block !important;
        flex: 0 0 auto;
        order: 2;
    }

    header .hia-header-search-link a {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #0072bb;
        font-size: 23px;
        text-decoration: none;
    }

    header .hia-nhs-logo {
        display: none !important;
    }

    header .burger-menu-area {
        display: block !important;
        flex: 0 0 auto;
        order: 3;
    }

    header .burger-menu-area .burger-menu svg {
        width: 36px;
        height: 36px;
    }

    header .burger-menu-area .burger-menu-close svg {
        width: 31px;
        height: 31px;
    }

    navigation {
        position: absolute;
        top: 0;
        z-index: 9999;
        width: 100%;
        min-height: calc(100vh - 76px);
        height: calc(100vh - 76px);
        margin-top: 76px !important;
        display: none;
        overflow-y: auto;
        background: #fff;
    }

    navigation > .row:first-child {
        min-height: 0;
        height: auto;
        padding: 16px 15px 22px;
        display: block !important;
        overflow: visible;
    }

    navigation > .row:first-child > .large-10.columns,
    navigation > .row:first-child > .large-2.columns {
        width: 100%;
        max-width: none;
        padding: 0;
        display: block;
        flex: none;
    }

    navigation > .row:first-child .core-nav {
        display: block;
    }

    navigation > .row:first-child .core-nav > li,
    navigation ul li {
        display: block;
        margin: 0 0 4px;
    }

    navigation ul li a,
    navigation ul .active > a {
        padding: 9px 10px;
        color: #4f5c6c;
        background: transparent;
        font-size: 15px;
    }

    navigation ul li a:hover,
    navigation ul .active > a {
        color: #0f9894;
        background: #f2f6f6;
    }

    navigation ul .active:after {
        display: none;
    }

    #search-box {
        width: 100% !important;
        margin: 12px 0 0 !important;
    }

    #search-box form input {
        height: 42px;
        border: 1px solid #d7d7d7;
        font-size: 14px;
    }

    .hia-site-shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
    }

    .hia-site-footer-main {
        gap: 45px;
    }
}

@media screen and (max-width: 39.9375em) {
    .hia-site-container,
    header > div {
        padding-left: 13px;
        padding-right: 13px;
    }

    header {
        min-height: 72px;
        padding: 10px 0;
    }

    header > div {
        min-height: 52px;
    }

    header > div > div:first-child img {
        width: 190px;
        max-width: 190px !important;
    }

    navigation {
        min-height: calc(100vh - 72px);
        height: calc(100vh - 72px);
        margin-top: 72px !important;
    }

    .hia-site-shortcuts {
        margin-bottom: 18px;
    }

    .hia-site-shortcuts-grid {
        gap: 6px 8px;
    }

    .hia-site-shortcut,
    .hia-site-social-pair {
        min-height: 48px;
        font-size: 10px;
    }

    .hia-site-shortcut-icon {
        width: 44px;
        min-width: 44px;
    }

    .hia-site-shortcut-icon i {
        font-size: 17px;
    }

    .hia-site-shortcut > span:last-child {
        padding: 7px 8px;
    }

    .hia-site-shortcut-logo > span {
        font-size: 11px;
        padding: 7px 8px !important;
    }

    .hia-site-social-pair a {
        padding: 7px;
    }

    .hia-site-social-pair img {
        max-width: 58px;
        max-height: 17px;
    }

    .hia-site-newsletter .hia-site-container {
        min-height: 0;
        padding-top: 16px;
        padding-bottom: 16px;
        display: block;
    }

    .hia-site-newsletter p {
        margin-bottom: 12px;
        font-size: 13px;
        line-height: 1.35;
    }

    .hia-site-newsletter a {
        padding: 9px 12px;
        font-size: 10px;
    }

    .hia-site-footer-main {
        padding-top: 24px;
        padding-bottom: 12px;
        display: block;
    }

    .hia-site-footer h2 {
        margin-bottom: 10px;
        font-size: 15px;
    }

    .hia-site-contact-grid {
        display: block;
    }

    .hia-site-footer p,
    .hia-site-footer a,
    .hia-site-footer li {
        font-size: 11px;
        line-height: 1.4;
    }

    .hia-site-footer-contact {
        margin-bottom: 22px;
    }

    .hia-site-footer-about .core-nav {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .hia-site-footer-about .core-nav a {
        font-size: 11px;
    }

    .hia-site-footer-bottom {
        min-height: 74px;
        padding-top: 15px;
        padding-bottom: 20px;
        display: block;
        font-size: 9px;
    }

    .hia-site-footer-bottom span {
        display: block;
        margin-top: 10px;
    }
}

/* -------------------------------------------------------------------------
 * September 2026: keep the desktop mega navigation aligned with the same
 * 75rem content column used by the homepage/header.
 * ---------------------------------------------------------------------- */
@media screen and (min-width: 64em) {
    navigation > #sub-menu.row {
        width: 100%;
        max-width: 75rem;
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
    }

    navigation > #sub-menu.row > .columns {
        padding-left: 0;
        padding-right: 0;
    }
}
