/* ==========================================================================
   TVG Sliding Carousel Widget
   
   Dynamic values (colors, dimensions) are set as CSS custom properties
   on the .sc-wrap element via inline style in the PHP render method.
   ========================================================================== */

.sc-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.sc-wrap {
    --radius: 1.2rem;
    --gap: 20px;
    font-family: 'Inter', system-ui, sans-serif;
    overflow: hidden;
    user-select: none;
    padding-bottom: 100px;
}

/* ── NAV PILLS ─────────────────────────────────────────────────────────── */
.sc-wrap .sc-nav {
    background: #88949F;
    display: flex;
    gap: 10px;
    padding: 2px;
    border-radius: 50px;
    width: max-content;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    position: relative;
}

/* Floating highlight pill */
.sc-wrap .sc-nav .sc-nav-highlight {
    position: absolute;
    top: 2px;
    left: 0;
    height: calc(100% - 4px);
    border-radius: 99px;
    background: #000000 linear-gradient(0deg, #296195 0%, transparent 25%);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18);
    pointer-events: none;
    z-index: 0;
    will-change: transform, width;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1), width .4s cubic-bezier(.4, 0, .2, 1);
}

.sc-wrap .sc-nav button {
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 16px;
    border-radius: 99px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    transition: color .2s;
    text-transform: none;
    letter-spacing: 0;
    position: relative;
    z-index: 1;
}

.sc-wrap .sc-nav button:hover {
    color: #fff;
}

/* Active button — no background, the highlight div handles it */
.sc-wrap .sc-nav button.active {
    color: #fff;
}

/* ── STAGE ─────────────────────────────────────────────────────────────── */
.sc-wrap .sc-stage {
    position: relative;
    height: var(--stage-h);
}

/* ── TRACK ─────────────────────────────────────────────────────────────── */
.sc-wrap .sc-track {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    will-change: transform;
}

/* ── SLIDES ────────────────────────────────────────────────────────────── */
.sc-wrap .sc-slide {
    flex: 0 0 calc(100% - var(--peek-left) - var(--text-w) - var(--gap) * 2);
    overflow: hidden;
    position: relative;
    border-radius: var(--radius);
}

.sc-wrap .sc-slide.active {
    padding-left: var(--gap);
    padding-right: var(--gap);
    border-radius: 0;
}

.sc-wrap .sc-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform .55s ease, filter .4s ease;
    border-radius: var(--radius);
}

.sc-wrap .sc-slide.active img {
    transform: scale(1.00);
    filter: brightness(1);
}

.sc-wrap .sc-slide:not(.active) img {
    transform: scale(1.05);
    filter: brightness(.45);
}

/* ── TEXT PANEL ─────────────────────────────────────────────────────────── */
.sc-wrap .sc-text-panel {
    position: absolute;
    top: 0;
    left: var(--peek-left);
    width: var(--text-w);
    height: 100%;
    z-index: 10;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 70px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.sc-wrap .sc-texts-wrap {
    height: 100%;
}

.sc-wrap .sc-text {
    display: none;
    position: relative;
    z-index: 1;
}

.sc-wrap .sc-text.active {
    display: flex;
    flex-direction: column;
    gap: 36px;
    animation: scTextUp .38s ease both;
    height: 100%;
}

@keyframes scTextUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sc-wrap .sc-text h2 {
    font-family: var(--e-global-typography-5720a29-font-family), Sans-serif;
    font-size: var(--e-global-typography-5720a29-font-size);
    font-weight: var(--e-global-typography-5720a29-font-weight);
    line-height: var(--e-global-typography-5720a29-line-height);
    color: var(--e-global-color-6d59cd8);
}

.sc-wrap .sc-text .sc-body {
    font-family: var(--e-global-typography-text-font-family), Sans-serif;
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    line-height: var(--e-global-typography-text-line-height);
    color: var(--e-global-color-6d59cd8);
}

.sc-wrap .sc-body p {
    margin: 0;
    margin-bottom: 1rem;
}

.sc-wrap .sc-cta {
    display: inline-block;
    background: var(--accent);
    font-family: var(--e-global-typography-081129f-font-family), Sans-serif;
    font-size: var(--e-global-typography-081129f-font-size);
    font-weight: var(--e-global-typography-081129f-font-weight);
    text-transform: var(--e-global-typography-081129f-text-transform);
    line-height: var(--e-global-typography-081129f-line-height);
    letter-spacing: var(--e-global-typography-081129f-letter-spacing);
    color: #fff;
    padding: 15px 32px;
    border-radius: 99px;
    text-decoration: none;
    align-self: flex-start;
    margin-top: auto;
    pointer-events: all;
    transition: background .3s, transform .18s;
}

.sc-wrap .sc-cta:hover {
	background: black;
}

/* ── ARROWS ────────────────────────────────────────────────────────────── */
.sc-wrap .sc-arrows {
    position: absolute;
    bottom: -80px;
    right: 4rem;
    z-index: 30;
    display: flex;
    gap: 1.5rem;
    pointer-events: none;
}

.sc-wrap button.sc-arrow {
    pointer-events: all;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: var(--arrow-bg);
    color: var(--arrow);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
    line-height: 1;
    padding: 0;
    margin: 0;
    min-width: 0;
    min-height: 0;
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.sc-wrap button.sc-arrow:hover,
.sc-wrap button.sc-arrow:focus {
    background: var(--arrow-bg);
    color: var(--arrow);
    transform: scale(1.08);
}

.sc-wrap button.sc-arrow:active {
    transform: scale(.95);
}

/* ── EDGE MASK ─────────────────────────────────────────────────────────── */
.sc-wrap .sc-edge-mask {
    position: absolute;
    top: 0;
    left: -40px;
    width: 60px;
    height: 100%;
    height: calc(100% - -1px);
    z-index: 1;
    pointer-events: none;
}

.sc-wrap .sc-edge-mask svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── NAV SCROLL INDICATOR (hidden on desktop) ──────────────────────────── */
.sc-wrap .sc-nav-scroll-hint {
    display: none;
}

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sc-wrap .sc-nav .sc-nav-highlight {
        display: none;
    }
    .sc-wrap .sc-nav button.active {
        background:
            #000000 linear-gradient(0deg,
                #296195 0%, transparent 25%);
    }
    .sc-wrap .sc-edge-mask {
        display: none;
    }

    .sc-wrap {
        overflow: hidden;
        padding-bottom: 60px;
        --peek-left: 0px;
        --text-w: 100%;
    }

    .sc-wrap .sc-stage {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 20px;
        position: relative;
    }

    .sc-wrap .sc-track {
        position: relative;
        inset: unset;
        height: 250px;
        flex-shrink: 0;
    }

    .sc-wrap .sc-slide {
        flex: 0 0 100%;
    }

    .sc-wrap .sc-slide.active {
        padding-left: 0;
        padding-right: 0;
    }

    .sc-wrap .sc-text-panel {
        position: relative;
        top: unset;
        left: unset;
        width: 100%;
        height: auto;
        min-height: 250px;
        padding: 30px 20px;
    }

    /* ── Nav pills: scrollable with scroll indicator ── */
    .sc-wrap .sc-nav-wrapper {
        position: relative;
        margin-bottom: 30px;
    }

    .sc-wrap .sc-nav {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-right: 40px;
    }

    .sc-wrap .sc-nav::-webkit-scrollbar {
        display: none;
    }

    .sc-wrap .sc-nav button {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 12px 14px;
    }

    /* Scroll hint chevron on right edge */
    .sc-wrap .sc-nav-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        background: #88949F;
        border-radius: 50%;
        color: #fff;
        font-size: 1.1rem;
        pointer-events: none;
        z-index: 2;
        transition: opacity .25s;
    }

    .sc-wrap .sc-nav-scroll-hint.hidden {
        opacity: 0;
    }

    /* Hide arrows on mobile when setting is off */
    .sc-wrap .sc-arrows.sc-arrows-hide-mobile {
        display: none !important;
    }

    /* ── Arrows: overlay on image area, left/right centered ── */
    .sc-wrap .sc-arrows {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 250px;
        bottom: unset;
        z-index: 30;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 12px;
        pointer-events: none;
        gap: 0;
    }

    .sc-wrap button.sc-arrow {
        pointer-events: all;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border: none;
        color: #fff;
        padding: 0;
    }

    .sc-wrap button.sc-arrow:hover,
    .sc-wrap button.sc-arrow:focus {
        background: rgba(255, 255, 255, 0.35);
        color: #fff;
    }
}

/* ==========================================================================
   LIGHTBOX TRIGGER (icon on each slide)
   ========================================================================== */
.sc-wrap .sc-lightbox-trigger {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #88949F;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: background .2s, transform .15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.85);
}

/* Show only on the active slide */
.sc-wrap .sc-slide.active .sc-lightbox-trigger {
    opacity: 1;
    transform: scale(1);
    transition: opacity .3s .15s, transform .3s .15s, background .2s;
}

.sc-wrap .sc-lightbox-trigger:hover {
    background: #fff;
    transform: scale(1.08);
}

.sc-wrap .sc-lightbox-trigger:active {
    transform: scale(0.95);
}

/* Bump specificity to beat Elementor kit button styles */
.sc-wrap button.sc-lightbox-trigger {
    background: rgba(255, 255, 255, 0.92);
    color: #88949F;
    border: none;
    border-radius: 50%;
    padding: 0;
    width: 44px;
    height: 44px;
    font-size: 0;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1;
    min-width: 0;
    min-height: 0;
}

.sc-wrap button.sc-lightbox-trigger:hover,
.sc-wrap button.sc-lightbox-trigger:focus {
    background: #fff;
    color: #88949F;
}

/* Adjust position for active slide padding (desktop) */
.sc-wrap .sc-slide.active .sc-lightbox-trigger {
    right: calc(var(--gap) + 16px);
}

@media (max-width: 1024px) {
    .sc-wrap .sc-slide.active .sc-lightbox-trigger {
        right: 12px;
    }
}

/* ==========================================================================
   LIGHTBOX OVERLAY
   ========================================================================== */
.sc-wrap .sc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.sc-wrap .sc-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.sc-wrap .sc-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.sc-wrap .sc-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sc-wrap .sc-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-select: none;
}

.sc-wrap .sc-lightbox-caption {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.85;
}

/* Close button */
.sc-wrap button.sc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: background .2s;
    font-size: 0;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1;
    min-width: 0;
    min-height: 0;
}

.sc-wrap button.sc-lightbox-close:hover,
.sc-wrap button.sc-lightbox-close:focus {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Lightbox nav arrows */
.sc-wrap button.sc-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: background .2s;
    font-size: 0;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1;
    min-width: 0;
    min-height: 0;
}

.sc-wrap button.sc-lightbox-arrow:hover,
.sc-wrap button.sc-lightbox-arrow:focus {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.sc-wrap .sc-lightbox-prev {
    left: 20px;
}

.sc-wrap .sc-lightbox-next {
    right: 20px;
}

/* Counter */
.sc-wrap .sc-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 400;
    z-index: 2;
}

@media (max-width: 1024px) {
    .sc-wrap button.sc-lightbox-arrow {
        width: 40px;
        height: 40px;
    }

    .sc-wrap .sc-lightbox-prev {
        left: 10px;
    }

    .sc-wrap .sc-lightbox-next {
        right: 10px;
    }

    .sc-wrap button.sc-lightbox-close {
        top: 12px;
        right: 12px;
    }
}
