/* 1. Force the outer container to stay "contained" */
.custom-caption-overlay, 
.custom-caption-overlay .wpb_single_image,
.custom-caption-overlay .wpb_wrapper,
.custom-caption-overlay figure {
    position: relative !important;
    display: inline-block !important; /* Prevents the box from stretching full-width */
    vertical-align: top;
    margin-bottom: 20px;
}

/* 2. Style the Caption and force it to the front */
.custom-caption-overlay .wpb_image_caption,
.custom-caption-overlay figcaption,
.custom-caption-overlay .vc_figure-caption {
    /* Positioning */
    position: absolute !important;
    bottom: 15px !important;
    left: 0 !important;
    z-index: 9999 !important; /* High number to beat any other layers */
    
    /* Colors & Border */
    background: #f9f8f4 !important; /* Eggshell */
    color: #4a4641 !important;      /* Warm Grey */
    border-left: 5px solid #c9a962 !important; /* Gold Border */
    
    /* Size & Layout */
    padding: 10px 20px !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 90% !important;
    white-space: nowrap; /* Keeps the text on one line if it's short */
    
    /* Visibility */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}