/* === BOOKS HEADER & FOOTER === */

body[data-sitename="booksgateway"] .journal-header,
body[data-sitename="booksgateway"] .widget-SitePageFooter .journal-footer.journal-bg {
    background: unset;
    background-color: #eb5e62;
}

body[data-sitename="booksgateway"] .journal-header .journal-header_content .journal-logo_wrap a.journal-logo-link {
    color: #000000;
    font-size: 2rem;
}

body[data-sitename="booksgateway"] .journal-header .journal-header_content .journal-logo_wrap a.journal-logo-link:hover {
    text-decoration: none;
}

body[data-sitename="booksgateway"] .journal-header .site-menu .nav-link {
    color: #000000;
}

@media (max-width: 899px) {
    body[data-sitename="booksgateway"] .journal-header .journal-header_content .navbar-menu_wrap .mobile-site-menu-toggle {
        color: #000000;
    }
}

body[data-sitename="booksgateway"] .widget-SitePageFooter .journal-footer .journal-footer_content .journal-footer-affiliations a img {
    max-height: 2rem;
}

/* === BOOKS GATEWAY HOMEPAGE === */

body[data-sitename="booksgateway"].pg_index .theme-homepage-layout.gateway .hero-row {
   background-color: #eb5e6233;
}

body[data-sitename="booksgateway"].pg_index .theme-homepage-layout.gateway .widget-SelfServeContent .homepage-panel-header {
    background-color: #eb5e62;
}

.pg_index .theme-homepage-layout .widget-instance-books_home-self-serve-feature-1 .homepage-panel-wrap {
    width: unset;
    margin: unset;
}

.pg_index .theme-homepage-layout .widget-instance-books_home-self-serve-feature-1 .homepage-panel-wrap h3 {
    margin: unset;
}

/* =========================================================
   BOOKS GATEWAY - THREE MAIN ACTION PANELS
   Browse & Discover / Publish with us / Librarians
   ========================================================= */


/* =========================================================
   ROW / 3-COLUMN LAYOUT
   ========================================================= */

body[data-sitename="booksgateway"]
.home-row2
.widget-dynamic-inner-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
}


/* Make each SelfServe widget fill its grid column */
body[data-sitename="booksgateway"]
.home-row2
.widget-SelfServeContent {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}


/* Force the existing Silverchair panel wrapper to fill the widget.
   This fixes feature 1 retaining an inherited/narrow panel width. */
body[data-sitename="booksgateway"]
.home-row2
.widget-SelfServeContent
.homepage-panel-wrap {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}


/* =========================================================
   BASE PANEL
   ========================================================= */

body[data-sitename="booksgateway"]
.home-row2
.books-panel {
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100%;
    background: #ffffff;
    box-sizing: border-box !important;
}


/* =========================================================
   PANEL HEADERS
   ========================================================= */

body[data-sitename="booksgateway"]
.home-row2
.books-panel
.homepage-panel-header {
    padding: 22px 22px 20px;
    margin: 0;
}


body[data-sitename="booksgateway"]
.home-row2
.books-panel
.homepage-panel-header h3 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 500;
}


/* =========================================================
   PANEL BODY
   ========================================================= */

body[data-sitename="booksgateway"]
.home-row2
.books-panel
.homepage-panel-text {
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start !important;

    padding: 14px 22px 12px;
    margin: 0;
    background: #ffffff;
}


/* =========================================================
   LINK LISTS
   ========================================================= */

body[data-sitename="booksgateway"]
.books-link-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}


body[data-sitename="booksgateway"]
.books-link-list li {
    position: relative;
    margin: 0 0 3px;
    padding: 0 0 0 20px;
    line-height: 1.2;
}


body[data-sitename="booksgateway"]
.books-link-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;

    width: 10px;
    height: 6px;

    transform: translateY(-50%);
}


body[data-sitename="booksgateway"]
.books-link-list a {
    color: #0e4751;
    font-size: 0.875rem;
    line-height: 1.25;
    text-decoration: underline;
    text-underline-offset: 2px;
}


body[data-sitename="booksgateway"]
.books-link-list a:hover {
    text-decoration-thickness: 2px;
}


/* =========================================================
   DIVIDER
   ========================================================= */

body[data-sitename="booksgateway"]
.books-panel-divider {
    width: 100%;
    height: 5px;
    margin: 18px 0 15px;
}


/* =========================================================
   BOX 1 - BROWSE & DISCOVER
   ========================================================= */

body[data-sitename="booksgateway"]
.books-panel--browse {
    border: 1px solid #ef6065;
}


body[data-sitename="booksgateway"]
.books-panel--browse
.homepage-panel-header {
    background: #ef6065;
    color: #000000;
}


body[data-sitename="booksgateway"]
.books-panel--browse
.books-panel-divider {
    background: #ef6065;
}


body[data-sitename="booksgateway"]
.books-panel--browse
.books-link-list--primary li::before {
    background: #ef6065;
}


/* Secondary colours from the design */
body[data-sitename="booksgateway"]
.books-panel--browse
.books-link-list--secondary li:nth-child(1)::before {
    background: #f15a24;
}


body[data-sitename="booksgateway"]
.books-panel--browse
.books-link-list--secondary li:nth-child(2)::before {
    background: #14555d;
}


/* =========================================================
   BOX 2 - PUBLISH WITH US
   ========================================================= */

body[data-sitename="booksgateway"]
.books-panel--publish {
    border: 1px solid #14555d;
}


body[data-sitename="booksgateway"]
.books-panel--publish
.homepage-panel-header {
    background: #14555d;
    color: #ffffff;
}


body[data-sitename="booksgateway"]
.books-panel--publish
.books-panel-divider {
    background: #14555d;
}


body[data-sitename="booksgateway"]
.books-panel--publish
.books-link-list--primary li::before {
    background: #ef6065;
}


body[data-sitename="booksgateway"]
.books-panel--publish
.books-link-list--secondary li:nth-child(1)::before {
    background: #14555d;
}


body[data-sitename="booksgateway"]
.books-panel--publish
.books-link-list--secondary li:nth-child(2)::before,
body[data-sitename="booksgateway"]
.books-panel--publish
.books-link-list--secondary li:nth-child(3)::before {
    background: #ef6065;
}


/* =========================================================
   BOX 3 - LIBRARIANS & INSTITUTIONS
   ========================================================= */

body[data-sitename="booksgateway"]
.books-panel--librarians {
    border: 1px solid #98cf2d;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.homepage-panel-header {
    background: #98cf2d;
    color: #000000;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-panel-divider {
    background: #98cf2d;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--primary li:nth-child(1)::before {
    background: #ef6065;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--primary li:nth-child(2)::before {
    background: #8b86f6;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--primary li:nth-child(3)::before,
body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--primary li:nth-child(4)::before {
    background: #14555d;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--secondary li:nth-child(1)::before {
    background: #008dd2;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--secondary li:nth-child(2)::before {
    background: #ef6065;
}


body[data-sitename="booksgateway"]
.books-panel--librarians
.books-link-list--secondary li:nth-child(3)::before {
    background: #14555d;
}


/* =========================================================
   REMOVE DEFAULT SILVERCHAIR PANEL STYLING
   ========================================================= */

body[data-sitename="booksgateway"]
.home-row2
.books-panel.homepage-panel-wrap {
    box-shadow: none !important;
    border-radius: 0 !important;
}


body[data-sitename="booksgateway"]
.home-row2
.books-panel
.homepage-panel-text p {
    margin: 0;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    body[data-sitename="booksgateway"]
    .home-row2
    .widget-dynamic-inner-wrap {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

}


@media (max-width: 600px) {

    body[data-sitename="booksgateway"]
    .home-row2
    .books-panel
    .homepage-panel-header {
        padding: 18px;
    }


    body[data-sitename="booksgateway"]
    .home-row2
    .books-panel
    .homepage-panel-text {
        padding: 16px 18px;
    }

}

/* =========================================================
   BOOKS GATEWAY - OUR COLLECTIONS
   ========================================================= */

body[data-sitename="booksgateway"]
.widget-instance-books_home-self-serve-feature-4 {
    width: 100% !important;
    grid-column: 1 / -1;
}


/* Remove inherited homepage panel behaviour if feature 4
   is still sitting inside the standard Silverchair wrapper */
body[data-sitename="booksgateway"]
.widget-instance-books_home-self-serve-feature-4
.homepage-panel-wrap,
body[data-sitename="booksgateway"]
.widget-instance-books_home-self-serve-feature-4
.homepage-panel-text {
    display: block !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}


/* =========================================================
   SECTION
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections {
    width: 100%;
    margin-top: 28px;
}


body[data-sitename="booksgateway"]
.books-collections > h2 {
    margin: 0 0 16px;
    padding: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 400;
    color: #000000;
}


/* =========================================================
   TWO COLUMN LAYOUT
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}


/* =========================================================
   COLLECTION CARD
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #8581f3;
}


/* =========================================================
   PURPLE HEADER
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections__header {
    padding: 11px 18px;
    background: #8581f3;
}


body[data-sitename="booksgateway"]
.books-collections__header h3 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 500;
    color: #000000;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections__content {
    flex: 1;
    padding: 14px 18px 16px;
}


body[data-sitename="booksgateway"]
.books-collections__content p {
    margin: 0 0 16px;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #333333;
}


body[data-sitename="booksgateway"]
.books-collections__content p:last-of-type {
    margin-bottom: 14px;
}


/* =========================================================
   LINK LISTS
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections__links {
    list-style: none;
    margin: 0;
    padding: 0;
}


body[data-sitename="booksgateway"]
.books-collections__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}


body[data-sitename="booksgateway"]
.books-collections__links li {
    position: relative;
    margin: 0 0 3px;
    padding-left: 23px;
    font-size: 0.875rem;
    line-height: 1.15;
}


body[data-sitename="booksgateway"]
.books-collections__links li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 11px;
    height: 7px;
    background: #ef6065;
    transform: translateY(-50%);
}


body[data-sitename="booksgateway"]
.books-collections__links a {
    color: #0e4751;
    text-decoration: underline;
    text-underline-offset: 2px;
}


body[data-sitename="booksgateway"]
.books-collections__links a:hover {
    text-decoration-thickness: 2px;
}


/* =========================================================
   SUBJECT AREAS - TWO LINK COLUMNS
   ========================================================= */

body[data-sitename="booksgateway"]
.books-collections__links--two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 38px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    body[data-sitename="booksgateway"]
    .books-collections__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}


@media (max-width: 600px) {

    body[data-sitename="booksgateway"]
    .books-collections__links--two-column {
        grid-template-columns: 1fr;
        gap: 0;
    }


    body[data-sitename="booksgateway"]
    .books-collections__header {
        padding: 12px 16px;
    }


    body[data-sitename="booksgateway"]
    .books-collections__content {
        padding: 14px 16px 16px;
    }

}

/* =========================================================
   BOOKS GATEWAY - FINAL PANEL OVERRIDES
   Fix header specificity + force all action panels full width
   ========================================================= */

body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.home-row2
.widget-SelfServeContent {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.home-row2
.widget-SelfServeContent
.homepage-panel-wrap {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.widget-instance-books_home-self-serve-feature-1
.books-panel--browse
.homepage-panel-header {
    background-color: #ef6065 !important;
    color: #000000 !important;
}

body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.widget-instance-books_home-self-serve-feature-2
.books-panel--publish
.homepage-panel-header {
    background-color: #14555d !important;
    color: #ffffff !important;
}

body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.widget-instance-books_home-self-serve-feature-3
.books-panel--librarians
.homepage-panel-header {
    background-color: #98cf2d !important;
    color: #000000 !important;
}

body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.widget-instance-books_home-self-serve-feature-1
.books-panel--browse,
body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.widget-instance-books_home-self-serve-feature-2
.books-panel--publish,
body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway
.widget-instance-books_home-self-serve-feature-3
.books-panel--librarians {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* =========================================================
   REMOVE SILVERCHAIR OUTER PANEL OUTLINES
   ========================================================= */

/* Main action widgets */
body[data-sitename="booksgateway"]
.home-row2
.widget-SelfServeContent {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* Remove inherited wrapper styling */
body[data-sitename="booksgateway"]
.home-row2
.widget-SelfServeContent
.homepage-panel-wrap {
    outline: 0 !important;
    box-shadow: none !important;
}


/* Feature 4 / Our collections outer wrapper */
body[data-sitename="booksgateway"]
.widget-instance-books_home-self-serve-feature-4 {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* Make sure the custom collections section itself
   doesn't pick up an inherited border */
body[data-sitename="booksgateway"]
.books-collections {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* =========================================================
   ALIGN ACTION PANEL DIVIDERS
   ========================================================= */

body[data-sitename="booksgateway"]
.home-row2
.books-panel
.books-link-list--primary {
    min-height: 82px;
}

/* =========================================================
   BOOKS GATEWAY - HERO LAYOUT
   ========================================================= */

body[data-sitename="booksgateway"].pg_index
.widget-instance-Home_MainContentB0B0
.hero-row {
    background-color: #eb5e6233 !important;
    padding: 22px 0 24px !important;
}


/* Two-column hero */
body[data-sitename="booksgateway"].pg_index
.widget-instance-Home_MainContentB0B0
.hero-row
.widget-dynamic-inner-wrap {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 0.95fr) !important;
    gap: 48px !important;
    align-items: end !important;
}


/* =========================================================
   LEFT - HERO COPY
   ========================================================= */

body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-feature {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}


body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-feature
.homepage-panel-wrap,
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-feature
.homepage-panel-text {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* Hero title */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-feature h1 {
    margin: 0 0 10px !important;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 400;
}


/* Hero intro copy */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-feature p {
    max-width: 760px;
    margin: 0 !important;
    font-size: 0.95rem;
    line-height: 1.35;
}


/* =========================================================
   RIGHT - SEARCH AREA
   ========================================================= */

body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    align-self: end;
}


/* Container for search + advanced search + button */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.hero-search-container {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "search advanced"
        "button button";
    column-gap: 14px;
    row-gap: 16px;

    width: 100%;
    margin: 0;
}


/* Search bar */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.navbar-search {
    grid-area: search;
    width: 100%;
}


/* Actual Silverchair search form */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
#MicrositeSearch {
    display: flex !important;
    width: 100% !important;
}


/* Search input gets remaining space */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.navbar-search-input_wrap {
    flex: 1 1 auto;
    min-width: 0;
}


/* Search filter */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.navbar-search-filter_wrap {
    flex: 0 0 auto;
}


/* Search submit */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.navbar-search-submit_wrap {
    flex: 0 0 auto;
}


/* Advanced search */
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.navbar-search-advanced {
    grid-area: advanced;
    display: flex !important;
    align-items: center;
}


body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.advanced-search {
    font-size: 0.85rem;
    line-height: 1.15;
    color: #222;
    text-decoration: none;
}


/* =========================================================
   FIND A BOOK BUTTON
   ========================================================= */

body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.home-btn-wrap {
    grid-area: button;
    margin: 0 !important;
}


body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.home-btn-wrap .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 22px;

    border: 0;
    border-radius: 24px;

    background: #14555d;
    color: #ffffff;

    text-decoration: none;
    font-size: 0.9rem;
}


body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.home-btn-wrap .button:hover {
    background: #0e4751;
    color: #ffffff;
}


/* =========================================================
   REMOVE DEFAULT SELFSERVE PANEL STYLING
   ========================================================= */

body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar,
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.homepage-panel-wrap,
body[data-sitename="booksgateway"]
.widget-instance-books_home-hero-search-bar
.homepage-panel-text {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    body[data-sitename="booksgateway"].pg_index
    .widget-instance-Home_MainContentB0B0
    .hero-row
    .widget-dynamic-inner-wrap {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }


    body[data-sitename="booksgateway"]
    .widget-instance-books_home-hero-search-bar
    .hero-search-container {
        grid-template-columns: 1fr auto;
    }

}


@media (max-width: 600px) {

    body[data-sitename="booksgateway"]
    .widget-instance-books_home-hero-search-bar
    .hero-search-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "search"
            "advanced"
            "button";
        gap: 12px;
    }


    body[data-sitename="booksgateway"]
    .widget-instance-books_home-hero-feature h1 {
        font-size: 1.65rem;
    }

}

/* =========================================================
   BOOKS GATEWAY - FULL WIDTH HERO BAND
   Match Journals / Case Studies Gateway behaviour
   ========================================================= */

/* Remove any gap above the hero */
body[data-sitename="booksgateway"].pg_index
.theme-homepage-layout.gateway {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body[data-sitename="booksgateway"].pg_index
.widget-instance-Home_MainContentB0B0 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Break the pink hero band out to full viewport width */
body[data-sitename="booksgateway"].pg_index
.widget-instance-Home_MainContentB0B0
.hero-row {
    width: 100vw !important;
    max-width: none !important;

    margin-top: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding: 0 !important;

    background: #eb5e6233 !important;
}

/* Keep the hero content centred while the background spans full width */
body[data-sitename="booksgateway"].pg_index
.widget-instance-Home_MainContentB0B0
.hero-row
> .widget-dynamic-inner-wrap {
    width: 100% !important;
    max-width: 1630px !important;

    margin: 0 auto !important;
    padding: 34px 40px 36px !important;

    box-sizing: border-box !important;
}

/* Tablet */
@media (max-width: 1000px) {

    body[data-sitename="booksgateway"].pg_index
    .widget-instance-Home_MainContentB0B0
    .hero-row
    > .widget-dynamic-inner-wrap {
        padding: 30px 28px !important;
    }
}

/* Mobile */
@media (max-width: 600px) {

    body[data-sitename="booksgateway"].pg_index
    .widget-instance-Home_MainContentB0B0
    .hero-row
    > .widget-dynamic-inner-wrap {
        padding: 26px 20px 28px !important;
    }
}

/* =========================================================
   BOOKS PURCHASING OPTIONS PAGE
   ========================================================= */

/*
   Keep all purchasing-page overrides scoped to this page only.
   The :has() selector prevents these rules affecting the rest of
   the Books Gateway.
*/

body[data-sitename="booksgateway"]:has(.books-purchasing-hero) {
    --books-purchasing-max-width: 1300px;
    --books-purchasing-gutter: 24px;
}


/* =========================================================
   SILVERCHAIR PAGE LAYOUT
   ========================================================= */

/* Hide the right-hand column only on the purchasing page */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero) #Sidebar,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero) .content-main_sidebar {
    display: none !important;
}

/* Allow the page content column to use the available width */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero) .content-main_content,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero) .content-main_content.col-md-8,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero) .content-main_content.col-lg-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Remove the normal gap between the Books header and first component */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero) .content-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Only reset the widget that actually contains this custom page */
body[data-sitename="booksgateway"] .widget-SelfServeContent:has(.books-purchasing-hero) {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

body[data-sitename="booksgateway"] .widget-SelfServeContent:has(.books-purchasing-hero),
body[data-sitename="booksgateway"] .widget-SelfServeContent:has(.books-purchasing-hero) .homepage-panel-wrap,
body[data-sitename="booksgateway"] .widget-SelfServeContent:has(.books-purchasing-hero) .homepage-panel-text {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

body[data-sitename="booksgateway"] .widget-SelfServeContent:has(.books-purchasing-hero) .homepage-panel-wrap,
body[data-sitename="booksgateway"] .widget-SelfServeContent:has(.books-purchasing-hero) .homepage-panel-text {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* =========================================================
   HERO
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
    isolation: isolate;
}

/* Full-width hero background without moving the aligned content */
body[data-sitename="booksgateway"] .books-purchasing-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: #f8dcdc;
}
body[data-sitename="booksgateway"] .books-purchasing-hero__inner {
    width: 100%;
    max-width: var(--books-purchasing-max-width);
    margin: 0 auto;
    padding: 32px var(--books-purchasing-gutter) 34px;
    box-sizing: border-box;
}


/* =========================================================
   HERO TYPOGRAPHY
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-hero h1 {
    margin: 0 0 14px;
    padding: 0;
    color: #1f1f1f;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 400;
}

body[data-sitename="booksgateway"] .books-purchasing-hero p {
    max-width: 1120px;
    margin: 0 0 18px;
    color: #333333;
    font-size: 0.95rem;
    line-height: 1.65;
}

body[data-sitename="booksgateway"] .books-purchasing-hero p:last-of-type {
    margin-bottom: 18px;
}


/* =========================================================
   HERO BUTTONS
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

body[data-sitename="booksgateway"] .books-purchasing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 28px;
    border-radius: 999px;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

body[data-sitename="booksgateway"] .books-purchasing-btn--primary {
    border: 1px solid #0e4751;
    background: #0e4751;
    color: #ffffff !important;
}

body[data-sitename="booksgateway"] .books-purchasing-btn--primary:hover,
body[data-sitename="booksgateway"] .books-purchasing-btn--primary:focus {
    background: #083b43;
    border-color: #083b43;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
    transform: translateY(-1px);
}

body[data-sitename="booksgateway"] .books-purchasing-btn--secondary {
    border: 1px solid #0e4751;
    background: transparent;
    color: #0e4751 !important;
}

body[data-sitename="booksgateway"] .books-purchasing-btn--secondary:hover,
body[data-sitename="booksgateway"] .books-purchasing-btn--secondary:focus {
    background: #ffffff;
    color: #0e4751 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}


/* =========================================================
   MAIN CONTENT + SKIP NAVIGATION
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-content {
    width: 100%;
    margin: 0;
    background: #ffffff;
}

body[data-sitename="booksgateway"] .books-purchasing-content__inner {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 48px;
    width: 100%;
    max-width: var(--books-purchasing-max-width);
    margin: 0 auto;
    padding: 40px var(--books-purchasing-gutter) 70px;
    box-sizing: border-box;
}


/* =========================================================
   LEFT SKIP NAV
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-skipnav {
    align-self: start;
    min-width: 0;
}

body[data-sitename="booksgateway"] .books-purchasing-skipnav nav {
    position: sticky;
    top: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body[data-sitename="booksgateway"] .books-purchasing-skipnav a {
    display: block;
    margin: 0 0 10px;
    color: #222222;
    font-size: 0.88rem;
    line-height: 1.35;
    text-decoration: none;
}

body[data-sitename="booksgateway"] .books-purchasing-skipnav a:hover,
body[data-sitename="booksgateway"] .books-purchasing-skipnav a:focus {
    color: #0e4751;
    text-decoration: underline;
}


/* =========================================================
   MAIN CONTENT COLUMN
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-main {
    width: 100%;
    max-width: none;
    min-width: 0;
}

body[data-sitename="booksgateway"] .books-purchasing-section {
    scroll-margin-top: 30px;
}

body[data-sitename="booksgateway"] .books-purchasing-section h2 {
    margin: 0 0 14px;
    padding: 0;
    color: #222222;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
}

body[data-sitename="booksgateway"] .books-purchasing-section h3 {
    margin: 28px 0 10px;
    padding: 0;
    color: #222222;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

body[data-sitename="booksgateway"] .books-purchasing-section h3:first-of-type {
    margin-top: 18px;
}

body[data-sitename="booksgateway"] .books-purchasing-section h4 {
    margin: 24px 0 8px;
    padding: 0;
    color: #222222;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

body[data-sitename="booksgateway"] .books-purchasing-section p {
    margin: 0 0 16px;
    color: #3c3c3c;
    font-size: 0.95rem;
    line-height: 1.65;
}

body[data-sitename="booksgateway"] .books-purchasing-section ul,
body[data-sitename="booksgateway"] .books-purchasing-section ol {
    margin: 8px 0 20px;
    padding-left: 22px;
}

body[data-sitename="booksgateway"] .books-purchasing-section ol {
    margin-bottom: 22px;
}

body[data-sitename="booksgateway"] .books-purchasing-section li {
    margin: 0 0 5px;
    color: #3c3c3c;
    font-size: 0.95rem;
    line-height: 1.5;
}

body[data-sitename="booksgateway"] .books-purchasing-section a {
    color: #0e4751;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body[data-sitename="booksgateway"] .books-purchasing-section a:hover,
body[data-sitename="booksgateway"] .books-purchasing-section a:focus {
    color: #083b43;
    text-decoration-thickness: 2px;
}


/* =========================================================
   SECTION DIVIDERS
   ========================================================= */

body[data-sitename="booksgateway"] .books-purchasing-section--divided {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 5px solid #ef6468;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    body[data-sitename="booksgateway"]:has(.books-purchasing-hero) {
        --books-purchasing-gutter: 28px;
    }

    body[data-sitename="booksgateway"] .books-purchasing-content__inner {
        grid-template-columns: 170px minmax(0, 1fr);
        gap: 36px;
    }
}

@media (max-width: 799px) {

    body[data-sitename="booksgateway"]:has(.books-purchasing-hero) {
        --books-purchasing-gutter: 24px;
    }

    body[data-sitename="booksgateway"] .books-purchasing-hero__inner {
        padding-top: 26px;
        padding-bottom: 30px;
    }

    body[data-sitename="booksgateway"] .books-purchasing-hero h1 {
        font-size: 1.7rem;
    }

    body[data-sitename="booksgateway"] .books-purchasing-hero p {
        font-size: 0.94rem;
    }

    body[data-sitename="booksgateway"] .books-purchasing-content__inner {
        display: block;
        padding-top: 26px;
    }

    body[data-sitename="booksgateway"] .books-purchasing-skipnav {
        margin-bottom: 30px;
    }

    body[data-sitename="booksgateway"] .books-purchasing-skipnav nav {
        position: static;
        padding: 16px 18px;
        border-left: 4px solid #0e4751;
        background: #f5f5f5;
    }

    body[data-sitename="booksgateway"] .books-purchasing-skipnav a {
        margin-bottom: 8px;
    }

    body[data-sitename="booksgateway"] .books-purchasing-skipnav a:last-child {
        margin-bottom: 0;
    }

    body[data-sitename="booksgateway"] .books-purchasing-section h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 520px) {

    body[data-sitename="booksgateway"] .books-purchasing-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    body[data-sitename="booksgateway"] .books-purchasing-btn {
        width: 100%;
    }
}

/* =========================================================
   PURCHASING PAGE - REMOVE SILVERCHAIR CENTRE COLUMN LIMIT
   ========================================================= */

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
#mainContent {
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* The wrapper containing mainContent + Sidebar */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.content-main_content {
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;

    overflow: visible !important;
}


/* Allow the outer Silverchair row to span the available width */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.master-main {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* Keep the hidden sidebar from reserving any flex/grid space */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
#Sidebar {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
    max-width: 0 !important;
}


/* =========================================================
   BOOKS PURCHASING - STICKY SKIP NAV PANEL
   Added as final overrides so these win over earlier rules.
   Works with the current <aside><nav><a> markup and also
   supports the enhanced __panel / __actions classes.
   ========================================================= */

/* Give the skipnav enough width for the boxed treatment */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-content__inner {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: 48px !important;
}

/* Sticky outer column */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav {
    align-self: start !important;
    min-width: 0 !important;
}

/* Boxed Books-style panel */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__panel {
    position: sticky !important;
    top: 24px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;

    width: 100% !important;
    padding: 0 20px 20px !important;
    margin: 0 !important;

    background: #f5f6f6 !important;
    border-left: 4px solid #eb5e62 !important;

    box-sizing: border-box !important;
}

/* Add "On this page" automatically for the existing simple markup */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav::before {
    content: "On this page";
    display: block;

    padding: 18px 0 14px;
    margin: 0;

    color: #1f1f1f;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Hide the generated heading if an explicit title is present */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav:has(.books-purchasing-skipnav__title)::before {
    content: none;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__title {
    margin: 0 !important;
    padding: 18px 0 14px !important;

    color: #1f1f1f !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Current simple links + enhanced link wrapper */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav > a:not(.books-purchasing-skipnav__button),
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__links > a {
    display: block !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 11px 0 !important;

    border-bottom: 1px solid #d4dddd !important;

    color: #0e4751 !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;

    text-decoration: none !important;
    box-sizing: border-box !important;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav > a:not(.books-purchasing-skipnav__button):hover,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav > a:not(.books-purchasing-skipnav__button):focus,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__links > a:hover,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__links > a:focus {
    color: #083b43 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

/* Optional action area - used if Contact us / Back to top are added */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;

    margin-top: 18px !important;
    padding-top: 18px !important;

    border-top: 1px solid #d4dddd !important;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 16px !important;
    margin: 0 !important;

    border-radius: 999px !important;

    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease !important;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button--primary {
    background: #0e4751 !important;
    border: 1px solid #0e4751 !important;
    color: #ffffff !important;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button--primary:hover,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button--primary:focus {
    background: #083b43 !important;
    border-color: #083b43 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button--secondary {
    background: #ffffff !important;
    border: 1px solid #0e4751 !important;
    color: #0e4751 !important;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button--secondary:hover,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__button--secondary:focus {
    background: #f8dcdc !important;
    color: #0e4751 !important;
    transform: translateY(-1px);
}

/* Tablet */
@media (max-width: 1100px) {
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-content__inner {
        grid-template-columns: 200px minmax(0, 1fr) !important;
        gap: 36px !important;
    }
}

/* Mobile - panel becomes part of normal document flow */
@media (max-width: 799px) {
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav {
        margin-bottom: 30px !important;
    }

    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav nav,
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav__panel {
        position: static !important;
        top: auto !important;
        padding: 0 18px 18px !important;
        border-left-color: #eb5e62 !important;
    }

    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav__actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav__actions {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   FINAL STICKY FIX - BOOKS PURCHASING SKIPNAV
   Make the ASIDE sticky rather than the nested NAV.
   ========================================================= */

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-content,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-content__inner,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.widget-SelfServeContent,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
#mainContent,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.content-main_content,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.master-main {
    overflow: visible !important;
}

body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-content__inner {
    align-items: start !important;
}

/* Sticky left grid item */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav {
    position: sticky !important;
    top: 24px !important;
    z-index: 5 !important;

    display: block !important;

    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;

    margin: 0 !important;
    padding: 0 !important;

    align-self: start !important;
    height: fit-content !important;
}

/* Nested panel is no longer sticky */
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav nav,
body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
.books-purchasing-skipnav__panel {
    position: static !important;
    top: auto !important;

    width: 100% !important;
    max-width: 220px !important;

    margin: 0 !important;
    padding: 0 18px 18px !important;

    background: #f5f6f6 !important;
    border-left: 4px solid #eb5e62 !important;

    box-sizing: border-box !important;
}

/* Tablet */
@media (max-width: 1100px) {
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
    }

    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav nav,
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav__panel {
        max-width: 200px !important;
    }
}

/* Mobile */
@media (max-width: 799px) {
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav {
        position: static !important;
        top: auto !important;
        z-index: auto !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;

        margin-bottom: 30px !important;
    }

    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav nav,
    body[data-sitename="booksgateway"]:has(.books-purchasing-hero)
    .books-purchasing-skipnav__panel {
        width: 100% !important;
        max-width: none !important;
    }
}