/* ======================================================================
   Sauce Pantry Grid  —  v1.14.0
   Widget: sauce-pantry-grid   (prefix: spn)
   Insights/pantry page: sticky full-bleed filter bar + Latest (3-column)
   and All/Insights/Podcasts (grouped list) views.
   ====================================================================== */

.sauce-pantry-grid {
    --spn-content-w:   1200px;
    --spn-list-w:      830px;
    --spn-accent:      #FF5338;
    --spn-text:        #121212;
    --spn-muted:       #8a8079;
    --spn-date:        #A8B5BD;
    --spn-bar-bg:      #F7F3E9;
    --spn-border:      rgba(0,0,0,0.14);
    --spn-active-bw:   3px;
    --spn-feature-bg:  var(--sauce-plum, #440E26);
    --spn-podcast-bg:  #DCE6E4;
    --spn-gap:         40px;
    --spn-row-gap:     26px;

    width: 100vw;
    margin-left: calc(-50vw + 50%);
    color: var(--spn-text);
    box-sizing: border-box;
}
.sauce-pantry-grid *,
.sauce-pantry-grid *::before,
.sauce-pantry-grid *::after { box-sizing: border-box; }

/* Bar inner + Latest view sit at the content width; the list view groups are
   full-bleed (their background spans the page) with inner text at list width. */
.spn__bar-in,
.spn__view--latest {
    max-width: var(--spn-content-w);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}
.spn__group-in {
    max-width: var(--spn-list-w);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}

/* ── Filter bar (full-bleed borders, sticky) ─────────────────────────── */
.spn__bar {
    background: var(--spn-bar-bg);
    border-top: 1px solid var(--spn-border);
    border-bottom: 1px solid var(--spn-border);
    position: sticky;
    top: var(--spn-bar-top, 0px);
    z-index: 30;
    transition: box-shadow 0.25s ease;
}
.sauce-pantry-grid.is-stuck .spn__bar { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.spn__bar-in {
    display: flex;
    align-items: stretch;
    gap: 28px;
    min-height: 64px;
}
.spn__bar-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--spn-muted);
    flex-shrink: 0;
    align-self: center;
}
.spn__filters {
    display: flex;
    align-items: stretch;
    gap: 34px;
    flex: 1 1 auto;
    justify-content: center;
    flex-wrap: wrap;
}
.spn__filter {
    appearance: none;
    background: none;
    border: none;
    padding: 6px 0;
    font: inherit;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--spn-text);
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
}
.spn__filter.is-active { color: var(--spn-accent); }
.spn__filter.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;   /* sit on the bar's bottom border */
    height: var(--spn-active-bw);
    background: var(--spn-accent);
}
.spn__subscribe {
    flex-shrink: 0;
    align-self: center;
    border: 1px solid var(--spn-text);
    padding: 12px 26px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--spn-text);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.spn__subscribe:hover { background: var(--spn-text); color: var(--spn-bar-bg); }

/* ── Body ────────────────────────────────────────────────────────────── */
.spn__body { padding: 0; }
.spn__view--latest { padding-top: 48px; padding-bottom: 64px; }
.spn__view[hidden],
.spn__group[hidden] { display: none !important; }

/* Shared bits */
.spn__dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--spn-accent); flex-shrink: 0;
}
.spn__byline {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 12px;
    color: var(--spn-text);
}
.spn__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.spn__watch { color: var(--spn-text); font-weight: 600; }
.spn__date  { color: var(--spn-date); }
.spn__circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--spn-border);
    flex-shrink: 0;
}
.spn__circle svg { width: 18px; height: 18px; color: var(--spn-text); }
.spn__circle--accent { border-color: var(--spn-accent); }
.spn__circle--accent svg { color: #fff; }
.spn__watchlink {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    text-decoration: none;
    color: var(--spn-text);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}
.spn__watchlink .spn__circle { width: 30px; height: 30px; }
.spn__watchlink .spn__circle svg { width: 13px; height: 13px; }

/* ── LATEST 3-column layout ──────────────────────────────────────────── */
.spn__view--latest {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;   /* 25 / 50 / 25 */
    gap: var(--spn-gap);
    align-items: start;
}
.spn__col { display: flex; flex-direction: column; gap: 40px; }

/* Compact card (side + centre non-feature) */
.spn__card { display: flex; flex-direction: column; }
.spn__card-img {
    display: block;
    margin-bottom: 18px;
    overflow: hidden;
}
.spn__card-img img { width: 100%; height: auto; display: block; }
.spn__card-title {
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--spn-text);
    text-decoration: none;
}
.spn__col--center .spn__card-title { font-size: 1.5rem; }

/* Featured overlay card (first centre item): text always white. */
.spn__feature {
    display: block;
    text-decoration: none;
    color: #ffffff;
    background: var(--spn-feature-bg);
}
.spn__feature-img img { width: 100%; height: auto; display: block; }
.spn__feature-body { padding: 34px; }
.spn__feature-title {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
}
.spn__feature-desc {
    margin: 16px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ffffff;
    opacity: 0.85;
}
.spn__feature .spn__byline { color: #ffffff; margin-top: 22px; }
.spn__feature-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
}
.spn__feature-foot .spn__meta { margin-top: 0; color: #ffffff; }
.spn__feature-foot .spn__watch { color: #ffffff; }
.spn__feature-foot .spn__date { color: rgba(255,255,255,0.65); }
.spn__feature-foot .spn__circle--accent svg { color: #ffffff; }
.spn__feature:hover,
.spn__feature:hover .spn__feature-title,
.spn__feature:hover .spn__feature-desc,
.spn__feature:hover .spn__byline { color: #ffffff; }

/* ── LIST view (All / Insights / Podcasts) ───────────────────────────── */
.spn__group--podcasts { background: var(--spn-podcast-bg); }
.spn__group-title {
    margin: 0 0 8px;
    padding-top: 40px;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--spn-accent);
}
.spn__group--podcasts .spn__group-title { color: #326F64; }
.spn__group:last-child .spn__group-in { padding-bottom: 20px; }

.spn__row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 34px 0;
    border-bottom: 1px solid var(--spn-border);
}
.spn__row-main { flex: 1 1 auto; min-width: 0; }
.spn__row-title {
    display: block;
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--spn-text);
    text-decoration: none;
}
.spn__row-desc {
    margin: 10px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--spn-muted);
    max-width: 60ch;
}
.spn__row-thumb {
    flex: 0 0 auto;
    width: 300px;
    max-width: 34%;
    align-self: stretch;
    overflow: hidden;
}
.spn__row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spn__row-arrow { flex: 0 0 auto; align-self: center; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .spn__view--latest { grid-template-columns: 1fr 1fr; }
    .spn__col--center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 767px) {
    .spn__bar-in { flex-wrap: wrap; gap: 12px 20px; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
    .spn__filters { justify-content: flex-start; gap: 20px; order: 3; width: 100%; }
    .spn__subscribe { margin-left: auto; }
    .spn__view--latest { grid-template-columns: 1fr; }
    .spn__col--center { order: 0; }
    .spn__row { flex-direction: column; gap: 18px; }
    .spn__row-thumb { width: 100%; max-width: 100%; }
    .spn__row--thumb .spn__row-thumb { order: -1; }
}
