/* ==========================================================================
   Afluex company pages (About Us, Key Members) — page-specific layouts.
   Loaded after assets/css/afluex.css by those pages only.
   ========================================================================== */

/* ---------------------------------------------------- hero photo stack */

.pstack {
    position: relative;
    width: 100%;
    max-width: 560px;
    justify-self: center;
    perspective: 1400px;
}

.pstack__deck {
    position: relative;
    aspect-ratio: 870 / 700;
    transform-style: preserve-3d;
}

.pstack__card {
    position: absolute;
    inset: 0 0 auto 0;
    margin: 0;
    padding: 8px;
    border-radius: 22px;
    border: 1px solid var(--line-2);
    background: linear-gradient(160deg, rgba(16, 30, 42, 0.98), rgba(7, 14, 21, 0.98));
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95), 0 0 50px -24px rgba(107, 199, 209, 0.45);
    transition: transform 0.9s var(--ease), opacity 0.9s, filter 0.9s;
}

.pstack__card img {
    width: 100%;
    aspect-ratio: 870 / 630;
    object-fit: cover;
    border-radius: 15px;
}

/* static (no-JS) arrangement: a gentle fan */
.pstack__card:nth-child(1) {
    z-index: 4;
}

.pstack__card:nth-child(2) {
    transform: translate3d(5%, -5%, -60px) rotate(3deg);
    z-index: 3;
}

.pstack__card:nth-child(3) {
    transform: translate3d(-5%, -9%, -120px) rotate(-4deg);
    z-index: 2;
}

.pstack__card:nth-child(n+4) {
    transform: translate3d(0, -12%, -180px);
    opacity: 0;
    z-index: 1;
}

.pstack.is-live .pstack__card[data-depth="0"] {
    transform: translate3d(0, 0, 0) rotateY(-6deg) rotateX(3deg);
    opacity: 1;
    filter: none;
    z-index: 4;
}

.pstack.is-live .pstack__card[data-depth="1"] {
    transform: translate3d(6%, -6%, -70px) rotate(3deg);
    opacity: 0.85;
    filter: saturate(0.6) brightness(0.8);
    z-index: 3;
}

.pstack.is-live .pstack__card[data-depth="2"] {
    transform: translate3d(-6%, -10%, -140px) rotate(-4deg);
    opacity: 0.6;
    filter: saturate(0.4) brightness(0.65);
    z-index: 2;
}

.pstack.is-live .pstack__card:not([data-depth="0"]):not([data-depth="1"]):not([data-depth="2"]) {
    transform: translate3d(0, -14%, -200px);
    opacity: 0;
    z-index: 1;
}

.pstack__bar {
    position: relative;
    z-index: 5;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pstack__bar p {
    font-size: 13.5px;
    color: var(--text-3);
}

.pstack__nav {
    display: none;
    gap: 8px;
}

.pstack.is-live .pstack__nav {
    display: flex;
}

.pstack__nav button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: rgba(4, 8, 12, 0.6);
    color: var(--text);
    transition: border-color 0.2s;
}

.pstack__nav button:hover {
    border-color: var(--aqua);
}

.pstack__badge {
    position: absolute;
    left: -4%;
    bottom: 22%;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: rgba(9, 18, 27, 0.92);
    box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.pstack__badge img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.pstack__badge small {
    display: block;
    font-weight: 400;
    font-size: 11.5px;
    color: var(--text-3);
}

/* -------------------------------------------- vision / mission / innovation */

.compass {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    counter-reset: c;
}

.compass .card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.compass__media {
    position: relative;
    aspect-ratio: 630 / 288;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(107, 199, 209, 0.12), #050b10 70%);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.compass__media img {
    max-height: 100%;
    width: auto;
    transition: transform 0.8s var(--ease);
}

.compass .card:hover .compass__media img {
    transform: scale(1.06);
}

/* slow scanning ring behind each illustration */
.compass__media::before {
    content: "";
    position: absolute;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px dashed rgba(156, 240, 246, 0.2);
    animation: c-spin 40s linear infinite;
}

@keyframes c-spin {
    to {
        transform: rotate(360deg);
    }
}

.compass__body {
    padding: 22px 24px 26px;
}

.compass__body h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.compass__body h3::before {
    counter-increment: c;
    content: "0" counter(c);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--aqua);
}

/* ---------------------------------------------------- what we do best */

.dobest [role="tablist"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.dobest [role="tab"] {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--glass);
    color: var(--text-2);
    font-weight: 600;
    transition: border-color 0.25s, background-color 0.25s, color 0.25s;
}

.dobest [role="tab"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-2);
    transition: background-color 0.25s, box-shadow 0.25s;
}

.dobest [role="tab"][aria-selected="true"] {
    color: var(--text);
    border-color: var(--aqua);
    background: rgba(107, 199, 209, 0.12);
}

.dobest [role="tab"][aria-selected="true"]::before {
    background: var(--aqua);
    box-shadow: 0 0 10px var(--aqua);
}

.dobest__panel {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(20px, 4vw, 56px);
    align-items: center;
    padding: clamp(18px, 3vw, 36px);
}

.dobest__panel[hidden] {
    display: none;
}

.dobest__media {
    position: relative;
    border-radius: var(--r-lg);
    background: radial-gradient(circle at 50% 45%, rgba(107, 199, 209, 0.16), #050b10 70%);
    border: 1px solid var(--line);
    overflow: hidden;
}

.dobest__media img {
    width: 100%;
    animation: float-y 7s ease-in-out infinite;
}

@keyframes float-y {
    50% {
        transform: translateY(-8px);
    }
}

.dobest__panel h3 {
    font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.9rem);
    margin-bottom: 12px;
}

.dobest__panel .checks {
    margin-top: 20px;
}

.dobest__refs {
    margin-top: 20px;
    display: grid;
    gap: 8px;
}

.dobest__refs li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--glass);
    font-size: 14.5px;
}

.dobest__refs img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
}

.dobest__refs strong {
    color: var(--text);
}

.dobest__refs li.is-more {
    color: var(--aqua);
    font-weight: 600;
}

html:not(.enhanced) .dobest [role="tablist"] {
    display: none;
}

html:not(.enhanced) .dobest__panel[hidden] {
    display: grid;
    margin-top: 16px;
}

/* ---------------------------------------------------------- who we are */

.whoweare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
}

.traits {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.trait {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
}

.trait img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
}

.trait strong {
    display: block;
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.3;
}

.trait small {
    font-size: 13px;
    color: var(--text-3);
}

/* team photo mosaic */
.mosaic {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: clamp(70px, 8vw, 110px);
    gap: 10px;
}

.mosaic figure {
    --drift: 0px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: #050b10;
    transform: translateY(var(--drift));
}

.mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease), filter 0.5s;
    filter: saturate(0.85);
}

.mosaic figure:hover img {
    transform: scale(1.05);
    filter: none;
}

.mosaic figure:nth-child(1) {
    grid-column: 1 / 5;
    grid-row: span 3;
}

.mosaic figure:nth-child(2) {
    grid-column: 5 / 7;
    grid-row: span 2;
}

.mosaic figure:nth-child(3) {
    grid-column: 5 / 7;
    grid-row: span 2;
}

.mosaic figure:nth-child(4) {
    grid-column: 1 / 3;
    grid-row: span 2;
}

.mosaic figure:nth-child(5) {
    grid-column: 3 / 5;
    grid-row: span 2;
}

.mosaic figure:nth-child(6) {
    grid-column: 5 / 7;
    grid-row: span 1;
}

.mosaic--wide {
    grid-auto-rows: clamp(80px, 9vw, 130px);
}

/* --------------------------------------------------------------- leaders */

.minds {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 380px));
    justify-content: center;
    gap: 18px;
}

.mind {
    position: relative;
    padding: 30px 28px;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 6px;
    overflow: hidden;
}

.mind__ring {
    position: relative;
    width: 186px;
    height: 186px;
    margin-bottom: 12px;
    display: grid;
    place-items: center;
}

.mind__ring::before,
.mind__ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--line-2);
}

.mind__ring::after {
    inset: -10px;
    border: 1px dashed rgba(156, 240, 246, 0.35);
    animation: c-spin 24s linear infinite;
}

.mind .avatar-initials {
    width: 176px;
    height: 176px;
    font-size: 28px;
    background: radial-gradient(circle at 30% 25%, rgba(156, 240, 246, 0.45), rgba(63, 144, 181, 0.2) 70%);
}

.mind h3 {
    font-size: 1.3rem;
}

.mind p {
    color: var(--aqua);
    font-size: 14.5px;
}

.minds__more {
    margin-top: 22px;
    text-align: center;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {

    .compass {
        grid-template-columns: minmax(0, 1fr);
        max-width: 560px;
        margin-inline: auto;
    }

    .dobest__panel,
    .whoweare {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {

    .traits {
        grid-template-columns: minmax(0, 1fr);
    }

    .minds {
        grid-template-columns: minmax(0, 1fr);
    }

    .mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 120px;
    }

    .mosaic figure:nth-child(n) {
        grid-column: auto;
        grid-row: span 1;
    }

    .mosaic figure:nth-child(1) {
        grid-column: 1 / -1;
        grid-row: span 2;
    }

    .pstack__badge {
        left: 0;
        bottom: 26%;
        font-size: 12px;
    }

    .dobest [role="tab"] {
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px;
    }
}

/* ---------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {

    .pstack__card,
    .compass__media img,
    .mosaic img {
        transition: none;
    }

    .compass__media::before,
    .mind__ring::after,
    .dobest__media img {
        animation: none;
    }

    .mosaic figure {
        transform: none;
    }
}

.dobest__panel .label {
    display: block;
    margin-bottom: 10px;
    color: var(--aqua);
    line-height: 1.5;
}

.trait small {
    display: block;
    margin-top: 2px;
    line-height: 1.4;
}

/* keep the rotated back photos inside narrow screens */
@media (max-width: 640px) {
    .pstack__deck {
        margin-inline: 5%;
    }
}

@media (max-width: 640px) {
    .mosaic figure:nth-child(6) {
        grid-column: 1 / -1;
    }
}



/* our keymemberes start  */
/* =====================================
       TEAM SECTION
    ===================================== */

/* =====================================
   TEAM SECTION
===================================== */

.af-team-section {
    width: 100%;
    padding: 80px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

    .af-team-section *,
    .af-team-section *::before,
    .af-team-section *::after {
        box-sizing: border-box;
    }

    .af-team-section .af-team-container {
        width: 100%;
        max-width: 1240px;
        margin: 0 auto;
    }

    /* =====================================
   RESPONSIVE GRID
===================================== */

    .af-team-section .team-grid {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 28px 22px;
        align-items: start;
        justify-items: center;
    }

/* =====================================
   CENTER INCOMPLETE LAST ROW
===================================== */

/* Last row has 3 cards */
@media (min-width: 992px) {

    .af-team-section .team-grid:has( > .team-card:nth-child(4n + 1):last-child ) {
        /* Four cards in the final row: keep original layout */
        justify-items: center;
    }

    /* Exactly 3 cards in the final row */
    .af-team-section .team-grid:has( > .team-card:nth-child(4n + 1):nth-last-child(3) ) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

        .af-team-section .team-grid:has( > .team-card:nth-child(4n + 1):nth-last-child(3) ) > .team-card:nth-child(4n + 1):nth-last-child(3) {
            grid-column: 1 / 2;
            transform: translateX(50%);
        }

        .af-team-section .team-grid:has( > .team-card:nth-child(4n + 1):nth-last-child(3) ) > .team-card:nth-child(4n + 2):nth-last-child(2) {
            grid-column: 2 / 3;
            transform: translateX(50%);
        }

        .af-team-section .team-grid:has( > .team-card:nth-child(4n + 1):nth-last-child(3) ) > .team-card:nth-child(4n + 3):last-child {
            grid-column: 3 / 4;
            transform: translateX(50%);
        }
}

/* =====================================
   TEAM CARD - ORIGINAL OVAL SHAPE
===================================== */

.af-team-section .team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: center;
    width: 100%;
    min-width: 0;
    padding: 35px 18px 0;
    text-align: center;
    border-radius: 999px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.07);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .af-team-section .team-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 32px rgba(30, 41, 59, 0.13);
    }

    .af-team-section .team-card.type-offset {
        margin-top: 55px;
    }

/* =====================================
   DIFFERENT CARD COLORS
===================================== */

.af-team-section .card-pink {
    background-color: #FCE7F0;
}

.af-team-section .card-blue {
    background-color: #E0F2FE;
}

.af-team-section .card-beige {
    background-color: #F5EBDD;
}

.af-team-section .card-purple {
    background-color: #EDE9FE;
}

.af-team-section .card-green {
    background-color: #DCFCE7;
}

.af-team-section .card-orange {
    background-color: #FFEDD5;
}

.af-team-section .card-sky {
    background-color: #CFFAFE;
}

.af-team-section .card-lavender {
    background-color: #F3E8FF;
}

.af-team-section .card-yellow {
    background-color: #FEF3C7;
}

.af-team-section .card-coral {
    background-color: #FFE4E6;
}

.af-team-section .card-teal {
    background-color: #CCFBF1;
}

/* =====================================
   NAME AND ROLE CONTENT
===================================== */

.af-team-section .card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 120px;
    gap: 9px;
    margin: 0 0 12px;
    padding: 10px 0 0;
}

/* NAME PILL */

.af-team-section .member-name {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 9px 15px;
    border-radius: 50px;
    color: #172033;
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

/* ROLE PILL */

.af-team-section .member-role {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 7px 14px;
    border-radius: 50px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* =====================================
   MEMBER IMAGE
===================================== */

.af-team-section .image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    max-width: 245px;
    aspect-ratio: 0.82 / 1;
    margin-top: auto;
    overflow: hidden;
}

    .af-team-section .image-wrapper img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        filter: grayscale(100%) contrast(105%);
        mix-blend-mode: multiply;
        transition: transform 0.5s ease, filter 0.5s ease;
    }

.af-team-section .team-card:hover .image-wrapper img {
    transform: scale(1.04);
    filter: grayscale(0%) contrast(100%);
}

/* =====================================
   LAPTOP
===================================== */

@media (max-width: 1199px) {
    .af-team-section {
        padding: 70px 20px;
    }

        .af-team-section .team-grid {
            gap: 25px 18px;
        }

        .af-team-section .team-card {
            padding: 30px 14px 0;
        }

            .af-team-section .team-card.type-offset {
                margin-top: 45px;
            }

        .af-team-section .card-content {
            min-height: 115px;
        }

        .af-team-section .member-name {
            font-size: 15px;
            padding: 8px 12px;
        }

        .af-team-section .member-role {
            font-size: 12px;
            padding: 6px 11px;
        }
}

/* =====================================
   TABLET
===================================== */

@media (max-width: 991px) {
    .af-team-section {
        padding: 60px 24px;
    }

        .af-team-section .team-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 30px 24px;
            max-width: 720px;
            margin: 0 auto;
            justify-items: center;
        }

        .af-team-section .team-card {
            width: 100%;
            max-width: 330px;
            justify-self: center;
            padding: 35px 22px 0;
        }

            .af-team-section .team-card.type-offset {
                margin-top: 25px;
            }

        .af-team-section .card-content {
            min-height: 110px;
        }

        .af-team-section .member-name {
            font-size: 16px;
            padding: 9px 14px;
        }

        .af-team-section .member-role {
            font-size: 13px;
        }

        .af-team-section .image-wrapper {
            max-width: 250px;
        }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 575px) {
    .af-team-section {
        padding: 45px 16px;
    }

        .af-team-section .team-grid {
            grid-template-columns: minmax(0, 1fr);
            max-width: 340px;
            gap: 28px;
            margin: 0 auto;
            justify-items: center;
        }

        .af-team-section .team-card {
            width: 100%;
            max-width: 320px;
            justify-self: center;
            padding: 35px 25px 0;
            border-radius: 999px;
        }

            .af-team-section .team-card.type-offset {
                margin-top: 0;
            }

        .af-team-section .card-content {
            min-height: 105px;
            gap: 9px;
            padding-top: 8px;
            margin-bottom: 10px;
        }

        .af-team-section .member-name {
            font-size: 17px;
            padding: 8px 14px;
        }

        .af-team-section .member-role {
            font-size: 13px;
            padding: 6px 12px;
        }

        .af-team-section .image-wrapper {
            max-width: 240px;
        }
}

/* =====================================
   VERY SMALL MOBILE
===================================== */

@media (max-width: 380px) {
    .af-team-section {
        padding: 35px 12px;
    }

        .af-team-section .team-grid {
            gap: 24px;
        }

        .af-team-section .team-card {
            max-width: 290px;
            padding: 30px 20px 0;
            border-radius: 999px;
        }

        .af-team-section .card-content {
            min-height: 100px;
            gap: 8px;
        }

        .af-team-section .member-name {
            font-size: 15px;
            padding: 8px 12px;
        }

        .af-team-section .member-role {
            font-size: 12px;
            padding: 6px 10px; 
        }
}

/* =====================================
   ACCESSIBILITY
===================================== */

@media (prefers-reduced-motion: reduce) {
    .af-team-section .team-card,
    .af-team-section .image-wrapper img {
        transition: none;
    }

        .af-team-section .team-card:hover {
            transform: none;
        }
}
/* our keymemberes end */