/* Shared FEED component — Work / Events / Blog carousels. Used site-wide. */

.sl-feed {
    --sl-ink: #222222;
    --sl-muted: rgba(34, 34, 34, .8);
    --sl-soft: #f3f2f8;
    --sl-tag-bg: #ece9f3;
    --sl-tag-ink: #39304f;
    --sl-font: 'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    /* Top + bottom margin so the block has consistent 120px spacing on BOTH
     * sides — matches Figma. Margin collapses between two adjacent sl-feeds
     * (max wins → still 120px between them) AND gives a real gap after the
     * last sl-feed before the next non-feed section (e.g. the CTA). */
    margin: 120px auto;
    font-family: var(--sl-font);
    color: var(--sl-ink);
}
.sl-feed *,
.sl-feed *::before,
.sl-feed *::after { box-sizing: border-box; }

/* ── Head: heading (left) + [supporting text + outline pill] (right) ──
 * Matches Figma: Work has just heading|pill; Events/Blog add a supporting
 * paragraph beside the pill. */
.sl-feed-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 48px;
}
.sl-feed-head h2 {
    margin: 0;
    flex: 1 1 auto;
    max-width: 640px;
    font-family: var(--sl-font);
    font-size: 40px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -.025em;
    color: var(--sl-ink);
}
.sl-feed-head-aside {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    flex: 0 1 auto;
}
.sl-feed-desc {
    max-width: 430px;
    margin: 0;
    color: var(--sl-muted);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 500;
}

/* ── Outline CTA pill: All Work / All Events / All Insights ── */
.sl-feed .sl-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 56px;
    padding: 0 31px;
    border-radius: 999px;
    border: 1.5px solid #222129;
    background: transparent;
    color: var(--sl-ink);
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.sl-feed .sl-pill:hover {
    background: #222129;
    color: #fff;
    transform: translateY(-1px);
}

/* ── Track ──
 * overflow: visible so the NEXT card peeks beyond the 1240px container's right
 * edge at .is-faded opacity (matches the Figma carousel). The body's overflow-x
 * stays hidden globally, so the peek never produces a horizontal scrollbar. */
.sl-feed-viewport { overflow: visible; }
.sl-feed-track {
    display: flex;
    gap: 20px;
    will-change: transform;
    transition: transform .35s ease;
}

/* ── Card (shared shell) ── */
.sl-card {
    flex: 0 0 400px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: var(--sl-soft);
    color: inherit;
    text-decoration: none;
    transition: opacity .25s ease;
}
.sl-card-media {
    position: relative;
    overflow: hidden;
    background: #e8e6ef;
}
.sl-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.sl-card:hover .sl-card-media img { transform: scale(1.035); }

/* ── Case + Post cards: image → title → desc → tags ── */
.sl-card--case,
.sl-card--post { height: 484px; }
.sl-card--case .sl-card-media,
.sl-card--post .sl-card-media { height: 300px; }

.sl-card--case h3,
.sl-card--post h3,
.sl-card--case > p,
.sl-card--post > p,
.sl-card .sl-tags {
    margin-left: 32px;
    margin-right: 32px;
}
.sl-card--case h3,
.sl-card--post h3 {
    margin-top: 32px;
    margin-bottom: 0;
    color: var(--sl-ink);
    font-size: 24px;
    line-height: 1.16;
    font-weight: 600;
    letter-spacing: 0;
}
.sl-card--case > p,
.sl-card--post > p {
    margin-top: 8px;
    margin-bottom: 0;
    color: var(--sl-muted);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Tags (category pills on cards) ── */
.sl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 32px;
}
.sl-tags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--sl-tag-bg);
    color: var(--sl-tag-ink);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: .22px;
    text-transform: uppercase;
}

/* ── Video badge (blog cards) ── */
.sl-card-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── Event card: image → eyebrow tag → title → date line → CTA ── */
.sl-card--event { background: #fff; }
.sl-card--event .sl-card-media { aspect-ratio: 1.45 / 1; }
.sl-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 28px 32px 30px;
    min-height: 200px;
}
.sl-card-eyebrow {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--sl-tag-bg);
    color: #5b3ea8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.sl-card--event h3 {
    margin: 0;
    color: var(--sl-ink);
    font-size: 24px;
    line-height: 1.16;
    font-weight: 600;
}
.sl-card-line {
    margin: 10px 0 0;
    color: var(--sl-muted);
    font-size: 14px;
    line-height: 1.4;
}
.sl-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--sl-ink);
    font-size: 14px;
    font-weight: 700;
}

/* ── Carousel meta: progress bar (left) + circular prev/next (right) ── */
.sl-feed-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    margin-top: 40px;
}
.sl-progress {
    height: 2px;
    overflow: hidden;
    background: #dedbe7;
}
.sl-progress span {
    display: block;
    width: 33.333%;
    height: 100%;
    background: #201f27;
    transition: width .25s ease, transform .25s ease;
    transform-origin: left center;
}
.sl-feed-nav { display: flex; gap: 12px; }
/* Selectors are intentionally nested (.sl-feed .sl-feed-nav-btn → specificity
 * 0,2,0) to beat Salient parent theme's
 * `body[data-button-style*="slightly_rounded"] button { border-radius:4px!important }`
 * (specificity 0,1,2) which would otherwise win and turn our circular nav
 * buttons into 4px-rounded rectangles on every page. !important kept as a
 * second-line defence against any per-page rule that might match. */
.sl-feed .sl-feed-nav-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border: 1px solid rgba(34, 34, 34, .15) !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #19191f !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-family: var(--sl-font) !important;
    cursor: pointer !important;
    transition: border-color .2s ease, opacity .2s ease !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.sl-feed .sl-feed-nav-btn:disabled { opacity: .38 !important; cursor: default !important; }
.sl-feed .sl-feed-nav-btn:not(:disabled):hover { border-color: #19191f !important; }
.sl-feed-track > .is-faded { opacity: .4; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .sl-card { flex-basis: 360px; }
}
@media (max-width: 900px) {
    .sl-feed { margin: 80px auto; }
    .sl-feed-head h2 { font-size: 32px; }
    .sl-card { flex-basis: 320px; }
    .sl-card--case, .sl-card--post { height: auto; }
    .sl-card--case .sl-card-media, .sl-card--post .sl-card-media { height: 240px; }
}
@media (max-width: 640px) {
    .sl-feed { margin: 56px auto; }
    .sl-feed-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
    .sl-feed-head h2 { font-size: 28px; max-width: none; }
    .sl-feed-head-aside { flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; }
    .sl-feed-desc { max-width: none; }
    .sl-card { flex-basis: 84%; }
    .sl-card--case h3, .sl-card--post h3,
    .sl-card--case > p, .sl-card--post > p,
    .sl-card .sl-tags { margin-left: 24px; margin-right: 24px; }
    .sl-card-body { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .sl-feed-track,
    .sl-card-media img,
    .sl-progress span { transition: none; }
}
