/* ------------------------------------------------------------
   Latest Articles Widget
   ------------------------------------------------------------
   Palette deliberately matches the events widget
   (ibm-event-monthly-widget.css) it sits alongside:
     navy  #0a2a4a
     gold  #fcc50a

   NOTE: !important is used throughout on color/background,
   matching the convention already established in
   ibm-event-monthly-widget.css (e.g. .ibm-emw-center-link a).
   Sidebar/widget-area contexts on this site carry ambient
   color rules that otherwise win the specificity fight against
   a plain class selector — this is the same battle that widget
   already had to fight.
------------------------------------------------------------ */

.ibm-la-widget {
    --ibm-la-navy: #0a2a4a;
    --ibm-la-gold: #fcc50a;
    --ibm-la-body-bg: #f5f7fb;
    --ibm-la-text: #14213d;
    --ibm-la-text-muted: #6b7280;
    --ibm-la-border: #e3e7ee;
    --ibm-la-hover-bg: #eaeef4;

    width: 100%;
    box-sizing: border-box;
    background: var(--ibm-la-body-bg) !important;
    border: 2px solid var(--ibm-la-gold);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(10, 42, 74, 0.12);
    overflow: hidden;
    margin-bottom: 22px;
}

/* ── HEADER BAR ── */
.ibm-la-header-bar {
    background: var(--ibm-la-navy) !important;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid var(--ibm-la-gold);
}

.ibm-la-header-icon {
    font-size: 16px;
    color: var(--ibm-la-gold) !important;
}

.ibm-la-header-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ibm-la-gold) !important;
    letter-spacing: 0.2px;
}

/* ── BODY ── */
.ibm-la-body {
    padding: 6px 16px 4px;
    background: var(--ibm-la-body-bg) !important;
}

.ibm-la-list {
    display: flex;
    flex-direction: column;
}

.ibm-la-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    text-decoration: none !important;
    border-bottom: 1px solid var(--ibm-la-border);
    transition: background 0.15s ease;
}

.ibm-la-list .ibm-la-row:last-child {
    border-bottom: none;
}

.ibm-la-row:hover {
    background: var(--ibm-la-hover-bg) !important;
}

.ibm-la-row:hover .ibm-la-chevron {
    transform: translateX(3px);
    color: var(--ibm-la-navy) !important;
}

/* ── THUMBNAIL — full image shown via object-fit: contain on a
   filled backdrop, instead of forcing a crop that can land
   badly depending on the source image's real proportions ── */
.ibm-la-thumb {
    position: relative;
    width: 96px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cfd4dc;
    background: linear-gradient(135deg, #dde3ec, #c7cfdc) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ibm-la-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ibm-la-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ibm-la-text-muted) !important;
    font-size: 16px;
}

.ibm-la-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ibm-la-text) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ibm-la-chevron {
    font-size: 12px;
    color: var(--ibm-la-text-muted) !important;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

/* ── EMPTY STATE ── */
.ibm-la-empty {
    padding: 22px 12px 20px;
    text-align: center;
}

.ibm-la-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(10, 42, 74, 0.08) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ibm-la-navy) !important;
    font-size: 18px;
}

.ibm-la-empty-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--ibm-la-text) !important;
    margin: 0 0 4px;
}

.ibm-la-empty-sub {
    font-size: 13px;
    color: var(--ibm-la-text-muted) !important;
    margin: 0 0 16px;
    line-height: 1.5;
}

.ibm-la-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ibm-la-navy) !important;
    color: var(--ibm-la-gold) !important;
    border: 1px solid var(--ibm-la-gold);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.ibm-la-empty-btn:hover {
    background: rgba(252, 197, 10, 0.15) !important;
    color: #ffffff !important;
}

.ibm-la-empty-btn i {
    font-size: 12px;
    color: inherit !important;
}

/* ------------------------------------------------------------
   EMPTY STATE — FIX TEXT + BUTTON
------------------------------------------------------------ */

/* Text inside empty state = navy */
.ibm-la-widget .ibm-la-empty-heading,
.ibm-la-widget .ibm-la-empty-sub {
    color: var(--ibm-la-navy) !important;
}

/* Button stays navy + gold */
.ibm-la-widget .ibm-la-empty-btn {
    background: var(--ibm-la-navy) !important;
    color: var(--ibm-la-gold) !important;
    border-color: var(--ibm-la-gold) !important;
}

.ibm-la-widget .ibm-la-empty-btn:hover {
    background: rgba(10, 42, 74, 0.85) !important;
    color: #ffffff !important;
}

/* Fix arrow icon inside empty state */
.ibm-la-widget .ibm-la-empty-btn i {
    color: var(--ibm-la-gold) !important;
}


/* ------------------------------------------------------------
   THUMBNAIL — SQUARE + CENTERED IMAGE
------------------------------------------------------------ */

.ibm-la-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd4dc;
}

/* Image centered, never cropped */
.ibm-la-thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* ------------------------------------------------------------
   COLORED BACKDROPS FOR THUMBNAILS (5 rotating colors)
------------------------------------------------------------ */

.ibm-la-list .ibm-la-row:nth-child(1) .ibm-la-thumb {
    background: #8e6cff !important; /* purple */
}

.ibm-la-list .ibm-la-row:nth-child(2) .ibm-la-thumb {
    background: #c45a4a !important; /* reddish brown */
}

.ibm-la-list .ibm-la-row:nth-child(3) .ibm-la-thumb {
    background: #4a9f6b !important; /* green */
}

.ibm-la-list .ibm-la-row:nth-child(4) .ibm-la-thumb {
    background: #e6a93d !important; /* gold/orange */
}

.ibm-la-list .ibm-la-row:nth-child(5) .ibm-la-thumb {
    background: #3b82f6 !important; /* blue */
}


/* ------------------------------------------------------------
   FIX: ARROW IN ARTICLE ROWS (RIGHT SIDE)
------------------------------------------------------------ */

.ibm-la-chevron {
    color: var(--ibm-la-navy) !important;
}

.ibm-la-row:hover .ibm-la-chevron {
    color: var(--ibm-la-navy) !important;
    transform: translateX(3px);
}
