/* ==========================================================================
   Motomarine v3 · Brands
   .cs-logo-grid (bordered white logo tiles, 4 columns; tiles stay white on
   dark sections), .cs-logo-row (plain centered logo row with a small label),
   .cs-marquee (infinite CSS logo strip, white logos on dark; --full sits outside
   the container, --boxed = bordered white logo boxes, --reverse runs the
   other way for a second row), .cs-brand-photos (full width .cs-carousel--4
   of .cs-brand-photo portrait photos with a white logo at the top and
   overlaid edge arrows; --strip = edge to edge 3/2 photos, no gap, .5
   overlay, logo centred). Real logos live in assets/img/logos: logo-1..8
   colour, logo-10..15 white.
   ========================================================================== */

/* --- Logo grid --- */
.cs-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.cs-logo-grid__item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 104px;
    padding: 0 24px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--white);
    transition: box-shadow .2s;
}
.cs-logo-grid__item img {
    display: block;
    max-height: 40px;
    max-width: 150px;
    width: auto;
    height: auto;
}
.cs-logo-grid__item:hover {
    box-shadow: var(--shadow);
}
.bg-lighter .cs-logo-grid__item {
    border-color: transparent;
    box-shadow: var(--shadow);
}
.bg-lighter .cs-logo-grid__item:hover {
    box-shadow: var(--shadow-lg);
}
.bg-dark .cs-logo-grid__item {
    border-color: transparent;
}
.cs-brands__more {
    margin-top: 40px;
}

/* --- Logo row --- */
.cs-logo-row__label {
    margin: 0 0 28px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.cs-logo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px 64px;
}
.cs-logo-row__item {
    display: flex;
    align-items: center;
    opacity: .85;
    transition: opacity .2s;
}
.cs-logo-row__item:hover {
    opacity: 1;
}
.cs-logo-row__item img {
    display: block;
    max-height: 40px;
    max-width: 150px;
    width: auto;
    height: auto;
}

/* --- Logo marquee --- */
.cs-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.cs-marquee__track {
    display: flex;
    width: max-content;
    animation: cs-marquee 40s linear infinite;
}
/* Once the script takes over it sets the transform itself, frame by frame */
.cs-marquee__track.is-js {
    animation: none;
    will-change: transform;
}
.cs-marquee__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}
.cs-marquee__logo img {
    display: block;
    max-height: 44px;
    max-width: 160px;
    width: auto;
    height: auto;
}
.cs-marquee + .cs-marquee {
    margin-top: 16px;
}
.cs-marquee--reverse .cs-marquee__track {
    animation-direction: reverse;
}
.cs-marquee--full,
.cs-marquee--boxed {
    -webkit-mask-image: none;
    mask-image: none;
}
.cs-brands-band {
    padding: 36px 0;
}
.cs-marquee--boxed .cs-marquee__track {
    animation-duration: 48s;
}
.cs-marquee__logo--box {
    width: 220px;
    height: 84px;
    margin: 0 8px;
    padding: 0 24px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--white);
}
.cs-marquee__logo--box img {
    max-height: 36px;
    max-width: 140px;
}
@keyframes cs-marquee {
    to {
        transform: translateX(-50%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .cs-marquee__track {
        animation: none;
    }
}

/* --- Brand photo carousel: full width, 4 portrait photos with a white logo on top --- */
.cs-brand-photos {
    padding: 0;
}
.cs-brand-photos .cs-carousel__track {
    gap: 16px;
    margin: 0;
    padding: 0;
}
.cs-brand-photos .cs-carousel__item {
    flex-basis: calc((100% - 48px) / 4);
}
.cs-brand-photo {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--heading);
}
.cs-brand-photo > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform .6s ease;
}
.cs-brand-photo > img {
    filter: brightness(.78);
}
.cs-brand-photo:hover > img {
    transform: scale(1.04);
}
.cs-brand-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 43, .7) 0%, rgba(15, 23, 43, .2) 30%, transparent 50%);
}
.cs-brand-photo__logo {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
}
.cs-brand-photo__logo img {
    display: block;
    max-height: 48px;
    max-width: 200px;
    width: auto;
    height: auto;
    filter: none;
}
.cs-brand-photos__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    min-width: 44px;
    height: 72px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 43, .5);
}
.cs-brand-photos__arrow:hover {
    background: var(--heading);
    border-color: var(--white);
    color: var(--white);
}
.cs-brand-photos__arrow--prev {
    left: 0;
}
.cs-brand-photos__arrow--next {
    right: 0;
}
.cs-brand-photos .cs-btn[disabled] {
    opacity: .35;
    pointer-events: none;
}

/* --- Brand photo strip: edge to edge landscape photos, dark overlay, logo in the middle --- */
.cs-brand-photos--strip .cs-carousel__track {
    gap: 0;
}
.cs-brand-photos--strip .cs-carousel__item {
    flex-basis: 25%;
}
.cs-brand-photo--strip > img {
    aspect-ratio: 3 / 2;
}
.cs-brand-photo--strip::before {
    background: rgba(15, 23, 43, .5);
    transition: background .3s;
}
.cs-brand-photo--strip:hover::before {
    background: rgba(15, 23, 43, .3);
}
.cs-brand-photo--strip .cs-brand-photo__logo {
    top: 50%;
    transform: translateY(-50%);
}

/* --- Slanted photo cards: four 3/4 photos clipped to a parallelogram, title + red link at the foot --- */
.cs-slant-cards {
    --bs-gutter-x: 0;
    --bs-gutter-y: 4px;
    padding: 0 1%;
}
.cs-slant-card {
    position: relative;
    display: block;
    margin: 0 -1.5%;
    overflow: hidden;
    background: var(--heading);
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    text-decoration: none;
}
.cs-slant-card > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 9;
    object-fit: cover;
    filter: brightness(.82);
    transition: transform .4s ease;
}
.cs-slant-card::after {
    content: "";
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0) 0%, rgba(17, 24, 39, .92) 100%);
    z-index: 1;
}
.cs-slant-card:hover > img {
    transform: scale(1.05);
}
.cs-slant-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12% 20px 24px;
}
.cs-slant-card__body .h4 {
    color: var(--white);
    margin: 0;
}
.cs-slant-card__link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    transition: gap .2s;
}
.cs-slant-card:hover .cs-slant-card__link {
    gap: 10px;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    /* Slanted cards go straight on tablets and phones */
    .cs-slant-cards {
        --bs-gutter-x: 16px;
        --bs-gutter-y: 16px;
        padding: 0;
    }
    .cs-slant-card {
        margin: 0;
        clip-path: none;
        border-radius: 4px;
    }
    .cs-slant-card__body {
        padding: 0 20px 20px;
    }
    .cs-logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .cs-logo-row {
        gap: 24px 40px;
    }
    .cs-brand-photos .cs-carousel__item {
        flex-basis: calc((100% - 16px) / 2);
    }
    .cs-brand-photos--strip .cs-carousel__item {
        flex-basis: 50%;
    }
    .cs-brand-photos--strip .cs-carousel__track {
        gap: 0;
    }
}
@media (max-width: 767px) {
    .cs-slant-card__body {
        padding: 0 16px 18px;
    }
    .cs-slant-card__body .h4 {
        font-size: 1.0625rem;
    }
    .cs-slant-card__link {
        font-size: 13px;
        white-space: nowrap;
    }
    .cs-brand-photos .cs-carousel__track {
        gap: 10px;
    }
    .cs-brand-photos .cs-carousel__item {
        flex-basis: calc((100% - 10px) / 2);
    }
    .cs-brand-photos--strip .cs-carousel__item {
        flex-basis: 50%;
    }
    .cs-brand-photos--strip .cs-carousel__track {
        gap: 0;
    }
    .cs-brand-photo__logo {
        top: 22px;
    }
    .cs-brand-photo__logo img {
        max-height: 30px;
        max-width: 120px;
    }
    .cs-brand-photos__arrow {
        width: 36px;
        min-width: 36px;
        height: 56px;
    }
    .cs-logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .cs-logo-grid__item {
        height: 68px;
    }
    .cs-logo-grid__item img,
    .cs-logo-row__item img {
        max-height: 26px;
        max-width: 100px;
    }
    .cs-marquee__logo {
        padding: 0 20px;
    }
    .cs-marquee__logo img {
        max-height: 26px;
        max-width: 110px;
    }
    .cs-marquee__logo--box {
        width: 160px;
        height: 64px;
        margin: 0 6px;
        padding: 0 16px;
    }
    .cs-marquee__logo--box img {
        max-height: 24px;
        max-width: 100px;
    }
}
@media (max-width: 575px) {
    /* Slanted cards stack one per row with a wide photo */
    .cs-slant-cards {
        --bs-gutter-y: 10px;
        padding: 0;
    }
    .cs-slant-cards > [class*="col-"] {
        width: 100%;
    }
    .cs-slant-card > img {
        aspect-ratio: 16 / 9;
    }
    .cs-slant-card::after {
        inset: 30% 0 0;
    }
    .cs-slant-card__body {
        padding: 0 20px 20px;
    }
}

/* --- Photo band: full width photo that fades into the page below --- */
.cs-photoband {
    position: relative;
    padding: 0;
    overflow: hidden;
}
.cs-photoband img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.cs-photoband::before,
.cs-photoband::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
}
.cs-photoband::before {
    top: 0;
    height: 30%;
    background: linear-gradient(180deg, var(--white) 0%, rgba(255, 255, 255, .6) 45%, rgba(255, 255, 255, 0) 100%);
}
.cs-photoband::after {
    bottom: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .7) 55%, var(--white) 100%);
}
.bg-lighter .cs-photoband::before {
    background: linear-gradient(180deg, var(--bg-light) 0%, rgba(244, 246, 249, .6) 45%, rgba(244, 246, 249, 0) 100%);
}
.bg-lighter .cs-photoband::after {
    background: linear-gradient(180deg, rgba(244, 246, 249, 0) 0%, rgba(244, 246, 249, .7) 55%, var(--bg-light) 100%);
}


/* ==========================================================================
   v5 · Modern logo grid and logo row (.cs-logos--modern)
   Logos sit in greyscale and come up in full colour when the pointer is on
   the link; grid tiles are spaced apart and lift slightly on hover.
   ========================================================================== */
.cs-logos--modern.cs-logo-grid {
    gap: 12px;
    border: 0;
    background: none;
}
.cs-logos--modern .cs-logo-grid__item,
.cs-logos--modern .cs-logo-row__item {
    transition: transform .3s var(--ease-out), box-shadow .3s ease, border-color .3s ease;
}
.cs-logos--modern .cs-logo-grid__item img,
.cs-logos--modern .cs-logo-row__item img {
    opacity: .75;
    filter: grayscale(1);
    transition: filter .25s ease, opacity .25s ease;
}
.cs-logos--modern .cs-logo-grid__item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.cs-logos--modern .cs-logo-grid__item:hover img,
.cs-logos--modern .cs-logo-row__item:hover img {
    opacity: 1;
    filter: none;
}

/* ==========================================================================
   v5 · Modern brand strips
   Marquee logos sit in one calm grey tone (colour logos only), full width
   bands get hairlines, boxed tiles get a soft shadow, the photo carousel and
   strip get a round arrow chip, slanted cards get a white link with a red
   arrow chip.
   ========================================================================== */
.cs-marquee .cs-marquee__logo img[src*="logo-1."],
.cs-marquee .cs-marquee__logo img[src*="logo-2."],
.cs-marquee .cs-marquee__logo img[src*="logo-3."],
.cs-marquee .cs-marquee__logo img[src*="logo-4."],
.cs-marquee .cs-marquee__logo img[src*="logo-5."],
.cs-marquee .cs-marquee__logo img[src*="logo-6."],
.cs-marquee .cs-marquee__logo img[src*="logo-7."],
.cs-marquee .cs-marquee__logo img[src*="logo-8."] {
    filter: grayscale(1);
    opacity: .7;
}
.cs-marquee--boxed .cs-marquee__logo img {
    filter: none;
    opacity: 1;
}
.cs-brands-band {
    position: relative;
}
.cs-brands-band::before,
.cs-brands-band::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.cs-brands-band::before {
    top: 0;
}
.cs-brands-band::after {
    bottom: 0;
}
.cs-brands-band.bg-dark::before,
.cs-brands-band.bg-dark::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
}
.cs-marquee--boxed {
    padding: 8px 0 12px;
}
.cs-marquee__logo--box {
    border-color: var(--border-light);
    border-radius: 4px;
    background: var(--white);
    box-shadow: rgba(0, 0, 0, .1) 0 0 5px 0, rgba(0, 0, 0, .1) 0 0 1px 0;
}

/* --- Photo carousel and strip: round arrow chip at the foot --- */
.cs-brand-photo::after {
    content: '\F138';
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-family: 'bootstrap-icons';
    font-size: 16px;
    line-height: 1;
    color: var(--white);
    background: rgba(255, 255, 255, .15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .3s ease, box-shadow .3s ease, transform .3s var(--ease-out);
}
.cs-brand-photo:hover::after {
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .25);
    transform: translateX(-4px);
}
.cs-brand-photo:not(.cs-brand-photo--strip) > img {
    filter: brightness(.85);
}
.cs-brand-photo:not(.cs-brand-photo--strip) .cs-brand-photo__logo {
    z-index: 2;
}
.cs-brand-photo--strip::after {
    right: 14px;
    bottom: 14px;
    width: 36px;
    height: 36px;
    font-size: 14px;
}

/* --- Slanted cards: white link, red arrow chip --- */
.cs-slant-card__link {
    color: rgba(255, 255, 255, .85);
}
.cs-slant-card__link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    color: var(--white);
    background: var(--primary);
    transition: transform .3s var(--ease-out);
}
.cs-slant-card:hover .cs-slant-card__link i {
    transform: translateX(3px);
}
@media (max-width: 575px) {
    .cs-brand-photo::after {
        right: 12px;
        bottom: 12px;
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ==========================================================================
   v5 · Brand carousels: v4 edge arrows, no per-photo arrow chips
   ========================================================================== */
.cs-brand-photo::after {
    content: none;
}

/* Boxed marquee: no border, lighter shadow, tighter rows */
.cs-marquee--boxed {
    padding: 6px 0;
}
.cs-marquee--boxed + .cs-marquee--boxed {
    margin-top: 4px;
}
.cs-marquee__logo--box {
    border: 0;
    box-shadow: rgba(15, 23, 43, .06) 0 1px 4px 0;
}
