.angie-people-gallery {
    display: flex;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Flex Direction Handling for Responsive Control */
.elementor-widget-angie_people_gallery.angie-gallery-layout-right .angie-people-gallery {
    flex-direction: row;
}

.elementor-widget-angie_people_gallery.angie-gallery-layout-left .angie-people-gallery {
    flex-direction: row-reverse;
}

/* Tablet & Mobile Fallback */
@media (max-width: 1024px) {
    .elementor-widget-angie_people_gallery.angie-gallery-layout-tablet-right .angie-people-gallery {
        flex-direction: row;
    }
    .elementor-widget-angie_people_gallery.angie-gallery-layout-tablet-left .angie-people-gallery {
        flex-direction: row-reverse;
    }
}

@media (max-width: 767px) {
    .angie-people-gallery {
        flex-direction: column !important; /* Force column on mobile usually best */
    }
    
    /* If user specifically wants side-by-side on mobile, these would work */
    .elementor-widget-angie_people_gallery.angie-gallery-layout-mobile-right .angie-people-gallery {
        flex-direction: row;
    }
    .elementor-widget-angie_people_gallery.angie-gallery-layout-mobile-left .angie-people-gallery {
        flex-direction: row-reverse;
    }
    
    /* Default mobile behavior is column - image usually on top or bottom */
    .elementor-widget-angie_people_gallery.angie-gallery-layout-mobile-left .angie-people-gallery {
         /* When "left" means "top" in column mode */
         flex-direction: column-reverse;
    }
    
     .elementor-widget-angie_people_gallery.angie-gallery-layout-mobile-right .angie-people-gallery {
         /* When "right" means "bottom" in column mode */
         flex-direction: column;
    }
}


/* List Side (Wrapper) */
.angie-people-list-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    padding: 20px;
}

.angie-people-list-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Grid of People Thumbnails */
.angie-people-grid {
    display: grid;
    /* Columns set by inline style/control */
    width: 100%;
}

/* Individual Person Item */
.angie-person-item {
    display: flex;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.angie-person-thumb {
    background-size: cover;
    background-position: center;
    border-radius: 50%; /* Default circle */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Display Area (Large Image) */
.angie-display-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.angie-display-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.angie-display-image.active {
    opacity: 1;
    z-index: 2;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .angie-people-list-wrapper {
        width: 100% !important;
        flex: none;
        padding: 10px 0;
    }
    
    .angie-display-area {
        width: 100%;
        height: 300px; /* Fixed height for mobile display area */
        flex: none;
    }
}
