/* =============================================
   Norwest Hero — carousel with crossfade
   ============================================= */

/* Override theme padding on the parent section */
section:not(.elementor-inner-section):has(.nw-hero) {
    padding: 0 !important;
    margin: 0 !important;
}

/* Also override Elementor column/widget wrappers */
.elementor-widget:has(.nw-hero) {
    padding: 0 !important;
    margin: 0 !important;
}

.elementor-column:has(.nw-hero) {
    padding: 0 !important;
}

.elementor-widget-wrap:has(.nw-hero) {
    padding: 0 !important;
}

.nw-hero {
    position: relative;
    width: 100%;
    min-height: 820px;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    color: #000;
    background: #d5d5d5;
    padding: 0 !important;
}

/* ── Slide backgrounds — stacked, crossfade ── */
.nw-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 0;
}

.nw-hero__bg.is-active {
    opacity: 1;
}

/* Inner container */
.nw-hero__container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 820px;
    position: relative;
}

/* Left content column — static, always visible */
.nw-hero__content {
    width: 50%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    position: relative;
    z-index: 2;
}

/* Right column — occupies space, bg image shows through */
.nw-hero__image-side {
    width: 50%;
}

/* ── Spacer top ── */
.nw-hero__spacer-top {
    height: 140px;
}

/* Mobile-only line break — hidden on desktop */
.nw-hero__mobile-br {
    display: none;
}

/* ── Heading ── */
.nw-hero__heading {
    font-family: 'Poppins', sans-serif;
    font-size: 45px;
    font-weight: 200;
    line-height: 65px;
    letter-spacing: 0.4px;
    color: #000;
    margin: 0 0 20px;
}

.nw-hero__heading-accent {
    font-family: 'DM Serif Display', serif !important;
    font-style: normal !important;
    font-size: 2em !important;
    font-weight: 400 !important;
}

/* ── Company Logos (right above captions, crossfade per slide) ── */
.nw-hero__logos {
    position: relative;
    height: 50px;
    margin-bottom: 16px;
}

.nw-hero__logo {
    position: absolute;
    top: 0;
    right: 0;
    height: 36px !important;
    max-height: 36px !important;
    width: auto;
    object-fit: contain;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out, filter 1.2s ease-in-out;
}

.nw-hero__logo.is-active {
    opacity: 1;
    transform: translateY(0);
}

.nw-hero__logo.is-exiting {
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* Force logos black on light backgrounds */
.nw-hero[data-theme="light"] .nw-hero__logo {
    filter: brightness(0);
}

/* Force logos white on dark backgrounds */
.nw-hero[data-theme="dark"] .nw-hero__logo {
    filter: brightness(0) invert(1);
}

/* ── CTA Buttons (crossfade per slide) ── */
.nw-hero__buttons {
    position: relative;
    min-height: 52px;
    margin-top: 25px;
}

.nw-hero__button {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #000;
    background: transparent;
    border: 1px solid #000;
    padding: 15px 35px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease, border-color 1.2s ease-in-out;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.nw-hero__button.is-active {
    opacity: 1;
    pointer-events: auto;
}

.nw-hero__button.is-exiting {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.nw-hero__button:hover {
    background: #000;
    color: #fff;
}

.nw-hero__button-mobile {
    display: none;
}

/* ── Spacer — pushes logo/caption to bottom ── */
.nw-hero__spacer-mid {
    flex: 1;
}

.nw-hero__spacer-bottom {
    height: 40px;
    flex-shrink: 0;
}

/* ── Captions wrapper — stacked, crossfade ── */
.nw-hero__captions {
    position: relative;
    height: 90px;
}

.nw-hero__caption {
    position: absolute;
    top: 0;
    right: 0;
    text-align: right;
    font-size: 16px;
    line-height: 24px;
    color: #000;
    margin: 0;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.nw-hero__caption.is-active {
    opacity: 1;
    transform: translateY(0);
}

.nw-hero__caption.is-exiting {
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.nw-hero__caption-name {
    font-weight: 600;
    letter-spacing: 1.5px;
}

.nw-hero__caption-title {
    font-weight: 300;
    letter-spacing: 0.25px;
}

/* ── Dot indicators ── */
.nw-hero__dots {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.nw-hero__dot {
    -webkit-appearance: none;
    appearance: none;
    width: 10px !important;
    height: 10px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.2) !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0;
    transition: background 0.3s ease;
    box-shadow: none !important;
    outline: none;
}

.nw-hero__dot.is-active {
    background: rgba(0, 0, 0, 0.6) !important;
}

/* ── Lottie arrows ── */
.nw-hero__lottie {
    display: none !important;
}

/* =============================================
   Dark theme (per-slide) — white text, inverted lottie
   ============================================= */

.nw-hero[data-theme="dark"] .nw-hero__heading,
.nw-hero[data-theme="dark"] .nw-hero__caption {
    color: #fff;
    transition: color 1.2s ease-in-out, opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.nw-hero[data-theme="dark"] .nw-hero__button {
    color: #fff;
    border-color: #fff;
}

.nw-hero[data-theme="dark"] .nw-hero__button:hover {
    background: #fff;
    color: #000;
}

/* Smooth color transitions when switching themes */
.nw-hero__heading,
.nw-hero__caption {
    transition: color 1.2s ease-in-out, opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.nw-hero[data-theme="dark"] .nw-hero__dot {
    background: rgba(255, 255, 255, 0.3) !important;
}

.nw-hero[data-theme="dark"] .nw-hero__dot.is-active {
    background: rgba(255, 255, 255, 0.8) !important;
}

.nw-hero[data-theme="dark"] .nw-hero__lottie {
    filter: saturate(0) invert(1);
}


/* =============================================
   Responsive
   ============================================= */

@media (min-width: 1400px) {
    .nw-hero__lottie {
        left: calc((100% - 1200px) / 2 - 100px);
    }
}

@media (max-width: 1399px) {
    .nw-hero__lottie {
        left: 20px;
    }
}

/* Mobile */
@media (max-width: 1024px) {
    section.nw-hero:not(.elementor-inner-section) {
        min-height: 480px;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .nw-hero__bg {
        background-position: var(--bg-mobile, center center) !important;
        background-size: cover;
    }

    .nw-hero__container {
        flex-direction: column;
        flex: 1;
        min-height: 0;
        padding: 15px 20px 0;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .nw-hero__content {
        width: 100%;
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Edge-to-edge: kill all Elementor wrapper padding */
    section:not(.elementor-inner-section):has(.nw-hero) {
        padding: 0 !important;
        margin: 0 !important;
    }

    .nw-hero__image-side {
        display: none;
    }

    .nw-hero__spacer-top {
        height: 5px;
    }

    .nw-hero__heading {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 8px;
        text-shadow: 0 0 20px rgba(255,255,255,1), 0 0 40px rgba(255,255,255,0.8), 0 0 60px rgba(255,255,255,0.4);
    }

    .nw-hero[data-theme="dark"] .nw-hero__heading {
        text-shadow: 0 0 20px rgba(0,0,0,1), 0 0 40px rgba(0,0,0,0.8), 0 0 60px rgba(0,0,0,0.4);
    }

    .nw-hero__heading-accent {
        font-size: 1.8em !important;
    }

    .nw-hero__mobile-br {
        display: block;
    }

    /* Left-align logo, caption, button on mobile */
    .nw-hero__logo {
        height: 24px !important;
        max-height: 24px !important;
        right: auto;
        left: 0;
    }

    .nw-hero__logos {
        height: 32px;
        margin-bottom: 8px;
    }

    .nw-hero__buttons {
        min-height: 46px;
        margin-bottom: 8px;
    }

    .nw-hero__button {
        font-size: 9px;
        padding: 7px 14px;
        line-height: 1.5em;
        text-align: center;
        text-shadow: 0 0 12px rgba(255,255,255,0.9);
    }

    .nw-hero[data-theme="dark"] .nw-hero__button {
        text-shadow: 0 0 12px rgba(0,0,0,0.9);
    }

    .nw-hero__button-desktop {
        display: none;
    }

    .nw-hero__button-mobile {
        display: inline;
    }

    .nw-hero__caption {
        font-size: 13px;
        line-height: 20px;
        right: auto;
        left: 0;
        text-align: left;
        text-shadow: 0 0 12px rgba(255,255,255,0.9);
    }

    .nw-hero[data-theme="dark"] .nw-hero__caption {
        text-shadow: 0 0 12px rgba(0,0,0,0.9);
    }

    .nw-hero__caption-name {
        letter-spacing: 1px;
    }

    .nw-hero__captions {
        height: 105px;
    }

    .nw-hero__caption-name,
    .nw-hero__caption-title {
        display: block;
        line-height: 1.4;
        max-width: 150px;
        text-wrap: balance;
    }

    .nw-hero__caption-title {
        margin-top: 4px;
    }

    .nw-hero__spacer-bottom {
        height: 40px;
    }

    .nw-hero__lottie {
        display: none;
    }

    .nw-hero__dots {
        bottom: 12px;
        padding: 0 30px;
    }

    .nw-hero__dot {
        width: 10px;
        height: 10px;
    }
}

/* =============================================
   Logo Carousel — [norwest_logo_carousel]
   Three modes: scroll, grid, wave
   ============================================= */

.nw-logos {
    padding: 60px 0;
    background: #000;
}

.nw-logos__header {
    max-width: 1300px;
    margin: 0 auto 40px;
    padding: 0 30px;
    text-align: left;
}

.nw-logos__heading {
    font-family: 'DM Serif Display', serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 30px;
}

.nw-logos__accent {
    font-family: 'DM Serif Display', serif;
    color: #197CA0 !important;
}

.nw-logos__subhead {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 39px;
    color: #fff;
    margin: 0 0 30px;
}

.nw-logos__cta {
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nw-logos__button {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 0;
    padding: 15px 35px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.nw-logos__button:hover {
    background: #fff;
    color: #000;
}

/* Shared logo styling */
.nw-logos__logo {
    max-width: 120px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ═══════════════════════════════════════════
   MODE: SCROLL — continuous marquee
   ═══════════════════════════════════════════ */
.nw-logos__scroll-wrap {
    max-width: 1300px;
    margin: 0 auto;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.nw-logos__scroll-row {
    overflow: hidden;
    padding: 16px 0;
}

.nw-logos__scroll-row + .nw-logos__scroll-row {
    padding-top: 8px;
}

.nw-logos__scroll-track {
    display: flex;
    align-items: center;
    gap: 60px;
    width: max-content;
    will-change: transform;
}

.nw-logos__scroll-row[data-direction="left"] .nw-logos__scroll-track {
    animation: nwScrollLeft var(--scroll-speed, 350s) linear infinite;
}

.nw-logos__scroll-row[data-direction="right"] .nw-logos__scroll-track {
    animation: nwScrollRight var(--scroll-speed, 350s) linear infinite;
}

/* Override LoftLoader *:not(...) specificity on animation */
*:not(#loftloader-wrapper.loftloader-imgfading #loader img).nw-logos__scroll-track {
    animation-duration: var(--scroll-speed, 350s) !important;
}

/* Pause on hover */
.nw-logos__scroll-wrap:hover .nw-logos__scroll-track {
    animation-play-state: paused;
}

@keyframes nwScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes nwScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.nw-logos__scroll-item {
    --scale: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: calc(140px * var(--scale));
    height: 60px;
    text-decoration: none;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.nw-logos__scroll-item:hover img {
    opacity: 1;
}

.nw-logos__scroll-item img {
    max-width: calc(100px * var(--scale));
    max-height: calc(30px * var(--scale));
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.5;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}


/* ═══════════════════════════════════════════
   MODE: GRID — batch swap with transitions
   ═══════════════════════════════════════════ */
.nw-logos__grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.nw-logos__card {
    display: none !important;
    text-decoration: none;
    color: #000;
    background: transparent;
    border-radius: 8px;
    padding: 24px 20px;
    overflow: hidden;
}

*:not(#loftloader-wrapper.loftloader-imgfading #loader img).nw-logos__card {
    display: none !important;
}

.nw-logos__card.is-visible,
*:not(#loftloader-wrapper.loftloader-imgfading #loader img).nw-logos__card.is-visible {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.nw-logos__card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.nw-logos__card-inner img {
    opacity: 0.6;
    filter: grayscale(100%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.nw-logos__card:hover .nw-logos__card-inner img {
    opacity: 1;
    filter: grayscale(0%);
}


/* ═══════════════════════════════════════════
   MODE: WAVE — individual logo swap
   ═══════════════════════════════════════════ */
.nw-logos__wave-grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.nw-logos__wave-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 24px 20px;
    border-radius: 8px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nw-logos__wave-cell img {
    opacity: 0.6;
    filter: grayscale(100%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.nw-logos__wave-cell:hover img {
    opacity: 1;
    filter: grayscale(0%);
}


/* ═══════════════════════════════════════════
   RESPONSIVE — all modes
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .nw-logos__grid,
    .nw-logos__wave-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }

    .nw-logos__card,
    .nw-logos__wave-cell {
        padding: 20px 14px;
    }
}

@media (max-width: 767px) {
    .nw-logos {
        padding: 50px 0;
    }

    .nw-logos__heading {
        font-size: 28px;
    }

    .nw-logos__subhead {
        font-size: 15px;
        line-height: 24px;
    }

    .nw-logos__header {
        margin-bottom: 30px;
    }

    .nw-logos__cta {
        margin-top: 30px;
    }

    .nw-logos__grid,
    .nw-logos__wave-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .nw-logos__card,
    .nw-logos__wave-cell {
        padding: 16px 10px;
    }

    .nw-logos__logo,
    .nw-logos__scroll-item img,
    .nw-logos__wave-cell img,
    .nw-logos__card-inner img {
        max-width: 80px;
        max-height: 36px;
    }

    .nw-logos__scroll-item {
        width: 100px;
        height: 44px;
    }

    .nw-logos__scroll-track {
        gap: 40px;
    }
}
