
.richtext img {
    max-width: 100%;
    height: auto;
}

.accordion-row,
.gallery-row,
.links-row,
.pods-row {
    margin-bottom: 2rem;
}

.accordion-row .tab-content {
    padding: 1.5rem 0;
}

/* The figures below the heading and intro text: Bootstrap's negative gutter margin on .row.g-3 would pull them up over
   the last line of the intro, so the row has a top margin instead */
.gallery-row > .row {
    margin-top: 25px;
}

.gallery-row .row-carousel {
    margin-top: 25px;
}

.gallery-row .row-carousel figure {
    margin: 0;
}

.gallery-row .gallery-item {
    display: block;
    overflow: hidden;
}

.gallery-row .gallery-item img {
    transition: opacity .2s ease-in-out;
}

.gallery-row .gallery-item:hover img,
.gallery-row .gallery-item:focus img {
    opacity: .6;
}

.link-list a {
    text-decoration: none;
}

.link-list-mini > li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--bs-gray-300, #dee2e6);
}

.link-list-mini > li a:hover,
.link-list-mini > li a:focus {
    text-decoration: underline;
}

.link-list-detail .card {
    display: block;
    transition: box-shadow .2s ease-in-out;
}

/* The card body is a span: as a block it keeps its padding around the block-level content inside it */
.link-list-detail .card-body {
    display: block;
}

.link-list-detail a:hover .card,
.link-list-detail a:focus .card {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .15);
}

.banner-row {
    margin-bottom: 2rem;
}

.banner-row .banner {
    position: relative;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
}

.banner-row .banner.carousel-item {
    display: none;
}
.banner-row .banner.carousel-item.active,
.banner-row .banner.carousel-item-next,
.banner-row .banner.carousel-item-prev {
    display: flex;
}

.banner-row .banner-small { min-height: 200px; }
.banner-row .banner-medium { min-height: 320px; }
.banner-row .banner-large { min-height: 480px; }

@media (min-width: 992px) {
    .banner-row .banner-small { min-height: 260px; }
    .banner-row .banner-medium { min-height: 420px; }
    .banner-row .banner-large { min-height: 600px; }
}

.banner-row .banner-caption {
    width: 100%;
    padding: 1.5rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
}

/* Banner "Text Animation" (scc-theme.js): the caption's heading, text and button wait out of sight until the banner is
   shown, then slide in from the left (0.1s delay, 3.9s, as on investsalford.com) or fade in from above (1s). The banner
   clips them while they are outside it. Nothing moves for visitors who prefer reduced motion */
.banner-row .banner-caption.banner-animation-pending > * {
    opacity: 0;
}

.banner-row .banner-caption.banner-animation-run[data-banner-animation="slide-left"] > * {
    animation: scc-banner-slide-left 3.9s ease .1s both;
}

.banner-row .banner-caption.banner-animation-run[data-banner-animation="fade-down"] > * {
    animation: scc-banner-fade-down 1s ease both;
}

@keyframes scc-banner-slide-left {
    from {
        opacity: 0;
        transform: translate3d(-2000px, 0, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes scc-banner-fade-down {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .banner-row .banner-caption.banner-animation-pending > * {
        opacity: 1;
    }

    .banner-row .banner-caption.banner-animation-run > * {
        animation: none;
    }
}

.banner-row .banner-caption h2 {
    color: #fff;
}

.subpage-listing-row {
    margin-bottom: 2rem;
}

.subpage-listing-item {
    color: inherit;
    text-decoration: none;
    transition: box-shadow .2s ease-in-out;
}

.subpage-listing-item:hover,
.subpage-listing-item:focus {
    color: inherit;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .15);
}

.subpage-listing-item .card-text p:last-child {
    margin-bottom: 0;
}

/* "Single Row Carousel" (subpage listing and gallery rows): one row showing --row-carousel-per-view items (Items Per
   Row from 768px, 1 below), moved by scc-theme.js. Without JavaScript (no .is-ready) the row scrolls sideways and the
   controls stay hidden. Previous / next sit in a gutter either side of the items; the dots and pause / play button sit
   below, as on the banner carousel */
.row-carousel {
    --row-carousel-per-view: 1;
    --row-carousel-control-size: 40px;
    --row-carousel-gap: 24px;
}
@media (min-width: 768px) {
    .row-carousel-per-2 { --row-carousel-per-view: 2; }
    .row-carousel-per-3 { --row-carousel-per-view: 3; }
    .row-carousel-per-4 { --row-carousel-per-view: 4; }
    .row-carousel-per-5 { --row-carousel-per-view: 5; }
    .row-carousel-per-6 { --row-carousel-per-view: 6; }
}

.row-carousel-stage {
    position: relative;
}

.row-carousel.is-ready .row-carousel-stage {
    padding: 0 calc(var(--row-carousel-control-size) + 8px);
}

/* Room around the cards for their focus outline and hover shadow, which the viewport would otherwise clip */
.row-carousel-viewport {
    margin: 0 calc(var(--row-carousel-gap) / -2);
    padding: 8px 0;
    overflow-x: auto;
}

.row-carousel.is-ready .row-carousel-viewport {
    overflow: hidden;
}

.row-carousel-track {
    display: flex;
    margin: 0;
    padding: 0;
    transition: transform .6s ease-in-out;
}

.row-carousel-item {
    flex: 0 0 calc(100% / var(--row-carousel-per-view));
    max-width: calc(100% / var(--row-carousel-per-view));
    padding: 0 calc(var(--row-carousel-gap) / 2);
}

.row-carousel:not(.is-ready) .row-carousel-item {
    flex-basis: min(85%, calc(100% / var(--row-carousel-per-view)));
    max-width: none;
}

.row-carousel-control,
.row-carousel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--row-carousel-control-size);
    height: var(--row-carousel-control-size);
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.row-carousel-control {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
}

.row-carousel-prev { left: 0; }
.row-carousel-next { right: 0; }

.row-carousel-control[hidden],
.row-carousel-footer[hidden] {
    display: none;
}

.row-carousel-control:hover,
.row-carousel-control:focus-visible,
.row-carousel-toggle:hover,
.row-carousel-toggle:focus-visible {
    background: rgba(0, 0, 0, .8);
}

.row-carousel-control:focus-visible,
.row-carousel-toggle:focus-visible,
.row-carousel-dot:focus-visible {
    outline: 3px solid rgb(var(--scc-link));
    outline-offset: 2px;
}

.row-carousel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.row-carousel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Each dot is a 24px target (WCAG 2.5.8) with a 12px dot: an outline in the text colour, filled with the link colour
   for the current position, so it shows in every colour set */
.row-carousel-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.row-carousel-dot::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.row-carousel-dot.active::before {
    background-color: rgb(var(--scc-link));
    border-color: rgb(var(--scc-link));
}

@media (prefers-reduced-motion: reduce) {
    .row-carousel-track {
        transition: none;
    }
}

/* Buttons below the listing (for example "Read more news here") */
.subpage-listing-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: var(--scc-spacing, 30px);
}

/* Gallery image "Aspect Ratio" 1:1 circle */
.gallery-row .gallery-image-circle,
.gallery-row .gallery-item-circle {
    border-radius: 50%;
}

.gallery-row .gallery-item-circle {
    display: block;
    overflow: hidden;
}

/* Gallery lightbox with more than one image: previous / next buttons over the edges of the image (round, dark, as on
   the carousels) and the position ("Image 2 of 5") below it */
.gallery-lightbox-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.gallery-lightbox-control {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
}

.gallery-lightbox-prev { left: 10px; }
.gallery-lightbox-next { right: 10px; }

.gallery-lightbox-control:hover,
.gallery-lightbox-control:focus-visible {
    background: rgba(0, 0, 0, .8);
}

.gallery-lightbox-control:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(0, 0, 0, .8);
}

.gallery-lightbox-position {
    margin: 10px 0 0;
    font-size: .875rem;
}

/* Banner media: the image (and a background video) as a layer behind the overlay and text. Each banner is its own
   stacking context, so the z-indexes below only order its layers and the carousel's previous / next controls and
   indicators stay on top (the full-width caption would otherwise cover them and take their clicks) */
.banner-row .banner {
    overflow: hidden;
    isolation: isolate;
}

.banner-row .banner-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-row .banner::before {
    z-index: 1;
}

.banner-row .banner-caption {
    z-index: 2;
}

/* Background video (Banner Source YouTube / MP4): fills the banner like a cover image, muted, without controls */
.banner-row .banner-video {
    position: absolute;
    inset: 0;
    overflow: hidden;
    container-type: size;
    pointer-events: none;
}

.banner-row .banner-video-mp4 .banner-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-row .banner-video-youtube .banner-video-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100cqw, 177.78cqh);
    height: max(100cqh, 56.25cqw);
    border: 0;
    transform: translate(-50%, -50%);
}

.banner-row .banner-video-toggle {
    position: absolute;
    right: calc(var(--banner-control-width, 0px) + 15px);
    bottom: 15px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.banner-row .banner-video-toggle:hover,
.banner-row .banner-video-toggle:focus-visible {
    background: rgba(0, 0, 0, .8);
}

.banner-row .banner-video-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Contact form block: the fields in a box in the block's Colour Set, the thank you message, and the errors */
.contact-form-row .contact-form-intro,
.contact-form-row .contact-form {
    margin-bottom: var(--scc-spacing, 30px);
}

.contact-form-row .contact-form-outro-heading {
    margin-top: var(--scc-spacing, 30px);
}

.contact-form-row .contact-form-inner {
    padding: var(--scc-spacing, 30px);
}

.contact-form-row .contact-form-inner.contact-form-base {
    border: 1px solid rgb(var(--scc-borders));
}

.contact-form-row .contact-form-required,
.contact-form-row .form-group {
    margin-bottom: 1rem;
}

.contact-form-row label {
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
}

/* The required marker is in the text colour, so it has the same contrast as the label */
.contact-form-row .req {
    font-style: normal;
}

.contact-form-row .form-control {
    min-height: 40px;
    color: rgb(60, 60, 59);
    background-color: #fff;
    border: 1px solid rgb(var(--scc-borders));
    border-radius: 5px;
    box-shadow: none;
}

@media (min-width: 992px) {
    .contact-form-row .form-control {
        min-height: 50px;
    }
}

.contact-form-row textarea.form-control {
    resize: vertical;
}

.contact-form-row .scc-colour .form-control {
    border-color: rgb(var(--scc-set-text));
}

.contact-form-row .form-control:focus {
    border-color: rgb(var(--scc-highlight));
    box-shadow: none;
}

.contact-form-row .form-control:focus-visible,
.contact-form-row .btn:focus-visible {
    outline: 2px dashed rgb(var(--scc-highlight));
    outline-offset: 2px;
}

.contact-form-row .scc-colour .form-control:focus-visible,
.contact-form-row .scc-colour .btn:focus-visible {
    outline-color: rgb(var(--scc-set-text));
}

.contact-form-row .form-control[aria-invalid="true"] {
    border: 2px solid rgb(144, 62, 60);
    box-shadow: 0 0 0 2px #fff;
}

/* Errors: dark red on white, which has enough contrast on every colour set */
.contact-form-row .field-error {
    display: inline-block;
    margin: 5px 0 0;
    padding: 2px 8px;
    font-weight: 600;
    color: rgb(144, 62, 60);
    background-color: #fff;
}

.contact-form-row .contact-form-error-summary {
    margin-bottom: 1rem;
    padding: 15px;
    color: rgb(144, 62, 60);
    background-color: #fff;
    border: 2px solid rgb(144, 62, 60);
    border-radius: 5px;
}

.contact-form-row .contact-form-required,
.contact-form-row .contact-form-error-summary > p,
.contact-form-row .contact-form-thanks .richtext > :first-child {
    margin-top: 0;
}

.contact-form-row .contact-form-error-heading {
    margin-bottom: 5px;
    font-weight: 700;
}

.contact-form-row .contact-form-error-summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

.contact-form-row .contact-form-error-summary a:not(.btn) {
    color: rgb(144, 62, 60);
    text-decoration: underline;
}

.contact-form-row .contact-form-error-summary > :last-child:not(ul),
.contact-form-row .contact-form-thanks .richtext > :last-child {
    margin-bottom: 0;
}

/* The summary and thank you message get focus from the script; the outline shows where it is */
.contact-form-row .contact-form-error-summary:focus-visible,
.contact-form-row .contact-form-thanks:focus-visible {
    outline: 3px solid rgb(var(--scc-highlight));
    outline-offset: 2px;
}

.contact-form-row .scc-colour .contact-form-error-summary:focus-visible,
.contact-form-row .scc-colour .contact-form-thanks:focus-visible {
    outline-color: rgb(var(--scc-set-text));
}

.contact-form-row .contact-form-thanks .alert,
.contact-form-row .contact-form-thanks .alert a:not(.btn) {
    color: rgb(15, 81, 50);
}

.contact-form-row .buttons {
    margin-top: .5rem;
}

.contact-form-row .buttons .btn[aria-disabled="true"] {
    opacity: .65;
    cursor: progress;
}

/* reCAPTCHA checkbox (304 x 78px): scaled down on narrow screens so it fits at 320px without scrolling sideways */
.contact-form-row .contact-form-recaptcha {
    min-height: 78px;
}

.contact-form-row .contact-form-recaptcha:focus-visible {
    outline: 2px dashed rgb(var(--scc-highlight));
    outline-offset: 2px;
}

.contact-form-row .scc-colour .contact-form-recaptcha:focus-visible {
    outline-color: rgb(var(--scc-set-text));
}

@media (max-width: 399.98px) {
    .contact-form-row .contact-form-recaptcha {
        height: 64px;
        min-height: 0;
        transform: scale(.82);
        transform-origin: 0 0;
    }
}

/* Honeypot field: off screen for people, still in the form for bots */
.contact-form-row .contact-form-website {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
