/* WHO ARE WE SECTION - MATCHING THEME STANDARDS */

.who-are-we {
    /* Default to theme colors for automatic dark mode support */
    --who-bg: var(--color-bg);
    --who-text: var(--color-text);
    --who-accent: var(--color-accent);

    background-color: var(--who-bg);
    color: var(--who-text);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 80px 0; /* Base padding for the section */
}

.who-are-we__inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    gap: 80px;
    z-index: 2;
    position: relative;
}

.who-are-we--split-right .who-are-we__inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .who-are-we--split-left .who-are-we__inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .who-are-we--split-right .who-are-we__inner {
    flex-direction: row;
}

/* Full Width Layout */
.who-are-we--full {
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.who-are-we--full .who-are-we__inner {
    justify-content: center;
    max-width: 800px;
}

.who-are-we--full .who-are-we__content {
    color: #ffffff;
}

/* Media / Image Logic */
.who-are-we__media {
    flex: 1;
    min-width: 0;
    position: relative;
}

.who-are-we__image-group {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.who-are-we--split-left .who-are-we__image-group { margin-right: 0; margin-left: auto; }
.who-are-we--split-right .who-are-we__image-group { margin-left: 0; margin-right: auto; }

[dir="rtl"] .who-are-we--split-left .who-are-we__image-group { margin-left: 0; margin-right: auto; }
[dir="rtl"] .who-are-we--split-right .who-are-we__image-group { margin-right: 0; margin-left: auto; }

.who-are-we__image-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Main image: natural dimensions, capped by column width (no forced aspect box) */
.who-are-we__image-wrapper--main {
    width: fit-content;
    max-width: 100%;
    height: auto;
}

/* Empty state: keep a stable preview area */
.who-are-we__image-wrapper--main:has(.who-are-we__placeholder) {
    width: 100%;
    aspect-ratio: 4 / 5;
}

.who-are-we__image-wrapper--secondary {
    position: absolute;
    bottom: -40px;
    width: 45%;
    max-width: 200px; /* Reduced max-width for better balance */
    aspect-ratio: 1/1;
    border: 8px solid var(--who-bg);
    z-index: 1;
    box-shadow: var(--shadow-xl);
}

/* Secondary Image Alignment Classes */
.who-are-we__secondary--left {
    left: -40px;
    right: auto;
}

.who-are-we__secondary--right {
    right: -40px;
    left: auto;
}

.who-are-we__secondary--center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

/* RTL Support for Secondary Image Alignment */
[dir="rtl"] .who-are-we__secondary--left {
    left: auto;
    right: -40px;
}

[dir="rtl"] .who-are-we__secondary--right {
    right: auto;
    left: -40px;
}

[dir="rtl"] .who-are-we__secondary--center {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.who-are-we__image-wrapper--main .who-are-we__image {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.who-are-we__image-wrapper--secondary .who-are-we__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.who-are-we__placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-surface);
}

/* Content Logic */
.who-are-we__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex overflow */
}

.who-are-we__content-inner {
    max-width: 650px;
}

.who-are-we--full .who-are-we__content-inner {
    margin: 0 auto;
}

.who-are-we__subtitle {
    display: block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--who-accent);
    margin-bottom: 16px;
}

.who-are-we__title {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: inherit;
}

.who-are-we__description {
    font-size: var(--fs-lg);
    line-height: 1.7;
    margin-bottom: 32px;
    opacity: 0.85;
    overflow-wrap: anywhere; /* Ensure long words break */
    white-space: normal;
}

.who-are-we__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 40px;
}

.who-are-we--full .who-are-we__highlights {
    justify-content: center;
}

.who-are-we__highlight {
    display: flex;
    align-items: center;
    gap: 12px;
}

.who-are-we__highlight-icon {
    width: 20px;
    height: 20px;
    color: var(--who-accent);
    flex-shrink: 0;
}

.who-are-we--full .who-are-we__highlight-icon {
    color: #ffffff;
}

.who-are-we__highlight-label {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
}

.who-are-we__actions {
    display: flex;
    gap: 16px;
}

.who-are-we--full .who-are-we__actions {
    justify-content: center;
}

/* Ensure button looks correct */
.who-are-we__button {
    /* Standard btn classes from theme handles most of this */
}


.who-are-we__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .who-are-we__inner {
        flex-direction: column !important;
        gap: 60px;
        padding-top: var(--spacing-md) !important;
        padding-bottom: var(--spacing-md) !important;
        padding-left: var(--container-padding);
        padding-right: var(--container-padding);
    }

    .who-are-we__media,
    .who-are-we__content {
        flex: 1 1 100%;
        width: 100%;
    }

    .who-are-we__media {
        max-width: 500px;
        margin: 0 auto;
    }

    .who-are-we__content {
        text-align: center;
        align-items: center;
    }

    .who-are-we__content-inner {
        max-width: 100%;
    }

    .who-are-we__highlights {
        justify-content: center;
    }

    .who-are-we__actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .who-are-we__title {
        font-size: 2rem;
    }
    
    .who-are-we__image-wrapper--secondary {
        width: 45%;
        bottom: -30px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
    
    [dir="rtl"] .who-are-we__image-wrapper--secondary {
        left: auto !important;
        right: 50% !important;
        transform: translateX(50%) !important;
    }
}
