/* ============================================================
   TEAM PAGE — Profile Cards (wireframe / crossed lines)
   ============================================================ */

/* Page hero */
.team-hero {
    padding: 80px 0 60px;
}

.team-hero h1 {
    font-size: 3.4rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 16px;
    max-width: 820px;
    /* جای خالی برای تایپ‌شدن تیتر تا صفحه نپرد */
    min-height: 1.05em;
}

.team-hero p {
    font-size: 1.05rem;
    opacity: 0.4;
    max-width: 520px;
    margin-bottom: 32px;
    /* زیرتیتر بعد از تایپ تیتر نرم ظاهر می‌شود */
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.team-hero p.is-pending {
    opacity: 0;
    transform: translateY(8px);
}

/* ============================================================
   TEAM BLOCK
   ============================================================ */
.team-block {
    /* بدون پدینگ بالا تا کادر تیتر روی خط بالای سکشن بنشیند */
    padding: 0 0 56px;
}

/* هدر بخش به فرم صفحه اصلی: عنوان در کادر خط‌دار، جدا از محتوا */
.team-block .section-header {
    position: relative;
    text-align: center;
    padding: 46px 0;
    margin-bottom: 0;
    direction: ltr;
}

/* خط افقی پایین کادر تیتر — از چپ تا لبه‌ی راست صفحه، جداکننده تیتر از محتوا */
.team-block .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(-1 * var(--line-ext));
    left: calc(-1 * var(--line-ext));
    border-bottom: 1px solid var(--line-border);
    transform-origin: left center;
    z-index: 2;
    pointer-events: none;
}

/* خطوط عمودی دو طرف کادر تیتر — هم‌تراز با لبه‌های گرید */
.team-block .section-header::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-left: 1px solid var(--line-strong);
    border-right: 1px solid var(--line-strong);
    transform-origin: left center;
    z-index: 2;
    pointer-events: none;
}

/* کلمه‌ی هایلایت تیتر: گرادیانت طلایی → سبز (مثل سمت‌ها) */
.team-block .section-header h2 .highlight {
    background-image: linear-gradient(90deg, #e6d07c 0%, #cfd67f 38%, #6fd894 72%, #3adea0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

[data-theme="light"] .team-block .section-header h2 .highlight {
    background-image: linear-gradient(90deg, #a8861f 0%, #8a9a2a 38%, #1f9a5c 72%, #11895a 100%);
}

/* هایلایت نام برند در هیرو */
.team-hero h1 .highlight {
    background-image: linear-gradient(90deg, #e6d07c 0%, #cfd67f 38%, #6fd894 72%, #3adea0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

[data-theme="light"] .team-hero h1 .highlight {
    background-image: linear-gradient(90deg, #a8861f 0%, #8a9a2a 38%, #1f9a5c 72%, #11895a 100%);
}

.team-block .section-header h2 {
    position: relative;
    display: inline-block;
    margin: 0;
    font-size: 2.15rem;
    letter-spacing: -1px;
    line-height: 1.15;
    z-index: 3;
}

.team-block .section-header p {
    position: relative;
    margin: 12px auto 0;
    max-width: 520px;
    font-size: 0.92rem;
    opacity: 0.45;
    z-index: 3;
}

/* ============================================================
   GRID — شبکه‌ی خطوط به‌هم‌پیوسته (بدون فاصله، بدون رادیوس)
   ============================================================ */
.team-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    /* خط بالای گرید را خط پایین هدر می‌کشد (بدون خط تکراری) */
    border-top: 0;
    border-left: 1px solid var(--line-border);
    position: relative;
    direction: ltr; /* چیدمان و خطوط از چپ به راست */
}

/* ============================================================
   CARD
   ============================================================ */
.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: transparent;
    border-right: 1px solid var(--line-border);
    border-bottom: 1px solid var(--line-border);
    transition: background 0.35s ease;
}

.team-card:hover {
    background: rgba(255, 255, 255, 0.012);
}

/* ============================================================
   نقاط تقاطع خطوط — روی گوشه‌ها و محل تلاقی هدر
   ============================================================ */
.tc-node {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--dot-empty);
    border: 1px solid var(--line-strong);
    z-index: 6;
    pointer-events: none;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.tc-node.tl { top: -3px; left: -3px; }
.tc-node.tr { top: -3px; right: -3px; }
.tc-node.bl { bottom: -3px; left: -3px; }
.tc-node.br { bottom: -3px; right: -3px; }

.team-card:hover .tc-node {
    background: var(--accent);
    border-color: var(--accent);
}

/* ============================================================
   HEADER — کد نقش چپ، نام و سمت راست (RTL)
   ============================================================ */
.tc-head {
    position: relative;
    direction: ltr; /* کد نقش چپ، نام و سمت راست */
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--line-strong);
    z-index: 3;
}

/* نقاط تلاقی خط هدر با لبه‌های کارت */
.tc-head .tc-node.ml { bottom: -3px; left: -3px; }
.tc-head .tc-node.mr { bottom: -3px; right: -3px; }

.tc-tag {
    flex-shrink: 0;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--text-muted);
    opacity: 0.55;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.team-card:hover .tc-tag {
    color: var(--accent);
    opacity: 1;
}

.tc-id {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    text-align: right;
}

.tc-name {
    margin: 0;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.2px;
    color: var(--text);
}

.tc-role {
    margin: 0;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.76rem;
    line-height: 1.6;
    /* سمت‌های طولانی: گرادیانت طلایی → سبز */
    background-image: linear-gradient(90deg, #e6d07c 0%, #cfd67f 38%, #6fd894 72%, #3adea0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

[data-theme="light"] .tc-role {
    background-image: linear-gradient(90deg, #a8861f 0%, #8a9a2a 38%, #1f9a5c 72%, #11895a 100%);
}

/* ============================================================
   PHOTO — تا لبه‌ی پایین کارت
   ============================================================ */
.tc-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%);
}

.tc-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
}

.team-card:hover .tc-img {
    transform: scale(1.03);
}

/* اعضای تیم: عکس خاکستری — روی هاور یا کلیک رنگ واقعی */
.team-card:not(.leader) .tc-img {
    filter: grayscale(1) contrast(1.02);
}

.team-card:not(.leader):hover .tc-img,
.team-card:not(.leader).is-revealed .tc-img {
    filter: grayscale(0) contrast(1);
}

/* محو شدن تدریجی پایین عکس در پس‌زمینه */
.tc-photo::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24%;
    background: linear-gradient(to top, var(--bg), transparent);
    z-index: 2;
    pointer-events: none;
}

/* علامت + روی خط تلاقی، وسط بالای عکس */
.tc-plus {
    position: absolute;
    top: 0;
    left: 50%;
    width: 15px;
    height: 15px;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
}

.tc-plus::before,
.tc-plus::after {
    content: '';
    position: absolute;
    background: var(--line-strong);
    transition: background 0.3s ease;
}

.tc-plus::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.tc-plus::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.team-card:hover .tc-plus::before,
.team-card:hover .tc-plus::after {
    background: var(--accent);
}

/* ============================================================
   BUTTONS — هم‌شکل با دکمه‌ی هدر
   ============================================================ */
.team-hero .btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 26px;
    border: 1px solid #ffffff;
    background: #ffffff;
    color: #0a0a0c;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 0;
    min-width: 0;
    white-space: nowrap;
    box-shadow: none;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* حذف قاب و نقطه‌های تزئینی قبلی */
.team-hero .btn-line > span,
.team-hero .btn-line::after {
    display: none;
}

/* نقطه‌ی لوزی سبز، مثل دکمه‌ی هدر */
.team-hero .btn-line::before {
    content: '';
    position: static;
    display: block;
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    border: 0;
    background: var(--accent);
    transform: rotate(45deg);
    opacity: 1;
}

.team-hero .btn-line i {
    font-size: 0.72rem;
}

.team-hero .btn-line:hover {
    background: #e6e6ea;
    border-color: #e6e6ea;
    color: #0a0a0c;
    transform: translateY(-1px);
}

.team-hero .btn-line:hover::before {
    background: #0a0a0c;
}

/* دکمه‌ی دوم: همان فرم، توخالی */
.team-hero .btn-line:not(.primary) {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.32);
    color: var(--text);
}

.team-hero .btn-line:not(.primary):hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #0a0a0c;
}

.team-hero .btn-line:not(.primary):hover::before {
    background: #0a0a0c;
}

/* تم روشن: دکمه تیره می‌شود تا کنتراست حفظ شود */
[data-theme="light"] .team-hero .btn-line {
    background: #121214;
    border-color: #121214;
    color: #f0f0f2;
}

[data-theme="light"] .team-hero .btn-line:hover {
    background: #2a2a2e;
    border-color: #2a2a2e;
    color: #ffffff;
}

[data-theme="light"] .team-hero .btn-line:not(.primary) {
    background: transparent;
    border-color: rgba(18, 18, 20, 0.32);
    color: #121214;
}

[data-theme="light"] .team-hero .btn-line:not(.primary):hover {
    background: #121214;
    border-color: #121214;
    color: #ffffff;
}

/* ============================================================
   RESPONSIVE — LARGE DESKTOP (max 1280px)
   ============================================================ */
@media (max-width: 1280px) {
    .team-hero h1 {
        font-size: 3rem;
        letter-spacing: -1.6px;
    }
}

/* ============================================================
   RESPONSIVE — TABLET LANDSCAPE (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .team-hero {
        padding: 70px 0 50px;
    }

    .team-hero h1 {
        font-size: 2.4rem;
        letter-spacing: -1.2px;
    }

    .team-hero p {
        font-size: 0.95rem;
    }

    .team-block {
        padding: 0 0 44px;
    }

    .team-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================================
   RESPONSIVE — TABLET PORTRAIT (max 900px)
   ============================================================ */
@media (max-width: 900px) {
    .team-hero h1 {
        font-size: 2.2rem;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    .team-hero {
        padding: 50px 0 35px;
    }

    .team-hero h1 {
        font-size: 1.9rem;
        letter-spacing: -1px;
        line-height: 1.1;
    }

    .team-hero p {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .team-block {
        padding: 0 0 36px;
    }

    .team-block .section-header p {
        margin: 0 auto 28px;
        font-size: 0.85rem;
    }

    .tc-head {
        padding: 18px 16px 15px;
        gap: 10px;
    }

    .tc-tag { font-size: 0.8rem; }
    .tc-name { font-size: 0.98rem; }
    .tc-role { font-size: 0.72rem; }

    .tc-photo { aspect-ratio: 1 / 1.15; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
    .team-hero {
        padding: 40px 0 30px;
    }

    .team-hero h1 {
        font-size: 1.5rem;
        letter-spacing: -0.6px;
    }

    .team-hero p {
        font-size: 0.85rem;
    }

    .team-block {
        padding: 0 0 30px;
    }

    .team-cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tc-photo { aspect-ratio: 4 / 5; }
}

/* ============================================================
   RESPONSIVE — MOBILE PASS (کل صفحه تیم)
   ============================================================ */
@media (max-width: 768px) {
    .team-hero .hero-content { padding: 6px 0 0; }

    .team-hero .hero-badge {
        font-size: 0.62rem;
        letter-spacing: 1.4px;
        padding: 6px 16px;
        margin-bottom: 18px;
    }

    .team-hero h1 { font-size: 1.85rem; line-height: 1.14; }
    .team-hero p { font-size: 0.9rem; line-height: 1.75; margin-bottom: 26px; }

    .team-hero .hero-actions { gap: 10px; }
    .team-hero .btn-line { padding: 14px 20px; font-size: 0.8rem; }

    .team-block .section-header { padding: 34px 0; }
    .team-block .section-header h2 { font-size: 1.6rem; }
    .team-block .section-header p { max-width: 34ch; margin: 10px auto 0; }

    .tc-photo { aspect-ratio: 4 / 4.6; }

    .cta-box { padding: 30px 16px; }
    .cta-box h2 { font-size: 1.35rem; letter-spacing: -0.5px; }
    .cta-box p { font-size: 0.85rem; line-height: 1.7; margin-bottom: 24px; }

    .cta-box .btn-line {
        width: 100%;
        max-width: 320px;
        padding: 15px 18px;
        font-size: 0.74rem;
    }

    .footer-links { flex-wrap: wrap; justify-content: center; gap: 10px 16px; }
    .footer-bottom { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
    .team-hero { padding: 34px 0 26px; }
    .team-hero h1 { font-size: 1.55rem; letter-spacing: -0.6px; }
    .team-hero p { font-size: 0.86rem; }

    .team-hero .btn-line {
        padding: 13px 16px;
        font-size: 0.74rem;
        letter-spacing: 0.02em;
    }

    .team-hero .btn-line .icon-right { margin-left: 6px; }

    .team-block { padding: 0 0 26px; }
    .team-block .section-header { padding: 26px 0; }
    .team-block .section-header h2 { font-size: 1.35rem; }
    .team-block .section-header p { font-size: 0.82rem; margin: 8px auto 0; }

    .tc-head { padding: 15px 13px 13px; gap: 8px; }
    .tc-tag { font-size: 0.7rem; letter-spacing: 0.1em; }
    .tc-name { font-size: 0.92rem; }
    .tc-role { font-size: 0.68rem; }

    .tc-photo { aspect-ratio: 4 / 5; }

    .cta-box { padding: 26px 14px; }
    .cta-box h2 { font-size: 1.15rem; }
    .cta-box p { font-size: 0.8rem; }

    .footer-links { gap: 8px 12px; font-size: 0.78rem; }
}

/* ============================================================
   TOUCH DEVICES — disable hover
   ============================================================ */
@media (hover: none) {
    .team-card:hover {
        background: transparent;
    }

    .team-card:hover .tc-img {
        transform: none;
    }
}

/* ============================================================
   MAIN FOOTER — خنثی کردن استایل فوتر قدیمی style.css
   ============================================================ */
.footer {
    text-align: left;
    opacity: 1;
}
