/* Match About's 24px content clearance plus the standard 32px contact lead. */
#main-content.fresh-standard-contact-gap{padding-bottom:24px}
#main-content.fresh-standard-contact-gap > div:last-of-type{margin-bottom:0!important;padding-bottom:0!important}
#main-content.fresh-standard-contact-gap > div:last-of-type > div:last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > div:last-child > div:last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > div:last-child > section:last-child{margin-bottom:0!important;padding-bottom:0!important}
.fresh-standard-contact-gap .project-text:last-of-type p:last-child,
.fresh-standard-contact-gap .vlist:last-child,
.fresh-standard-contact-gap .project-source-links,
.fresh-standard-contact-gap .project-source-links a,
.fresh-standard-contact-gap .services-section:last-child,
.fresh-standard-contact-gap .expertise-row:last-child,
.fresh-standard-contact-gap .project-cols:last-child .mb-4{margin-bottom:0!important}

/* Remove only the portfolio grid's final row clearance. */
@media(min-width:1200px){.fresh-standard-contact-gap .fresh-work-grid .row > :nth-last-child(-n+4){margin-bottom:0!important}}
@media(min-width:992px) and (max-width:1199px){.fresh-standard-contact-gap .fresh-work-grid .row > :nth-last-child(-n+3){margin-bottom:0!important}}
@media(max-width:991px){.fresh-standard-contact-gap .fresh-work-grid .row > :last-child{margin-bottom:0!important}}

/* Trim terminal wrappers, preserving spacing between earlier sections. */
#main-content.fresh-standard-contact-gap > div:last-of-type > :last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > :last-child > :last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > :last-child > :last-child > :last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > :last-child > :last-child > :last-child > :last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > :last-child > :last-child > :last-child > :last-child > :last-child,
#main-content.fresh-standard-contact-gap > div:last-of-type > :last-child > :last-child > :last-child > :last-child > :last-child > :last-child{margin-bottom:0!important;padding-bottom:0!important}

.fresh-standard-contact-gap > div:last-of-type p:last-child:has(> br:only-child){display:none}
@media(min-width:1200px){.fresh-standard-contact-gap .fresh-news-grid .row > :nth-last-child(-n+6){margin-bottom:0!important}}
@media(min-width:768px) and (max-width:1199px){.fresh-standard-contact-gap .fresh-news-grid .row > :nth-last-child(-n+3){margin-bottom:0!important}}
@media(min-width:576px) and (max-width:767px){.fresh-standard-contact-gap .fresh-news-grid .row > :nth-last-child(-n+2){margin-bottom:0!important}}
@media(max-width:575px){.fresh-standard-contact-gap .fresh-news-grid .row > :last-child{margin-bottom:0!important}}

/* Office pages can end with an empty project row; trim its preceding cards. */
.fresh-standard-contact-gap > .row:not(:has(*)){display:none}
.fresh-standard-contact-gap:has(> .row:last-child) > .container:nth-last-of-type(2) > .row:last-child{margin-bottom:0!important;padding-bottom:0!important}
@media(min-width:992px){.fresh-standard-contact-gap:has(> .row:last-child) > .container:nth-last-of-type(2) > .row:last-child > :nth-last-child(-n+3){margin-bottom:0!important}}
@media(max-width:991px){.fresh-standard-contact-gap:has(> .row:last-child) > .container:nth-last-of-type(2) > .row:last-child > :last-child{margin-bottom:0!important}}

.fresh-office-page > .container:nth-last-of-type(2) > .row:last-child .jobdesc{margin-bottom:0!important}
@media(min-width:992px){.fresh-office-page > .container:last-of-type > .row:last-child > :nth-last-child(-n+3){margin-bottom:0!important}}
@media(max-width:991px){.fresh-office-page > .container:last-of-type > .row:last-child > :last-child{margin-bottom:0!important}}

.fresh-standard-contact-gap .fresh-profile-pagination > div{margin-bottom:0!important}
@media(min-width:1200px){.fresh-standard-contact-gap .fresh-team-directory > :nth-last-child(-n+4){margin-bottom:0!important}.fresh-standard-contact-gap .fresh-team-directory > :nth-last-child(-n+4) .jobdesc{margin-bottom:0!important}}
@media(min-width:992px) and (max-width:1199px){.fresh-standard-contact-gap .fresh-team-directory > :nth-last-child(-n+3){margin-bottom:0!important}.fresh-standard-contact-gap .fresh-team-directory > :nth-last-child(-n+3) .jobdesc{margin-bottom:0!important}}
@media(max-width:991px){.fresh-standard-contact-gap .fresh-team-directory > :last-child{margin-bottom:0!important}.fresh-standard-contact-gap .fresh-team-directory > :last-child .jobdesc{margin-bottom:0!important}}
