/* =========================================
   کمیته تخصصی — پس‌زمینه + امواج طلایی/نماد + جدول موبایل
   ========================================= */

body.committee-body {
    background: #e8eef8;
}

.committee-section {
    --c-navy: #0b1c44;
    --c-blue: #1e3c8c;
    --c-gold: #f2b31e;
    --c-gold-soft: #ffcf55;
    --c-header-h: var(--header-height, 70px);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: calc(100vh - var(--c-header-h));
    min-height: calc(100dvh - var(--c-header-h));
    padding: 0;
    margin: 0;
    font-family: "Vazirmatn", "YekanBakh", Tahoma, sans-serif;
    background: #dce6f5;
}

.committee-section + .footer-new,
.committee-section ~ .footer-new {
    margin-top: 0;
}

.committee-page-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.committee-page-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ساختمان بالا‌چپ + امواج پایین هر دو در قاب بمانند */
    object-position: left top;
}

.committee-bg-wash {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(236, 244, 255, 0.18) 0%,
        rgba(240, 246, 255, 0.32) 38%,
        rgba(232, 240, 252, 0.22) 68%,
        rgba(220, 232, 248, 0.1) 100%
    );
}

/* موج کف صفحه */
.committee-wave-floor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: clamp(90px, 14vw, 160px);
    pointer-events: none;
    line-height: 0;
}

.committee-wave-floor svg {
    width: 100%;
    height: 100%;
    display: block;
}

.committee-wave-navy {
    fill: #0b1c44;
}

.committee-wave-navy-soft {
    fill: #122a5c;
    opacity: 0.88;
}

.committee-wave-gold-stroke {
    stroke: url(#none);
    stroke: #f2b31e;
    stroke-width: 5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(242, 179, 30, 0.65));
}

.committee-container {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(36px, 4vw, 56px) 20px clamp(88px, 12vw, 130px);
}

.committee-title {
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 900;
    color: var(--c-navy);
    margin: 0 0 10px;
}

.committee-title-rule {
    display: block;
    width: 72px;
    height: 3px;
    margin: 0 auto 14px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
}

.committee-subtitle {
    text-align: center;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: #2f5f9a;
    margin: 0 0 36px;
    font-weight: 600;
}

.committee-stage {
    position: relative;
}

.committee-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 11px 26px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4a5d78;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(20, 40, 80, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--c-navy);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(145deg, #122a5c, var(--c-navy));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(11, 28, 68, 0.28);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid var(--c-gold);
}

.tab-contents {
    position: relative;
}

.tab-content {
    display: none;
    animation: committeeFade 0.35s ease;
}

.tab-content.active {
    display: block;
}

@keyframes committeeFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.committee-card {
    position: relative;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 40px rgba(20, 45, 90, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.committee-header {
    position: relative;
    background: linear-gradient(135deg, #14305f, #2a5cb0);
    padding: 22px 28px;
    text-align: center;
    overflow: hidden;
}

/* موج طلایی گوشه هدر کادر — مثل نمونه */
.committee-header-wave {
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(140px, 28%);
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.committee-header-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.committee-header i {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 8px;
    display: inline-block;
}

.committee-header h3 {
    position: relative;
    z-index: 2;
    font-size: 1.35rem;
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 16px 22px;
    overscroll-behavior-x: contain;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.members-table thead tr {
    background: rgba(232, 240, 252, 0.9);
    border-bottom: 2px solid rgba(42, 92, 176, 0.35);
}

.members-table th {
    padding: 12px 12px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--c-navy);
    line-height: 1.45;
    vertical-align: middle;
}

.members-table td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(20, 40, 80, 0.08);
    color: #334155;
    vertical-align: middle;
}

.members-table th.th-member-type {
    max-width: 8.5rem;
    white-space: normal;
}

.members-table td.member-cell {
    white-space: pre-wrap;
}

.members-table td.member-background {
    max-width: 16rem;
    white-space: pre-wrap;
}

.members-table tbody tr:hover {
    background: rgba(240, 246, 255, 0.85);
}

.members-table tbody tr:last-child td {
    border-bottom: none;
}

.member-resume-cell {
    text-align: center;
    white-space: nowrap;
}

.view-resume-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #5b7db8;
    color: #2a5cb0;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-resume-btn:hover {
    background: #2a5cb0;
    color: #fff;
}

tr.member-resume-open td {
    background: rgba(232, 240, 252, 0.95);
}

.member-resume-row td {
    padding: 0 20px 16px !important;
    border-bottom: 1px solid rgba(20, 40, 80, 0.08);
    background: rgba(248, 250, 255, 0.95);
}

.resume-panel {
    position: relative;
    background: linear-gradient(135deg, #122a5c, #2a4ba8);
    color: #fff;
    border-radius: 16px;
    padding: 16px 20px 16px 48px;
    animation: committeeFade 0.3s ease;
}

.resume-text {
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.close-resume {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.close-resume:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

body.lang-en .close-resume {
    left: auto;
    right: 12px;
}

body.lang-en .resume-panel {
    padding: 16px 48px 16px 20px;
}

body.lang-en .committee-header-wave {
    left: auto;
    right: 0;
    transform: scaleX(-1);
}

/* موبایل: جدول با اسکرول افقی؛ دکمه‌ها پایین کادر */
@media (max-width: 768px) {
    .committee-page-bg img {
        object-position: left top;
    }

    .committee-container {
        padding: 28px 14px 72px;
    }

    .committee-title {
        font-size: 1.7rem;
    }

    .committee-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .committee-header {
        padding: 16px 18px;
    }

    .committee-header h3 {
        font-size: 1.1rem;
    }

    .committee-card {
        overflow: hidden;
    }

    .table-scroll-shell {
        position: relative;
        padding-bottom: 8px;
    }

    .table-wrapper {
        padding: 14px 10px 10px;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .members-table {
        min-width: 760px;
        width: max-content;
    }

    .members-table th,
    .members-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .members-table td.member-background,
    .members-table td.member-cell {
        white-space: normal;
        min-width: 9rem;
        max-width: 14rem;
    }

    .table-nav {
        display: flex;
        justify-content: center;
        gap: 14px;
        margin: 4px 0 14px;
        padding: 0 10px;
    }

    .table-nav-btn {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid rgba(11, 28, 68, 0.18);
        background: rgba(255, 255, 255, 0.95);
        color: var(--c-navy);
        box-shadow: 0 4px 12px rgba(15, 40, 80, 0.12);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1rem;
    }

    .table-nav-btn:active {
        transform: scale(0.96);
    }
}

@media (min-width: 769px) {
    .table-nav {
        display: none !important;
    }
}

body.lang-en .committee-member-info,
body.lang-en .committee-member-info h3,
body.lang-en .committee-member-info p {
    text-align: left;
}
