/* =====================================================================
   LEADERSHIP SECTION — Animated Testimonials Style (Stacked Images)
   FILE: leadership.css  |  VERSION: 5.2
   ===================================================================== */

/* ── Reset ── */
.rh-team-section,
.rh-team-section *,
.rh-team-section *::before,
.rh-team-section *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Accessibility helper ── */
.rh-team-section .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Section ── */
.rh-team-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 0;
    contain: layout style;
}

/* ── Content Wrapper ── */
.rh-team-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ══════════════════════════════════════════════
   HEADING AREA — Rotating Text
   ══════════════════════════════════════════════ */
.rh-team-heading {
    text-align: center;
    margin-bottom: 60px;
}

.rh-rotate-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: inherit;
    font-weight: inherit;
}

.rh-rotate-static {
    font-family: 'CompressaVF', 'Arial Black', Impact, sans-serif;
    font-size: clamp(42px, 6.5vw, 80px);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    color: #0a0a1a;
    letter-spacing: -0.02em;
}

.rh-rotate-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #00B4D8, #0077B6);
    border-radius: 12px;
    padding: 4px 16px 8px;
    min-width: 200px;
    height: clamp(50px, 7vw, 90px);
    position: relative;
    vertical-align: middle;
}

.rh-rotate-text {
    font-family: 'CompressaVF', 'Arial Black', Impact, sans-serif;
    font-size: clamp(42px, 6.5vw, 80px);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: -0.02em;
    display: inline-flex;
    overflow: hidden;
    position: relative;
    min-height: 1.1em;           /* Prevent CLS */
}

/* ── Character animation states ── */
.rh-rotate-char {
    display: inline-block;
    will-change: transform, opacity;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease;
}

.rh-rotate-char.rh-char-enter {
    transform: translateY(0);
    opacity: 1;
}

.rh-rotate-char.rh-char-exit {
    transform: translateY(-120%);
    opacity: 0;
}

.rh-rotate-char.rh-char-ready {
    transform: translateY(100%);
    opacity: 0;
}

.rh-rotate-space {
    display: inline-block;
    width: 0.3em;
}

.rh-team-subtitle {
    font-size: 1.05rem;
    color: rgba(10, 10, 26, 0.45);
    margin-top: 18px;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════
   MAIN LAYOUT — Grid
   ══════════════════════════════════════════════ */
.rh-team-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

/* ══════════════════════════════════════════════
   STACKED IMAGE AREA
   ══════════════════════════════════════════════ */
.rh-team-image-area {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 3 / 3.8;
    justify-self: end;
}

.rh-team-img-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.rh-team-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 20px;
    pointer-events: none;
    -webkit-user-drag: none;
    will-change: transform, opacity;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.5s ease;
    transform-origin: center center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08),
                0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Active image — on top, no rotation */
.rh-team-img.rh-img-active {
    z-index: 40;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Stacked behind — visible with random rotations set via JS */
.rh-team-img.rh-img-stacked {
    z-index: 30;
    opacity: 0.7;
}

.rh-team-img.rh-img-behind {
    z-index: 20;
    opacity: 0.4;
}

.rh-team-img.rh-img-far {
    z-index: 10;
    opacity: 0.15;
}

.rh-team-img.rh-img-hidden {
    z-index: 0;
    opacity: 0;
    transform: scale(0.9) rotate(0deg);
}

/* ══════════════════════════════════════════════
   INFO AREA — Right column
   ══════════════════════════════════════════════ */
.rh-team-info-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
    min-height: 260px;             /* Prevent CLS on text swap */
}

.rh-team-member-name {
    font-family: 'CompressaVF', 'Arial Black', Impact, sans-serif;
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 700;
    color: #0a0a1a;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.02em;
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s ease;
}

.rh-team-member-name.rh-text-active {
    transform: translateY(0);
    opacity: 1;
}

.rh-team-member-name.rh-text-exit {
    transform: translateY(-20px);
    opacity: 0;
}

.rh-team-member-role {
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    color: #0077B6;
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.03em;
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
                opacity 0.4s ease 0.08s;
}

.rh-team-member-role.rh-text-active {
    transform: translateY(0);
    opacity: 1;
}

.rh-team-member-role.rh-text-exit {
    transform: translateY(-15px);
    opacity: 0;
}

.rh-team-divider {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #00B4D8, transparent);
    margin: 22px 0;
    border-radius: 2px;
}

.rh-team-member-bio {
    font-size: 0.95rem;
    color: rgba(10, 10, 26, 0.5);
    line-height: 1.65;
    max-width: 380px;
    font-weight: 300;
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.14s,
                opacity 0.4s ease 0.14s;
}

.rh-team-member-bio.rh-text-active {
    transform: translateY(0);
    opacity: 1;
}

.rh-team-member-bio.rh-text-exit {
    transform: translateY(-12px);
    opacity: 0;
}

/* ══════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════ */
.rh-team-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 35px;
}

.rh-team-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 10, 26, 0.03);
    border: 1px solid rgba(10, 10, 26, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease,
                border-color 0.3s ease,
                transform 0.3s ease;
    flex-shrink: 0;
    outline: none;
}

.rh-team-arrow:focus-visible {
    outline: 2px solid #0077B6;
    outline-offset: 2px;
}

.rh-team-arrow:hover {
    border-color: rgba(0, 180, 216, 0.5);
    background: rgba(0, 180, 216, 0.08);
    transform: scale(1.06);
}

.rh-team-arrow:active {
    transform: scale(0.95);
}

.rh-team-arrow svg {
    width: 18px;
    height: 18px;
    stroke: rgba(10, 10, 26, 0.4);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

.rh-team-arrow:hover svg {
    stroke: #0077B6;
}

.rh-team-counter {
    font-size: 0.85rem;
    color: rgba(10, 10, 26, 0.25);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    min-width: 50px;
    text-align: center;
}

.rh-team-counter-current {
    color: #0a0a1a;
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   IMAGE PROTECTION
   ══════════════════════════════════════════════ */
.rh-team-section img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .rh-team-inner {
        padding: 0 30px;
    }

    .rh-team-showcase {
        gap: 40px;
    }

    .rh-team-image-area {
        max-width: 300px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .rh-team-section {
        padding: 60px 0;
    }

    .rh-team-heading {
        margin-bottom: 45px;
    }

    .rh-team-showcase {
        grid-template-columns: 1fr;
        gap: 35px;
        max-width: 380px;
        margin: 0 auto;
    }

    .rh-team-image-area {
        max-width: 320px;
        justify-self: center;
    }

    .rh-team-info-area {
        text-align: center;
        align-items: center;
        padding: 0;
        min-height: auto;
    }

    .rh-team-divider {
        margin: 18px auto;
    }

    .rh-team-member-bio {
        max-width: 100%;
        text-align: center;
    }

    .rh-team-nav {
        justify-content: center;
        margin-top: 28px;
    }

    .rh-team-subtitle {
        font-size: 1rem;
    }

    .rh-rotate-box {
        min-width: 160px;
        padding: 3px 12px 6px;
    }
}

@media (max-width: 600px) {
    .rh-team-section {
        padding: 50px 0;
    }

    .rh-team-inner {
        padding: 0 18px;
    }

    .rh-team-heading {
        margin-bottom: 35px;
    }

    .rh-rotate-static {
        font-size: clamp(34px, 10vw, 46px);
    }

    .rh-rotate-text {
        font-size: clamp(34px, 10vw, 46px);
    }

    .rh-rotate-box {
        height: clamp(42px, 11vw, 54px);
        border-radius: 8px;
        min-width: 120px;
        padding: 2px 10px 5px;
    }

    .rh-team-showcase {
        max-width: 320px;
    }

    .rh-team-image-area {
        max-width: 280px;
    }

    .rh-team-img {
        border-radius: 16px;
    }

    .rh-team-arrow {
        width: 40px;
        height: 40px;
    }

    .rh-team-arrow svg {
        width: 16px;
        height: 16px;
    }

    .rh-team-member-bio {
        font-size: 0.88rem;
    }
}

@media (max-width: 400px) {
    .rh-team-showcase {
        max-width: 280px;
    }

    .rh-team-image-area {
        max-width: 250px;
    }

    .rh-team-img {
        border-radius: 14px;
    }

    .rh-rotate-static {
        font-size: 30px;
    }

    .rh-rotate-text {
        font-size: 30px;
    }

    .rh-rotate-box {
        height: 38px;
        min-width: 100px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .rh-rotate-char,
    .rh-team-img,
    .rh-team-member-name,
    .rh-team-member-role,
    .rh-team-member-bio,
    .rh-team-arrow {
        transition-duration: 0.01ms !important;
    }
}