/* TME Tabs Slider – Refined Figma Styles */

.tme-ts-wrapper {
    width: 100%;
    margin: 60px 0;
    font-family: inherit;
    overflow: hidden;
}

.tme-ts-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── 1. Text Area (Left) ── */
.tme-ts-text-area {
    flex: 1;
    position: relative;
    min-height: 400px;
    /* Ensure space for crossfade */
    display: flex;
    align-items: center;
}

.tme-ts-text-slide {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-out;
}

.tme-ts-text-slide.active {
    position: relative;
    top: 0;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.tme-ts-icon {
    margin-bottom: 20px;
}

.tme-ts-icon img {
    height: 42px;
    width: auto;
}

.tme-ts-headline {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.tme-ts-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a4a4a;
    margin-bottom: 30px;
    max-width: 90%;
}

/* ── 2. Visual Area (Center/Right) ── */
.tme-ts-visual-area {
    flex: 1.8;
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}

/* Sidebars (Tabs) */
.tme-ts-sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 0px;
    transition: all 0.5s ease;
}

.tme-ts-tab-btn {
    background: transparent;
    border-right: 1px solid #EAEAEA;
    border-radius: 100px;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    outline: none;
    height: 100%;
    /* Fixed height for capsule look */
    width: 48px;
}

.tme-ts-tab-btn.active {
    display: none;
    /* Active tab is shown in the corner badge instead */
}

.tme-ts-tab-arrow {
    font-size: 1.2rem;
    color: #CCCCCC;
    margin-bottom: 5px;
}

.tme-ts-tab-arrow::before {
    content: "←";
}

.tme-ts-tab-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 22px;
    font-weight: 600;
    color: #C7C7C7;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: auto;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.tme-ts-tab-num {
    font-size: 26px;
    font-weight: 600;
    color: #C7C7C7;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: color 0.3s ease;
}

.tme-ts-tab-btn:hover .tme-ts-tab-label,
.tme-ts-tab-btn:hover .tme-ts-tab-num,
.tme-ts-tab-btn:hover .tme-ts-tab-arrow {
    color: #1a3a8f;
}

/* Image Frame */
.tme-ts-image-frame {
    flex: 1;
    height: auto;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    border-right: 1px solid #EAEAEA;
}

.tme-ts-image-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.tme-ts-img-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.tme-ts-img-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Corner Badge (Figma Style) ── */
.tme-ts-corner-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ffffff;
    padding: 24px 40px;
    min-width: 220px;
    text-align: left;
    /* Figma: Bottom-left and Top-right rounded */
    border-radius: 40px 0 0 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
}

/* Concave Curves */
.tme-ts-corner-badge::before {
    content: "";
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border-bottom-right-radius: 40px;
    box-shadow: 20px 20px 0 20px #ffffff;
}

.tme-ts-corner-badge::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -40px;
    width: 40px;
    height: 40px;
    background: transparent;
    border-bottom-right-radius: 40px;
    box-shadow: 20px 20px 0 20px #ffffff;
}

.tme-ts-badge-num {
    font-size: 3.2rem;
    font-weight: 300;
    color: #1a1a1a;
    line-height: 0.9;
}

.tme-ts-badge-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 1100px) {
    .tme-ts-inner {
        flex-direction: column;
        gap: 60px;
    }

    .tme-ts-visual-area {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tme-ts-image-frame {
        height: 350px;
    }

    .tme-ts-sidebar {
        min-width: 45px;
        padding: 0 5px;
    }

    .tme-ts-tab-num {
        font-size: 1.4rem;
    }
}