/* ==========================================================================
   Toonz System Flow Widget Styles
   ========================================================================== */

.toonz-system-flow-wrapper {
    padding: 50px 0;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
}

/* --- HEADER SECTION --- */
.tsf-header {
    text-align: center;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.toonz-system-flow-wrapper.is-visible .tsf-header {
    opacity: 1;
    transform: translateY(0);
}

.tsf-accent-dash {
    width: 30px;
    height: 2px;
    background-color: #E87722;
    margin-bottom: 20px;
}

.tsf-dash-bottom {
    margin-top: 20px;
    margin-bottom: 30px;
}

.tsf-main-title {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.tsf-dot {
    color: #E87722;
}

.tsf-subtitle-box {
    max-width: 600px;
    margin: 0 auto;
}

.tsf-subtitle {
    font-size: 18px;
    color: #f2f2f2;
    margin: 5px 0;
    font-weight: 400;
}

/* --- FLOW TRACK & NODES --- */
.tsf-track {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 auto 50px auto;
    position: relative;
}

.tsf-node {
    flex: 1;
    padding: 0 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.toonz-system-flow-wrapper.is-visible .tsf-node {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance for nodes */
.toonz-system-flow-wrapper.is-visible .tsf-node:nth-child(1) {
    transition-delay: 0.2s;
}

.toonz-system-flow-wrapper.is-visible .tsf-node:nth-child(2) {
    transition-delay: 0.35s;
}

.toonz-system-flow-wrapper.is-visible .tsf-node:nth-child(3) {
    transition-delay: 0.5s;
}

.toonz-system-flow-wrapper.is-visible .tsf-node:nth-child(4) {
    transition-delay: 0.65s;
}

.toonz-system-flow-wrapper.is-visible .tsf-node:nth-child(5) {
    transition-delay: 0.8s;
}

/* Ensure earlier nodes stack on top so arrows overlap the next node */
.tsf-node:nth-child(1) {
    z-index: 50;
}

.tsf-node:nth-child(2) {
    z-index: 40;
}

.tsf-node:nth-child(3) {
    z-index: 30;
}

.tsf-node:nth-child(4) {
    z-index: 20;
}

.tsf-node:nth-child(5) {
    z-index: 10;
}

/* Top Steps */
.tsf-node-top {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.tsf-step-num {
    color: #E87722;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.tsf-step-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Image Wrap */
.tsf-image-wrap {
    width: 100%;
    aspect-ratio: 11 / 10;
    position: relative;
    margin-bottom: 30px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.4s ease;
}

.tsf-image-wrap:hover {
    transform: scale(1.05) translateY(-5px);
    z-index: 10;
}

.tsf-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 3;
    transition: box-shadow 0.4s ease;
}

.tsf-image-wrap:hover .tsf-image {
    box-shadow: 0 25px 45px rgba(232, 119, 34, 0.15), inset 0 0 0 1px rgba(232, 119, 34, 0.3);
}

.tsf-image-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: radial-gradient(circle at center, rgba(232, 119, 34, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0;
    z-index: 1;
    transform: scale(1.2);
    transition: opacity 0.5s ease;
}

.tsf-image-wrap:hover .tsf-image-glow {
    opacity: 1;
}

/* Connector Arrow */
.tsf-connector-arrow {
    position: absolute;
    right: -25%;
    top: 50%;
    transform: translateY(-50%);
    width: 60% !important;
    max-width: 100px !important;
    z-index: 20;
    /*opacity: 0.8;*/
    pointer-events: none;
    transition: all 0.4s ease;
}

.tsf-image-wrap:hover .tsf-connector-arrow {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Bottom Descriptions */
.tsf-node-bottom {
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding: 0 5px;
}

.tsf-desc-1 {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
    margin: 0;
}

.tsf-desc-2 {
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.6;
    margin: 0;
}

/* Line Strip Separator */
.tsf-line-strip {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0;
    transform: scaleX(0.8);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 0.9s;
}

.toonz-system-flow-wrapper.is-visible .tsf-line-strip {
    opacity: 1;
    transform: scaleX(1);
}

.tsf-line-strip img {
    max-width: 100%;
    height: 2px;
    /*opacity: 0.6;*/
}

/* --- FOOTER QUOTE --- */
.tsf-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0px;
    margin-top: 0px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 1.1s;
}

.toonz-system-flow-wrapper.is-visible .tsf-footer {
    opacity: 1;
    transform: translateY(0);
}

.tsf-footer-bracket {
    display: flex;
    align-items: center;
}

.tsf-footer-bracket img {
    height: 80px;
    width: auto;

}

.tsf-footer-content {
    text-align: center;
}

.tsf-footer-1 {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 5px 0;
}

.tsf-footer-2 {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 600;
    color: #E87722;
    margin: 0;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .tsf-track {
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
    }

    .tsf-node {
        flex: 1 1 30%;
        min-width: 250px;
    }

    .tsf-connector-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .tsf-node {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }

    .tsf-footer {
        flex-direction: column;
        gap: 15px;
    }

    .tsf-footer-bracket {
        display: none;
    }
}

/* --- ELEMENTOR EDITOR BYPASS --- */
.elementor-editor-active .tsf-header,
.elementor-editor-active .tsf-node,
.elementor-editor-active .tsf-line-strip,
.elementor-editor-active .tsf-footer {
    opacity: 1 !important;
    transform: none !important;
}