.tabbed-slide-nav {
    font-size: 17px;
    line-height: 1em;
    font-weight: 400;
    color: var(--black);
    padding: 15px 16px 15px 15px;
    text-transform: capitalize;
    cursor: pointer;
    background: transparent; /* Ensure default is transparent */
    /* Mobile touch optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    /* Smooth color transition without movement */
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Force non-active tabs to have default styling */
.tabbed-slider-nav .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) {
    background: transparent !important;
    color: var(--black) !important;
}

.bg-blue .tabbed-slider-nav .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) {
    background: transparent !important;
    color: var(--white) !important;
}

.bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) {
    background: transparent !important;
    color: var(--white) !important;
}

/* Force underline to be hidden for non-active tabs - mobile styles */
.tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) .tabbed-slide-nav__text:after {
    width: 0 !important;
}

.bg-blue .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) .tabbed-slide-nav__text:after {
    width: 0 !important;
}

.bg-dark-blue .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) .tabbed-slide-nav__text:after {
    width: 0 !important;
}

/* Active tab styling - multiple selectors for maximum compatibility */
.tabbed-slider-nav .slick-slide.slick-current .tabbed-slide-nav,
.tabbed-slider-nav .tabbed-slide-nav.active,
.tabbed-slider-nav .tabbed-slide-nav.js-active,
.tabbed-slider-nav .tabbed-slide-nav[data-active="true"] {
    background: var(--primary) !important;
    color: var(--white) !important;
}

.bg-blue .tabbed-slide-nav {
    color: var(--white);
}

.bg-dark-blue .tabbed-slide-nav {
    color: var(--white);
}

/* Blue theme active tab styling */
.bg-blue .tabbed-slider-nav .slick-slide.slick-current .tabbed-slide-nav,
.bg-blue .tabbed-slider-nav .tabbed-slide-nav.active,
.bg-blue .tabbed-slider-nav .tabbed-slide-nav.js-active,
.bg-blue .tabbed-slider-nav .tabbed-slide-nav[data-active="true"] {
    background: var(--light-blue) !important;
    color: var(--dark-blue) !important;
}

/* Dark theme active tab styling */
.bg-dark-blue .tabbed-slider-nav .slick-slide.slick-current .tabbed-slide-nav,
.bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav.active,
.bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav.js-active,
.bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav[data-active="true"] {
    background: var(--light-blue) !important;
    color: var(--dark-blue) !important;
}

.tabbed-slider-nav .slick-slide {
    margin: 0 3px;
}

.tabbed-slider-for {
    margin: 35px 0 0;
    /* Prevent content jumping during tab switches */
    min-height: 300px;
    /* Smooth fade transition for content updates */
    transition: opacity 0.15s ease;
}

/* Mobile: Prevent layout shifts during content updates */
@media(max-width: 767px) {
    .tabbed-slider-for {
        min-height: 350px;
    }
    
    /* Smooth content transitions without causing scroll jumps */
    .js-tab-content,
    .js-tab-heading,
    .js-tab-link-container,
    .js-tab-image {
        transition: opacity 0.15s ease;
    }
}

.tabbed-slider-for .slick-slide {
    vertical-align: top;
}

.tabbed-block__heading {
    margin: 0 0 35px;
}

.tabbed-slider-nav .slick-arrow {
    width: 30px;
    height: 30px;
    background: var(--light-blue);
    color: var(--dark-blue);
    border-radius: 50px;
    transform: translate(0, -50%);
    top: 50%;
    margin: 0;
}

.tabbed-slider-nav .slick-arrow:before {
    font-size: 16px;
}

.tabbed-slider-nav .slick-next {
    left: unset;
    right: 0;
}

.tabbed-slider-nav .slick-prev {
    opacity: 0;
}

.tabbed-slider-nav:after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 48px;
    background: linear-gradient(270deg, #F4F4F4 0%, rgba(244, 244, 244, 0) 100%);
}


.bg-blue .tabbed-slider-nav:after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 48px;
    background: linear-gradient(270deg, var(--primary) 0%, rgba(0, 123, 191, 0) 100%);
}

.bg-dark-blue .tabbed-slider-nav:after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 48px;
    background: linear-gradient(270deg, #041525 0%, rgba(4, 21, 37, 0) 100%);
}

/* Center tabs on mobile when 3 or fewer tabs */
@media(max-width: 767px) {
    .tabbed-slider-nav.tabs-centered {
        position: relative;
    }
    
    .tabbed-slider-nav.tabs-centered .slick-list {
        text-align: center;
        overflow: visible !important;
    }

    .tabbed-slider-nav.tabs-centered .slick-track {
        display: flex !important;
        justify-content: center !important;
        transform: none !important;
        left: auto !important;
        width: auto !important;
        /* Prevent slider movement animations on mobile */
        transition: none !important;
    }
    
    .tabbed-slider-nav.tabs-centered .slick-slide {
        float: none !important;
        width: auto !important;
        flex-shrink: 0;
    }

    /* Hide the gradient overlay and arrow when centered */
    .tabbed-slider-nav.tabs-centered:after,
    .tabbed-slider-nav.tabs-centered .slick-next,
    .tabbed-slider-nav.tabs-centered .slick-prev {
        display: none !important;
    }
    
    /* Prevent all slider movement on mobile */
    .tabbed-slider-nav .slick-track {
        transition: none !important;
    }
    
    .tabbed-slider-nav .slick-list {
        overflow-x: hidden;
    }
}

.tabbed-slide-flex {
    background: var(--white);
}

.tabbed-slide-flex__text {
    padding: 35px 22px;
}

.bg-blue .tabbed-slide-flex__text p a,
.bg-dark-blue .tabbed-slide-flex__text p a {
    color: var(--black);
    text-decoration-color: var(--black);
}

.bg-blue .tabbed-slide-flex__text p a:hover,
.bg-dark-blue .tabbed-slide-flex__text p a:hover {
    color: var(--primary);
}

.tabbed-slide-flex__image {
    height: 200px;
}

.bg-blue .tabbed-slide-flex__text,
.bg-blue .tabbed-slide-flex__text h3 {
    color: var(--black);
}

.bg-dark-blue .tabbed-slide-flex__text,
.bg-dark-blue .tabbed-slide-flex__text h3 {
    color: var(--black);
}


@media(min-width: 768px) {
    .tabbed-slider-nav .tabbed-slide-nav {
        background: transparent;
        padding: 0 16px;
        text-transform: capitalize;
        font-size: 20px;
        font-weight: 600;
        position: relative;
    }
    
    /* Desktop - Force non-active tabs to have default styling */
    .tabbed-slider-nav .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) {
        background: transparent !important;
        color: var(--black) !important;
    }
    
    .bg-blue .tabbed-slider-nav .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) {
        background: transparent !important;
        color: var(--white) !important;
    }
    
    .bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) {
        background: transparent !important;
        color: var(--white) !important;
    }

    /* Desktop active tab styling */
    .tabbed-slider-nav .slick-slide.slick-current .tabbed-slide-nav,
    .tabbed-slider-nav .tabbed-slide-nav.active,
    .tabbed-slider-nav .tabbed-slide-nav.js-active,
    .tabbed-slider-nav .tabbed-slide-nav[data-active="true"] {
        color: var(--primary) !important;
        padding: 0 16px;
        background: transparent !important;
    }

    .tabbed-slide-nav__text {
        position: relative;
        display: inline-block;
        padding: 0 4px 13px;
    }

    .tabbed-slide-nav__text:after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translate(-50%, 0);
        bottom: 0;
        height: 5px;
        background: var(--primary);
        width: 0;
        transition: all ease 0.3s;
    }
    
    /* Force underline to be hidden for non-active tabs */
    .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) .tabbed-slide-nav__text:after {
        width: 0 !important;
    }

    /* Active tab underline styling */
    .slick-current .tabbed-slide-nav__text:after,
    .active .tabbed-slide-nav__text:after,
    .js-active .tabbed-slide-nav__text:after,
    [data-active="true"] .tabbed-slide-nav__text:after {
        width: 100% !important;
    }


    .tabbed-slider-nav:after {
        display: none;
    }

    .tabbed-slider-nav .slick-next {
        opacity: 0;
    }

    .tabbed-slider-nav .slick-slide {
        margin: 0;
    }

    .tabbed-slider-nav .slick-track:before,
    .tabbed-slider-nav .slick-track:after {
        display: none;
    }

    .tabbed-slider-nav .slick-track {
        display: flex !important;
        justify-content: space-between !important;
        flex-wrap: wrap;
    }

    .tabbed-slider-nav .slick-slide{
        width: auto !important;
    }

    .tabbed-slider-for {
        margin-top: 50px;
    }

    .tabbed-slide-flex {
        display: flex;
        flex-wrap: wrap;
    }

    .tabbed-slide-flex__image {
        position: relative;
        width: 349px;
        height: auto;
    }

    .tabbed-slide-flex__image img {
        position: absolute;
        top: 0;
        left: 0;
    }

    .tabbed-slide-flex__text {
        width: calc(100% - 349px);
        padding: 35px 21px;
    }

    .tabbed-slide-flex__text .btn{
        margin-top: 20px;
        margin-bottom: 0;
    }


    /* Desktop blue theme active styling */
    .bg-blue .tabbed-slider-nav .slick-slide.slick-current .tabbed-slide-nav,
    .bg-blue .tabbed-slider-nav .tabbed-slide-nav.active,
    .bg-blue .tabbed-slider-nav .tabbed-slide-nav.js-active,
    .bg-blue .tabbed-slider-nav .tabbed-slide-nav[data-active="true"] {
        background: none !important;
        color: var(--light-blue) !important;
    }

    /* Desktop dark theme active styling */
    .bg-dark-blue .tabbed-slider-nav .slick-slide.slick-current .tabbed-slide-nav,
    .bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav.active,
    .bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav.js-active,
    .bg-dark-blue .tabbed-slider-nav .tabbed-slide-nav[data-active="true"] {
        background: none !important;
        color: var(--light-blue) !important;
    }

     /* Blue theme underline styling */
     .bg-blue .slick-current .tabbed-slide-nav__text::after,
     .bg-blue .active .tabbed-slide-nav__text::after,
     .bg-blue .js-active .tabbed-slide-nav__text::after,
     .bg-blue [data-active="true"] .tabbed-slide-nav__text::after {
       background: var(--light-blue) !important;
    }

     /* Dark theme underline styling */
     .bg-dark-blue .slick-current .tabbed-slide-nav__text::after,
     .bg-dark-blue .active .tabbed-slide-nav__text::after,
     .bg-dark-blue .js-active .tabbed-slide-nav__text::after,
     .bg-dark-blue [data-active="true"] .tabbed-slide-nav__text::after {
       background: var(--light-blue) !important;
    }
    
    /* Force underline to be hidden for non-active tabs in blue theme */
    .bg-blue .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) .tabbed-slide-nav__text:after {
        width: 0 !important;
    }

    /* Force underline to be hidden for non-active tabs in dark theme */
    .bg-dark-blue .tabbed-slide-nav:not(.active):not(.js-active):not(.slick-current):not([data-active="true"]) .tabbed-slide-nav__text:after {
        width: 0 !important;
    }

}


@media(min-width: 1200px) {
    .tabbed-slider-nav .tabbed-slide-nav {
        font-size: 24px;
        transition: all ease 0.3s;
    }

    
    .tabbed-block__heading {
        max-width: 1034px;
        margin: 0 auto;
        margin-bottom: 50px;
    }

    .tabbed-block__wrapper {
         max-width: 1034px;
        margin: 0 auto;
    }

    .tabbed-slide-flex__image {
        width: calc(50% - 15px);
    }

    .tabbed-slide-flex__text {
        width: calc(50% + 15px);
        padding: 75px 35px 75px 100px;
    }


}

@media(min-width: 1600px) {
    .tabbed-slider-nav .tabbed-slide-nav {
        font-size: 30px;
    }

    .tabbed-block__heading {
        max-width: 100%;
    }

    .tabbed-block__wrapper {
        max-width: 1096px;
    }

    .tabbed-slide-flex__image {
        width: calc(50% - 170px);
    }

    .tabbed-slide-flex__text {
        width: calc(50% + 170px);
        padding: 106px 36px 106px 50px;
    }

    .tabbed-slide-flex__text p {
        font-size: 17px;
    }
    
}

.bg-blue .tabbed-slide-for li a, 
.bg-dark-blue .tabbed-slide-for li a {
    color: #000;
    text-decoration-color: #000;
}

.bg-blue .tabbed-slide-for li a:hover, 
.bg-dark-blue .tabbed-slide-for li a:hover {
    color: var(--light-blue);
    text-decoration-color: var(--light-blue);
}