﻿/* team.css – Pocket-style team cards with hover reveal and modal pull-out animation */
/* Enhanced: smaller cards, stronger shadows, refined aesthetics */

.team-page {
    width: 100%;
    background: var(--kcl-surface-soft, #fafaf8);
    padding: 0;
    font-family: Inter, sans-serif;
    overflow-x: hidden;
    margin-top: 40px;
}

/* SECTION BLOCKS */
.section-block {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.container {
    width: 88%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* INTRO SECTION */
.intro-section {
    background: var(--kcl-surface-soft, #fafaf8);
    margin-top: 40px;
    border-radius: 90px 90px 90px 90px;
    padding: 30px 0 60px;
    position: relative;
    z-index: 4;
    box-shadow: var(--kcl-shadow-bottom);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--kcl-primary, #2a7ea8);
    background: rgba(42, 126, 168, 0.1);
    padding: 0.3rem 0.9rem;
    border-radius: 40px;
}

.intro-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
}

.accent-text {
    color: var(--kcl-primary, #2a7ea8);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-icon-circle {
    width: 52px;
    height: 52px;
    background: rgba(42, 126, 168, 0.08);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .stat-icon-circle i {
        font-size: 1.5rem;
        color: var(--kcl-primary, #2a7ea8);
    }

.ethos-card {
    background: #ffffff;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: var(--kcl-shadow-bottom);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

    .ethos-card:hover {
        transform: translateY(-5px);
    }
    /* کاهش فاصله بین پاراگراف و چک‌ایتم‌ها در کارت Ethos */
    .ethos-card .ethos-text {
        margin-bottom: 0.75rem;
    }

    .ethos-card .row.g-4.my-4 {
        margin-top: 0.25rem !important;
        margin-bottom: 0.25rem !important;
        --bs-gutter-y: 0.5rem;
    }

        .ethos-card .row.g-4.my-4 > [class*="col-"] {
            margin-bottom: 0.25rem;
        }
/* TEAM GRID SECTION */
.team-grid-section {
    background: var(--kcl-surface, #ffffff);
    border-bottom-left-radius: 90px;
    border-bottom-right-radius: 90px;
    padding: 140px 0 120px;
    position: relative;
    z-index: 3;
    box-shadow: var(--kcl-shadow-bottom);
    margin-top: -80px;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 54px;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #111;
    margin-bottom: 15px;
}

.section-subtitle {
    color: #7a7a7a;
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
}

/* Team grid – tighter gap for smaller cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; /* reduced from 26px */
}

/* Pocket-style card – smaller and more elegant */
.team-member-card {
    background: transparent;
    perspective: 1000px;
    cursor: pointer;
}

.card-pocket {
    background: #f3f3f1;
    border-radius: 24px; /* slightly smaller radius */
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: var(--kcl-shadow-bottom); /* stronger initial shadow */
}

/* Front part (always visible: avatar + name) – reduced padding */
.card-front {
    padding: 24px 20px 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

/* Hidden part that slides up on hover – reduced padding */
.card-hover-reveal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #dbdbdb;
    padding: 16px 20px 24px;
    text-align: center;
    border-radius: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

/* Hover effects – stronger lift and shadow */
.team-member-card:hover .card-pocket {
    transform: translateY(-6px);
    box-shadow: 0 25px 35px rgba(0, 0, 0, 0.15); /* much stronger shadow on hover */
}

.team-member-card:hover .card-hover-reveal {
    transform: translateY(0);
}

.team-member-card:hover .card-front {
    transform: translateY(-8px);
}

/* Avatar – smaller and refined */
.team-avatar {
    width: 100px; /* reduced from 130px */
    height: 100px;
    margin: 0 auto 1rem;
    background: #fff;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(42, 126, 168, 0.15);
    transition: 0.2s;
}

.team-member-card:hover .team-avatar {
    border-color: var(--kcl-primary, #2a7ea8);
    transform: scale(1.02);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Name – slightly smaller */
.team-member-card h4 {
    font-size: 1.25rem; /* was 1.5rem */
    font-weight: 700;
    margin-bottom: 0.1rem;
}

/* Role badge – compact */
.team-role {
    display: inline-block;
    background: rgba(42, 126, 168, 0.12);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--kcl-primary, #2a7ea8);
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    margin: 0.5rem 0 0.8rem;
}

/* Description text – smaller */
.card-hover-reveal p {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #5a6874;
    margin-bottom: 1rem;
}

/* Social links – slightly smaller icons */
.team-social-links {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

    .team-social-links a {
        width: 32px;
        height: 32px;
        background: #ffffff;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #2c3e50;
        transition: 0.2s;
        text-decoration: none;
        border: 1px solid #eef2f6;
        font-size: 0.85rem;
    }

        .team-social-links a:hover {
            background: var(--kcl-primary, #2a7ea8);
            color: white;
            transform: translateY(-3px);
            border-color: var(--kcl-primary, #2a7ea8);
        }

/* MODAL – with "pull-out from pocket" animation */
.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

    .team-modal.active {
        opacity: 1;
        visibility: visible;
    }

.modal-card {
    width: 480px;
    max-width: calc(100vw - 2rem);
    max-height: 85vh;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.2), opacity 0.25s ease;
}

.team-modal.active .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Custom scroll */
.modal-card::-webkit-scrollbar {
    width: 4px;
}

.modal-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-card::-webkit-scrollbar-thumb {
    background: var(--kcl-primary, #2a7ea8);
    border-radius: 10px;
}

.modal-inner {
    padding: 1.8rem 1.8rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-header {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #eff3f8;
    padding-bottom: 1rem;
}

.modal-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--kcl-primary, #2a7ea8);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.modal-title h3 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #111;
    line-height: 1.2;
}

.modal-role-badge {
    background: rgba(42, 126, 168, 0.12);
    color: var(--kcl-primary, #2a7ea8);
    display: inline-block;
    padding: 0.2rem 0.9rem;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.3rem;
}

.modal-bio {
    background: #f8fafd;
    padding: 0.9rem 1.1rem;
    border-radius: 1.2rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #2c3e50;
    border-left: 4px solid var(--kcl-primary, #2a7ea8);
}

    .modal-bio i {
        color: var(--kcl-primary, #2a7ea8);
        margin-right: 5px;
    }

.modal-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #2d3e50;
}

    .detail-item i {
        width: 24px;
        color: var(--kcl-primary, #2a7ea8);
        font-size: 0.95rem;
    }

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.skill-tag {
    background: #eff3f6;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #1f2a3e;
}

.modal-social {
    display: flex;
    gap: 0.8rem;
    border-top: 1px solid #edf2f7;
    padding-top: 1rem;
}

    .modal-social a {
        background: #f1f5f9;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #2c3e50;
        transition: 0.2s;
        text-decoration: none;
    }

        .modal-social a:hover {
            background: var(--kcl-primary, #2a7ea8);
            color: white;
            transform: translateY(-2px);
        }

.close-modal-btn {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.05);
    width: 30px;
    height: 30px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: #5a6874;
    z-index: 10;
}

    .close-modal-btn:hover {
        background: rgba(0, 0, 0, 0.1);
        color: #000;
    }

/* CTA SECTION */
.cta-team-section {
    background: var(--kcl-surface-soft, #fafaf8);
    margin-top: -70px;
    border-radius: 90px;
    padding: 140px 0 110px;
    position: relative;
    z-index: 2;
}

.cta-icon-wrap {
    width: 95px;
    height: 95px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--kcl-primary, #2a7ea8);
    box-shadow: 0 15px 25px -12px rgba(0, 0, 0, 0.08);
}

.cta-team-section h2 {
    font-size: 68px;
    line-height: 1.08;
    letter-spacing: -2px;
    color: #111;
    margin-bottom: 20px;
}

.cta-buttons-group {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.btn-dark, .btn-light {
    padding: 16px 34px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 30px rgba(0, 0, 0, 0.12);
}

.btn-dark {
    background: #111;
    color: #fff;
}

    .btn-dark:hover {
        transform: translateY(-3px);
        background: #000;
    }

.btn-light {
    background: #fff;
    color: #111;
    border: 1px solid #e2e8f0;
}

    .btn-light:hover {
        transform: translateY(-3px);
        background: var(--kcl-primary, #2a7ea8);
        color: white;
    }

.cta-note {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #7c7f82;
}

/* Responsive */
@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cta-team-section h2 {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .modal-card {
        width: calc(100% - 2rem);
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
    }

    .modal-details-grid {
        grid-template-columns: 1fr;
    }

    .team-avatar {
        width: 90px;
        height: 90px;
    }

    .card-front {
        padding: 18px 15px 15px;
    }

    .team-member-card h4 {
        font-size: 1.1rem;
    }
}

body.modal-open {
    overflow: hidden;
}
