/* ============================================
   MBC Blog Post Header
   Figma: Header section (1440x720), 50/50 split
   ============================================ */

.mbc-blog-header {
    /* Design tokens (overridable via Bricks controls -> CSS vars) */
    --mbc-blog-header-bg: #F9F9FB;             /* Gray cool/50 */
    --mbc-blog-header-image-bg: #34312E;       /* MBClinic Brand/700 */
    --mbc-blog-header-meta-color: #34312E;     /* MBClinic Brand/700 */
    --mbc-blog-header-heading-color: #101828;  /* Gray/900 */
    --mbc-blog-header-supporting-color: #475467;/* Gray/600 */
    --mbc-blog-header-tag-bg: #FFFFFF;
    --mbc-blog-header-tag-border: #D0D5DD;     /* Gray/300 */
    --mbc-blog-header-tag-color: #344054;      /* Gray/700 */
    --mbc-blog-header-min-height: 720px;
    --mbc-blog-header-content-max: 544px;

    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    min-height: var(--mbc-blog-header-min-height);
    background: var(--mbc-blog-header-bg);
}

/* Reverse order when the image should be on the left */
.mbc-blog-header--image-left {
    flex-direction: row-reverse;
}

/* ---- Text section ---- */

.mbc-blog-header__text-section {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex: 1 1 50%;
    min-width: 0;
    padding: 96px 0;
    gap: 64px;
    background: var(--mbc-blog-header-bg);
}

.mbc-blog-header--image-left .mbc-blog-header__text-section {
    justify-content: flex-start;
}

.mbc-blog-header__container {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    max-width: 640px;
    padding: 0 32px;
}

.mbc-blog-header--image-left .mbc-blog-header__container {
    justify-content: flex-start;
}

.mbc-blog-header__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    width: 100%;
    padding: 0 32px 0 0;
    gap: 48px;
}

.mbc-blog-header--image-left .mbc-blog-header__content {
    padding: 0 0 0 32px;
}

.mbc-blog-header__heading-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: var(--mbc-blog-header-content-max);
    gap: 24px;
}

.mbc-blog-header__heading-and-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 16px;
}

/* Meta line: "13 Jan 2024 • 10 min read" */
.mbc-blog-header__meta {
    width: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: var(--mbc-blog-header-meta-color);
}

/* Heading: Display lg/Semibold */
.mbc-blog-header__heading {
    margin: 0;
    width: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 48px;
    line-height: 60px;
    letter-spacing: -0.02em;
    color: var(--mbc-blog-header-heading-color);
}

/* Supporting text: Text xl/Regular */
.mbc-blog-header__supporting {
    margin: 0;
    width: 100%;
    max-width: 480px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    color: var(--mbc-blog-header-supporting-color);
}

/* ---- Tags row ---- */

.mbc-blog-header__tags {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    gap: 16px;
}

.mbc-blog-header__tags-label {
    flex: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: var(--mbc-blog-header-supporting-color);
    align-self: center;
}

.mbc-blog-header__tags-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tag pill */
.mbc-blog-header__tag {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 3px 8px;
    gap: 3px;
    height: 24px;
    background: var(--mbc-blog-header-tag-bg);
    border: 1px solid var(--mbc-blog-header-tag-border);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

a.mbc-blog-header__tag:hover {
    background: #F9FAFB;
    border-color: #98A2B3;
}

.mbc-blog-header__tag-text {
    display: inline-flex;
    align-items: center;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    color: var(--mbc-blog-header-tag-color);
    white-space: nowrap;
}

/* ---- Image section ---- */

.mbc-blog-header__image-section {
    flex: 1 1 50%;
    min-width: 0;
    align-self: stretch;
    padding: 32px;
    background-color: var(--mbc-blog-header-image-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

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

@media (max-width: 1199px) {
    .mbc-blog-header__heading {
        font-size: 40px;
        line-height: 52px;
    }
}

@media (max-width: 991px) {
    .mbc-blog-header,
    .mbc-blog-header--image-left {
        flex-direction: column;
    }

    .mbc-blog-header__text-section {
        flex: 0 0 auto;
        padding: 64px 0;
        justify-content: center;
    }

    .mbc-blog-header__container {
        max-width: 100%;
        padding: 0 24px;
        justify-content: center;
    }

    .mbc-blog-header__content,
    .mbc-blog-header--image-left .mbc-blog-header__content {
        padding: 0;
        max-width: 720px;
    }

    .mbc-blog-header__image-section {
        flex: 0 0 auto;
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .mbc-blog-header__text-section {
        padding: 48px 0;
    }

    .mbc-blog-header__container {
        padding: 0 16px;
    }

    .mbc-blog-header__content {
        gap: 32px;
    }

    .mbc-blog-header__heading-block {
        gap: 20px;
    }

    .mbc-blog-header__heading {
        font-size: 32px;
        line-height: 40px;
    }

    .mbc-blog-header__supporting {
        font-size: 18px;
        line-height: 28px;
    }

    .mbc-blog-header__image-section {
        min-height: 280px;
        padding: 16px;
    }
}
