/* ==========================================================================
   DPNA Modern Board Members Stylesheet
   ========================================================================== */

.bm-section {
    background-color: #f8fafc;
    padding-top: 60px;
    padding-bottom: 90px;
}

.bm-header {
    text-align: center;
    margin-bottom: 50px;
}

.bm-header-badge {
    display: inline-block;
    background-color: #fee2e2;
    color: #bf2f37;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.bm-header-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 14px;
}

.bm-header-desc {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Filter Tabs / Controls
   ========================================================================== */

.bm-tabs-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.bm-filter-btn {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.bm-filter-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.bm-filter-btn.active {
    background-color: #bf2f37;
    color: #ffffff;
    border-color: #bf2f37;
    box-shadow: 0 4px 14px rgba(191, 47, 55, 0.28);
}

/* ==========================================================================
   Board Member Card Grid
   ========================================================================== */

.bm-grid {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.bm-col {
    display: flex;
    margin-bottom: 30px;
}

.bm-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #edf2f7;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

.bm-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 36px rgba(191, 47, 55, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
    border-color: #fecdd3;
}

/* Card Top Accent Bar */
.bm-card-top-bar {
    height: 5px;
    width: 100%;
    background: linear-gradient(90deg, #bf2f37 0%, #e11d48 50%, #f43f5e 100%);
}

.bm-card-top-bar--member {
    background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

.bm-card-body {
    padding: 32px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

/* Avatar Frame */
.bm-avatar-container {
    position: relative;
    width: 136px;
    height: 136px;
    margin-bottom: 20px;
}

.bm-avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #bf2f37 0%, #f43f5e 100%);
    box-shadow: 0 8px 18px rgba(191, 47, 55, 0.2);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.bm-card:hover .bm-avatar-ring {
    transform: scale(1.04);
    box-shadow: 0 12px 24px rgba(191, 47, 55, 0.28);
}

.bm-avatar-ring--member {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: 0 8px 16px rgba(100, 116, 139, 0.15);
}

.bm-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #ffffff;
    overflow: hidden;
    position: relative;
}

.bm-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: transform 0.4s ease;
}

.bm-card:hover .bm-avatar-img {
    transform: scale(1.08);
}

.bm-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #bf2f37;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.bm-avatar-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #f1f5f9;
}

/* Position Badge */
.bm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.bm-badge--president {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.bm-badge--officer {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.bm-badge--pr {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
}

.bm-badge--member {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Member Name */
.bm-name {
    font-size: 1.22rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Biography Excerpt */
.bm-bio-excerpt {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Footer */
.bm-card-footer {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    background-color: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bm-btn-view-profile {
    background-color: #fee2e2;
    color: #bf2f37;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.bm-btn-view-profile:hover {
    background-color: #bf2f37;
    color: #ffffff;
    text-decoration: none;
}

.bm-btn-view-profile i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.bm-btn-view-profile:hover i {
    transform: translateX(3px);
}

.bm-social-links {
    display: flex;
    gap: 8px;
}

.bm-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bm-icon-btn:hover {
    background-color: #bf2f37;
    color: #ffffff;
    border-color: #bf2f37;
    text-decoration: none;
}

/* ==========================================================================
   Former Members ("سابق") Notice & Section
   ========================================================================== */

.bm-former-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px dashed #e2e8f0;
}

.bm-former-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
    margin-bottom: 10px;
}

.bm-former-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 35px;
}

/* ==========================================================================
   Biography Modal Styles
   ========================================================================== */

.bm-modal .modal-dialog {
    max-width: 720px;
    margin: 30px auto;
}

.bm-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.bm-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 24px 28px;
    position: relative;
    border-bottom: none;
}

.bm-modal-header .close {
    color: #ffffff;
    opacity: 0.8;
    text-shadow: none;
    font-size: 1.6rem;
    font-weight: 300;
    position: absolute;
    top: 20px;
    right: 24px;
    padding: 0;
    background: transparent;
    border: none;
}

.bm-modal-header .close:hover {
    opacity: 1;
    color: #fee2e2;
}

.bm-modal-hero {
    display: flex;
    align-items: center;
    gap: 22px;
}

.bm-modal-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #bf2f37;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.bm-modal-avatar--placeholder {
    border: 3px solid #cbd5e1;
    background-color: #f1f5f9;
}

.bm-modal-title-wrap {
    flex-grow: 1;
}

.bm-modal-name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.25;
}

.bm-modal-role {
    display: inline-block;
    background-color: rgba(191, 47, 55, 0.35);
    color: #fca5a5;
    border: 1px solid rgba(254, 202, 202, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.bm-modal-body {
    padding: 30px 28px;
    background-color: #ffffff;
}

.bm-modal-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background-color: #f8fafc;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.bm-modal-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #475569;
}

.bm-modal-meta-item i {
    color: #bf2f37;
    font-size: 0.95rem;
}

.bm-modal-meta-item a {
    color: #bf2f37;
    text-decoration: none;
    font-weight: 500;
}

.bm-modal-meta-item a:hover {
    text-decoration: underline;
}

.bm-modal-bio-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bm-modal-bio-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #bf2f37;
    border-radius: 2px;
}

.bm-modal-bio-content {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Normalize old database styled text */
.bm-modal-bio-content p {
    margin-bottom: 14px !important;
    text-align: left !important;
    color: #334155 !important;
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
}

.bm-modal-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 14px 28px;
    display: flex;
    justify-content: flex-end;
}

.bm-modal-btn-close {
    background-color: #e2e8f0;
    color: #334155;
    border: none;
    padding: 8px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bm-modal-btn-close:hover {
    background-color: #cbd5e1;
    color: #0f172a;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 991px) {
    .bm-header-title {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .bm-section {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .bm-header {
        margin-bottom: 35px;
    }

    .bm-header-title {
        font-size: 1.65rem;
    }

    .bm-header-desc {
        font-size: 0.95rem;
    }

    .bm-modal-hero {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .bm-modal-meta-grid {
        flex-direction: column;
        gap: 10px;
    }

    .bm-name {
        min-height: auto;
    }
}
