.jgc-sidebar-wrapper {
    width: 100%;
    font-family: inherit;
}

/* --- THE STICKY LOGIC --- */
@media (min-width: 992px) {
    .jgc-is-sticky {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: var(--sb-offset, 120px); 
        align-self: flex-start; 
        z-index: 10;
    }

    /*
     * Salient/WPBakery gives the inner wrappers only the height of their
     * content. Expanding the wrappers gives the sticky sidebar room to move.
     * These selectors apply only to the column containing this sidebar.
     */
    .row_col_wrap_12:has(.jgc-is-sticky),
    .wpb_column:has(.jgc-is-sticky),
    .wpb_column:has(.jgc-is-sticky) > .vc_column-inner,
    .wpb_column:has(.jgc-is-sticky) > .vc_column-inner > .wpb_wrapper,
    .wpb_column:has(.jgc-is-sticky) .wpb_content_element:has(.jgc-is-sticky),
    .wpb_column:has(.jgc-is-sticky) .wpb_content_element:has(.jgc-is-sticky) > .wpb_wrapper {
        overflow: visible !important;
    }

    .wpb_column:has(.jgc-is-sticky) > .vc_column-inner,
    .wpb_column:has(.jgc-is-sticky) > .vc_column-inner > .wpb_wrapper {
        height: 100%;
    }

    .wpb_column:has(.jgc-is-sticky) .wpb_content_element:has(.jgc-is-sticky),
    .wpb_column:has(.jgc-is-sticky) .wpb_content_element:has(.jgc-is-sticky) > .wpb_wrapper {
        min-height: 100%;
    }
}

/* --- GENERAL WIDGET STYLING --- */
.jgc-widget {
    margin-bottom: 50px;
}

.jgc-widget-title {
    color: var(--sb-heading, #111111) !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    line-height: 1.2 !important;
}

/* --- 1. SEARCH BAR --- */
.jgc-search-form {
    display: flex;
    width: 100%;
    gap: 10px; /* THE FIX: Adds the space between the input and button */
}

.jgc-search-field {
    flex-grow: 1;
    padding: 14px 18px;
    border: 1px solid #f2f2f2; /* Lightened to match your screenshot */
    border-radius: 6px; /* THE FIX: Fully rounds all 4 corners */
    font-family: inherit;
    font-size: 16px;
    color: #333333;
    outline: none;
    background: #f8f9fa; /* Matches the slight grey from your screenshot */
    min-width: 0; 
}

.jgc-search-field::placeholder {
    color: #888888;
}

.jgc-search-submit {
    background-color: var(--sb-btn-bg, #000000); 
    color: var(--sb-btn-txt, #ffffff);
    padding: 14px 24px;
    border: none;
    border-radius: 6px; /* THE FIX: Fully rounds all 4 corners */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.jgc-search-submit:hover {
    opacity: 0.85;
}

/* --- 2. CATEGORIES DROPDOWN --- */
.jgc-category-select-wrap {
    position: relative;
    width: 100%;
}

.jgc-category-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--sb-dot, #0a3452);
    border-bottom: 2px solid var(--sb-dot, #0a3452);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.jgc-category-select {
    width: 100%;
    min-height: 56px;
    padding: 14px 48px 14px 18px;
    border: 1px solid #f2f2f2;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333333;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.3;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.jgc-category-select:hover,
.jgc-category-select:focus {
    border-color: var(--sb-dot, #0a3452);
}

.jgc-category-select:focus {
    box-shadow: 0 0 0 3px rgba(10, 52, 82, 0.12);
}

/* --- 3. RECENT POSTS --- */
.jgc-rp-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    text-decoration: none !important;
    group: hover;
}

.jgc-rp-item:last-child {
    margin-bottom: 0;
}

.jgc-rp-img {
    width: 85px;
    height: 85px;
    flex-shrink: 0;
    position: relative;
    border-radius: 10px; 
    overflow: hidden;
    background: #dfdfdf;
}

.jgc-rp-img img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center center;
    display: block !important;
    transition: transform 0.4s ease;
}

.jgc-rp-item:hover .jgc-rp-img img {
    transform: scale(1.05); 
}

.jgc-rp-placeholder {
    width: 100%;
    height: 100%;
    background: #dfdfdf;
}

.jgc-rp-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jgc-rp-content h4 {
    color: #0A3452 !important; 
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin: 0 0 6px 0 !important;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.jgc-rp-item:hover .jgc-rp-content h4 {
    color: var(--sb-dot, #000000) !important; 
}

.jgc-rp-date {
    color: #555555;
    font-size: 14px;
}