﻿/* ============================================================
   leadership.css — Leadership Module (.leadership)
   ============================================================ */


/* ---------- 0. Botão reutilizável (tp-btn) ---------- */
.leadership .tp-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    min-width: 120px;
    padding: 8px 16px;
    background: var(--bg-primary-strong);
    color: var(--title-inverse);
    font-size: var(--fs-18);
    line-height: var(--lh-24);
    font-family: var(--font-sans);
    font-weight: var(--fw-light);
    white-space: nowrap;
    overflow: hidden;
    isolation: isolate;
}

    .leadership .tp-btn > * {
        position: relative;
        z-index: 2;
    }

.leadership .tp-btn__accent {
    position: absolute;
    inset: 0;
    background: var(--bg-secondary-strong);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 1;
    transition: transform var(--t-base) var(--ease);
}

.leadership .tp-btn:hover .tp-btn__accent,
.leadership .tp-btn:focus-visible .tp-btn__accent {
    transform: scaleX(1);
}

.leadership .tp-btn__icon {
    width: 24px;
    height: 24px;
    flex: none;
    transition: transform var(--t-base) var(--ease);
}

    .leadership .tp-btn__icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }

.leadership .tp-btn--secondary {
    background: var(--bg-neutral-medium);
    color: var(--title-primary-strong);
}

    .leadership .tp-btn--secondary .tp-btn__accent {
        background: var(--bg-primary-strong);
    }

    .leadership .tp-btn--secondary:hover,
    .leadership .tp-btn--secondary:focus-visible {
        color: var(--title-inverse);
    }


/* ---------- 1. Container raiz ---------- */
.leadership {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 96px;
}


    /* ---------- 2. Grid de cards (desktop = grid real; ≤991.98px vira carrossel) ---------- */
    .leadership .ldr__grid-wrap {
        width: 100%;
    }

    .leadership .ldr__grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* ≥1440 */
        gap: 48px;
        width: 100%;
    }

    .leadership .tpc__slide {
        min-width: 0;
    }

    .leadership .tpc__nav {
        display: none;
    }

    .leadership .ldr__card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        min-width: 0;
        width: 100%;
    }

    .leadership .ldr__photo {
        position: relative;
        width: 100%;
        aspect-ratio: 3 / 4;
        overflow: clip;
        /*background: radial-gradient(ellipse 91.6% 68.1% at 50% 32%, #e7ebee 0%, #c8c6cf 50%, #aaa1b0 100%);*/
    }

        .leadership .ldr__photo img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: bottom center;
            pointer-events: none;
        }

    .leadership .ldr__view {
        position: absolute;
        right: 0;
        bottom: 0;
        z-index: 2;
    }

        .leadership .ldr__view .tp-btn__icon {
            transform: rotate(0deg);
        }

        .leadership .ldr__view:hover .tp-btn__icon,
        .leadership .ldr__view:focus-visible .tp-btn__icon {
            transform: rotate(-45deg);
        }

    .leadership .ldr__name {
        width: 100%;
    }

    .leadership .ldr__name-title,
    .leadership .ldr__name-role {
        margin: 0;
        width: 100%;
        font-family: var(--font-sans);
        font-weight: var(--fw-light);
    }

    .leadership .ldr__name-title {
        font-size: 24px;
        line-height: 32px;
        color: var(--title-default);
    }

    .leadership .ldr__name-role {
        font-size: 18px;
        line-height: 24px;
        color: var(--body-default);
    }


    /* ---------- 3. Modal de perfil (sem mudança nenhuma — versão que já funciona) ---------- */
    .leadership .ldr-modal {
        position: fixed;
        inset: 0;
        z-index: 300;
    }

        .leadership .ldr-modal[hidden] {
            display: none;
        }

    .leadership .ldr-modal__overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
    }

    .leadership .ldr-modal__container {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        max-width: 100%;
        max-height: calc(100vh - 80px);
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .leadership .ldr-modal__card {
        position: relative;
        display: flex;
        align-items: stretch;
        width: 100%;
        height: min(744px, calc(100vh - 176px));
        background: var(--bg-default);
        overflow: clip;
        isolation: isolate;
    }

    .leadership .ldr-modal__content {
        width: 600px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 40px;
        min-height: 0;
    }

    .leadership .ldr-modal__heading {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 541px;
    }

    .leadership .ldr-modal__name {
        margin: 0;
        font-family: var(--font-sans);
        font-weight: var(--fw-extralight);
        font-size: 56px;
        line-height: 56px;
        color: var(--title-default);
    }

    .leadership .ldr-modal__role,
    .leadership .ldr-modal__bio p {
        margin: 0;
        font-family: var(--font-sans);
        font-weight: var(--fw-light);
        font-size: 18px;
        line-height: 24px;
        color: var(--body-default);
    }

    .leadership .ldr-modal__bio {
        display: flex;
        flex-direction: column;
        width: 100%;
        overflow-y: auto;
        flex: 1 1 0;
        min-height: 0;
        padding-right: 20px;
    }

    .leadership .ldr-modal__media img {
        height: 100%;
        width: auto;
        object-fit: contain;
    }

    .leadership .ldr-modal__close {
        position: absolute;
        right: 16px;
        top: 16px;
        z-index: 3;
        width: 48px;
        height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        cursor: pointer;
        background: var(--bg-default);
        color: var(--icon-default);
        transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
    }

        .leadership .ldr-modal__close:hover {
            background: var(--bg-primary-strong);
            color: var(--title-inverse);
        }

        .leadership .ldr-modal__close svg {
            width: 24px;
            height: 24px;
            display: block;
        }

    .leadership .ldr-modal__action {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .leadership .ldr__arrow {
        width: 56px;
        height: 56px;
        flex: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        cursor: pointer;
        background: var(--bg-default);
        color: var(--icon-default);
        transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
    }

        .leadership .ldr__arrow svg {
            width: 24px;
            height: 24px;
            display: block;
        }

    .leadership .ldr__arrow--prev svg {
        transform: rotate(180deg);
    }

    .leadership .ldr__arrow:hover {
        background: var(--bg-primary-strong);
        color: var(--title-inverse);
    }

    .leadership .ldr__arrow:disabled {
        opacity: 0.35;
        cursor: default;
    }

        .leadership .ldr__arrow:disabled:hover {
            background: var(--bg-default);
            color: var(--icon-default);
        }


/* ---------- 4. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .leadership .ldr__grid {
        transition: none;
    }
}


/* ---------- 5. Breakpoints ---------- */
@media (min-width: 1920px) {
    .leadership .ldr__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .leadership .ldr-modal__content {
        width: 1060px;
    }
}

@media (max-width: 1439.98px) {
    .leadership .ldr__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .leadership {
        gap: 48px;
    }

        .leadership .ldr-modal__container {
            max-height: calc(100vh - 40px);
            gap: 24px;
            max-width: 90%;
        }

        .leadership .ldr-modal__card {
            flex-direction: column;
            height: min(744px, calc(100vh - 136px));
        }

        .leadership .ldr-modal__media {
            order: -1;
            width: max-content;
            max-height: 180px;
            margin: 24px;
        }

        .leadership .ldr-modal__content {
            padding: 24px;
            justify-content: flex-start;
            width: 100%;
            height: 100%;
            min-height: 0;
        }

        .leadership .ldr-modal__name {
            font-size: 40px;
            line-height: 40px;
        }

        .leadership .ldr-modal__close {
            background: var(--bg-primary-strong);
            color: var(--title-inverse);
        }
}

@media (max-width: 991.98px) {
    /* desliga o grid; o tpc__track da biblioteca assume como flex */
    .leadership .ldr__grid {
        display: flex;
        gap: 24px;
    }

    .leadership .tpc__slide {
        flex: none;
        width: 280px;
    }

    .leadership .ldr__card {
        width: 100%;
    }

    .leadership .tpc__nav {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    .leadership {
        /*padding: 40px 20px;*/
        gap: 32px;
    }

        .leadership .ldr-modal__container {
            width: 100%;
        }

        .leadership .ldr-modal__name {
            font-size: 32px;
            line-height: 36px;
        }
}

@media (max-width: 767.98px) and (orientation: landscape) {

    .leadership .ldr-modal__card {
        flex-direction: row;
    }

    .leadership .ldr-modal__content {
        width: 50%;
        height: 100%;
        flex: 0 0 50%;
        min-width: 0;
        min-height: 0;
        padding: 24px;
    }

    .leadership .ldr-modal__media {
        order: 0;
        height: 100%;
        flex: 0 0 50%;
        max-height: none;
        margin: 0;
        padding: 0;
        display: block;
        position: relative;
    }

        .leadership .ldr-modal__media img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
        }

    .leadership .ldr-modal__close {
        top: 16px;
        right: 16px;
        z-index: 3;
        background: var(--bg-primary-strong);
        color: var(--title-inverse);
    }
}
