/* ConsultPlus: translated-page scrolling and homepage banner corrections.
 * Loaded after runtime customization. Other themes and portal layouts are not
 * targeted. Do not hide scrollbars: the document remains the page scroll owner.
 */
html.consultplus-document {
    height: auto !important;
    min-height: 100%;
    max-height: none !important;
}

html.consultplus-document:not(.platform-loader-pending):not(.platform-loader-active) {
    overflow-x: hidden;
    overflow-y: auto;
}

html.consultplus-document > body.consultplus-v4 {
    height: auto !important;
    min-height: 100vh;
    max-height: none !important;
}

/* overflow-x:hidden on body makes overflow-y:visible compute to auto. With a
 * provider-supplied viewport height that creates an inner scroll container.
 * Only the root clips horizontally; body keeps its natural document flow.
 */
html.consultplus-document:not(.platform-loader-pending):not(.platform-loader-active) > body.consultplus-v4:not(.modal-open) {
    overflow: visible !important;
}

/* Keep deliberate page locks for Bootstrap dialogs and the existing loader. */
html.consultplus-document:has(> body.consultplus-v4.modal-open) {
    overflow: hidden !important;
}

/* The category navigation belongs to the dark hero, not the light page surface.
 * Its dark base also remains legible when the configured secondary is light.
 * The first declaration is the fallback for browsers without color-mix().
 */
body.consultplus-v4.consultplus-home-v3 .cp-home > .cp-marketbar {
    background: #0d2630 !important;
    background: color-mix(in srgb, var(--cp-secondary, #0d2630) 30%, #061e27 70%) !important;
    color: #f3fbf8;
    opacity: 1;
    border-color: rgba(255, 255, 255, .12);
}

body.consultplus-v4.consultplus-home-v3 .cp-marketbar-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.consultplus-v4.consultplus-home-v3 .cp-marketbar a {
    min-width: 0;
    height: auto;
    padding: 15px 12px;
    color: #f3fbf8 !important;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
}

body.consultplus-v4.consultplus-home-v3 .cp-marketbar a > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.consultplus-v4.consultplus-home-v3 .cp-marketbar i {
    flex: 0 0 auto;
    color: var(--cp-accent, #53e5a0);
}

body.consultplus-v4.consultplus-home-v3 .cp-marketbar a:hover,
body.consultplus-v4.consultplus-home-v3 .cp-marketbar a:focus-visible {
    color: #fff !important;
    background: rgba(255, 255, 255, .10);
}

body.consultplus-v4.consultplus-home-v3 .cp-marketbar a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

/* Translation adds inline wrappers and can lengthen a heading substantially.
 * Keep the existing grid/typography, but never let text paint over its neighbour.
 */
body.consultplus-v4.consultplus-home-v3 .cp-hero-copy,
body.consultplus-v4.consultplus-home-v3 .cp-terminal-wrap,
body.consultplus-v4.consultplus-home-v3 .cp-hero-points > div > span {
    min-width: 0;
}

body.consultplus-v4.consultplus-home-v3 .cp-hero h1,
body.consultplus-v4.consultplus-home-v3 .cp-hero-copy > p {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

body.consultplus-v4.consultplus-home-v3 .cp-hero h1 font,
body.consultplus-v4.consultplus-home-v3 .cp-hero-copy > p font,
body.consultplus-v4.consultplus-home-v3 .cp-hero-points font,
body.consultplus-v4.consultplus-home-v3 .cp-marketbar font {
    display: inline;
    font: inherit;
    line-height: inherit;
    color: inherit;
    white-space: normal;
}

body.consultplus-v4.consultplus-home-v3 .cp-hero-points strong,
body.consultplus-v4.consultplus-home-v3 .cp-hero-points small {
    overflow-wrap: anywhere;
}

@media (max-width: 991px) {
    body.consultplus-v4.consultplus-home-v3 .cp-marketbar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.consultplus-v4.consultplus-home-v3 .cp-marketbar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.consultplus-v4.consultplus-home-v3 .cp-marketbar a {
        padding: 14px 10px;
        gap: 8px;
    }
}
