/**
 * Key Person Section Block Styles
 * Based on Figma Design Specifications
 */

/* ============================================
   FORCE FULL-WIDTH DISPLAY
   ============================================ */

.wp-block-mawconsultant-key-person-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: relative;
}

/* ============================================
   KEY PERSON SECTION BASE STYLES
   ============================================ */

.key-person-section {
    position: relative;
    width: 100%;
    min-height: 936px;
    background-color: var(--color-background);
    padding-block: 128px;
    padding-inline: var(--container-padding-x);
    margin: 0 !important;
}

.key-person-section__container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

/* ============================================
   IMAGE COLUMN
   ============================================ */

.key-person-section__image-wrapper {
    width: 544px;
    height: 680px;
    overflow: hidden;
    flex-shrink: 0;
}

.key-person-section__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.key-person-section__image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 16px;
}

/* ============================================
   CONTENT COLUMN
   ============================================ */

.key-person-section__content {
    padding-top: 80px;
    flex-grow: 1;
}

/* Label */
.key-person-section__label {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: var(--color-chart-3);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0;
}

/* Heading */
.key-person-section__heading {
    font-family: 'Gambetta', Georgia, serif;
    font-size: 48px;
    font-weight: 500;
    line-height: 56px;
    letter-spacing: -0.96px;
    /* -2% of 48px */
    color: var(--color-accent-foreground);
    margin: 0 0 56px 0;
    max-width: 515px;
}

/* Person Name */
.key-person-section__name {
    font-family: 'Gambetta', Georgia, serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 38px;
    letter-spacing: 0;
    color: var(--color-secondary-foreground);
    margin: 0 0 8px 0;
}

/* Person Title */
.key-person-section__title {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0;
    color: var(--color-muted-foreground);
    margin: 0 0 48px 0;
    text-transform: uppercase;
}

/* Biography */
.key-person-section__bio {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
    color: var(--color-secondary-foreground);
    margin: 0 0 24px 0;
    max-width: 541px;
}

.key-person-section__bio:last-of-type {
    margin-bottom: 0;
}

/* ============================================
   EDITOR PREVIEW STYLES
   ============================================ */

.key-person-section-editor {
    background: #f5f5f5;
    padding: 40px;
    border: 1px solid #ddd;
}

.key-person-section-preview {
    background: #ffffff;
    padding: 40px;
    border-radius: 4px;
}

.key-person-section-preview__container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
}

.key-person-section-preview__image {
    width: 200px;
    height: 250px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    overflow: hidden;
}

.key-person-section-preview__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.key-person-section-preview__content {
    display: flex;
    flex-direction: column;
}

.key-person-section-preview__label {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #007AFF;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.key-person-section-preview__heading {
    font-family: 'Gambetta', Georgia, serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 16px;
}

.key-person-section-preview__name {
    font-family: 'Gambetta', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.key-person-section-preview__title {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #757575;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.key-person-section-preview__bio {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin: 0 0 12px 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .key-person-section {
        padding-block: 100px;
    }

    .key-person-section__container {
        grid-template-columns: 480px 1fr;
        gap: 48px;
    }

    .key-person-section__image-wrapper {
        width: 480px;
        height: 600px;
    }
}

@media (max-width: 1024px) {
    .key-person-section {
        padding-block: 80px;
    }

    .key-person-section__container {
        grid-template-columns: 416px 1fr;
        gap: 64px;
    }

    .key-person-section__image-wrapper {
        width: 416px;
        height: 520px;
    }

    .key-person-section__heading {
        font-size: 48px;
        line-height: 56px;
        letter-spacing: -0.02em;
    }

    .key-person-section__name {
        font-size: 30px;
        line-height: 38px;
    }

    .key-person-section__description {
        font-size: 16px;
        line-height: 24px;
    }
}

@media (max-width: 768px) {
    .key-person-section {
        padding-block: 60px;
        min-height: auto;
    }

    .key-person-section__container {
        flex-direction: column;
        gap: 40px;
    }

    .key-person-section__image-wrapper {
        width: 50%;
        max-width: 100%;
        height: 400px;
        order: 2;
    }

    .key-person-section__content {
        padding-top: 0;
        order: 1;
    }

    .key-person-section__heading {
        font-size: 32px;
        line-height: 40px;
    }

    .key-person-section__name {
        font-size: 24px;
        line-height: 32px;
    }
}

@media (max-width: 480px) {
    .key-person-section {
        padding-block: 40px;
        padding-inline: 16px;
        min-height: auto;
    }

    .key-person-section__container {
        flex-direction: column;
        gap: 32px;
    }

    .key-person-section__image-wrapper {
        width: 80%;
        order: 2;
    }

    .key-person-section__content {
        order: 1;
    }

    .key-person-section__label {
        font-size: 12px;
        line-height: 18px;
        margin-bottom: 12px;
    }

    .key-person-section__heading {
        margin-bottom: 32px;
    }

    .key-person-section__name {
        margin-bottom: 6px;
    }

    .key-person-section__title {
        font-size: 12px;
        line-height: 18px;
        margin-bottom: 32px;
    }

    .key-person-section__bio {
        margin-bottom: 16px;
    }
}

/* ============================================
   SCROLL-TRIGGERED ENTRANCE ANIMATIONS
   JS adds .is-visible to [data-animate] elements
   when section reaches 10% viewport visibility.
   ============================================ */

/* --- Base: all animatable elements start invisible (fade up) --- */
.key-person-section [data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

/* --- Variant: image slides in from the left --- */
.key-person-section [data-animate][data-animate-from="left"] {
    transform: translateX(-48px);
}

/* --- Visible state triggered by JS --- */
.key-person-section [data-animate].is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Respect reduced-motion preference --- */
@media (prefers-reduced-motion: reduce) {
    .key-person-section [data-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}