/* ============================================================================
   Savings Hub landing page — Personal / Business / Charity
   Design tokens match _campaign-landing-deel.scss
   ========================================================================= */

:root {
    --shub-navy: #041e41;
    --shub-azure: #28a7df;
    --shub-mango: #f9b236;
    --shub-pale: #f3f5f7;
    --shub-ink: #1c2640;
    --shub-muted: #5b6a85;
    --shub-line: #e6ebf2;
    --shub-card-shadow: 0 6px 22px rgba(4, 30, 65, 0.08);
    --shub-card-shadow-hover: 0 14px 36px rgba(4, 30, 65, 0.14);
    --shub-gradient: linear-gradient(135deg, #041e41 0%, #0a3978 100%);
    --shub-font: "canada-type-gibson", "Gibson", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body { font-family: var(--shub-font); }

.inline-hero,
.savings-hub-body,
.deel-kb,
.savings-hub-featured,
.savings-hub-grid {
    font-family: var(--shub-font);
}

.savings-hub-body,
.deel-kb,
.savings-hub-featured,
.savings-hub-grid { color: var(--shub-ink); }

.savings-hub-body .content-block,
.deel-kb .content-block,
.savings-hub-featured .content-block,
.savings-hub-grid .content-block {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* ----------------------------------------------------------------- Hero -- */
/* Split-panel hero (matches DeelHero pattern in the static prototype):
   navy background, white copy on the left, photo with focus-frame on the right. */

.inline-hero {
    background: var(--shub-navy);
    color: #fff;
}

.inline-hero__split {
    display: flex;
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
}

.inline-hero__left {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    padding: 56px 0;
}

.inline-hero__left-inner {
    max-width: 720px;
    width: 100%;
    padding-left: 24px;
    padding-right: 48px;
}

.inline-hero__right {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--shub-navy);
    min-height: 480px;
}

.inline-hero__photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Focus frame — 4 L-bracket corners drawn via CSS borders so we don't depend
   on the prototype's Vector*.png assets (which don't exist in this theme). */
.inline-hero__focus-frame {
    position: absolute;
    top: 8%;
    left: 8%;
    width: 84%;
    height: 84%;
    pointer-events: none;
    z-index: 2;
}

.inline-hero__corner {
    position: absolute;
    width: 88px;
    height: 88px;
}

.inline-hero__corner--tl { top: 0;    left: 0; }
.inline-hero__corner--tr { top: 0;    right: 0; }
.inline-hero__corner--bl { bottom: 0; left: 0; }
.inline-hero__corner--br { bottom: 0; right: 0; }

.inline-hero__eyebrow {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.5px;
    /* No forced casing — renders as typed (client). */
    text-transform: none;
    color: var(--shub-azure);
    margin-bottom: 16px;
}

.inline-hero__title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #fff;
    font-family: var(--shub-font);
}

.inline-hero__title-accent {
    color: var(--shub-mango);
}

.inline-hero__subtitle {
    font-size: 17px;
    line-height: 1.55;
    color: #fff;
    margin: 0 0 36px;
}

/* Hub tabs — 2x2 grid, icon + label, glassy pills on the navy hero.
   Matches the prototype's .hero-nav--grid2x2 layout. */
.savings-hub-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
}

.savings-hub-tabs__tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    font: inherit;
    font-family: var(--shub-font);
    font-weight: 500; /* client: 600 read too heavy */
    font-size: 14px;
    padding: 12px 18px;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    text-align: left;
}

.savings-hub-tabs__tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.savings-hub-tabs__tab:hover {
    background: rgba(255, 255, 255, 0.15);
}

.savings-hub-tabs__tab.is-active {
    background: var(--shub-azure);
    color: #fff;
}

/* ----------------------------------------------------------- Section body -- */

.savings-hub-section { display: none; }
.savings-hub-section.is-active { display: block; }

section.content.savings-hub-featured {
    /* 60px lead-in matching the sitewide section rhythm (client). */
    padding: 60px 0 80px;
    background: #fff;
    margin: 0;
}

.savings-hub-featured__header { margin-bottom: 32px; }

.savings-hub-featured__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    /* No forced casing — editors control case in the Section copy fields (client). */
    text-transform: none;
    color: var(--shub-muted);
    margin-bottom: 8px;
}

.savings-hub-featured__title {
    font-size: 40px;
    line-height: 1.1;
    color: var(--shub-navy);
    margin: 0;
    font-weight: 600;
}

/* Featured hero row — 2-up large cards */
.savings-hub-featured__hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.savings-hub-featured__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ---------------------------------------------------------- Article cards -- */

.savings-hub-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shub-card-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.savings-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shub-card-shadow-hover);
}

.savings-hub-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--shub-pale);
    position: relative;
}

/* Featured top row (2 big cards): 16:9 like every other card so the
 * images display without extra cropping — especially on mobile/tablet
 * where the old 80/27 banner read very slim (client). */
.savings-hub-featured__hero-row .savings-hub-card__image {
    aspect-ratio: 16 / 9;
}

/* Featured bottom row (3 standard cards) — match the taller image height
 * used by the grid cards lower down the page so both rows feel consistent. */
.savings-hub-featured__grid .savings-hub-card__image {
    /* 16:9 like the rest of the site — the fixed 180px height displayed
       these at ~2:1 and re-cropped the images (client). */
    aspect-ratio: 16 / 9;
    height: auto;
}

.savings-hub-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(4, 30, 65, 0.45) 100%);
    pointer-events: none;
}

.savings-hub-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.savings-hub-card__body {
    padding: 22px 24px 26px;
}

.savings-hub-card__title {
    font-size: 22px;
    line-height: 1.25;
    color: var(--shub-navy);
    margin: 0 0 10px;
    font-weight: 600;
}

.savings-hub-card--hero .savings-hub-card__title { font-size: 26px; color: #fff; }
.savings-hub-card--standard .savings-hub-card__title { font-size: 20px; }
.savings-hub-card--grid .savings-hub-card__title { font-size: 19px; margin: 14px 4px 8px; }

/* Featured hero cards — navy gradient bg, white copy (matches prototype) */
.savings-hub-card--hero {
    background: var(--shub-gradient);
    color: #fff;
}
.savings-hub-card--hero .savings-hub-card__desc { color: rgba(255, 255, 255, 0.78); }

/* Featured standard cards — pale grey bg */
.savings-hub-card--standard {
    background: var(--shub-pale);
    box-shadow: none;
}

.savings-hub-card__desc {
    font-size: 15px;
    line-height: 1.55;
    color: var(--shub-muted);
    margin: 0;
}

.savings-hub-card--grid .savings-hub-card__desc { padding: 0 4px; }

.savings-hub-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--shub-muted);
    /* margin-top: auto pushes the meta strip (type chip + read time + date)
     * to the bottom of the card so the chip/date sits on a consistent
     * baseline across every card regardless of description length. The card
     * itself is already a flex-column container, so this Just Works. */
    margin: auto 4px 0;
    padding-top: 14px;
    flex-wrap: wrap;
}

.savings-hub-card__type {
    background: var(--shub-pale);
    color: var(--shub-navy);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.savings-hub-card__meta-sep { color: var(--shub-line); }

.savings-hub-card--grid {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(4, 30, 65, 0.06);
    box-shadow: none;
    overflow: hidden;
}

.savings-hub-card--grid:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-color: rgba(4, 30, 65, 0.12);
}

.savings-hub-card--grid .savings-hub-card__image {
    border-radius: 0;
    /* 16:9 (was a fixed 180px ≈ 2:1, which cropped the images) — client. */
    aspect-ratio: 16 / 9;
    height: auto;
}
.savings-hub-card--grid .savings-hub-card__image::after { display: none; }

.savings-hub-card--grid .savings-hub-card__title,
.savings-hub-card--grid .savings-hub-card__desc,
.savings-hub-card--grid .savings-hub-card__meta {
    padding-left: 24px;
    padding-right: 24px;
    margin-left: 0;
    margin-right: 0;
}

.savings-hub-card--grid .savings-hub-card__meta {
    margin-bottom: 22px;
}

/* ----------------------------------------------------- Grid + filter pills -- */

section.content.savings-hub-grid {
    /* 60px lead-in matching the sitewide section rhythm (client). */
    padding: 60px 0 100px;
    background: var(--shub-pale);
    margin: 0;
}

.savings-hub-grid__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 20px; /* pull filter pills up toward the subtitle, matching the product listing (client) */
}

.savings-hub-grid__title {
    font-size: 36px;
    line-height: 1.1;
    color: var(--shub-navy);
    margin: 0 0 14px;
    font-weight: 600;
}

.savings-hub-grid__subtitle {
    font-size: 17px;
    line-height: 1.55;
    color: var(--shub-muted);
    margin: 0;
}

.savings-hub-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 32px; /* match product listing */
}

.savings-hub-filter {
    appearance: none;
    background: #fff;
    /* Matched to the product listing pills (.deel-filter-pill) — client:
       same size/weight, count aligned. */
    border: 1px solid rgba(4, 30, 65, 0.15);
    color: var(--shub-ink);
    font: inherit;
    font-weight: 400;
    font-size: 15px;
    line-height: normal; /* font:inherit dragged in the page line-height, +6px pill height */
    padding: 7px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.savings-hub-filter:hover {
    border-color: var(--shub-azure);
    color: var(--shub-azure);
}

.savings-hub-filter.is-active {
    background: var(--shub-azure);
    border-color: var(--shub-azure);
    color: #fff;
}

.savings-hub-filter__count {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: -1px; /* optically centre against the label, as on product pills */
    margin-left: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(4, 30, 65, 0.08);
    border-radius: 999px;
    padding: 1px 8px;
    color: #5a6a7a;
}
.savings-hub-filter.is-active .savings-hub-filter__count {
    color: #fff;
}

.savings-hub-filter.is-active .savings-hub-filter__count {
    background: rgba(255, 255, 255, 0.22);
}

.savings-hub-grid__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.savings-hub-card--grid.is-hidden-batch,
.savings-hub-card--grid.is-hidden-filter {
    display: none;
}

.savings-hub-grid__footer {
    text-align: center;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.savings-hub-grid__progress {
    font-size: 14px;
    color: var(--shub-muted);
    margin: 0;
}

/* ------------------------------------------------------- Mid-grid CTA card -- */

.savings-hub-grid-cta {
    grid-column: 1 / -1;
    background: var(--shub-gradient);
    color: #fff;
    border-radius: 18px;
    padding: 48px 56px;
    margin: 16px 0;
}

.savings-hub-grid-cta__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.savings-hub-grid-cta__title {
    color: #fff;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 600;
}

.savings-hub-grid-cta__desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    line-height: 1.55;
    margin: 0 0 22px;
}

.savings-hub-grid-cta .deel-btn--accent {
    background: var(--shub-mango);
    color: var(--shub-navy);
    border: none;
}

.savings-hub-grid-cta .deel-btn--accent:hover {
    background: #ffc25e;
}

/* ---------------------------------------- Shared: "features at a glance" -- */
/* `.deel-kb` is the single-card 4-up feature strip lifted from the campaign
   prototype. Reusable — the savings hub uses it as the "Find your perfect
   savings account" block. When campaign pages move to WP they should
   enqueue the same stylesheet rather than duplicating these rules. */

section.content.deel-kb {
    padding: 80px 0;
    background: #fff;
    margin: 0;
}

.deel-kb__title {
    font-family: var(--shub-font);
    font-weight: 600;
    font-size: 37px;
    line-height: 1.15;
    color: var(--shub-navy);
    margin: 0 0 48px;
    text-align: center;
}

/* Strip uses flex so 3 or 4 items both look right.
   Each item gets equal width; vertical dividers between adjacent items. */
.deel-kb__strip {
    display: flex;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 20px rgba(0, 0, 0, 0.03);
}

.deel-kb__item { flex: 1 1 0; min-width: 0; }

.deel-kb__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 36px 32px;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.deel-kb__item + .deel-kb__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 1px;
    background: rgba(4, 30, 65, 0.08);
}

.deel-kb__item--clickable {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    transition: background 0.2s ease;
}
.deel-kb__item--clickable:hover {
    background: rgba(40, 167, 223, 0.03);
}

.deel-kb__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--shub-gradient);
}

.deel-kb__icon svg {
    color: var(--shub-mango);
}

.deel-kb__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.deel-kb__headline {
    font-family: var(--shub-font);
    font-weight: 600;
    font-size: 18px;
    color: var(--shub-navy);
    line-height: 1.3;
}

.deel-kb__desc {
    font-size: 16px;
    line-height: 1.5;
    color: var(--shub-muted);
}

/* ----------------------------------------------------------------- Buttons -- */
/* Color modifiers only — base size/typography lives in deel-btn.css
 * (mu-plugin: deel-btn-styles). */

.savings-hub-grid .deel-btn--accent {
    background: var(--shub-mango);
    color: var(--shub-navy);
}

.savings-hub-grid .deel-btn--outline {
    background: transparent;
    color: var(--shub-navy);
    border-color: var(--shub-navy);
}

.savings-hub-grid .deel-btn:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------ Responsive -- */

@media (max-width: 960px) {
    .inline-hero__split { flex-direction: column; }
    .inline-hero__left { flex: none; max-width: 100%; padding: 40px 0 36px; }
    .inline-hero__left-inner { padding-left: 24px; padding-right: 24px; }
    .inline-hero__right { min-height: 360px; }
    .inline-hero__title { font-size: 36px; }
    .inline-hero__subtitle { font-size: 15px; }
    .inline-hero__corner { width: 48px; height: 48px; }
    .savings-hub-featured__hero-row { grid-template-columns: 1fr; }
    .savings-hub-featured__grid { grid-template-columns: 1fr 1fr; }
    .savings-hub-grid__list { grid-template-columns: 1fr 1fr; }
    .savings-hub-grid-cta { padding: 36px 28px; }
    .deel-kb__strip { flex-wrap: wrap; }
    .deel-kb__item { flex: 1 1 50%; max-width: 50%; }
    .deel-kb__item + .deel-kb__item:nth-child(2n+1)::before { display: none; }
}

@media (max-width: 600px) {
    .inline-hero__title { font-size: 28px; }
    .savings-hub-featured__title,
    .savings-hub-grid__title { font-size: 28px; }
    .savings-hub-featured__grid { grid-template-columns: 1fr; }
    .savings-hub-grid__list { grid-template-columns: 1fr; }
    .savings-hub-featured { padding: 56px 0 24px; }
    .savings-hub-grid { padding: 24px 0 72px; }
    .savings-hub-tabs__tab { padding: 8px 14px; font-size: 13px; }
    .deel-kb { padding: 56px 0; }
    .deel-kb__title { font-size: 28px; margin-bottom: 32px; }
    .deel-kb__strip { flex-wrap: wrap; }
    .deel-kb__item { flex: 1 1 100%; max-width: 100%; }
    .deel-kb__item + .deel-kb__item::before {
        top: 0; bottom: auto; left: 24px; right: 24px;
        width: auto; height: 1px;
    }
}

/* Hub hero — the title accent ("smarter savings", "smarter business saving"
 * etc.) reads as a separate phrase rendered in the brand mango. The default
 * .pd-hero__title-accent treatment elsewhere is a muted navy suffix, so this
 * override is scoped to the .pd-hero--hub modifier that the hub shim adds. */
.pd-hero.pd-hero--hub .pd-hero__title-accent {
    color: #f9b236;
    opacity: 1;
}

/* Hub audience switcher (Option E from the v2f-switcher prototype).
 * Segmented control rendered above the hero, inside the same navy
 * band so the strip flushes to the hero with no visible gap. Active
 * tab is white-fill / navy-text; inactive tabs are 75%-white text on
 * an 8%-white pill. Auto-rendered from include-hub-audience-switcher.php
 * — admins don't configure anything per hub. */
.hub-switcher-e {
    background: #041e41;
    font-family: "canada-type-gibson", "Gibson", sans-serif;
    padding-top: 18px;
    margin-bottom: -1px;
}
.hub-switcher-e__inner {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    justify-content: flex-start;
}
.hub-switcher-e__segmented {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}
.hub-switcher-e__segment {
    padding: 8px 18px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13.5px;
    font-weight: 500; /* client: 600 read too heavy at this size */
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.hub-switcher-e__segment:hover {
    color: #fff;
}
.hub-switcher-e__segment--active,
.hub-switcher-e__segment--active:hover {
    background: #fff;
    color: #041e41;
}

/* Overlay the switcher on top of the hero so it doesn't push the hero
 * content down. The wrapper .hub-hero-stack establishes the positioning
 * context; the switcher floats over the top of the hero. The hero's
 * left column has plenty of top padding (and the content is centred
 * vertically) so the eyebrow/title still read cleanly under the
 * switcher's overlay zone. */
.hub-hero-stack {
    position: relative;
}
.hub-hero-stack .hub-switcher-e {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: transparent;
    margin-bottom: 0;
    padding-top: 20px; /* client: sit a little lower (28 was too much) */
}
.hub-hero-stack .hub-switcher-e__inner {
    padding-bottom: 14px;
    border-bottom: none;
}
/* Push the hub hero's left-column content down so the eyebrow sits below
 * the switcher overlay zone with comfortable breathing room. The image on
 * the right scales via object-fit: cover so the slightly taller hero just
 * shows a touch more of the photo — no whitespace. Scoped to .pd-hero--hub
 * so other heroes (PSL, product detail, account-type) are unaffected. */
.hub-hero-stack .pd-hero--hub .pd-hero__left {
    padding-top: 93px;
}

/* ── Featured card colour modifiers ──
   Colour decoupled from card size (client: choose blue or grey per tier).
   Declared after the size modifiers so an explicit choice always wins;
   templates default to c-blue on hero cards and c-grey on standard cards,
   matching the original design. */
.savings-hub-card--c-blue {
    background: var(--shub-gradient);
    color: #fff;
}
.savings-hub-card--c-blue .savings-hub-card__title { color: #fff; }
.savings-hub-card--c-blue .savings-hub-card__desc { color: rgba(255, 255, 255, 0.78); }
.savings-hub-card--c-grey {
    background: var(--shub-pale);
    color: inherit;
    box-shadow: none;
}
.savings-hub-card--c-grey .savings-hub-card__title { color: var(--shub-navy); }
.savings-hub-card--c-grey .savings-hub-card__desc { color: var(--shub-muted); }
