/* ============================================
   Interactive Team Accordion — style.css
   ============================================ */

/* --- Container --- */
.ita-84f3662f-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow: hidden;
    gap: 4px;
    border-radius: 12px;
}

/* --- Item --- */
.ita-84f3662f-item {
    flex: 1;
    display: flex;
    position: relative;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    background: #f8f8f8;
}

/* --- Image Panel --- */
.ita-84f3662f-image-panel {
    flex: 1;
    min-width: 100px;
    background-size: cover;
    background-position: center top;
    filter: grayscale(100%);
    transition: filter 0.6s ease;
}

/* --- Content Panel --- */
.ita-84f3662f-content-panel {
    width: 0;
    opacity: 0;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease;
}

.ita-84f3662f-content-inner {
    padding: 30px;
    min-width: 250px;
}

.ita-84f3662f-name {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
}

.ita-84f3662f-job {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.ita-84f3662f-bio {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}

.ita-84f3662f-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #eee;
    border-radius: 50%;
    margin-right: 10px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
}

.ita-84f3662f-social a:hover {
    background: #ddd;
}

/* ============================================
   DESKTOP — Active State
   ============================================ */
.ita-84f3662f-item.active {
    flex: 4;
}

.ita-84f3662f-item.active .ita-84f3662f-image-panel {
    filter: grayscale(0%);
}

.ita-84f3662f-item.active .ita-84f3662f-content-panel {
    width: 50%;
    opacity: 1;
}

/* ============================================
   MOBILE — Vertical stacking
   ============================================ */
@media (max-width: 767px) {

    /* Container devine coloană, înălțimea Elementor e ignorată */
    .ita-84f3662f-container {
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
        gap: 4px;
        border-radius: 8px;
    }

    /* Fiecare item: înălțime fixă când e colapsat */
    .ita-84f3662f-item {
        flex: none;
        flex-direction: column;       /* imagine sus, conținut jos */
        height: 90px;
        transition: height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
        overflow: hidden;
    }

    /* Panoul cu imaginea — înălțime fixă, ocupa tot itemul colapsat */
    .ita-84f3662f-image-panel {
        width: 100%;
        height: 90px;
        flex: none;
        min-width: unset;
        min-height: unset;
        transition: height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.6s ease;
        /* Poziționare mai bună pentru portrete */
        background-position: center 15%;
    }

    /* Panoul cu conținut — ascuns, animat cu max-height */
    .ita-84f3662f-content-panel {
        width: 100%;
        height: auto;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        /* Înlătură tranziția de width de pe desktop */
        transition: max-height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                    opacity 0.4s ease 0.1s;
    }

    .ita-84f3662f-content-inner {
        padding: 20px 16px;
        min-width: unset;
    }

    .ita-84f3662f-name {
        font-size: 20px;
    }

    /* --- Item ACTIV pe mobil --- */
    .ita-84f3662f-item.active {
        flex: none;
        height: auto;           /* se extinde după conținut */
    }

    .ita-84f3662f-item.active .ita-84f3662f-image-panel {
        height: 220px;          /* imagine mai mare când e deschis */
        filter: grayscale(0%);
    }

    .ita-84f3662f-item.active .ita-84f3662f-content-panel {
        width: 100% !important; /* suprascrie width: 50% de pe desktop */
        max-height: 500px;      /* suficient pentru orice bio */
        opacity: 1;
    }
}
