/* ============ WRAPPER (breakout) ============ */
.ts-slider-wrap {
    position: relative;
    width: 100%;
}

.ts-slider-wrap[data-breakout="yes"] {
    /* Escape Elementor container padding */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
    left: 0;
}

/* Prevent horizontal scroll */
body { overflow-x: hidden; }

/* ============ SLIDER ROOT ============ */
.ts-slider {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    width: 100%;
}

/* Default height (overridden by inline setting or full-screen) */
.ts-slider { min-height: 400px; height: 100%; }

.ts-slider[data-full-screen="yes"] {
    height: 100vh;
    height: 100dvh; /* mobile-safe dynamic viewport */
}

.ts-slider[data-full-screen="yes"][data-full-mode="header"] {
    height: calc(100vh - var(--ts-header-h, 80px));
    height: calc(100dvh - var(--ts-header-h, 80px));
}

/* ============ TRACK & SLIDES ============ */
.ts-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.ts-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
}

.ts-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Transition variants */
.ts-slider[data-transition="fade"] .ts-slide.is-active { transform: none; }

.ts-slider[data-transition="slide"] .ts-slide {
    transform: translateX(100%);
    opacity: 1;
    visibility: visible;
}
.ts-slider[data-transition="slide"] .ts-slide.is-active {
    transform: translateX(0);
    z-index: 3;
}
.ts-slider[data-transition="slide"] .ts-slide.is-prev {
    transform: translateX(-100%);
    z-index: 2;
}

.ts-slider[data-transition="zoom"] .ts-slide {
    transform: scale(1.08);
}
.ts-slider[data-transition="zoom"] .ts-slide.is-active {
    transform: scale(1);
}

/* ============ BACKGROUND LAYERS ============ */
.ts-slide-bg {
    position: absolute;
    inset: 0;
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: ts-gradient-shift 15s ease infinite;
    z-index: 1;
}

@keyframes ts-gradient-shift {
    0%, 100% { background-position: 0% 0%; }
    50%      { background-position: 100% 100%; }
}

.ts-slide-media {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

.ts-slide-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
}

/* Ken Burns effect on image slides */
.ts-slider[data-ken-burns="yes"] .ts-slide.is-active .ts-slide-media-image {
    animation: ts-ken-burns 12s ease-out both;
}

@keyframes ts-ken-burns {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

/* ============ OVERLAY ============ */
.ts-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* ============ CONTENT ============ */
.ts-slide-content {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 60px;
}

.ts-slide.is-active .ts-slide-content {
    animation: ts-content-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.2s;
}

@keyframes ts-content-in {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ts-slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

.ts-slide-title {
    font-size: clamp(28px, 5.5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.ts-slide-description {
    font-size: clamp(15px, 1.9vw, 20px);
    line-height: 1.6;
    margin: 0 0 34px;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.ts-slide-button {
    display: inline-block;
    padding: 16px 38px;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.ts-slide-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ============ ARROWS ============ */
.ts-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 0;
}

.ts-arrow svg { width: 22px; height: 22px; }

.ts-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.08);
}

.ts-arrow-prev { left: 24px; }
.ts-arrow-next { right: 24px; }

/* ============ DOTS ============ */
.ts-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.ts-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-dot.is-active {
    width: 32px;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.ts-dot:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.7);
}

/* ============ PROGRESS BAR ============ */
.ts-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 10;
}

.ts-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    transition: width 0.1s linear;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .ts-slide-content { padding: 40px 24px !important; }
    .ts-arrow { width: 42px; height: 42px; }
    .ts-arrow-prev { left: 10px; }
    .ts-arrow-next { right: 10px; }
    .ts-slide-title { font-size: clamp(24px, 8vw, 36px); }
    .ts-slide-description { font-size: 15px; }
    .ts-dots { bottom: 18px; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .ts-slide,
    .ts-slide-bg,
    .ts-slide-media-image,
    .ts-slide-content { animation: none !important; transition: opacity 0.2s !important; }
}