/* Catalogue hero */
.ServicesDirectoryHero {
    background: linear-gradient(145deg, var(--color-surface-soft), var(--color-surface-base) 68%);
    border-bottom: 1px solid var(--color-border-soft);
    padding: clamp(48px, 7vw, 104px) 0;
}

.ServicesDirectoryBreadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.ServicesDirectoryBreadcrumbs a {
    color: var(--color-brand-logo-dark);
}

.ServicesDirectoryHero__Body {
    max-width: 980px;
}

.ServicesDirectoryHero__Lead {
    max-width: 880px;
    color: var(--color-text-secondary);
    font-size: var(--font-size-lead);
    line-height: var(--line-height-lead);
}

.ServicesDirectoryHero__Content {
    max-width: 820px;
    color: var(--color-text-secondary);
}

.ServicesDirectoryHero__Content > *:last-child {
    margin-bottom: 0;
}

/* In-page navigation */
.ServicesDirectoryNavigation {
    background: var(--color-surface-base);
    border-bottom: 1px solid var(--color-border-soft);
    padding: 18px 0;
}

.ServicesDirectoryNavigation__List {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.ServicesDirectoryNavigation a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border-default);
    border-radius: 999px;
    min-height: 40px;
    padding: 8px 15px;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.ServicesDirectoryNavigation a:hover,
.ServicesDirectoryNavigation a:focus-visible {
    background: var(--color-surface-dark);
    border-color: var(--color-surface-dark);
    color: var(--color-surface-base);
}

/* Service groups */
.ServicesDirectoryGroup {
    scroll-margin-top: 110px;
    padding: clamp(64px, 8vw, 112px) 0;
}

.ServicesDirectoryGroup--Soft {
    background: var(--color-surface-muted);
}

.ServicesDirectoryGroup__Header {
    max-width: 860px;
    margin-bottom: 36px;
}

.ServicesDirectoryGroup__Header h2 {
    margin-bottom: 14px;
    font-size: var(--font-size-section-title-compact);
}

.ServicesDirectoryGroup__Header > p:last-child {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}

.ServicesDirectoryGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.ServicesDirectoryCard {
    display: flex;
    flex-direction: column;
    background: var(--color-surface-base);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-medium);
    min-width: 0;
    overflow: hidden;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ServicesDirectoryCard:hover {
    border-color: var(--color-border-default);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.ServicesDirectoryCard__Main {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(24px, 3vw, 34px);
}

.ServicesDirectoryCard h3 {
    margin-bottom: 14px;
    font-size: var(--font-size-card-title);
    line-height: 1.22;
}

.ServicesDirectoryCard h3 a {
    color: inherit;
    text-decoration: none;
}

.ServicesDirectoryCard h3 a:hover,
.ServicesDirectoryCard h3 a:focus-visible {
    color: var(--color-brand-logo-dark);
}

.ServicesDirectoryCard__Main > p {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.62;
}

.ServicesDirectoryCard__Link {
    margin-top: auto;
}

.ServicesDirectoryCard__Children {
    background: var(--color-surface-soft);
    border-top: 1px solid var(--color-border-soft);
    padding: 20px clamp(24px, 3vw, 34px) 24px;
}

.ServicesDirectoryCard__Children > p {
    margin-bottom: 7px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ServicesDirectoryCard__Children ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.ServicesDirectoryCard__Children li + li {
    border-top: 1px solid var(--color-border-soft);
}

.ServicesDirectoryCard__Children a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.42;
    text-decoration: none;
}

.ServicesDirectoryCard__Children a:hover,
.ServicesDirectoryCard__Children a:focus-visible {
    color: var(--color-brand-logo-dark);
}

/* Catalogue call to action */
.ServicesDirectoryCta {
    padding: clamp(56px, 8vw, 104px) 0;
}

.ServicesDirectoryCta__Body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    background: var(--color-surface-dark);
    border-radius: var(--radius-large);
    padding: clamp(34px, 5vw, 68px);
    color: var(--color-surface-base);
}

.ServicesDirectoryCta__Body > div:first-child {
    max-width: 760px;
}

.ServicesDirectoryCta__Body h2 {
    margin-bottom: 14px;
}

.ServicesDirectoryCta__Body p:last-child {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.72);
}

.ServicesDirectoryCta__Actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
}

.ServicesDirectoryCta__Actions .Button {
    justify-content: center;
    width: 100%;
}

@media screen and (max-width: 1100px){
    .ServicesDirectoryGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 760px){
    .ServicesDirectoryNavigation__List {
        flex-wrap: nowrap;
        padding-bottom: 4px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .ServicesDirectoryNavigation a {
        flex: 0 0 auto;
    }

    .ServicesDirectoryGrid {
        grid-template-columns: 1fr;
    }

    .ServicesDirectoryCta__Body {
        align-items: flex-start;
        flex-direction: column;
    }

    .ServicesDirectoryCta__Actions {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce){
    .ServicesDirectoryCard,
    .ServicesDirectoryNavigation a {
        transition: none;
    }
}
