/* =========================================
   هیئت مدیره — اتاق جلسه + کارت شیشه‌ای ۳+۲
   ========================================= */

body.hmodire-body {
    background: #d7e3f2;
}

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

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

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

.board-page-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: saturate(1.04) contrast(1.02);
}

.board-bg-wash {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(230, 240, 252, 0.28) 0%,
            rgba(236, 244, 255, 0.18) 40%,
            rgba(220, 234, 250, 0.35) 100%
        );
}

.board-container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(40px, 5vw, 64px) 20px clamp(48px, 6vw, 80px);
}

.board-title {
    text-align: center;
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    font-weight: 900;
    color: var(--b-navy);
    margin: 0 0 12px;
}

.board-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #ffcf55, var(--b-gold));
    box-shadow: 0 0 10px rgba(242, 179, 30, 0.45);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 20px;
    margin-top: 42px;
    justify-items: center;
}

/* ردیف دوم (کارت ۴ و ۵) وسط‌چین */
.members-grid .member-card:nth-child(4) {
    grid-column: 1 / 2;
    justify-self: end;
    width: min(100%, 280px);
    margin-right: 8%;
}

.members-grid .member-card:nth-child(5) {
    grid-column: 2 / 3;
    justify-self: start;
    width: min(100%, 280px);
    margin-left: 8%;
}

/* بهتر: دو کارت آخر در ستون‌های ۲ و ۳ با شروع از وسط */
@media (min-width: 901px) {
    .members-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .members-grid .member-card:nth-child(1) { grid-column: 1 / 3; }
    .members-grid .member-card:nth-child(2) { grid-column: 3 / 5; }
    .members-grid .member-card:nth-child(3) { grid-column: 5 / 7; }
    .members-grid .member-card:nth-child(4) {
        grid-column: 2 / 4;
        justify-self: stretch;
        width: auto;
        margin: 0;
    }
    .members-grid .member-card:nth-child(5) {
        grid-column: 4 / 6;
        justify-self: stretch;
        width: auto;
        margin: 0;
    }
}

.member-card {
    width: 100%;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.42);
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 12px 28px rgba(15, 40, 80, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.3s ease;
    position: relative;
    min-height: 220px;
}

.member-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 36px rgba(15, 40, 80, 0.18);
}

.card-front {
    padding: 28px 18px 22px;
    text-align: center;
    background: transparent;
}

.member-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(145deg, #1a3f78, #0b1c44);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 18px rgba(11, 28, 68, 0.28);
    overflow: hidden;
    flex-shrink: 0;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.member-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--b-navy);
    margin: 0 0 8px;
    text-align: center;
}

.member-position {
    font-size: 0.86rem;
    color: #355980;
    margin: 0 0 14px;
    border-bottom: none;
    padding-bottom: 0;
    text-align: center;
    line-height: 1.55;
}

.view-resume-btn {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(42, 92, 176, 0.45);
    color: #1e4fa3;
    padding: 7px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.view-resume-btn:hover {
    background: #1e4fa3;
    color: #fff;
}

/* مدال رزومه — استایل‌های موجود حفظ */
.resume-sheet-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.resume-sheet-modal.is-open {
    display: flex;
}

.resume-sheet-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 18, 40, 0.55);
}

.resume-sheet {
    position: relative;
    z-index: 1;
    width: min(720px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    display: grid;
    grid-template-columns: 200px 1fr;
}

.resume-sheet__close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
}

.resume-sheet__brand {
    background: linear-gradient(180deg, #122a5c, #0b1c44);
    color: #fff;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.resume-sheet__logo {
    max-width: 88px;
    height: auto;
}

.resume-sheet__brand-name {
    text-align: center;
    font-size: 0.85rem;
    margin: 0;
}

.resume-sheet__body {
    padding: 28px 24px;
}

.resume-sheet__name {
    margin: 0 0 6px;
    color: var(--b-navy);
    font-size: 1.35rem;
}

.resume-sheet__position {
    margin: 0 0 18px;
    color: #355980;
}

.resume-sheet__heading {
    margin: 0 0 8px;
    color: var(--b-navy);
    font-size: 1rem;
}

.resume-sheet__list {
    margin: 0;
    padding-right: 18px;
    line-height: 1.8;
    color: #334155;
}

.resume-sheet__divider {
    border: none;
    border-top: 1px solid #e5eaf2;
    margin: 16px 0;
}

@media (max-width: 900px) {
    .members-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .members-grid .member-card:nth-child(n) {
        grid-column: auto;
        width: 100%;
        max-width: none;
        margin: 0;
        justify-self: stretch;
    }
}

@media (max-width: 560px) {
    .members-grid {
        grid-template-columns: 1fr;
    }

    .board-container {
        padding: 28px 14px 40px;
    }

    .resume-sheet {
        grid-template-columns: 1fr;
    }

    .resume-sheet__brand {
        padding: 18px;
    }
}

body.lang-en .member-name,
body.lang-en .member-position {
    text-align: left;
}
