:root {
    --afce-modal-navy: #10284f;
    --afce-modal-teal: #06aa9b;
    --afce-modal-text: #202634;
    --afce-modal-muted: #6d7480;
    --afce-modal-border: #e8ebef;
    --afce-modal-bg: #ffffff;
}

body.afce-ejecutivo-modal-open {
    overflow: hidden;
}

.afce-ejecutivo-overlay[hidden] {
    display: none !important;
}

.afce-ejecutivo-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 28px;
}

.afce-ejecutivo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 23, 50, 0.76);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.afce-ejecutivo-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    max-height: min(86vh, 820px);
    overflow: hidden;
    background: var(--afce-modal-bg);
    border-radius: 4px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    outline: none;
}

.afce-ejecutivo-modal__close {
    position: absolute;
    z-index: 4;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(16, 40, 79, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: var(--afce-modal-navy);
    font: inherit;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.afce-ejecutivo-modal__close:hover,
.afce-ejecutivo-modal__close:focus-visible {
    transform: rotate(4deg) scale(1.04);
    background: var(--afce-modal-navy);
    color: #fff;
    outline: none;
}

.afce-ejecutivo-modal__loading,
.afce-ejecutivo-modal__error {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    padding: 72px 32px;
    text-align: center;
    color: var(--afce-modal-navy);
}

.afce-ejecutivo-modal__loading[hidden],
.afce-ejecutivo-modal__error[hidden],
.afce-ejecutivo-modal__profile[hidden] {
    display: none !important;
}

.afce-ejecutivo-modal__spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(6, 170, 155, 0.22);
    border-top-color: var(--afce-modal-teal);
    border-radius: 50%;
    animation: afce-modal-spin 750ms linear infinite;
}

@keyframes afce-modal-spin {
    to { transform: rotate(360deg); }
}

.afce-ejecutivo-modal__fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid var(--afce-modal-teal);
    border-radius: 3px;
    color: var(--afce-modal-navy);
    text-decoration: none;
    font-weight: 700;
}

.afce-ejecutivo-modal__profile {
    display: grid;
    grid-template-columns: minmax(320px, 39%) minmax(0, 1fr);
    min-height: 590px;
    max-height: min(86vh, 820px);
}

.afce-ejecutivo-modal__profile--no-image {
    grid-template-columns: 1fr;
}

.afce-ejecutivo-modal__media {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: #eef2f5;
}

.afce-ejecutivo-modal__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(16, 40, 79, 0.26), transparent);
    pointer-events: none;
}

.afce-ejecutivo-modal__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 590px;
    object-fit: cover;
    object-position: center top;
}

.afce-ejecutivo-modal__body {
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 64px 64px 56px;
    scrollbar-width: thin;
}

.afce-ejecutivo-modal__eyebrow {
    margin: 0 0 10px;
    color: var(--afce-modal-teal);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.afce-ejecutivo-modal__title {
    margin: 0;
    color: var(--afce-modal-navy);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
}

.afce-ejecutivo-modal__cargo {
    margin: 12px 0 0;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--afce-modal-teal);
    color: var(--afce-modal-teal);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.afce-ejecutivo-modal__content {
    margin-top: 28px;
    color: var(--afce-modal-text);
    font-size: 16px;
    line-height: 1.75;
}

.afce-ejecutivo-modal__content > :first-child {
    margin-top: 0;
}

.afce-ejecutivo-modal__content > :last-child {
    margin-bottom: 0;
}

.afce-ejecutivo-modal__content p,
.afce-ejecutivo-modal__content ul,
.afce-ejecutivo-modal__content ol {
    margin: 0 0 1.15em;
}

.afce-ejecutivo-modal__content a {
    color: var(--afce-modal-teal);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 767px) {
    .afce-ejecutivo-overlay {
        padding: 0;
        place-items: stretch;
    }

    .afce-ejecutivo-modal__dialog {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        overflow-y: auto;
    }

    .afce-ejecutivo-modal__close {
        position: fixed;
        top: max(14px, env(safe-area-inset-top));
        right: 14px;
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
    }

    .afce-ejecutivo-modal__profile {
        display: block;
        min-height: 100%;
        max-height: none;
    }

    .afce-ejecutivo-modal__media {
        min-height: auto;
        height: min(58vh, 520px);
    }

    .afce-ejecutivo-modal__image {
        min-height: 0;
        height: 100%;
    }

    .afce-ejecutivo-modal__body {
        overflow: visible;
        padding: 36px 24px calc(42px + env(safe-area-inset-bottom));
    }

    .afce-ejecutivo-modal__title {
        font-size: 34px;
    }

    .afce-ejecutivo-modal__cargo {
        font-size: 17px;
    }

    .afce-ejecutivo-modal__content {
        font-size: 15px;
        line-height: 1.68;
    }
}

@media (prefers-reduced-motion: reduce) {
    .afce-ejecutivo-modal__spinner {
        animation-duration: 1.5s;
    }

    .afce-ejecutivo-modal__close {
        transition: none;
    }
}
