.page-template-page-deflatehae-patient .patient-hae-facts {
    background-color: var(--color-white);
    padding: 80px 20px;
}

.page-template-page-deflatehae-patient .patient-hae-facts__container {
    max-width: 1434px;
    margin: 0 auto;
    filter: drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.5));
}

.page-template-page-deflatehae-patient .patient-hae-facts__inner {
    clip-path: var(--clip-path-fixed-bowl);
    overflow: hidden;
}

.page-template-page-deflatehae-patient .patient-hae-facts__header {
    background-color: var(--color-nav-gray);
    padding: 100px 20px 60px;
    text-align: center;
}

.page-template-page-deflatehae-patient .patient-hae-facts__title {
    color: var(--color-yellow);
    font-size: 45px;
    line-height: 50px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 30px;
}

.page-template-page-deflatehae-patient .patient-hae-facts__intro {
    color: var(--color-white);
    font-weight: 700;
    max-width: 580px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.5;
}

.page-template-page-deflatehae-patient .patient-hae-facts__subheader {
    background-color: var(--color-red);
    padding: 40px 20px;
    text-align: center;
}

.page-template-page-deflatehae-patient .patient-hae-facts__subtitle {
    color: var(--color-white);
    font-size: 49px;
    line-height: 32px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 15px;
}

.page-template-page-deflatehae-patient .patient-hae-facts__subtitle-text {
    color: var(--color-white);
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

/* Grid Layout */
.page-template-page-deflatehae-patient .patient-hae-facts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: var(--color-white);
}

/* Alternating row backgrounds - 3 column layout */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-5),
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-4),
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-3) {
    background-color: var(--color-white);
}

.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-2),
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-1),
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n) {
    background-color: var(--color-bg-gray);
}

/* Grid row padding */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(3n-2),
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(3n-1),
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(3n) {
    padding: 60px 40px 0;
}

/* Grid Items */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 340px;
    background-color: var(--color-white);
    position: relative;
    grid-column: auto;
}

/* Create vertical separator lines */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 30px;
    bottom: 30px;
    width: 1px;
    background-color: var(--color-nav-gray);
}

/* Remove right border from every third item */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(3n)::after {
    display: none;
}

/* Remove bottom border from last row items */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-last-child(1)::before,
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-last-child(2)::before,
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-last-child(3)::before {
    display: none;
}

/* Alternating row backgrounds */
.page-template-page-deflatehae-patient .patient-hae-facts__grid-item.grid-item--alt-bg {
    background-color: var(--color-bg-gray);
}

/* Last row handling for 3-column layout */
.page-template-page-deflatehae-patient .patient-hae-facts__grid .patient-hae-facts__grid-item:last-child:nth-child(3n-1),
.page-template-page-deflatehae-patient .patient-hae-facts__grid .patient-hae-facts__grid-item:last-child:nth-child(3n-2) {
    grid-column: 1 / -1;
}

/* Single item in last row should span full width */
.page-template-page-deflatehae-patient .patient-hae-facts__grid .patient-hae-facts__grid-item:last-child:nth-child(3n) {
    grid-column: 1 / -1;
}

/* Item Content */
.page-template-page-deflatehae-patient .patient-hae-facts__item-title {
    font-size: 100px;
    line-height: 50px;
    font-weight: 700;
    margin: 0 0 30px;
}

.page-template-page-deflatehae-patient .patient-hae-facts__item-title.color-red {
    color: var(--color-red);
}

.page-template-page-deflatehae-patient .patient-hae-facts__item-title.color-blue {
    color: var(--color-blue);
}

.page-template-page-deflatehae-patient .patient-hae-facts__item-title.color-yellow {
    color: var(--color-yellow);
}

.page-template-page-deflatehae-patient .patient-hae-facts__item-title.color-gray {
    color: var(--color-nav-gray);
}

.page-template-page-deflatehae-patient .patient-hae-facts__item-text {
    font-weight: 600;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
}

/* Media Queries */
@media screen and (min-width: 1440px) {
    .page-template-page-deflatehae-patient .patient-hae-facts__grid {
        grid-template-columns: repeat(3, 1fr); /* Force 3 columns at largest size */
    }
}

@media screen and (max-width: 1439px) and (min-width: 961px) {
    .page-template-page-deflatehae-patient .patient-hae-facts__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reset all grid column spans */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item {
        grid-column: auto !important;
        width: 100%;
    }

    /* Handle last item in odd-numbered grids */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:last-child:nth-child(odd) {
        grid-column: 1 / span 2 !important;
        width: 50%;
        justify-self: center;
    }

    /* Adjust borders for 2-column layout */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(3n)::after {
        display: block;
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(2n)::after {
        display: none;
    }

    /* Special handling for last items when total count is odd */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:last-child:nth-child(2n+1) {
        grid-column: 1 / -1;
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Reset 3-column backgrounds */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-5),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-4),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-3),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-2),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-1),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n) {
        background-color: var(--color-white);
    }

    /* Alternating row backgrounds - 2 column layout */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n-3),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n-2) {
        background-color: var(--color-white);
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n-1),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n) {
        background-color: var(--color-bg-gray);
    }

    /* Remove bottom border from last row items in 2-column layout */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-last-child(1)::before,
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-last-child(2)::before {
        display: none;
    }
}

@media screen and (max-width: 960px) {
    .page-template-page-deflatehae-patient .patient-hae-facts__grid {
        grid-template-columns: 1fr;
        padding-bottom: 60px;
    }

    /* Reset all grid column spans and widths */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item {
        grid-column: 1 / -1 !important;
        width: 100%;
    }

    /* Reset all backgrounds */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-5),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-4),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-3),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-2),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n-1),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(6n),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n-3),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n-2),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n-1),
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(4n) {
        background-color: var(--color-white);
    }

    /* Alternating backgrounds - single column */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(odd) {
        background-color: var(--color-white);
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item:nth-child(even) {
        background-color: var(--color-bg-gray);
    }

    /* Remove all vertical borders in mobile */
    .page-template-page-deflatehae-patient .patient-hae-facts__grid-item::after {
        display: none;
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__subheader {
        padding: 40px 0;
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__title {
        font-size: 30px;
        line-height: 40px;
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__intro {
        font-size: 16px;
        line-height: 32px;
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__subtitle {
        font-size: 30px;
        line-height: 20px;
    }

    .page-template-page-deflatehae-patient .patient-hae-facts__subtitle-text {
        font-size: 16px;
        line-height: 25px;
        max-width: 200px;
        margin: 0 auto;
    }
} 