
/* =========================================
   HEXNIVO — TEAM PAGE
   Theme: Royal Blue, White & Ice
========================================= */

.team-page {
    overflow: hidden;
}

.team-page section {
    position: relative;
}

/* =========================================
   TEAM HERO
========================================= */

.team-hero {
    min-height: 560px;
    padding: 95px 0 75px;
    display: flex;
    align-items: center;
    color: #ffffff;
    text-align: center;

    background:
        radial-gradient(circle at 15% 20%, rgba(96, 165, 250, .25), transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(147, 197, 253, .22), transparent 30%),
        linear-gradient(135deg, #172554 0%, #1d4ed8 52%, #3b82f6 100%);
}

.team-hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.team-hero .eyebrow {
    display: inline-block;
    padding: 9px 17px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50px;
    color: #dbeafe;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.team-hero h1 {
    margin: 25px 0 20px;
    color: #ffffff;
    font-size: clamp(38px, 5.5vw, 66px);
    line-height: 1.13;
    letter-spacing: -2px;
}

.team-hero .gradient-text {
    color: #bfdbfe;
    background: linear-gradient(90deg, #eff6ff, #bfdbfe, #93c5fd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.team-hero-content > p {
    max-width: 640px;
    margin: 0 auto 30px;
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.9;
}

.team-hero .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.team-hero-stats {
    display: flex;
    justify-content: center;
    gap: 65px;
    margin-top: 55px;
}

.team-hero-stats div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.team-hero-stats strong {
    color: #ffffff;
    font-size: 27px;
    font-weight: 800;
}

.team-hero-stats span {
    color: #dbeafe;
    font-size: 12px;
    letter-spacing: .5px;
}

.team-hero-decoration {
    position: absolute;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    pointer-events: none;
}

.decoration-one {
    top: -110px;
    left: -70px;
    box-shadow: 0 0 0 35px rgba(255, 255, 255, .025);
}

.decoration-two {
    right: -100px;
    bottom: -100px;
    box-shadow: 0 0 0 35px rgba(255, 255, 255, .025);
}

/* =========================================
   TEAM INTRODUCTION
========================================= */

.team-intro {
    padding: 95px 0;
    background: #f8fafc;
}

.team-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 75px;
}

.team-intro-text .eyebrow,
.team-cta .eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.team-intro-text h2 {
    margin: 18px 0;
    color: #172554;
    font-size: clamp(32px, 4vw, 45px);
    line-height: 1.2;
    letter-spacing: -1px;
}

.team-intro-text > p {
    max-width: 510px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.9;
}

.team-intro-text .gradient-text {
    color: #3b82f6;
}

.team-values {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    border: 1px solid #dbeafe;
    border-radius: 17px;
    background: #ffffff;
    transition: transform .3s ease, box-shadow .3s ease;
}

.value-item:hover {
    transform: translateX(6px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, .09);
}

.value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 23px;
}

.value-item h3 {
    margin: 2px 0 7px;
    color: #172554;
    font-size: 16px;
}

.value-item p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

/* =========================================
   TEAM MEMBERS SECTION
========================================= */

.team-members-section {
    padding: 100px 0;
    background: #ffffff;
}

.team-members-section .section-heading {
    max-width: 650px;
    margin: 20px auto;
    text-align: center;
}

.team-members-section .section-heading .eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.team-members-section .section-heading h2 {
    margin: 15px 0;
    color: #172554;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.2;
}

.team-members-section .section-heading p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.8;
}

/* Team Filters */

.team-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 38px 0 45px;
}

.team-filter {
    padding: 11px 21px;
    border: 1px solid #dbeafe;
    border-radius: 50px;
    color: #475569;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

.team-filter:hover,
.team-filter.active {
    border-color: #3b82f6;
    color: #ffffff;
    background: linear-gradient(135deg, #172554, #3b82f6);
    box-shadow: 0 7px 20px rgba(59, 130, 246, .2);
}

.team-filter:focus-visible,
.profile-btn:focus-visible,
.team-modal-close:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 4px;
}

/* =========================================
   TEAM GRID — FOUR CARDS ON DESKTOP
========================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* =========================================
   TEAM CARD — SAME BLUE FOR ALL CARDS
========================================= */

.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    min-width: 0;
    min-height: 285px;
    padding: 24px 14px;
    overflow: hidden;

    background: linear-gradient(
        145deg,
        #c5d9ff 0%,
        #d5e3ff 55%,
        #c3d5ff 100%
    );

    border: 1px solid #9fb9ed;
    border-radius: 20px;

    box-shadow:
        0 8px 20px rgba(30, 58, 138, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);

    transition:
        background 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

/* Force Every Card To Use The Same Blue */

.team-card:nth-child(3n + 2),
.team-card:nth-child(3n) {
    background: linear-gradient(
        145deg,
        #c5d9ff 0%,
        #d5e3ff 55%,
        #c3d5ff 100%
    );

    border-color: #9fb9ed;
}

/* Card Decorative Accents */

.team-card::before {
    content: "";
    position: absolute;
    top: -45px;
    right: -45px;
    width: 115px;
    height: 115px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.4s ease;
}

.team-card::after {
    content: "";
    position: absolute;
    bottom: -55px;
    left: -45px;
    width: 110px;
    height: 110px;
    background: rgba(79, 70, 229, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

/* Card Hover — Still Blue */

.team-card:hover,
.team-card:nth-child(3n + 2):hover,
.team-card:nth-child(3n):hover {
    transform: translateY(-6px);

    background: linear-gradient(
        145deg,
        #bfcfff 0%,
        #d0dfff 55%,
        #bfd2ff 100%
    );

    border-color: #829ff0;

    box-shadow:
        0 18px 32px rgba(30, 64, 175, 0.17),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.team-card:hover::before {
    transform: scale(1.25);
}

.team-card[hidden] {
    display: none !important;
}

/* Optional Card Top Details */

.team-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.member-number {
    color: #354a75;
    font-size: 12px;
    font-weight: 800;
}

.member-status {
    padding: 6px 9px;
    border-radius: 50px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 10px;
    font-weight: 800;
}

/* =========================================
   MEMBER PICTURES
   Supports Both Existing HTML Structures
========================================= */

/* Picture Structure: .team-card-image */

.team-card-image {
    position: relative;
    z-index: 1;

    width: 100px;
    height: 100px;
    flex-shrink: 0;

    margin: 0 auto 19px;
    overflow: hidden;

    border-radius: 50%;
    background: #c5d6ff;
    border: 4px solid #ffffff;

    box-shadow:
        0 0 0 2px #8fa9ee,
        0 8px 18px rgba(30, 64, 175, 0.16);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.team-card:hover .team-card-image {
    transform: scale(1.045);

    box-shadow:
        0 0 0 3px #7899ef,
        0 10px 22px rgba(30, 64, 175, 0.22);
}

.team-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* Picture Structure: .member-avatar */

.member-avatar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    margin: 0 auto 19px;
    overflow: hidden;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: #c5d6ff;
    box-shadow:
        0 0 0 2px #8fa9ee,
        0 8px 18px rgba(30, 64, 175, 0.16);
    isolation: isolate;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.team-card:hover .member-avatar {
    transform: scale(1.045);
    box-shadow:
        0 0 0 3px #7899ef,
        0 10px 22px rgba(30, 64, 175, 0.22);
}

.member-avatar img,
.member-avatar .member-photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.member-avatar > span {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Same Blue Fallback Colors */

.team-image-fallback,
.member-avatar .team-image-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    border-radius: 50%;
}

.team-image-fallback.avatar-purple,
.member-avatar.avatar-purple,
.avatar-purple {
    background: linear-gradient(135deg, #172554, #3b82f6);
}

.team-image-fallback.avatar-pink,
.member-avatar.avatar-pink,
.avatar-pink {
    background: linear-gradient(135deg, #1e40af, #818cf8);
}

.team-image-fallback.avatar-blue,
.member-avatar.avatar-blue,
.avatar-blue {
    background: linear-gradient(135deg, #172554, #3b82f6);
}

.team-image-fallback.avatar-orange,
.member-avatar.avatar-orange,
.avatar-orange {
    background: linear-gradient(135deg, #1e3a8a, #6366f1);
}

.avatar-orbit {
    position: absolute;
    z-index: 0;
    width: 145px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    transform: rotate(-45deg);
    pointer-events: none;
}

/* =========================================
   MEMBER DETAILS
========================================= */

.team-card-info {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 3px;
    text-align: center;
}

.member-role {
    display: block;
    margin-bottom: 9px;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.team-card-info h3 {
    margin: 0 0 7px;
    color: #14234d;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.35px;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

.team-card:hover .team-card-info h3 {
    color: #1d4ed8;
}

.team-card-info p {
    margin: 0;
    color: #354a75;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.member-skills {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: 18px 0 20px;
}

.member-skills span,
.modal-skills span {
    padding: 7px 10px;
    border: 1px solid #b8cff8;
    border-radius: 7px;
    color: #334155;
    background: #eff6ff;
    font-size: 10px;
    font-weight: 700;
}

/* Optional Profile Button */

.profile-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding: 13px 15px;
    border: 1px solid #9fb9ed;
    border-radius: 11px;
    color: #1d4ed8;
    background: rgba(255, 255, 255, .65);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all .25s ease;
}

.profile-btn:hover {
    border-color: #3b82f6;
    color: #ffffff;
    background: #3b82f6;
}

.profile-btn span {
    font-size: 17px;
}

.team-empty-message {
    margin-top: 25px;
    color: #64748b;
    text-align: center;
}

/* =========================================
   PROFILE MODAL
========================================= */

.team-modal[hidden] {
    display: none !important;
}

.team-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.team-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(6px);
}

.team-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    padding: 38px;
    overflow-y: auto;
    border: 1px solid #dbeafe;
    border-radius: 25px;
    background: #ffffff;
    box-shadow: 0 25px 90px rgba(0, 0, 0, .25);
    text-align: center;
    animation: teamModalIn .25s ease both;
}

@keyframes teamModalIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.team-modal-close {
    position: absolute;
    top: 13px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 27px;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.team-modal-close:hover {
    transform: rotate(90deg);
    background: #dbeafe;
}

.modal-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 5px auto 22px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #172554, #3b82f6);
    font-size: 29px;
    font-weight: 900;
}

.team-modal-content h2 {
    margin: 7px 0 13px;
    color: #172554;
    font-size: 27px;
}

.team-modal-content > p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

.team-modal-content h3 {
    margin: 25px 0 13px;
    color: #172554;
    font-size: 15px;
}

.modal-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* =========================================
   TEAM CTA
========================================= */

.team-cta {
    padding: 65px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 90% 20%, rgba(147, 197, 253, .18), transparent 30%),
        linear-gradient(125deg, #172554, #1d4ed8 65%, #3b82f6);
}

.team-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.team-cta .eyebrow {
    color: #dbeafe;
}

.team-cta h2 {
    margin: 13px 0;
    color: #ffffff;
    font-size: clamp(26px, 3.5vw, 38px);
    line-height: 1.2;
}

.team-cta p {
    max-width: 550px;
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.8;
}

.team-cta .btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 12px;
    padding: 15px 23px;
    border-radius: 10px;
    color: #1d4ed8;
    background: #ffffff;
    font-weight: 800;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

.team-cta .btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .15);
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 1100px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px;
    }

    .team-card-info p {
        min-height: auto;
    }

    .team-intro-grid {
        gap: 40px;
    }
}

@media (max-width: 1000px) {
    .team-card {
        min-height: 290px;
        padding: 23px 14px;
    }

    .team-card-image,
    .member-avatar {
        width: 105px;
        height: 105px;
    }

    .team-card-info h3 {
        font-size: 19px;
    }
}

@media (max-width: 768px) {
    .team-hero {
        min-height: auto;
        padding: 75px 0 60px;
    }

    .team-hero h1 {
        letter-spacing: -1px;
    }

    .team-hero-content > p {
        font-size: 14px;
    }

    .team-hero-stats {
        gap: 28px;
        margin-top: 40px;
    }

    .team-hero-stats strong {
        font-size: 23px;
    }

    .team-hero-stats span {
        font-size: 10px;
    }

    .team-intro,
    .team-members-section {
        padding: 70px 0;
    }

    .team-intro-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .team-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-modal-content {
        padding: 32px 23px;
    }
}

@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .team-card {
        min-height: 245px;
        padding: 19px 8px;
        border-radius: 17px;
    }

    .team-card-image,
    .member-avatar {
        width: 82px;
        height: 82px;
        margin-bottom: 16px;
        border-width: 3px;
    }

    .team-image-fallback {
        font-size: 25px;
    }

    .team-card-info h3 {
        font-size: 14px;
        letter-spacing: -0.2px;
    }

    .team-card-info p {
        font-size: 11px;
        line-height: 1.55;
    }

    .member-avatar > span {
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .team-hero {
        padding: 65px 0 50px;
    }

    .team-hero h1 {
        font-size: 36px;
    }

    .team-hero-stats {
        gap: 17px;
    }

    .team-hero-stats strong {
        font-size: 21px;
    }

    .team-hero-stats span {
        font-size: 9px;
    }

    .team-filters {
        gap: 8px;
        margin: 30px 0;
    }

    .team-filter {
        padding: 10px 14px;
        font-size: 12px;
    }

    .team-intro-text h2,
    .team-members-section .section-heading h2 {
        font-size: 32px;
    }

    .team-cta {
        padding: 50px 0;
    }
}

@media (max-width: 360px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .team-card {
        min-height: 225px;
        padding: 16px 6px;
        border-radius: 15px;
    }

    .team-card-image,
    .member-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 14px;
    }

    .team-card-info h3 {
        font-size: 13px;
    }

    .team-card-info p {
        font-size: 10px;
    }
}

/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {
    .team-card,
    .team-card::before,
    .team-card-image,
    .member-avatar,
    .team-card-info h3,
    .value-item,
    .team-filter,
    .profile-btn,
    .team-cta .btn-white {
        transition: none;
    }

    .team-card:hover,
    .team-card:hover .team-card-image,
    .team-card:hover .member-avatar,
    .value-item:hover {
        transform: none;
    }

    .team-modal-content {
        animation: none;
    }
}
