.ita-container {
    --ita-height: 500px;
    --ita-bg-color: #ffffff;
    --ita-name-color: #111827;
    --ita-job-color: #6B7280;
    --ita-bio-color: #4B5563;
    --ita-card-width: 85vw;
    --ita-flex-inactive: 1;
    --ita-flex-active: 4;
    --ita-content-width: 400px;
    
    display: flex;
    flex-direction: row;
    width: 100%;
    height: var(--ita-height);
    overflow: hidden;
    box-sizing: border-box;
}

.ita-item {
    flex: var(--ita-flex-inactive);
    display: flex;
    flex-direction: row;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    background: #000;
    position: relative;
    /* Box shadow and border radius now controlled by Elementor, default fallbacks below */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

/* Remove hover effects on mobile, apply only to desktop */
@media (min-width: 1025px) {
    .ita-item:hover {
        /* Slight bump to inactive cards when hovered */
        flex: calc(var(--ita-flex-inactive) + 0.1); 
    }
    .ita-item:hover .ita-image img {
        transform: scale(1.05);
    }
}

.ita-item.is-active {
    flex: var(--ita-flex-active);
    cursor: default;
}

.ita-content {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.7s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease-in-out;
    background: var(--ita-bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ita-content-inner {
    padding: 40px; /* Overridden by Elementor */
    min-width: 350px;
    white-space: normal;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.ita-item.is-active .ita-content {
    width: var(--ita-content-width);
    opacity: 1;
}

.ita-image {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
    min-width: 100px;
}

.ita-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Can be overridden by controls */
    filter: grayscale(100%);
    transition: filter 0.7s ease, transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.ita-item.is-active .ita-image img {
    filter: grayscale(0%);
    transform: scale(1);
}

/* Typography & Elements */
.ita-name {
    margin: 0 0 5px 0;
    font-size: 28px; /* Fallback */
    font-weight: 800; /* Fallback */
    color: var(--ita-name-color);
    line-height: 1.2;
}

.ita-job {
    margin: 0 0 15px 0;
    font-size: 13px; /* Fallback */
    text-transform: uppercase;
    font-weight: 600; /* Fallback */
    letter-spacing: 1.5px;
    color: var(--ita-job-color);
}

.ita-logo {
    max-width: 150px; /* Fallback, overridden by controls */
    margin: 10px 0 20px 0;
    object-fit: contain;
    display: block;
}

.ita-bio {
    margin: 0 0 25px 0;
    font-size: 15px; /* Fallback */
    line-height: 1.7; /* Fallback */
    color: var(--ita-bio-color);
}

.ita-social {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.ita-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    /* Dimensions & colors set via Elementor vars */
}

.ita-social a:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

.ita-social a i, .ita-social a svg {
    fill: currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ita-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s, opacity 0.2s;
    text-align: center;
    align-self: flex-start; /* Keeps button from stretching full width */
}

.ita-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 📱 Tablet & Mobile: Animated Carousel */
@media (max-width: 1024px) {
    .ita-container {
        flex-direction: row;
        height: auto !important; /* Allow natural expansion */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE */
        padding-bottom: 20px; /* Space for shadow */
    }
    
    .ita-container::-webkit-scrollbar {
        display: none;
    }
    
    .ita-item {
        flex: 0 0 var(--ita-card-width, 85vw); 
        scroll-snap-align: center;
        flex-direction: column;
        height: auto; /* Natural Height */
    }
    
    .ita-item.is-active {
        flex: 0 0 var(--ita-card-width, 85vw); /* Maintain size on mobile */
    }

    .ita-image {
        height: var(--ita-image-height, 250px);
        flex: none;
        order: 1;
    }
    
    .ita-image img {
        filter: grayscale(0%) !important; /* Always color on mobile */
        /* Border radii overridden by elementor dynamically */
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    /* FIX: Stretching Content on Mobile to eliminate black space */
    .ita-content, .ita-item.is-active .ita-content {
        width: 100%;
        opacity: 1;
        height: auto;
        order: 2;
        /* Flex Grow forces the white container to stretch to the bottom of the card */
        flex-grow: 1; 
        display: flex;
        flex-direction: column;
        justify-content: stretch;
    }

    .ita-content-inner {
        min-width: 100%;
        flex-grow: 1; /* Stretch inner wrapper to bottom */
        justify-content: flex-start; /* Content starts at top, fills down */
    }
}