.diagram-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;          /* anchor for connector overlay */
}

/* ── Top card: production outcomes ───────────── */
.outcomes-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px 32px 56px;
    text-align: center;
    position: relative;
}

.outcomes-label {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.outcomes-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.outcome-pill {
    background: var(--text-color);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 30px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ── Bottom card: brands ─────────────────────── */
.brands-card {
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    position: relative;
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.05);
}

.brands-card .row {
    position: relative;
    z-index: 2;
}

.brand-box {
    border: 1.5px solid;
    border-radius: 18px;
    padding: 36px 28px 32px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.brand-redhat {
    border-radius: 25px;
    border: 1px solid #E00;
    background: linear-gradient(180deg, #FFF 20.29%, #FEF4F4 100%);
}

.brand-gruve {
    border-radius: 25px;
    border: 1px solid var(--primary-color, --primary-color);
    background: linear-gradient(180deg, #FFF 26.69%, #E5F6ED 100%);
}

/* Brand head: logo + tag */
.brand-head {
    text-align: center;
    margin-bottom: 28px;
}

/* Red Hat composed logo */
.redhat-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.redhat-icon {
    width: 50px;
    height: 36px;
}

.redhat-text {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

.redhat-text-red { color: #EE0000; }
.redhat-text-dark { color: var(--text-color); margin-left: 2px; }

/* Gruve composed logo */
.gruve-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.gruve-mark {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gruve-mark svg {
    width: 24px;
    height: 24px;
}

.gruve-text {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.5px;
}

.brand-tag {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.brand-tag-red { color: #EE0000; }
.brand-tag-green { color: var(--primary-color); }

/* Three small tiles inside each brand box */
.brand-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.brand-tile {
    background: #fff;
    /* border: 1px solid #EEF0EE; */
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.connector-overlay {
    position: absolute;
    top: 160px; 
    height: 240px;
    pointer-events: none;
    z-index: 5;
    left: 25%;
    right: 25%;
}

.connector-overlay svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.bx-logo img {
    width: 175px;
    margin-bottom: 15px;
}

section.partnershipvalue--section {
    background: #F6F6F6;
    padding: 80px 0px;
}

.brand--innerbox {
    display: flex;
    gap: 65px;
    justify-content: center;
    width: 100%;
}

.inner--card {
    width: 70% !important;
}

/* ══════════════════════════════════════════════
    RESPONSIVE
    ══════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .section-title { font-size: 38px; }
    section.partnershipvalue--section { padding: 64px 0 80px; }

    .brand--innerbox { gap: 24px; }
    .inner--card { width: 50% !important; }
}

@media (max-width: 767.98px) {
    section.partnershipvalue--section { padding: 48px 0 64px; }

    .section-title { font-size: 30px; }

    .partnership-intro { margin-bottom: 40px; }

    .outcomes-card { padding: 28px 20px 32px; }

    .outcomes-label {
        font-size: 13px;
        letter-spacing: 1px;
        margin-bottom: 18px;
    }

    .outcomes-pills {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .outcome-pill {
        text-align: center;
        white-space: normal;
        font-size: 14px;
        padding: 11px 18px;
    }

    /* Stack brand boxes vertically and force full width */
    .brand--innerbox {
        flex-direction: column;
        gap: 32px;                              /* extra room for the + badge */
        position: relative;                      /* anchor for the + badge */
    }

    /* Plus badge between Red Hat and Gruve cards */
    .brand--innerbox::before {
        content: "+";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #fff;
        border: 1px solid var(--primary-color, #21A55E);
        color: var(--primary-color, #21A55E);
        font-size: 16px;
        font-weight: 500;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 3;
    }

    .inner--card { width: 100% !important; position: relative; }

    /* Vertical connector lines: bottom of Red Hat → top of Gruve,
       meeting at the + badge in the gap between them. */
    .inner--card:first-child::after,
    .inner--card:last-child::after {
        content: "";
        position: absolute;
        left: 50%;
        width: 1.5px;
        height: 49px;
        background: var(--primary-color);
        z-index: 0;
    }
    .inner--card:first-child::after { bottom: -19px; }
    .inner--card:last-child::after  { top: -19px; }
    .outcomes-card::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -19px;
        width: 1px;
        height: 19px;
        background: var(--primary-color, #21A55E);
        z-index: 1;
    }
    .brands-card { padding: 16px; }
    .brand-tile br{
        display:none;
    }
    .brand-box {padding: 24px 16px 20px;margin-bottom: 30px;position: relative;z-index: 1;}
    .brand-head {margin-bottom: 20px;text-align: left;}
    .bx-logo img {
        width: 140px;
        margin-bottom: 10px;
    }
    .brand-tiles {gap: 8px;grid-template-columns: repeat(1,1fr);}
    .brand-tile {
        padding: 15px 15px;
        line-height: 1.3;
        margin-bottom: 10px;
        font-size: 18px;
        min-height: auto;
        display: unset;
        width: 100%;
        text-align: left;
    }
    .brand-tile:last-child{
        margin-bottom: 0;
    }
    .connector-overlay { display: none !important; }
    .diagram-stack { gap: 32px; }                /* extra room so lines breathe */
}

@media (max-width: 480px) {
    .section-title { font-size: 26px; }
    .outcomes-card { padding: 24px 16px 28px; }
    .brands-card { padding: 12px; }
    .brand-box {padding: 20px;}
    .bx-logo img { width: 120px; }
    .brand-tag { font-size: 14px; }
}