/* Theme isolation — prevent WP theme styles bleeding into profile blocks */
.ctc-profiles-wrap {
    --ctc-accent: #7a2038;
    --ctc-accent-hover: #5e1830;
    --ctc-text: #222;
    --ctc-border: #d8d8d8;
    --ctc-muted: #6b6b6b;
    --ctc-aside-width: 240px;
    --ctc-photo-ratio: 3 / 4;

    box-sizing: border-box;
    line-height: 1.5;
    color: var(--ctc-text);
}

.ctc-profiles-wrap *,
.ctc-profiles-wrap *::before,
.ctc-profiles-wrap *::after {
    box-sizing: border-box;
}

.ctc-profiles-wrap a {
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.ctc-profiles-wrap ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ctc-profiles-wrap p {
    margin: 0;
}

/* Block separator */
.ctc-profile-block + .ctc-profile-block {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 2px dotted #bbb;
}

/* Two-column layout */
.ctc-profile-layout {
    display: grid;
    grid-template-columns: var(--ctc-aside-width) minmax(0, 1fr);
    gap: 32px 56px;
    align-items: start;
}

@media (max-width: 768px) {
    .ctc-profile-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .ctc-profile-aside {
        max-width: 220px;
    }
}

/* ── Left column: photo + contact ── */
.ctc-profile-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ctc-profile-photo {
    aspect-ratio: var(--ctc-photo-ratio);
    width: 100%;
    background: #eee;
    overflow: hidden;
}

.ctc-profile-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.ctc-profile-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f5f5f5, #e8e8e8);
}

.ctc-profile-photo--placeholder svg {
    width: 44px;
    height: 44px;
    opacity: 0.18;
}

.ctc-profile-contact-card {
    padding: 14px 12px;
    background: #fafafa;
    border-left: 3px solid var(--ctc-accent);
}

.ctc-profile-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.ctc-profile-contact li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.ctc-profile-contact-icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: #888;
}

.ctc-profiles-wrap .ctc-profile-contact-link {
    color: var(--ctc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    min-width: 0;
}

.ctc-profiles-wrap .ctc-profile-contact-link:hover,
.ctc-profiles-wrap .ctc-profile-contact-link:focus {
    color: var(--ctc-accent-hover);
}

.ctc-profiles-wrap .ctc-profile-contact-link--email {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Right column: role, name, bio, CTA ── */
.ctc-profile-main {
    display: flex;
    flex-direction: column;
    padding-top: 2px;
}

.ctc-profiles-wrap .ctc-profile-role {
    margin: 0 0 4px;
    padding: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ctc-muted);
    line-height: 1.4;
}

.ctc-profiles-wrap .ctc-profile-name {
    margin: 0 0 12px;
    padding: 0;
    font-family: inherit;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ctc-text);
    letter-spacing: -0.02em;
    text-transform: none;
}

.ctc-profiles-wrap .ctc-profile-bio {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ctc-muted);
    max-width: 42rem;
}

.ctc-profiles-wrap .ctc-profile-bio p {
    margin: 0 0 0.6em;
}

.ctc-profiles-wrap .ctc-profile-bio p:last-child {
    margin-bottom: 0;
}

.ctc-profile-actions {
    margin-top: 24px;
    max-width: 26rem;
}

.ctc-profile-main:not(:has(.ctc-profile-bio)) .ctc-profile-actions {
    margin-top: 20px;
}

.ctc-profiles-wrap .ctc-profile-divider {
    margin: 0 0 16px;
    padding: 0;
    border: none;
    border-top: 1px solid #333;
    opacity: 0.2;
    height: 0;
    background: none;
}

/* CTA button — force white text over theme link styles */
.ctc-profiles-wrap a.ctc-profile-cta,
.ctc-profiles-wrap span.ctc-profile-cta {
    display: block;
    width: 100%;
    margin: 0;
    padding: 15px 20px;
    border: none;
    border-radius: 2px;
    background-color: var(--ast-global-color-0);
    color: #fff;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ctc-profiles-wrap a.ctc-profile-cta:hover,
.ctc-profiles-wrap a.ctc-profile-cta:focus,
.ctc-profiles-wrap a.ctc-profile-cta:active,
.ctc-profiles-wrap a.ctc-profile-cta:visited {
    background-color: var(--ast-global-color-0);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.ctc-profiles-wrap span.ctc-profile-cta--static {
    cursor: default;
}

.ctc-profiles-wrap span.ctc-profile-cta--static:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.ctc-profiles-empty {
    margin: 0;
    padding: 12px 0;
    color: var(--ctc-muted);
}

@media (max-width: 480px) {
    .ctc-profiles-wrap .ctc-profile-name {
        font-size: 1.5rem;
    }

    .ctc-profile-actions {
        max-width: none;
    }
}
