.gds-team-grid {
    display: grid;
    gap: 28px;
    margin: 30px 0;
}

.gds-team-columns-1 { grid-template-columns: 1fr; }
.gds-team-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gds-team-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gds-team-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gds-team-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.gds-team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.10);
}

.gds-team-photo {
    aspect-ratio: 4 / 3;
    background: #f3f3f3;
    overflow: hidden;
}

.gds-team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gds-team-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: 700;
    color: #444;
    background: linear-gradient(135deg, #f2f2f2, #e3e3e3);
}

.gds-team-content {
    padding: 22px;
}

.gds-team-name {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.2;
}

.gds-team-name a,
.gds-team-photo-link {
    color: inherit;
    text-decoration: none;
}

.gds-team-job-title {
    margin: 0 0 6px;
    font-weight: 700;
}

.gds-team-department {
    margin: 0 0 14px;
    opacity: 0.78;
    font-size: 14px;
}

.gds-team-bio,
.gds-team-specialisms,
.gds-team-qualifications {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.55;
}

.gds-team-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.gds-team-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.gds-team-links a:hover {
    background: #f5f5f5;
}

.gds-team-empty {
    padding: 18px;
    background: #fff8e5;
    border-left: 4px solid #d99a00;
}

.gds-team-single-card {
    max-width: 520px;
    margin: 30px auto;
}

@media (max-width: 980px) {
    .gds-team-columns-3,
    .gds-team-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .gds-team-columns-2,
    .gds-team-columns-3,
    .gds-team-columns-4 {
        grid-template-columns: 1fr;
    }
}

.gds-team-review-link,
.gds-team-testimonial-button {
    background: #c46b2b;
    border-color: #c46b2b !important;
    color: #fff !important;
    font-weight: 700;
}

.gds-team-review-link:hover,
.gds-team-testimonial-button:hover {
    filter: brightness(0.95);
    background: #c46b2b !important;
}

.gds-team-testimonial-count {
    display: inline-flex;
    align-items: center;
    margin: 4px 0 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(196, 107, 43, 0.10);
    color: #6f3712;
    font-size: 13px;
    font-weight: 700;
}

.gds-team-card-summary .gds-team-specialisms,
.gds-team-card-summary .gds-team-qualifications {
    display: none;
}

.gds-team-card-summary .gds-team-bio {
    min-height: 70px;
}

.gds-team-read-more {
    background: #2f2f3a;
    border-color: #2f2f3a !important;
    color: #fff !important;
    font-weight: 700;
}

.gds-team-profile-page {
    padding: 40px 20px;
}

.gds-team-profile-wrap {
    max-width: 1120px;
    margin: 0 auto;
}

.gds-team-profile-back {
    margin-bottom: 18px;
}

.gds-team-profile-back a {
    text-decoration: none;
    font-weight: 700;
}

.gds-team-single-card {
    max-width: 980px;
    margin: 30px auto;
}

.gds-team-single-card .gds-team-card-full {
    display: grid;
    grid-template-columns: minmax(260px, 38%) 1fr;
}

.gds-team-single-card .gds-team-photo {
    aspect-ratio: auto;
    height: 100%;
    min-height: 420px;
}

.gds-team-card-full .gds-team-bio,
.gds-team-card-full .gds-team-specialisms,
.gds-team-card-full .gds-team-qualifications {
    font-size: 16px;
    line-height: 1.75;
}

@media (max-width: 760px) {
    .gds-team-single-card .gds-team-card-full {
        display: block;
    }
    .gds-team-single-card .gds-team-photo {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }
}

/* v1.2.2: keep team cards tidy and images consistent */
.gds-team-grid { align-items: stretch; }
.gds-team-card { height: 100%; display: flex; flex-direction: column; }
.gds-team-card-summary .gds-team-photo { height: 260px; aspect-ratio: auto; }
.gds-team-card-summary .gds-team-content { flex: 1; display: flex; flex-direction: column; }
.gds-team-card-summary .gds-team-links { margin-top: auto; padding-top: 18px; }
.gds-team-card-summary .gds-team-photo img,
.gds-team-card-full .gds-team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Helpful when Team Members are displayed through a Divi Blog module instead of the shortcode */
.et_pb_blog_grid .type-gds_team_member .et_pb_image_container,
.et_pb_posts .type-gds_team_member .et_pb_image_container { height: 260px; overflow: hidden; }
.et_pb_blog_grid .type-gds_team_member .et_pb_image_container img,
.et_pb_posts .type-gds_team_member .et_pb_image_container img,
.et_pb_blog_grid .type-gds_team_member img,
.et_pb_posts .type-gds_team_member img { width: 100%; height: 260px; object-fit: cover; object-position: center; }


/* v1.2.4: full profile and staff-specific testimonial carousel */
.gds-team-inline-profile .gds-team-single-card,
.gds-team-profile-page .gds-team-single-card {
    max-width: 1120px;
}
.gds-team-member-testimonials {
    margin: 34px auto 0;
    max-width: 1120px;
}
.gds-team-member-testimonials h3 {
    margin: 0 0 14px;
    font-size: 24px;
}
.gds-team-card-full .gds-team-photo {
    background: #f6f6f6;
}
.gds-team-card-full .gds-team-photo img {
    object-fit: cover;
    object-position: center top;
}

/* v1.2.5: make staff-specific reviews look like the main testimonials section */
.gds-team-member-testimonials .gds-tm-stats {
    margin-bottom: 18px;
}
.gds-team-member-testimonials .gds-tm-carousel {
    margin-top: 10px;
}

/* v1.2.6: client logo, stronger full-profile image/buttons, and accent controls */
.gds-team-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    text-align: center;
}
.gds-team-logo img {
    max-width: min(260px, 80vw);
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.gds-team-card { --gds-team-accent: #c46b2b; }
.gds-team-card-full .gds-team-photo { min-height: 480px; }
.gds-team-card-full .gds-team-photo img { object-fit: cover; object-position: center top; }
.gds-team-card-full .gds-team-testimonial-count {
    background: color-mix(in srgb, var(--gds-team-accent) 14%, #ffffff);
    color: #3d2414;
}
.gds-team-card-full .gds-team-links a {
    min-width: 112px;
    padding: 10px 16px;
    font-weight: 700;
}
.gds-team-card-full .gds-team-links .gds-team-review-link,
.gds-team-review-link,
.gds-team-testimonial-button {
    background: var(--gds-team-accent, #c46b2b) !important;
    border-color: var(--gds-team-accent, #c46b2b) !important;
}
.gds-team-member-testimonials .gds-tm-grid,
.gds-team-member-testimonials .gds-tm-carousel {
    margin-top: 18px;
}
