/* ============================================
   Text Split Animation with Carousel Style 2
   ============================================ */

.pretpot-text-split-carousel-style2 {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pretpot-tsc2-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Text parts */
.pretpot-tsc2-text-left,
.pretpot-tsc2-text-right {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    transition: transform var(--tsc2-split-duration, 0.8s) var(--tsc2-split-easing, cubic-bezier(0.25, 0.46, 0.45, 0.94));
    will-change: transform;
}

.pretpot-tsc2-text-left {
    align-items: flex-end;
    text-align: right;
}

.pretpot-tsc2-text-right {
    align-items: flex-start;
    text-align: left;
}

/* Subtext above/below */
.pretpot-tsc2-subtext {
    font-size: var(--tsc2-subtext-size, 14px);
    letter-spacing: var(--tsc2-subtext-spacing, 0.15em);
    text-transform: var(--tsc2-subtext-transform, uppercase);
    color: var(--tsc2-subtext-color, #666);
    line-height: 1.4;
    opacity: 0;
    transition: all var(--tsc2-subtext-duration, 0.6s) var(--tsc2-subtext-delay, 0.3s) ease;
}

.pretpot-tsc2-text-left .pretpot-tsc2-subtext {
    transform: translateX(-20px);
}

.pretpot-tsc2-text-right .pretpot-tsc2-subtext {
    transform: translateX(20px);
}

.pretpot-tsc2-subtext.pretpot-tsc2-above {
    margin-bottom: var(--tsc2-subtext-gap, 8px);
}

.pretpot-tsc2-subtext.pretpot-tsc2-below {
    margin-top: var(--tsc2-subtext-gap, 8px);
}

/* Main text */
.pretpot-tsc2-main-text {
    font-size: var(--tsc2-text-size, clamp(3rem, 8vw, 8rem));
    font-weight: var(--tsc2-text-weight, 300);
    letter-spacing: var(--tsc2-text-spacing, 0.05em);
    color: var(--tsc2-text-color, #1a1a1a);
    line-height: 1;
    white-space: nowrap;
}

/* Split line - optional, fades out as media fades in */
.pretpot-tsc2-split-line {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--tsc2-line-width, 2px);
    height: 0;
    background: var(--tsc2-line-color, #8b7355);
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0;
    transition: height var(--tsc2-line-duration, 0.6s) var(--tsc2-line-easing, ease-out),
                opacity var(--tsc2-line-fade-duration, 0.4s) var(--tsc2-line-fade-delay, 0.3s) ease;
}

/* Media container */
.pretpot-tsc2-media {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: var(--tsc2-media-width, 280px);
    height: var(--tsc2-media-height, 350px);
    z-index: 1;
    overflow: hidden;
    border-radius: var(--tsc2-media-radius, 4px);
    box-shadow: var(--tsc2-media-shadow, 0 20px 60px rgba(0,0,0,0.15));
    transition: transform var(--tsc2-media-duration, 0.8s) var(--tsc2-media-easing, cubic-bezier(0.34, 1.56, 0.64, 1)),
                opacity var(--tsc2-media-duration, 0.8s) ease;
    opacity: 0;
}

.pretpot-tsc2-media img,
.pretpot-tsc2-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel slides */
.pretpot-tsc2-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.pretpot-tsc2-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--tsc2-slide-duration, 0.5s) ease;
}

.pretpot-tsc2-slide.active {
    opacity: 1;
}

/* Carousel dots */
.pretpot-tsc2-dots {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--tsc2-dots-duration, 0.4s) var(--tsc2-dots-delay, 0.5s) ease;
}

.pretpot-tsc2-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pretpot-tsc2-dot.active {
    background: var(--tsc2-dot-active-color, #1a1a1a);
    transform: scale(1.3);
}

/* Carousel arrows */
.pretpot-tsc2-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #1a1a1a;
    opacity: 0;
    transition: opacity var(--tsc2-arrows-duration, 0.4s) var(--tsc2-arrows-delay, 0.5s) ease, background 0.3s ease;
    z-index: 10;
}

.pretpot-tsc2-arrow:hover {
    background: #fff;
}

.pretpot-tsc2-arrow.prev {
    left: -50px;
}

.pretpot-tsc2-arrow.next {
    right: -50px;
}

/* Play button overlay for video */
.pretpot-tsc2-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pretpot-tsc2-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 18px solid #1a1a1a;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.pretpot-tsc2-media:hover .pretpot-tsc2-play-btn {
    opacity: 1;
}

.pretpot-tsc2-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ============================================
   EXPANDED STATE
   ============================================ */

/* Desktop gap */
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-text-left {
    transform: translateX(calc(-1 * var(--tsc2-gap-desktop, 160px)));
}

.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-text-right {
    transform: translateX(var(--tsc2-gap-desktop, 160px));
}

/* Split line expands then fades */
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-split-line {
    opacity: 1;
    height: var(--tsc2-line-height, 120%);
}

/* Line fades OUT as media becomes fully visible */
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-split-line.tsc2-line-fadeout {
    opacity: 0;
    transition: height var(--tsc2-line-duration, 0.6s) var(--tsc2-line-easing, ease-out),
                opacity var(--tsc2-line-fade-duration, 0.4s) var(--tsc2-line-fade-delay, 0.3s) ease;
}

/* Media reveals */
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-media {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Subtext fades in */
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-subtext {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* Carousel nav visible */
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-dots,
.pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-arrow {
    opacity: 1;
}

/* ============================================
   TABLET GAP
   ============================================ */
@media (max-width: 1024px) {
    .pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-text-left {
        transform: translateX(calc(-1 * var(--tsc2-gap-tablet, 120px)));
    }

    .pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-text-right {
        transform: translateX(var(--tsc2-gap-tablet, 120px));
    }

    .pretpot-tsc2-arrow.prev { left: -35px; }
    .pretpot-tsc2-arrow.next { right: -35px; }

    /* Tablet media sizing */
    .pretpot-tsc2-media {
        width: var(--tsc2-media-width-tablet, 240px);
        height: var(--tsc2-media-height-tablet, 300px);
    }
}

/* ============================================
   MOBILE GAP
   ============================================ */
@media (max-width: 767px) {
    .pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-text-left {
        transform: translateX(calc(-1 * var(--tsc2-gap-mobile, 80px)));
    }

    .pretpot-text-split-carousel-style2.expanded .pretpot-tsc2-text-right {
        transform: translateX(var(--tsc2-gap-mobile, 80px));
    }

    .pretpot-tsc2-arrow.prev { left: -25px; }
    .pretpot-tsc2-arrow.next { right: -25px; }

    /* Mobile media sizing */
    .pretpot-tsc2-media {
        width: var(--tsc2-media-width-mobile, 200px);
        height: var(--tsc2-media-height-mobile, 260px);
    }
}