/* People page + cards. Moved from the People page's Raw HTML block into KlaesLab Core so it survives theme changes.
   Rules are unchanged except: global "*"/"body" resets removed, ".container" renamed ".kl-people-page". */
.kl-people-page { font-family: Arial, Helvetica, Verdana, sans-serif; line-height: 28px; color: #333; } /* live site renders Arial and The7's 28px line height (The7 overrode the block's own font and 1.6) */
body:has(.kl-people-page) { background-color: #f8f9fa; }
.kl-people-page .section-header h2 { text-transform: uppercase; } /* The7 heading style on the live site */
.wp-block-group.kl-people-page { max-width: 1200px; margin-left: auto; margin-right: auto; padding: 2rem; }
.kl-people-page *, .klaeslab-people * { box-sizing: border-box; }
.kl-people-page h2, .kl-people-page h3, .kl-people-page p, .klaeslab-people h3, .klaeslab-people p { margin: 0; }
.team-card-bio p + p { margin-top: .5em; }
.kl-people-page .team-card-name, .klaeslab-people .team-card-name { margin-bottom: .25rem; } /* the h3 reset above must not remove it */
.kl-people-page .wp-block-heading { font-family: inherit; }
.kl-people-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-header {
    text-align: left;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.section-header:first-child {
    margin-top: 0;
}

.section-header h2 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin: 0;
    position: relative;
}

.section-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}

/* CATlab section header — a clickable "learn more" banner */
.catlab-header-link {
    display: block;
    text-decoration: none;
    margin-top: 3rem;
}

.section-header.catlab-header {
    border-bottom: 2px solid #b8d4e8;
    margin-top: 0;
    padding: 0.4rem 0 0.6rem;
    transition: border-color 0.2s ease;
}

.catlab-header-link:hover .section-header.catlab-header {
    border-bottom-color: #3a7ca5;
}

.section-header.catlab-header h2 {
    color: #2c3e50;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-weight: 400;
    font-size: 1.5rem;
}

/* Wordmark: CAT highlighted, lab in slate */
.catlab-wordmark {
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: -0.01em;
}

.catlab-wordmark .cat {
    color: #3a7ca5;
    letter-spacing: 0.04em;
}

.catlab-wordmark .lab {
    color: #2c3e50;
}

/* The acronym expansion — structure that encodes the name */
.catlab-expand {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #3a7ca5;
    white-space: nowrap;
}

/* Learn-more affordance on the right */
.catlab-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3a7ca5;
    white-space: nowrap;
}

.catlab-learn-more .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.catlab-header-link:hover .catlab-learn-more .arrow {
    transform: translateX(4px);
}

.catlab-description {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    margin-top: 0.65rem;
}

@media (max-width: 768px) {
    .catlab-learn-more { margin-top: 0.4rem; }
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Team Card */
.team-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: row;
    min-height: 240px;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

/* CATlab cards get a subtle left accent */
.team-card.catlab-card {
    border-left: 4px solid #3a7ca5;
}

.team-card.catlab-card:hover {
    border-color: #3a7ca5;
    box-shadow: 0 8px 16px rgba(58, 124, 165, 0.12);
}

.team-card-image {
    width: 220px;
    height: auto;
    flex-shrink: 0;
    background: #f0f0f0;
    position: relative;
    min-height: 100%;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    position: absolute;
    top: 0;
    left: 0;
}

.team-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.team-card-name a {
    color: inherit;
    text-decoration: none;
}

.team-card-name a:hover {
    color: #3a7ca5;
    text-decoration: underline;
}

.team-card-position {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.catlab-card .team-card-position {
    color: #3a7ca5;
}

.team-card-bio {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.team-card-bio a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.team-card-bio a:hover {
    text-decoration: underline;
}

.catlab-card .team-card-bio a {
    color: #3a7ca5;
}

.team-card-contact {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.contact-link:hover {
    color: #667eea;
}

.catlab-card .contact-link:hover {
    color: #3a7ca5;
}

.contact-link svg {
    width: 16px;
    height: 16px;
    margin-right: 0.4rem;
}

/* Alumni */
.alumni-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    margin-top: 2rem;
}

.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.alumni-card {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.alumni-card:hover {
    background-color: #fff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.alumni-name {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

@media (max-width: 768px) {
    .kl-people-page, .wp-block-group.kl-people-page { padding: 1rem; }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 2rem;
    }
    .team-grid { grid-template-columns: 1fr; }
    .team-card {
        flex-direction: column;
        height: auto;
    }
    .team-card-image {
        width: 100%;
        height: 250px;
        min-height: 0;
    }
    .team-card-image img { position: relative; }
    .team-card.catlab-card {
        border-left: none;
        border-top: 4px solid #3a7ca5;
    }
}

/* Spacing restated one level deeper: WordPress's layout rule `:root :where(.is-layout-flow) > *` resets margins
   with the same specificity as the rules above and loads later. */
.kl-people-page .section-header { margin-top: 3rem; margin-bottom: 1.5rem; }
.kl-people-page .section-header:first-child { margin-top: 0; }
.kl-people-page .catlab-header-link { margin-top: 3rem; }
.kl-people-page .section-header.catlab-header { margin-top: 0; }
.kl-people-page .catlab-description { margin-top: 0.65rem; margin-bottom: 1.5rem; }
.kl-people-page .team-grid { margin-bottom: 1.5rem; }
.kl-people-page .alumni-section { margin-top: 2rem; }
@media (max-width: 768px) {
	.kl-people-page .section-header { margin-top: 2rem; }
	.kl-people-page .section-header:first-child { margin-top: 0; }
}
