.team-section {
    position: relative;
    overflow: hidden;
    color: var(--color-navy);
}

/* Section backgrounds */
.team-section.bg-white { background: var(--color-white); }
.team-section.bg-cyan  { background: var(--color-cyan); }
.team-section.bg-azure { background: var(--color-azure); }
.team-section.bg-pink  { background: var(--color-pink); }

/* Header */
.team-section .team-header {
    max-width: 45rem;
    margin-bottom: 3.5rem;
}
.team-section.header-center .team-header { margin-left: auto; margin-right: auto; text-align: center; }
.team-section.header-left .team-header   { margin-left: 0; text-align: left; }
.team-section .team-title { color: var(--color-navy); }
.team-section .team-header .content,
.team-section .team-header .content * { color: var(--color-navy); }
.team-section .team-header .content > *:last-child { margin-bottom: 0; }

/* List - grid */
.team-section .team-list {
    list-style: none;
    margin: 0;
    padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	/*
    display: grid;
    grid-template-columns: minmax(0, 1fr);
	*/
    gap: 1.5rem;
}
.team-section .team-item { display: flex; min-width: 0; width: 100%; }

/* Card */
.team-section .team-card {
    --team-card-bg: var(--color-white);
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius, 8px);
    background: var(--team-card-bg);
    color: var(--color-navy);
}
.team-section.card-outline .team-card { box-shadow: inset 0 0 0 2px var(--color-pink); }
.team-section.card-pink .team-card    { --team-card-bg: var(--color-pink); }
.team-section.card-azure .team-card   { --team-card-bg: var(--color-azure); }
.team-section.card-cyan .team-card    { --team-card-bg: var(--color-cyan); }
.team-section.card-white .team-card    { --team-card-bg: var(--color-white); }
.team-section.card-shadow .team-card  { box-shadow: 0 6px 24px rgba(15, 70, 113, .12); }

/* Image */
.team-section .team-card-media {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--color-azure);
    aspect-ratio: 6 / 5;
}
.team-section.ratio-square .team-card-media { aspect-ratio: 1 / 1; }
.team-section.ratio-4-5 .team-card-media    { aspect-ratio: 4 / 5; }
.team-section.ratio-4-3 .team-card-media    { aspect-ratio: 4 / 3; }
.team-section .team-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
/* card outline sits over the image edges */
.team-section.card-outline .team-card { position: relative; }
.team-section.card-outline .team-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2px var(--color-pink);
    pointer-events: none;
}
.team-section.card-outline .team-card { box-shadow: none; }

/* Body */
.team-section .team-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 2.5rem;
}
.team-section .team-name {
    margin: 0 0 .5rem;
    font-size: 1.875rem;
    line-height: 1.15;
    color: var(--color-navy);
}
.team-section .team-role {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-blue);
}
.team-section .team-bio { margin-bottom: 2rem; }
.team-section .team-bio > *:last-child { margin-bottom: 0; }
.team-section .team-card-body .buttons { margin-top: auto; }
.team-section .team-bio + .buttons,
.team-section .team-role + .buttons,
.team-section .team-name + .buttons { margin-top: auto; }

/* Footer button */
.team-section .team-footer {
    justify-content: center;
    margin-top: 3.5rem;
}
.team-section.header-left .team-footer { justify-content: flex-start; }

/* Filter */
.search-filter-label {
    color: var(--color-navy) !important;
    font-size: 1rem !important;
    font-family: var(--heading-font);
    margin-bottom: 0.9rem !important;
}
.search-filter-input-button {
    line-height: 1.1;
    font-weight: 600 !important;
    font-family: var(--heading-font) !important;
    color: var(--color-navy) !important;
  letter-spacing: 0.06em;
  position: relative;
  font-size: 1rem !important;
  border-radius: 40px !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: unset !important;
  padding: 0.5rem clamp(1rem, 1.5vw, var(--vert-spacing-2)) !important;
  cursor: pointer;
  font-size: 0.95rem !important;
}

.search-filter-input-button:focus {
    border: 0 !important;
    outline: none !important;
    box-shadow: unset !important;
}

.search-filter-input-button[aria-pressed="true"],
.search-filter-input-button--is-selected,
.search-filter-input-button:hover {
    box-shadow: unset !important;
    background: var(--color-navy) !important;
    color: var(--color-white) !important;
    border: 0 !important;
}

/* Slider */
.team-section .splide { visibility: visible; }
.team-section .team-slider .splide__slide { height: auto; }
.team-section .team-slider .splide__arrow {
    width: 2.75rem;
    height: 2.75rem;
    background: var(--color-white);
    opacity: 1;
    height: fit-content;
    display: inline-block;
    color: var(--color-navy);
    padding: clamp(1rem, calc(var(--vert-spacing-1) * 1), 3.5rem) clamp(1.1rem, 1.7vw, var(--vert-spacing-3));
}
.team-section .team-slider .splide__arrow svg { fill: var(--color-white); }
.team-section .team-slider .splide__arrow:hover:not(:disabled) { background: var(--color-purple); }
.team-section .team-slider .splide__arrow:disabled { opacity: .35; }
.team-section .team-slider .splide__arrow--prev { left: -1.5rem; }
.team-section .team-slider .splide__arrow--next { right: -1.5rem; }
.team-section .team-slider .splide__pagination { position: static; margin-top: 1.5rem; padding: 0; }
.team-section .team-slider .splide__pagination__page { background: var(--color-pink); opacity: 1; }
.team-section .team-slider .splide__pagination__page.is-active { background: var(--color-purple); transform: none; }

/* Modals */
.team-section dialog.lm-modal[open]::backdrop {
    animation: lm-fade .25s ease;
}
.team-section dialog.lm-modal::backdrop {
    background: rgba(15, 70, 113, .75);
}
.team-section dialog.lm-modal[open] {
    animation: lm-fade .25s ease;
}
.team-section dialog.lm-modal {
    width: min(70rem, calc(100% - 3rem));
    max-width: none;
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--border-radius, 8px);
    background: var(--color-white);
    color: var(--color-navy);
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.team-section dialog.lm-modal[open] { animation: lm-fade .25s ease; }
.team-section dialog.lm-modal[open]::backdrop { animation: lm-fade .25s ease; }

.team-section .lm-modal-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 2.4fr;
    align-items: center;
    column-gap: 4rem;
    padding: 4rem;
}
.team-section dialog.modal-logo-top .lm-modal-inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
    justify-items: start;
}

.team-section .lm-modal-media { display: flex; align-items: center; justify-content: center; }
.team-section .lm-modal-logo {
    display: block;
    max-width: 100%;
    max-height: 20rem;
    width: auto;
    height: auto;
    object-fit: contain;
}
.team-section .lm-modal-body { min-width: 0; }
.team-section .lm-modal-title {
    margin: 0 0 1.5rem;
    padding-right: 2.5rem;
    font-size: 1.75rem;
    line-height: 1.25;
    color: var(--color-navy);
}
.team-section .lm-modal-content { font-size: .9375rem; line-height: 1.6; }
.team-section .lm-modal-content > *:last-child { margin-bottom: 0; }
.team-section .lm-modal-body .buttons { margin-top: 2rem; }

/* Close button */
.team-section .lm-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 2px solid var(--color-navy);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color .2s ease;
}
.team-section .lm-close span,
.team-section .lm-close span::before {
    content: "";
    display: block;
    width: 1rem;
    height: 2px;
    background: var(--color-navy);
}
.team-section .lm-close:hover span,
.team-section .lm-close:hover span::before {
    background: var(--color-white) !important;
}
.team-section .lm-close span { transform: rotate(45deg); }
.team-section .lm-close span::before { transform: rotate(90deg); }
.team-section .lm-close:hover,
.team-section .lm-close:focus-visible { background: var(--color-navy); }
.team-section .lm-close:focus-visible { outline: 3px solid var(--color-purple); outline-offset: 2px; }

.team-section.bg-blue h2,
.team-section.bg-blue h1,
.team-section.bg-blue .team-header *,
.team-section.bg-blue .search-filter-label {
    color: var(--color-white) !important;
}

.team-section .search-filter-checkable-button:not([data-option-value="south-england"]):not([data-option-value="east-england"]):not([data-option-value="wales"]):not([data-option-value="midlands"]):not([data-option-value="north-england"]):not([data-option-value="scotland"]):not([data-option-value="northern-ireland-roi"]):not([data-option-value=""]) {
    display: none !important;
}

.next svg {
    transform: rotate(-90deg);
}

.prev svg {
    transform: rotate(90deg);
}

.teamPagination:has(a) {
    margin-top: 3rem;
    text-align: center;
}

.teamPagination {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.teamPagination svg {
    width: 1em;
}

.bg-blue .teamPagination a {
    color: var(--color-white) !important;
}

.bg-blue .teamPagination svg path {
    stroke: var(--color-white) !important;
}

.bg-blue .teamPagination .current {
    background: var(--color-white) !important;
    color: var(--color-navy) !important;
}

.teamPagination a,
.teamPagination span {
    height: 2.3rem;
    width: 2.3rem;
    font-weight: 500;
}

.teamPagination .current {
    color: var(--color-white) !important;
    background: var(--color-navy);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
}

.teamPagination a {
    display: flex;
    justify-content: center;
    font-family: var(--heading-font);
    color: var(--color-navy);
    align-items: center;
}

.team-modals .lm-modal-linkedin {
    margin-top: 2rem !important;
    display: block;
}

.team-modals .d-flex {
    gap: clamp(1rem, 3vw, 2.5rem);
}

.team-modals .d-flex:has(div) + .lm-modal-content {
    margin-top: 2rem !important;
}

.team-modals .lm-modal-job {
    font-family: var(--heading-font) !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: var(--color-blue) !important;
}

.team-modals ul {
    margin: 0 !important;
    padding: 0 0 0 18px !important;
}

.team-modals ul li::marker {
    font-size: 20px !important;
    line-height: 15px !important;
    color: var(--color-blue) !important;
}

.team-modals img {
    border-radius: var(--border-radius);
}

.team-modals h3 {
    font-size: 1.2rem !important;
    margin-bottom: 0.5rem !important;
    color: var(--color-blue) !important;
}

.team-modals .team-social-icons {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	padding: 0 !important;
	list-style: none !important;
	margin: 0;
}

.team-modals .team-social-icons:has(li) {
	margin-top: 2rem !important;
}

.team-modals .team-social-icons a {
	background: var(--color-navy) !important;
	border-radius: 100%;
	padding: 5px;
	height: 45px;
	width: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.team-modals .team-social-icons a:hover {
	background: var(--color-purple) !important;
}

.team-modals .team-social-icons a svg {
	height: 20px !important;
	width: auto;
}

.team-modals .team-social-icons a path {
	fill: var(--color-white) !important;
}

@keyframes lm-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Tablet: 2 columns */
@media (min-width: 576px) {
    /*.team-section.display-grid .team-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } */
	.team-section.display-grid .team-list > li {
		width: calc(50% - ( 1.5rem / 2 ) );
	}
}

/* Desktop: chosen columns */
@media (min-width: 992px) {
	/*
    .team-section.display-grid.cols-2 .team-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-section.display-grid.cols-3 .team-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .team-section.display-grid.cols-4 .team-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	*/
	
	.team-section.display-grid.cols-2 .team-list > li {
		width: calc(50% - ( 1.5rem / 2 ) );
	}
	.team-section.display-grid.cols-3 .team-list > li {
		width: calc(33.333% - (( 1.5rem * 2 ) / 3) );
	}
	.team-section.display-grid.cols-4 .team-list > li {
		width: calc(25% - (( 1.5rem * 3 ) / 4) );
	}
}

@media (min-width: 600px) {
    .search-filter-field--id-2 { display: none !important; }
}

/* Slider mode: Splide controls layout */
.team-section.display-slider .team-list { display: flex; gap: 0; }

@media (max-width: 600px) {
    .search-filter-field--id-1 { display: none !important; }
}

@media (max-width: 1199.98px) {
    .team-section .team-card-body { padding: 2rem; }
    .team-section .team-name { font-size: 1.625rem; }
}

@media (max-width: 575.98px) {
    .team-section .team-header { margin-bottom: 2rem; }
    .team-section .team-card-body { padding: 1.5rem; }
    .team-section .team-name { font-size: 1.5rem; }
    .team-section .team-role { font-size: 1.125rem; margin-bottom: 1rem; }
    .team-section .team-footer { margin-top: 2rem; }
}

@media (max-width: 991.98px) {
    .team-section .d-flex { flex-wrap: wrap; }
    .team-section .lm-header { margin-bottom: 2.5rem; }
    .team-section .lm-modal-inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2rem;
        padding: 3.5rem 2rem 2.5rem;
    }
    .team-section .lm-modal-media { justify-content: flex-start; }
    .team-section .lm-modal-logo { max-height: 8rem; }
    .team-section .lm-modal-title { font-size: 1.5rem; }
}

@media (max-width: 575.98px) {
    .team-section dialog.lm-modal { width: calc(100% - 1.5rem); max-height: calc(100dvh - 1.5rem); }
    .team-section .lm-modal-inner { padding: 3.5rem 1.25rem 1.75rem; }
    .team-section .lm-close { top: .75rem; right: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .team-section dialog.lm-modal[open],
    .team-section dialog.lm-modal[open]::backdrop { animation: none; }
}