/* =============================================================
   MIPB — Homepage Sections
   Used by [mipb_homepage] shortcode (inc/homepage.php)
   Design tokens: --mipbu-* variables defined globally.
   ============================================================= */

/* ── Suppress Oxygen/Breakdance PostTitle on front page ───── */
body.home .oxy-post-title,
body.home .ct-text-block[data-element-type="heading"],
body.home .bde-post-title { display: none !important; }

/* Collapse the empty h1 and any wrapper top spacing that creates whitespace */
body.home h1.oxy-post-title,
body.home h1:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
}
/* Remove content-area top padding injected by Oxygen/page template */
body.home .oxy-post-content,
body.home .ct-section > .ct-section-inner-wrap > *:first-child,
body.home .entry-content,
body.home .page-content { padding-top: 0 !important; margin-top: 0 !important; }
/* Push hero flush to top of content area */
body.home .mipb-hp { margin-top: 0; }

/* ── Reset / base ─────────────────────────────────────────── */
.mipb-hp * { box-sizing: border-box; }
.mipb-hp a { text-decoration: none; }
.mipb-hp img { max-width: 100%; display: block; }
/* Ensure sections above/below trust bar sit flush */
.mipb-hp .mipb-hp-section:last-of-type { padding-bottom: 3rem; }

/* ── Shared layout ────────────────────────────────────────── */
.mipb-hp-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mipb-hp-section {
    padding: 5rem 0;
}

.mipb-hp-section--alt {
    background: var(--mipbu-bg, #f8fdf9);
}

.mipb-hp-section--dark {
    background: var(--mipbu-green-dark, #1b4332);
    color: #fff;
}

.mipb-hp-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mipbu-green, #2d6a4f);
    background: rgba(45,106,79,.09);
    border: 1px solid rgba(45,106,79,.18);
    border-radius: 999px;
    padding: .3rem .85rem;
    margin-bottom: 1.1rem;
}

.mipb-hp-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 .5rem;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.mipb-hp-section-sub {
    font-size: 1.05rem;
    color: var(--mipbu-text-muted, #5a6a5e);
    margin: 0 0 2.5rem;
    line-height: 1.55;
    max-width: 600px;
}

.mipb-hp-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.mipb-hp-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .92rem;
    font-weight: 700;
    border-radius: var(--mipbu-radius, 12px);
    padding: .7rem 1.4rem;
    transition: all .18s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.mipb-hp-btn--primary {
    background: var(--mipbu-green, #2d6a4f);
    color: #fff;
}
.mipb-hp-btn--primary:hover {
    background: var(--mipbu-green-dark, #1b4332);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45,106,79,.25);
}

.mipb-hp-btn--outline {
    background: transparent;
    color: var(--mipbu-green, #2d6a4f);
    border-color: var(--mipbu-green, #2d6a4f);
}
.mipb-hp-btn--outline:hover {
    background: var(--mipbu-green, #2d6a4f);
    color: #fff;
    transform: translateY(-1px);
}

.mipb-hp-btn--ghost-white {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.4);
}
.mipb-hp-btn--ghost-white:hover {
    background: rgba(255,255,255,.25);
    color: #fff;
}

.mipb-hp-see-all {
    font-size: .9rem;
    font-weight: 700;
    color: var(--mipbu-green, #2d6a4f);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: gap .18s ease, color .18s ease;
}
.mipb-hp-see-all:hover { gap: .55rem; color: var(--mipbu-green-dark, #1b4332); }

/* ── 1. HERO ──────────────────────────────────────────────── */
.mipb-hero {
    background: linear-gradient(135deg, #1a3a2a 0%, #2d6a4f 60%, #3a8a65 100%);
    color: #fff;
    padding: 3.5rem 0 4rem;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 0 12px;
}

/* Subtle decorative glow */
.mipb-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: 30%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(149,213,178,.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Two-column layout: text left, illustration right */
.mipb-hero__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3rem;
}

/* Text column */
.mipb-hero__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mipb-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--mipbu-green-light, #95d5b2);
    background: rgba(149,213,178,.12);
    border: 1px solid rgba(149,213,178,.25);
    border-radius: 999px;
    padding: .32rem .9rem;
    margin-bottom: 1.3rem;
}

.mipb-hero__title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #fff;
    margin: 0 0 1rem;
    text-align: left;
}

.mipb-hero__title em {
    font-style: normal;
    color: var(--mipbu-green-light, #95d5b2);
}

.mipb-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,.78);
    line-height: 1.6;
    margin: 0 0 1.8rem;
    max-width: 500px;
    text-align: left;
}

/* Illustration column */
.mipb-hero__img-col {
    flex-shrink: 0;
    width: 360px;
}

.mipb-hero__illustration {
    width: 360px;
    height: 360px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 0 0 6px rgba(149,213,178,.15);
    display: block;
}

/* Search bar */
.mipb-hero__search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: .35rem .35rem .35rem 1.1rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    margin-bottom: 1.6rem;
    gap: .5rem;
}

.mipb-hero__search-icon {
    color: var(--mipbu-text-muted, #5a6a5e);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.mipb-hero__search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1a1a1a;
    background: transparent;
    font-family: inherit;
    padding: .45rem 0;
}
.mipb-hero__search-input::placeholder { color: #9ca3af; }

.mipb-hero__search-btn {
    background: var(--mipbu-green, #2d6a4f);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 700;
    padding: .65rem 1.2rem;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s ease;
    white-space: nowrap;
}
.mipb-hero__search-btn:hover { background: var(--mipbu-green-dark, #1b4332); }

/* Source trust pills */
.mipb-hero__sources {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.mipb-hero__source-label {
    font-size: .72rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
    margin-right: .25rem;
}

.mipb-hero__source-pill {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: .25rem .7rem;
}

.mipb-hero__cta-row {
    display: flex;
    gap: .9rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

/* ── 2. STATS BAR ─────────────────────────────────────────── */
.mipb-stats {
    background: #fff;
    border-top: 1px solid var(--mipbu-border, #d8eddf);
    border-bottom: 1px solid var(--mipbu-border, #d8eddf);
    padding: 2rem 0;
}

.mipb-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.mipb-stats__item {
    text-align: center;
    padding: 1.2rem 1rem;
    position: relative;
}

.mipb-stats__item + .mipb-stats__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--mipbu-border, #d8eddf);
}

.mipb-stats__number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--mipbu-green, #2d6a4f);
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: .25rem;
}

.mipb-stats__label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--mipbu-text-muted, #5a6a5e);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ── 3. TOOLS SPOTLIGHT ───────────────────────────────────── */
.mipb-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.mipb-tool-card {
    --tc: var(--mipbu-green, #2d6a4f);
    --tc-rgb: 45,106,79;
    background: #fff;
    border: 1px solid var(--mipbu-border, #d8eddf);
    border-top: 3px solid var(--tc);
    border-radius: var(--mipbu-radius, 12px);
    padding: 1.5rem;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    text-decoration: none;
    color: inherit;
}
.mipb-tool-card:hover {
    border-color: var(--tc);
    border-top-color: var(--tc);
    box-shadow: 0 4px 20px rgba(var(--tc-rgb), .18);
    transform: translateY(-3px);
    color: inherit;
}

.mipb-tool-card__icon {
    width: 44px;
    height: 44px;
    background: rgba(var(--tc-rgb), .09);
    border-radius: var(--mipbu-radius-sm, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    color: var(--tc);
}
.mipb-tool-card__icon svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.mipb-tool-card__name {
    font-size: .97rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.mipb-tool-card__desc {
    font-size: .83rem;
    color: var(--mipbu-text-muted, #5a6a5e);
    line-height: 1.5;
    flex: 1;
}

.mipb-tool-card__arrow {
    font-size: .8rem;
    color: var(--tc);
    font-weight: 700;
    margin-top: auto;
}

/* ── 4. INGREDIENTS SECTION ──────────────────────────────── */
.mipb-ingredients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mipb-ing-card {
    background: #fff;
    border: 1px solid var(--mipbu-border, #d8eddf);
    border-radius: var(--mipbu-radius, 12px);
    padding: 1.2rem 1rem;
    text-align: center;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}
.mipb-ing-card:hover {
    border-color: var(--mipbu-green, #2d6a4f);
    box-shadow: var(--mipbu-shadow-md, 0 4px 16px rgba(45,106,79,.12));
    transform: translateY(-2px);
    color: inherit;
}

.mipb-ing-card__img-wrap {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f7f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mipb-ing-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mipb-ing-card__emoji {
    font-size: 2.1rem;
    line-height: 1;
}

.mipb-ing-card__name {
    font-size: .85rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.mipb-ing-card__hint {
    font-size: .75rem;
    color: var(--mipbu-text-muted, #5a6a5e);
    line-height: 1.3;
}

/* ── 5. RECIPES SECTION ───────────────────────────────────── */
.mipb-recipes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.mipb-recipe-card {
    background: #fff;
    border: 1px solid var(--mipbu-border, #d8eddf);
    border-radius: var(--mipbu-radius, 12px);
    overflow: hidden;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.mipb-recipe-card:hover {
    box-shadow: var(--mipbu-shadow-md, 0 4px 16px rgba(45,106,79,.12));
    transform: translateY(-2px);
    color: inherit;
}

.mipb-recipe-card__img {
    background: linear-gradient(135deg, var(--mipbu-green-pale,#b7e4c7), var(--mipbu-green-light,#95d5b2));
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    overflow: hidden;
    position: relative;
}
.mipb-recipe-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.mipb-recipe-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.mipb-recipe-card__title {
    font-size: .97rem;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
}

.mipb-recipe-card__excerpt {
    font-size: .83rem;
    color: var(--mipbu-text-muted, #5a6a5e);
    line-height: 1.5;
    flex: 1;
}

.mipb-recipe-card__tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mipbu-green, #2d6a4f);
    background: rgba(45,106,79,.08);
    border-radius: 999px;
    padding: .2rem .65rem;
}

/* ── 6. BLOG / HEALTH GUIDES ──────────────────────────────── */
.mipb-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.mipb-post-card {
    background: #fff;
    border: 1px solid var(--mipbu-border, #d8eddf);
    border-radius: var(--mipbu-radius, 12px);
    overflow: hidden;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.mipb-post-card__img {
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}
.mipb-post-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.mipb-post-card:hover .mipb-post-card__img img { transform: scale(1.04); }

.mipb-post-card__body {
    padding: 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
/* Cards without image keep the old padding behaviour */
.mipb-post-card:not(.mipb-post-card--has-img) .mipb-post-card__body {
    padding: 1.5rem;
}
.mipb-post-card:hover {
    border-color: var(--mipbu-green, #2d6a4f);
    box-shadow: var(--mipbu-shadow-md, 0 4px 16px rgba(45,106,79,.12));
    transform: translateY(-2px);
    color: inherit;
}

.mipb-post-card__body .mipb-post-card__meta,
.mipb-post-card__meta {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--mipbu-green, #2d6a4f);
}

.mipb-post-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
}

.mipb-post-card__excerpt {
    font-size: .83rem;
    color: var(--mipbu-text-muted, #5a6a5e);
    line-height: 1.5;
    flex: 1;
}

.mipb-post-card__read {
    font-size: .82rem;
    font-weight: 700;
    color: var(--mipbu-green, #2d6a4f);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .2rem;
}

/* ── 7. TRUST / DATA SOURCES ──────────────────────────────── */
.mipb-trust {
    background: var(--mipbu-green-dark, #1b4332);
    padding: 3.5rem 1.5rem;
    text-align: center;
    border-radius: 20px;
    margin: 0 12px 12px;
}

.mipb-trust__eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: 1.2rem;
}

.mipb-trust__title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .6rem;
    letter-spacing: -.02em;
}

.mipb-trust__sub {
    font-size: .92rem;
    color: rgba(255,255,255,.6);
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.mipb-trust__sources {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

.mipb-trust__pill {
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    padding: .4rem 1rem;
}

/* ── Section header flex row (title left, see-all right) ─── */
.mipb-hp-section-hdr {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mipb-hp-section-hdr .mipb-hp-section-title { margin-bottom: .3rem; }
.mipb-hp-section-hdr .mipb-hp-section-sub   { margin-bottom: 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    /* Hero: shrink illustration on medium screens */
    .mipb-hero__img-col      { width: 280px; }
    .mipb-hero__illustration { width: 280px; height: 280px; }
    .mipb-hero__inner        { gap: 2rem; }
}

@media (max-width: 900px) {
    /* Hero: stack vertically, hide illustration to keep it clean */
    .mipb-hero__inner        { grid-template-columns: 1fr; }
    .mipb-hero__img-col      { display: none; }
    .mipb-hero__text         { align-items: center; }
    .mipb-hero__title        { text-align: center; }
    .mipb-hero__subtitle     { text-align: center; max-width: 100%; }
    .mipb-hero__search       { max-width: 520px; }
    .mipb-hero__cta-row      { justify-content: center; }
    .mipb-tools-grid         { grid-template-columns: repeat(2, 1fr); }
    .mipb-ingredients-grid   { grid-template-columns: repeat(3, 1fr); }
    .mipb-recipes-grid       { grid-template-columns: 1fr; }
    .mipb-posts-grid         { grid-template-columns: repeat(2, 1fr); }
    .mipb-stats__grid        { grid-template-columns: repeat(2, 1fr); }
    .mipb-stats__item:nth-child(3)::before { display: none; }
}

@media (max-width: 600px) {
    .mipb-hero               { padding: 2.5rem 0 3rem; margin: 0 8px; border-radius: 16px; }
    .mipb-trust              { margin: 0 8px 8px; border-radius: 16px; }
    .mipb-hp-section         { padding: 3.5rem 0; }
    .mipb-hero__title        { font-size: 1.9rem; }
    .mipb-hero__search       { flex-wrap: wrap; }
    .mipb-hero__search-btn   { width: 100%; justify-content: center; }
    .mipb-tools-grid         { grid-template-columns: 1fr; }
    .mipb-ingredients-grid   { grid-template-columns: repeat(2, 1fr); }
    .mipb-posts-grid         { grid-template-columns: 1fr; }
    .mipb-stats__grid        { grid-template-columns: repeat(2, 1fr); }
    .mipb-stats__item:nth-child(2)::before { display: none; }
    .mipb-hp-section-hdr     { flex-direction: column; align-items: flex-start; }
}
