/**
 * Tab Slider Widget Styles
 * Version: 1.0.0
 */

/* ============================================
   Main Wrapper
   ============================================ */
.tsw-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tsw-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

/* ============================================
   Tabs Navigation
   ============================================ */
.tsw-tabs {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    z-index: 10;
    padding: 0;
    gap: 0;
}

.tsw-tabs.tsw-tabs-top {
    top: 0;
}

.tsw-tabs.tsw-tabs-bottom {
    bottom: 0;
}

.tsw-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    margin: 0;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tsw-tab:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.tsw-tab.active {
    background-color: #ffffff;
    color: #333333;
}

.tsw-tab:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* ============================================
   Slides Container
   ============================================ */
.tsw-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.tsw-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 1;
}

.tsw-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* ============================================
   Slide Overlay
   ============================================ */
.tsw-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* ============================================
   Slide Content
   ============================================ */
.tsw-slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 60px 20px;
    text-align: center;
    box-sizing: border-box;
}

.tsw-slide-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tsw-slide-link:hover {
    text-decoration: none;
}

/* Title */
.tsw-slide-title {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 48px;
    font-weight: 300;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 8px;
    line-height: 1.2;
    position: relative;
    
    /* Animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tsw-slide.active .tsw-slide-title {
    opacity: 1;
    transform: translateY(0);
}

/* Title underline */
.tsw-slide-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #ffffff;
    margin-top: 20px;
}

/* Subtitle */
.tsw-slide-subtitle {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    /* Animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.tsw-slide.active .tsw-slide-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.tsw-arrow-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.tsw-slide-link:hover .tsw-arrow-icon {
    transform: translateX(5px);
}

/* ============================================
   Navigation Arrows (Mobile)
   ============================================ */
.tsw-arrows {
    display: none;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    padding: 0 15px;
    justify-content: space-between;
}

.tsw-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    padding: 0;
}

.tsw-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.tsw-arrow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.tsw-arrow svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.tsw-arrow-prev {
    /* Additional styles if needed */
}

.tsw-arrow-next {
    /* Additional styles if needed */
}

/* ============================================
   Mobile Responsive Styles
   ============================================ */
@media screen and (max-width: 768px) {
    /* Hide tabs on mobile */
    .tsw-slider-wrapper.tsw-mobile-mode .tsw-tabs {
        display: none !important;
    }
    
    /* Show arrows on mobile */
    .tsw-slider-wrapper.tsw-mobile-mode .tsw-arrows {
        display: flex !important;
    }
    
    /* Adjust content padding */
    .tsw-slide-content {
        padding: 40px 60px;
    }
    
    /* Smaller title on mobile */
    .tsw-slide-title {
        font-size: 28px;
        letter-spacing: 4px;
    }
    
    /* Smaller subtitle on mobile */
    .tsw-slide-subtitle {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .tsw-slide-content {
        padding: 30px 50px;
    }
    
    .tsw-slide-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .tsw-slide-title::after {
        margin-top: 15px;
    }
    
    .tsw-arrow {
        width: 40px;
        height: 40px;
    }
    
    .tsw-arrow svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   Animation Classes
   ============================================ */

/* Fade Animation */
.tsw-slide.tsw-fade-out {
    opacity: 0;
    visibility: hidden;
}

.tsw-slide.tsw-fade-in {
    opacity: 1;
    visibility: visible;
}

/* Content Animation - From Bottom */
.tsw-slide .tsw-slide-title,
.tsw-slide .tsw-slide-subtitle {
    opacity: 0;
    transform: translateY(30px);
}

.tsw-slide.active .tsw-slide-title {
    animation: tswSlideUp 0.6s ease forwards;
}

.tsw-slide.active .tsw-slide-subtitle {
    animation: tswSlideUp 0.6s ease 0.15s forwards;
}

@keyframes tswSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reset animation when slide becomes inactive */
.tsw-slide:not(.active) .tsw-slide-title,
.tsw-slide:not(.active) .tsw-slide-subtitle {
    opacity: 0;
    transform: translateY(30px);
    animation: none;
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .tsw-slide-subtitle {
    flex-direction: row-reverse;
}

[dir="rtl"] .tsw-slide-link:hover .tsw-arrow-icon {
    transform: translateX(-5px);
}

[dir="rtl"] .tsw-arrow-prev svg {
    transform: rotate(180deg);
}

[dir="rtl"] .tsw-arrow-next svg {
    transform: rotate(180deg);
}

/* ============================================
   Elementor Editor Styles
   ============================================ */
.elementor-editor-active .tsw-slide {
    position: relative;
    display: none;
}

.elementor-editor-active .tsw-slide.active {
    display: block;
}

.elementor-editor-active .tsw-slide-title,
.elementor-editor-active .tsw-slide-subtitle {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}
