.ita-388-container {
    display: flex;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    /* Height is set via elementor controls, defaults to 500px */
}

.ita-388-item {
    display: flex;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.ita-388-item:last-child {
    border-right: none;
}

.ita-388-item.ita-388-active {
    flex: 5;
    cursor: default;
}

/* Image Section */
.ita-388-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.6s ease;
}

.ita-388-active .ita-388-image-wrapper {
    width: 50%;
}

.ita-388-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.ita-388-active .ita-388-image {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.ita-388-item:not(.ita-388-active):hover .ita-388-image {
    filter: grayscale(50%);
}

/* Vertical Title (for inactive state) */
.ita-388-title-vertical {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: translateX(-50%) rotate(180deg);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
}

.ita-388-active .ita-388-title-vertical {
    opacity: 0;
}

/* Content Section (Left side when active) */
.ita-388-content {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 40px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow: hidden;
    flex-shrink: 0;
    /* Background color set via Elementor */
}

.ita-388-active .ita-388-content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.ita-388-item:not(.ita-388-active) .ita-388-content {
    width: 0;
    padding: 0;
}

.ita-388-content-inner {
    width: 100%;
    min-width: 200px; /* Prevent squishing during animation */
}

.ita-388-name {
    font-size: 2rem;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.ita-388-role {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin: 0 0 20px 0;
}

.ita-388-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    opacity: 0.8;
}

.ita-388-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: inherit;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
}

.ita-388-social:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

.ita-388-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.ita-388-social i {
    font-size: 18px;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .ita-388-container {
        flex-direction: column;
        height: auto !important; /* Override inline style on mobile */
        min-height: 600px;
    }

    .ita-388-item {
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        min-height: 80px;
    }
    
    .ita-388-item:last-child {
        border-bottom: none;
    }
    
    .ita-388-item.ita-388-active {
        flex: auto;
        min-height: 400px;
    }

    .ita-388-active .ita-388-image-wrapper {
        width: 100%;
        height: 50%;
    }

    .ita-388-content {
        width: 100%;
        height: 50%;
        padding: 20px;
        transform: translateY(-20px);
    }
    
    .ita-388-active .ita-388-content {
        transform: translateY(0);
    }
    
    .ita-388-item:not(.ita-388-active) .ita-388-content {
        height: 0;
    }

    .ita-388-title-vertical {
        writing-mode: horizontal-tb;
        transform: translate(-50%, -50%);
        top: 50%;
        bottom: auto;
        letter-spacing: 1px;
    }
}