/* Cards, overlay and list widgets. Elementor controls only set the --iuw-p-* variables. */
.elementor-widget-iuw-posts-cards,
.elementor-widget-iuw-posts-overlay,
.elementor-widget-iuw-posts-list,
.elementor-widget-iuw-posts-cards > .elementor-widget-container,
.elementor-widget-iuw-posts-overlay > .elementor-widget-container,
.elementor-widget-iuw-posts-list > .elementor-widget-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.iuw-posts {
    display: grid;
    grid-template-columns: repeat(var(--iuw-p-cols, 3), minmax(0, 1fr));
    gap: var(--iuw-p-gap, 24px);
    width: 100%;
    min-width: 0;
    color: #1f3856;
    font-family: inherit;
}
.iuw-posts *, .iuw-posts *::before, .iuw-posts *::after { box-sizing: border-box; }
.iuw-posts--list { grid-template-columns: minmax(0, 1fr); }

.iuw-post {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    border-radius: var(--iuw-p-radius, 0);
    overflow: hidden;
}
.iuw-post__media {
    flex-shrink: 0;
    aspect-ratio: var(--iuw-p-ratio, 16/9);
    overflow: hidden;
    background: #eef4f8;
}
.iuw-post__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.iuw-post__placeholder { width: 100%; height: 100%; background: #eef4f8; }
.iuw-post__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}
.iuw-posts:not(.iuw-posts--box-default) .iuw-post__body { padding: var(--iuw-p-pad, 24px); }

/* Boxed settings. One variable, --iuw-p-box, is the background, border or shadow colour. */
.iuw-posts--box-background .iuw-post { background: var(--iuw-p-box, #eef4f8); }
.iuw-posts--box-border .iuw-post { border: 1px solid var(--iuw-p-box, #dbe3ea); }
.iuw-posts--box-shadow .iuw-post {
    background: #fff;
    box-shadow: 0 2px 14px color-mix(in srgb, var(--iuw-p-box, #1f3856) 18%, transparent);
}

.iuw-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    color: #4d6072;
    font-size: .8125rem;
    line-height: 1.5;
}
.iuw-post__terms { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; }
.iuw-post__term {
    position: relative; /* Above the stretched title link, so a linked label stays clickable. */
    z-index: 1;
    color: #1f3856;
    font-weight: 700;
    text-decoration: none;
}
a.iuw-post__term:hover { text-decoration: underline; text-underline-offset: .15em; }
.iuw-post__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--iuw-p-title-lines, 3);
    line-clamp: var(--iuw-p-title-lines, 3);
    margin: 0;
    padding: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #1f3856;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
}
.iuw-post__link { color: inherit; text-decoration: none; }
.iuw-post__link::after { content: ''; position: absolute; inset: 0; }
.iuw-post:hover .iuw-post__link { text-decoration: underline; text-underline-offset: .15em; }
.iuw-post__link:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; }
.iuw-post__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--iuw-p-lines, 3);
    line-clamp: var(--iuw-p-lines, 3);
    margin: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #455b72;
    font-size: .9375rem;
    line-height: 1.6;
}
.iuw-post__more {
    margin-top: auto;
    padding-top: 6px;
    color: #1f3856;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .2em;
    text-decoration-thickness: 1px;
}

/* Rows: photo beside the text. */
.iuw-posts--rows .iuw-post { flex-direction: row; }
.iuw-posts--rows .iuw-post__media { flex: 0 0 40%; }

/* List: compact items with a small square thumbnail. */
.iuw-posts--list .iuw-post { flex-direction: row; align-items: flex-start; gap: 16px; }
.iuw-posts--list .iuw-post__media { flex: 0 0 88px; width: 88px; aspect-ratio: 1; }
.iuw-posts--list .iuw-post__title { font-size: 1rem; }
.iuw-posts--list.iuw-posts--box-default .iuw-post { overflow: visible; }
.iuw-posts--separated { --iuw-p-sep: #dbe3ea; }
.iuw-posts--separated > .iuw-post:not(:last-child) {
    padding-bottom: var(--iuw-p-gap, 24px);
    border-bottom: 1px solid var(--iuw-p-sep);
}

/* Overlay: text over the photo, darkened for contrast. */
.iuw-posts--overlay .iuw-post {
    flex-direction: column;
    justify-content: flex-end;
    min-height: var(--iuw-p-min-h, 360px);
    background: #1f3856;
    isolation: isolate;
}
.iuw-posts--overlay .iuw-post__media { position: absolute; inset: 0; z-index: -1; aspect-ratio: auto; }
.iuw-posts--overlay .iuw-post__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(9 20 34 / .1), rgb(9 20 34 / .88));
}
.iuw-posts--overlay .iuw-post__placeholder { background: #1f3856; }
.iuw-posts--overlay .iuw-post__body { flex: 0 0 auto; padding: var(--iuw-p-pad, 24px); }
.iuw-posts--overlay .iuw-post__title,
.iuw-posts--overlay .iuw-post__excerpt,
.iuw-posts--overlay .iuw-post__meta,
.iuw-posts--overlay .iuw-post__term,
.iuw-posts--overlay .iuw-post__more { color: #fff; }

@media (max-width: 767px) {
    .iuw-posts--rows .iuw-post__media { flex-basis: 38%; }
    .iuw-posts--rows .iuw-post__excerpt { display: none; }
}
@media (max-width: 420px) {
    .iuw-posts--rows .iuw-post { flex-direction: column; }
    .iuw-posts--rows .iuw-post__media { flex-basis: auto; }
}
@media (prefers-reduced-motion: no-preference) {
    .iuw-post__image { transition: transform .35s ease; }
    .iuw-post:hover .iuw-post__image { transform: scale(1.03); }
}
