/* Procurement Services Grid - 3 Columns with natural flow */
.procurement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--grid-gutter);
    width: 100%;
}

/* Service Items ONLY - with top border */
.procurement-grid .service-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-top: 3px solid var(--color-border, var(--color-text-main));
}

/* Bottom border ONLY for Assembly and Warranty (the last row)
   Grid indices: 1:Skip, 2-6:Items, 7:Assembly, 8:Warranty, 9:Ghost */
.procurement-grid> :nth-child(7) .service-item,
.procurement-grid> :nth-child(8) .service-item {
    border-bottom: 3px solid var(--color-border, var(--color-text-main));
}

/* Empty placeholder - Only top border for alignment */
.procurement-grid-ghost {
    border-top: 3px solid var(--color-border, var(--color-text-main));
}

/* Mobile/Tablet: Stacked layout */
/* Mobile/Tablet: Stacked layout */
@media (max-width: 767px) {
    .procurement-grid {
        grid-template-columns: 1fr;
    }

    /* Reset desktop bottom border from Assembly (index 7) */
    .procurement-grid> :nth-child(7) .service-item {
        border-bottom: none;
    }

    /* In a stack, ONLY the very last item (Warranty, index 8) gets a bottom border */
    .procurement-grid> :nth-child(8) .service-item {
        border-bottom: 3px solid var(--color-border, var(--color-text-main));
    }

    .procurement-grid-skip,
    .procurement-grid-ghost {
        display: none;
    }
}

/* Why Choose Trika Arabia Section - ALIGNMENT FIX */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    align-items: stretch;
    gap: var(--grid-gutter);
}

.advantage-item {
    display: grid;
    grid-column: span 4;
    grid-row: span 3;

    /* Occupy 3 rows of the parent advantages-grid */
    grid-template-rows: subgrid;
    border-top: 3px solid var(--color-border, var(--color-text-main));
}

/* Position sub-elements into the 3 rows */
.advantage-item>div:first-child {
    grid-row: 1;
    align-self: start;
}

.advantage-item>h4 {
    grid-row: 2;
    margin: 0;

    /* padding-bottom: 2rem */
    align-self: start;
}

.advantage-item>p {
    grid-row: 3;
    align-self: start;
}

/* Borders for Desktop Grid */
/* Target the last 3 loop-wrappers to apply border to their items */
.advantages-grid>div:nth-last-child(-n+3) .advantage-item {
    border-bottom: 3px solid var(--color-border, var(--color-text-main));
}

@media (max-width: 767px) {
    .advantages-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto;
    }

    .advantage-item {
        grid-column: span 1;

        /* grid-row: auto */
        /* display: block !important */
    }

    .advantages-grid div .advantage-item {
        border-bottom: none !important;
    }

    .advantages-grid div:last-child .advantage-item {
        border-bottom: 3px solid var(--color-border, var(--color-text-main)) !important;
    }
}

.max-width-we-work-closely {
    max-width: 42ch;
}

.from-brief-to-aftercare {
    display: flex;
    max-width: 40ch;
    justify-content: space-between;
    flex-direction: column;
}