/* =============================================
   TABS SHOWCASE WIDGET v1.0 – Swaggos Gems
   - Full screen background image/video
   - Custom tab pill buttons
   - Smooth crossfade transitions
   ============================================= */

.ts-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 650px; /* Moze byt upravene cez Elementor slider */
    border-radius: 20px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 24px;
    box-sizing: border-box;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    background-color: #0b0c0d;
}

/* ══════════════════════════════════════════
   BACKGROUND LAYERS (Image / Video)
══════════════════════════════════════════ */
.ts-backgrounds {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #000000;
}

.ts-bg-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: opacity;
}

.ts-bg-layer.is-active {
    opacity: 1;
    z-index: 2;
}

.ts-media {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Gradients overlay for legibility */
.ts-overlays {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.ts-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.ts-bottom-gradient {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

/* ══════════════════════════════════════════
   TOP CONTENT: Title & Tabs
══════════════════════════════════════════ */
.ts-top-content {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.ts-title {
    font-size: 34px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    padding: 0 16px;
}

/* Tabs Pill Navigation */
.ts-tabs-nav {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 5px;
    border-radius: 40px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.ts-tab-btn {
    padding: 10px 24px;
    border-radius: 30px !important;
    border: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background-color: transparent;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none !important;
    box-shadow: none !important;
}

.ts-tab-btn.is-active {
    background-color: #121315;
    color: #ffffff;
}

.ts-tab-btn:hover:not(.is-active) {
    background-color: rgba(255, 255, 255, 0.12);
}

/* ══════════════════════════════════════════
   BOTTOM CONTENT: Description text
══════════════════════════════════════════ */
.ts-bottom-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 90%;
    max-width: 880px;
    margin: 0 auto;
}

.ts-desc-layer {
    display: none;
    will-change: opacity, transform;
}

.ts-desc-layer.is-active {
    display: block;
    animation: tsFadeInUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.ts-desc {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes tsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── RESPONZIVITA ── */
@media (max-width: 900px) {
    .elementor-widget-tabs_showcase .ts-wrapper,
    .ts-wrapper { 
        height: 580px !important; 
        padding: 40px 16px !important; 
    }
    .ts-title { font-size: 26px; }
    .ts-desc { font-size: 14px; }
    .ts-tab-btn { padding: 8px 18px; font-size: 13px; }
}

@media (max-width: 640px) {
    .elementor-widget-tabs_showcase .ts-wrapper,
    .ts-wrapper { 
        height: 520px !important; 
        padding: 48px 12px 24px 12px !important; /* more top padding to push text down */
    }
    body .elementor-widget-tabs_showcase .ts-wrapper .ts-title,
    .elementor-widget-tabs_showcase .ts-title,
    .ts-title { 
        font-size: 20px !important; 
        line-height: 1.25 !important;
        margin-top: 10px !important; /* ensure spacing from top edge */
    }
    .ts-desc { font-size: 13px; line-height: 1.5; }
    .ts-tabs-nav {
        max-width: 90% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        scrollbar-width: none !important; /* Firefox */
        flex-wrap: nowrap !important;
        border-radius: 40px !important;
        padding: 5px !important;
    }
    .ts-tabs-nav::-webkit-scrollbar {
        display: none !important; /* Safari and Chrome */
    }
    .ts-tab-btn {
        padding: 8px 18px !important;
        font-size: 12px !important;
        border-radius: 30px !important;
        flex-shrink: 0 !important;
    }
}
