/**
 * Directors section. Cards styled like latest news; not clickable.
 * Director name, role, bio; default "Read more", on hover overlay expands and shows bio + "Hide".
 */

.directors-section {
    --Neutrals-01: #EEEDED;
    --Secondary-100: #F65B1B;
    --Primary-100: #0B0B0B;
    height: auto;
    padding: 4rem 1.25rem;
    background: black;
    color: var(--Neutrals-01);
}

@media (min-width: 768px) {
    .directors-section {
        padding: 5rem 1.5rem;
    }
}

.directors-section .directors-section-container {
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 768px) {
    .directors-section .directors-section-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .directors-section .directors-section-container {
        min-width: 100%;
    }
}

/* Top row: title on the left, nav arrows on the right */
.directors-section-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .directors-section-top {
        margin-bottom: 3rem;
    }
}

/* Header: subtitle + title on the left */
.directors-section-header {
    margin-bottom: 0;
    text-align: left;
}

/* Subtitle – Times New Roman Regular */
.directors-section-subtitle {
    font-family: "Forma DJR Text", "forma-djr-text", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--Neutrals-01);
    margin: 0 0 0.5rem;
}

/* Title – Desktop/Heading/H1 */
.directors-section-title {
    color: var(--Neutrals-01);
    font-family: "forma-djr-text", sans-serif;
    font-size: 56px;
    font-style: normal;
    font-weight: 400;
    line-height: 110%;
    margin: 0;
}

@media (max-width: 767px) {
    .directors-section-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

/* ── Grid: 1 col mobile, 2 tablet, 4 desktop ─────────────── */
.directors-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .directors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .directors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.directors-item {
    margin: 0;
    display: flex;
}

/* Card: same structure as news card but div, not link */
.director-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    cursor: default;
}

.director-card-image {
    position: relative;
    display: block;
    aspect-ratio: 10 / 10;
    overflow: hidden;
    background: #1a1512;
}

.director-card-image .director-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.director-card:hover .director-card-image .director-card-img {
    transform: scale(1.08);
}

.director-card-img--placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2a2520 0%, #1a1512 100%);
    transition: transform 0.4s ease;
}

.director-card:hover .director-card-img--placeholder {
    transform: scale(1.08);
}

/* Diagonal overlay – same as news card; expands on hover.
   Anchored to the bottom in rems (not %) so the orange band always covers the
   fixed-height content block regardless of photo size. Percentages were relative
   to the whole card, so on mobile the tall square photo pushed the diagonal below
   the photo's bottom edge, leaving a black gap between the photo and the overlay. */
.director-card-image-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(246, 91, 27, 0.70) 0%, rgba(102, 31, 23, 0.70) 100%), var(--Primary-100);
    /* content block is 11rem tall (mobile); start ~1rem into the photo */
    clip-path: polygon(0 calc(100% - 12rem), 100% calc(100% - 15rem), 100% 100%, 0 100%);
    pointer-events: none;
    z-index: 0;
    transition: clip-path 0.4s ease;
}

.director-card:hover .director-card-image-overlay {
    clip-path: polygon(0 calc(100% - 16rem), 100% calc(100% - 19rem), 100% 100%, 0 100%);
}

@media (min-width: 768px) {
    /* content block is 12rem tall on tablet/desktop */
    .director-card-image-overlay {
        clip-path: polygon(0 calc(100% - 13rem), 100% calc(100% - 16rem), 100% 100%, 0 100%);
    }

    .director-card:hover .director-card-image-overlay {
        clip-path: polygon(0 calc(100% - 18rem), 100% calc(100% - 21rem), 100% 100%, 0 100%);
    }
}

/* On hover, move content up over the expanded overlay so there is room for the bio */
.director-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 1.25rem 1.25rem 1.5rem;
    color: var(--Neutrals-01);
    height: 11rem;
    transition: margin-top 0.4s ease;
}

@media (min-width: 768px) {
    .director-card-content {
        padding: 1.5rem 1.5rem 1.75rem;
        height: 12rem;
    }
}

.director-card:hover .director-card-content {
    margin-top: -4rem;
}

@media (min-width: 768px) {
    .director-card:hover .director-card-content {
        margin-top: -5rem;
    }
}

/* Director name – Desktop/Heading/H4 */
.director-card-name {
    color: var(--Neutrals-01);
    font-family: "forma-djr-text", sans-serif;
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    display: block;
    margin: 0 0 0.25rem;
}

/* Role – Desktop/Body/Large - Alt */
.director-card-role {
    color: var(--Neutrals-01);
    font-family: "Forma DJR Text", "forma-djr-text", sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    display: block;
    margin: 0 0 0.5rem;
}

/* Bio wrapper: by default hide bio, show "Read more"; on hover show bio and "Hide" */
.director-card-bio-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

/* Full bio – Desktop/Body/Small; hidden by default, visible on hover; scrollable when long */
.director-card-bio {
    color: var(--Neutrals-01);
    font-family: "forma-djr-text", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.35px;
    margin: 0 0 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s;
    -webkit-overflow-scrolling: touch;
}

.director-card:hover .director-card-bio {
    max-height: 8rem;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s;
}

/* Toggle: "Read more" by default, "Hide" on hover – same underline style */
.director-card-toggle {
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(238, 237, 237, 0.70);
    font-family: "forma-djr-text", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.35px;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: 5%;
    text-underline-offset: 20%;
    text-underline-position: from-font;
    width: fit-content;
}

.director-card-read-more {
    display: inline;
}

.director-card-hide {
    display: none;
}

.director-card:hover .director-card-read-more {
    display: none;
}

/* .director-card:hover .director-card-hide {
    display: inline;
} */

/* ── Mobile: no hover (touch). ────────────────────────────────
   On touch screens :hover sticks on tap, which (1) shrank the card via the
   negative margin-top so tapping near the bottom made it jitter, and (2) revealed
   the bio into a cramped, clipping box. Instead show the full bio statically in its
   own orange panel below the photo — nothing moves, nothing clips, face stays clear. */
@media (max-width: 767px) {
    /* Diagonal now lives on the content panel itself */
    .director-card-image-overlay {
        display: none;
    }

    .director-card-content {
        height: auto;                /* grow to fit name + role + full bio */
        margin-top: -2.5rem;         /* static overlap so the diagonal cuts into the photo */
        padding: 3rem 1.25rem 1.5rem;
        background: linear-gradient(180deg, rgba(246, 91, 27, 0.70) 0%, rgba(102, 31, 23, 0.70) 100%), var(--Primary-100);
        clip-path: polygon(0 2.5rem, 100% 0, 100% 100%, 0 100%);
    }

    /* Hover/tap must not move or rescale anything */
    .director-card:hover .director-card-content {
        margin-top: -2.5rem;
    }

    .director-card:hover .director-card-image .director-card-img,
    .director-card:hover .director-card-img--placeholder {
        transform: none;
    }

    /* Full bio always visible — no clip, no internal scroll */
    .director-card-bio,
    .director-card:hover .director-card-bio {
        max-height: none;
        opacity: 1;
        visibility: visible;
        overflow: visible;
    }

    /* "Read more" is redundant when the bio is always open */
    .director-card-toggle {
        display: none;
    }
}
