/* TCM Horizontal Toggle Panels Styles */

/* ===========================
   Elementor Widget Wrapper
   =========================== */

.tcm-toggle-wrapper {
    width: 100%;
    max-width: 100%;
}

/* Elementor widget container fixes */
.elementor-widget-tcm_toggle_panels {
    width: 100%;
}

.elementor-widget-tcm_toggle_panels .elementor-widget-container {
    width: 100%;
    max-width: 100%;
}

/* ===========================
   Main Container
   =========================== */

.steps-accordion {
    display: flex;
    width: 100%;
    height: 600px; /* Adjust as needed */
    gap: 2px;
    background: #000;
    overflow: hidden;
    position: relative;
    border-radius: 30px;
}

.step-panel {
    position: relative;
    flex: 0 0 250px; /* Collapsed width - increased from 80px */
    height: 100%;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-width: 250px; /* Ensure minimum width - increased from 80px */
}

.step-panel.active {
    flex: 1; /* Expanded width */
    cursor: default;
}

/* Background Image */
.step-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-panel:not(.active) .step-background {
    transform: scale(1.2);
}

.step-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    transition: background 0.4s ease;
}

.step-panel.active .step-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* Step Header (Collapsed State) */
.step-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 40px;
    z-index: 2;
    opacity: 1;
    overflow: visible;
}

.step-panel.active .step-header {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.step-label {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 0px; 
    transform: rotate(-90deg) translateY(95%);
    white-space: normal;
    transform-origin: bottom left;
}

.step-number {  
    font-size: 50px;
    line-height: 60px;
    font-weight: 700;
    color: #50DCC8;
    /*margin-bottom: 8px;*/
}

.step-title {
    font-size: 50px;
    line-height: 50px;
    font-weight: 700;
    color: #ffffff;
    text-align: left;
}

/* Step Content (Expanded State) */
.step-content {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 100%;
    inset: 0;
    opacity: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    pointer-events: none;
}

.step-panel.active .step-content {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease 0.3s;
}

.step-content-inner {
    max-width: 600px;
}

.step-panel.collapsed .step-content-inner {
    animation: slideDown 0s ease-out;
}

.step-panel.active .step-content-inner {
    animation: slideUp 1s ease-out;
}

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

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

.content-title {
    font-size: 50px;
    line-height: 50px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
}

.content-step-number {
    display: block;
    font-size: 50px;
    font-weight: 700;
    color: #50DCC8;
    /*margin-bottom: 10px;*/
}

.content-text {
    font-size: 24px;
    line-height: 30px;
    color: #ffffff;
    max-width: 500px;
}

.content-text p {
    margin: 0 0 15px 0;
}

.content-text p:last-child {
    margin-bottom: 0;
}

/* Hover Effects */
.step-panel:not(.active):hover .step-background {
    transform: scale(1.1);
}

.step-panel:not(.active):hover .step-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* Responsive Design */
@media (max-width: 1024px) {
    .steps-accordion {
        height: 500px;
    }
    
    .step-panel {
        flex: 0 0 60px;
    }
    
    .step-title {
        font-size: 22px;
    }
    
    .content-title {
        font-size: 40px;
        line-height: 50px;
    }
    
    .step-content {
        padding: 40px 30px;
    }
}

/* Mobile - Fixed Blocks (No Toggle Interaction) */
@media (max-width: 768px) {
    .steps-accordion {
        flex-direction: column;
        height: auto !important; /* Override Elementor inline styles */
        min-height: auto !important;
        gap: 15px;
        background: transparent;
        border-radius: 0;
    }
    
    .step-panel {
        flex: none !important;
        width: 100%;
        height: auto !important;
        min-height: 400px;
        cursor: default;
        border-radius: 30px;
        background: #000;
    }
    
    .step-panel.active {
        flex: none !important;
        height: auto !important;
    }
    
    /* Hide collapsed header on mobile */
    .step-header {
        display: none;
    }
    
    /* Show all content as fixed blocks */
    .step-content {
        opacity: 1;
        pointer-events: auto;
        position: relative;
        padding: 40px 30px;
        display: flex;
        align-items: flex-end;
        min-height: 400px;
    }
    
    .step-content-inner {
        animation: none;
        max-width: 100%;
    }
    
    .content-title {
        font-size: 32px;
        line-height: 38px;
        margin-bottom: 20px;
    }
    
    .content-step-number {
        font-size: 28px;
        margin-bottom: 5px;
    }
    
    .content-text {
        font-size: 18px;
        line-height: 24px;
        max-width: 100%;
    }
    
    /* Background always visible */
    .step-background {
        transform: scale(1);
    }
    
    .step-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
}

@media (max-width: 480px) {
    .step-panel {
        min-height: 350px;
    }
    
    .step-content {
        padding: 30px 25px;
        min-height: 350px;
    }
    
    .content-title {
        font-size: 28px;
        line-height: 34px;
    }
    
    .content-step-number {
        font-size: 24px;
    }
    
    .content-text {
        font-size: 16px;
        line-height: 22px;
    }
}
