/*
 * Single dt_team template — individual + team layouts.
 *
 * Body: DM Sans (already enqueued site-wide).
 * Headings: Knockout 31 Junior Middlewt (loaded via knockout-fonts.css).
 *
 * Accessibility: targets WCAG 2.1 AA. Text contrast >= 4.5:1, focus states
 * preserved on all interactive elements, semantic landmarks (main, article,
 * section, nav with aria-label), no info conveyed by colour alone.
 */

/* Theme-wrapper override. The7 paints #main with the global page background,
 * which clashes with our white-canvas layout. Targets the body class set by
 * TemplateLoader::add_template_body_class() so other dt_team pages (those
 * still on Visual Composer / Elementor) are unaffected. */
.ucb-talent-single-template #main {
    background-color: #fff;
}

.ucb-talent-single {
    --ucb-text:          #1a1a1a;
    --ucb-text-muted:    #4a4a4a;
    --ucb-rule:          #d9d9d9;
    --ucb-accent:        #b22222;   /* 6.36:1 on #ffffff — AA for normal text */
    --ucb-accent-dark:   #8a1a1a;   /* 9.5:1 on #ffffff */
    --ucb-bg:            #ffffff;
    --ucb-bg-muted:      #f6f5f2;
    --ucb-focus:         #005fcc;

    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--ucb-text);
    background: var(--ucb-bg);
    line-height: 1.55;
}

.ucb-talent-single :where(h1, h2, h3, h4) {
    font-family: 'Knockout 31 Junior Middlewt', 'DM Sans', sans-serif;
    color: var(--ucb-text);
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin: 0 0 0.5em;
}

.ucb-talent-single :where(a):focus-visible,
.ucb-talent-single :where(button):focus-visible {
    outline: 3px solid var(--ucb-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

.ucb-talent-single .talent-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Individual layout ---------- */

.ucb-talent-individual {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2.5rem 0.75rem 4rem;
}

.ucb-talent-individual__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .ucb-talent-individual__header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.ucb-talent-individual__photo {
    position: relative;
    background: var(--ucb-bg-muted);
    /* 2/3 portrait crop to match the talent-grid card aspect — square
       cropped too tightly for landscape headshots (face stayed centred
       but useful framing got cut off). */
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 6px;
}

/* The7 has aggressive img rules (`img { height: auto !important }` in
   places) that break our `height: 100%` fill, leaving the image at its
   intrinsic landscape size and the muted blue container background
   showing around it. Lock the cover/crop behavior with !important. */
.ucb-talent-individual__photo img,
.ucb-talent-individual__photo img.attachment-large,
.ucb-talent-individual__photo img.size-large {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    -webkit-filter: none !important;
    mix-blend-mode: normal !important;
    transform: none !important;
}

/* Kill any theme-injected hover/rollover overlay pseudo-elements that
   tint the headshot. */
.ucb-talent-individual__photo::before,
.ucb-talent-individual__photo::after {
    display: none !important;
    content: none !important;
}

.ucb-talent-individual__name {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--ucb-accent);
    margin-bottom: 1rem;
}

.ucb-talent-individual__bio {
    font-size: 1.0625rem;
    color: var(--ucb-text-muted);
    margin-bottom: 1.75rem;
}

.ucb-talent-individual__bio p:last-child {
    margin-bottom: 0;
}

/* Representation block — divider + 3-column row */

.ucb-talent-rep {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ucb-rule);
    position: relative;
}

.ucb-talent-rep__heading {
    position: absolute;
    top: -0.7em;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ucb-bg);
    padding: 0 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    color: var(--ucb-text);
    text-align: center;
    margin: 0;
}

.ucb-talent-rep__list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    text-align: center;
}

.ucb-talent-rep__role {
    color: var(--ucb-accent);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.25rem;
    text-transform: none;
}

.ucb-talent-rep__value {
    margin: 0;
    color: var(--ucb-text);
}

/* Full-width line below the grid. Used for additional_representation
   rows whose `label` is empty — the migration produces these from
   legacy notes lines that didn't follow the "Label: Value" convention
   (most commonly "Currently seeking representation."). Centered so it
   visually anchors under the Representation heading. */
.ucb-talent-rep__notes {
    margin: 1.25rem 0 0;
    text-align: center;
    color: var(--ucb-text);
}

/* Socials + website row */

.ucb-talent-links {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.ucb-talent-links__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--ucb-accent);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.ucb-talent-links__item:hover,
.ucb-talent-links__item:focus-visible {
    background: var(--ucb-accent-dark);
    color: #fff;
}

.ucb-talent-links__item svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
    display: block;
}

.ucb-talent-links__website {
    width: auto;
    padding: 0 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ---------- Team layout ---------- */

.ucb-talent-team {
    background: var(--ucb-bg);
}

.ucb-talent-team__hero {
    background: #000;
    position: relative;
    overflow: hidden;
}

.ucb-talent-team__hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    margin: 0 auto;
}

.ucb-talent-team__title-bar {
    background: #000;
    color: #fff;
    padding: 1.25rem 1.5rem;
}

.ucb-talent-team__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: #fff;
    margin: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.ucb-talent-team__body {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 0.75rem;
}

.ucb-talent-team__bio {
    font-size: 1.0625rem;
    color: var(--ucb-text-muted);
    margin-bottom: 2rem;
}

.ucb-talent-team__cast {
    margin-top: 2rem;
}

.ucb-talent-team__cast-heading {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* ---------- Shared: shows section ---------- */

.talent-shows-section {
    max-width: 1300px;
    margin: 3rem auto 0;
    padding: 0 0.75rem;
}

/* Trim the The7-theme's 50px-each-side .wf-wrap padding on the
   talent single template so the 1300px content area can actually
   reach 1300px on a ~1400px viewport. body class is added by
   TemplateLoader::add_template_body_class when our template renders. */
body.ucb-talent-single-template #main > .wf-wrap {
    padding-left: 20px;
    padding-right: 20px;
}

.talent-shows-section h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: 1.25rem;
}

.talent-shows + .talent-shows {
    margin-top: 2.5rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .ucb-talent-single * {
        transition: none !important;
        animation: none !important;
    }
}
