/* Migrated from legacy page-associate.php; original styling preserved. */
/* ========================================================
   ১. হোম পেজ মেম্বার গ্রিড ও ট্যাব ফিল্টার
   ======================================================== */
.committee-hierarchical-section {
    padding: 10px 0 25px;
    width: 100%;
}

.members-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tab-item:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.tab-item.active {
    background: linear-gradient(135deg, #1e7e34, #155724);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.25);
}

.committee-header-text {
    text-align: center;
    margin-bottom: 30px;
}

.committee-header-text .term-badge {
    color: #1e7e34;
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: 0.3px;
}

.committee-header-text h2 {
    font-size: 23px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.section-underline {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #1e7e34, #8b0000);
    margin: 8px auto 0;
    border-radius: 2px;
}

/* ৪-কলাম মেম্বার গ্রিড */
.members-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.member-single-card {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 12px 14px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.member-single-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #8b0000, #ff4d4d, #f59e0b);
    transition: height 0.3s ease;
}

.member-single-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(139, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: rgba(139, 0, 0, 0.25);
}

.member-single-card:hover::before {
    height: 5px;
}

.member-profile-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* মেম্বার অ্যাভাটার */
.member-avatar {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 4px auto 12px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #8b0000, #f87171, #facc15);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.16);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.member-single-card:hover .member-avatar {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.26);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #ffffff;
    display: block;
}

.member-avatar .empty-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 32px;
}

.badge-role {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #8b0000;
    background: rgba(139, 0, 0, 0.07);
    border-radius: 20px;
    margin-bottom: 6px;
    border: 1px solid rgba(139, 0, 0, 0.12);
}

.member-meta .name {
    font-size: 14.5px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.member-single-card:hover .name {
    color: #8b0000;
}

/* কার্ড সোশ্যাল মিডিয়া বাটন */
.social-mini-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    width: 100%;
}

.social-mini-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    font-size: 11.5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.social-mini-icons a.pc-btn-fb { background: #1877f2; color: #ffffff !important; }
.social-mini-icons a.pc-btn-wa { background: #25d366; color: #ffffff !important; }
.social-mini-icons a.pc-btn-mail { background: #ea4335; color: #ffffff !important; }
.social-mini-icons a.pc-btn-call { background: #0284c7; color: #ffffff !important; }

.social-mini-icons a:hover {
    transform: translateY(-2px) scale(1.12);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================================
   ২. ৮টি পেজ টেমপ্লেটের হেডার ও গ্রিড লেআউট
   ======================================================== */
.member-page-header {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-badge {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.member-page-header h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 4px 0 6px;
    color: #0f172a;
}

.member-page-header p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

.glow-accent-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.member-cards-layout.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.m-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px 14px 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.m-avatar-frame {
    width: 95px;
    height: 95px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8fafc;
    border: 3px solid #f1f5f9;
}

.m-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #94a3b8;
    background: #f1f5f9;
}

.m-name {
    font-size: 14.5px;
    font-weight: 800;
    margin: 8px 0 6px;
}

.m-name a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.m-name a:hover {
    color: #8b0000;
}

.m-type-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    align-self: center;
}

.m-social-strip {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.s-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.s-icon.fb { background: #1877f2; }
.s-icon.wa { background: #25d366; }
.s-icon.mail { background: #ea4335; }
.s-icon.phone { background: #0284c7; }
.s-icon:hover { transform: scale(1.15); }

/* ========================================================
   ৩. প্রতিটি ক্যাটাগরি পেজের কালার অ্যাকসেন্ট
   ======================================================== */
/* ১. স্থায়ী সদস্য */
.header-permanent .page-badge { color: #8b0000; }
.header-permanent .glow-accent-line { background: linear-gradient(90deg, #8b0000, #dc2626); }
.card-permanent .m-type-pill { background: rgba(139, 0, 0, 0.08); color: #8b0000; }
.card-permanent:hover { border-color: #8b0000; }

/* ২. সাধারণ সদস্য */
.header-general .page-badge { color: #334155; }
.header-general .glow-accent-line { background: linear-gradient(90deg, #334155, #64748b); }
.card-general .m-type-pill { background: #f1f5f9; color: #475569; }

/* ৩. সম্মানপ্রদ জীবন সদস্য (গোল্ডেন) */
.header-honorary .page-badge { color: #b45309; }
.header-honorary .glow-accent-line { background: linear-gradient(90deg, #d97706, #fbbf24); }
.card-honorary .gold-aura { border-color: #fde68a; box-shadow: 0 0 12px rgba(245, 158, 11, 0.25); }
.card-honorary .gold-pill { background: #fef3c7; color: #b45309; }

/* ৪. আজীবন দাতা সদস্য (এমারেল্ড গ্রিন) */
.header-donor .page-badge { color: #047857; }
.header-donor .glow-accent-line { background: linear-gradient(90deg, #059669, #34d399); }
.card-donor .emerald-aura { border-color: #a7f3d0; }
.card-donor .emerald-pill { background: #d1fae5; color: #047857; }

/* ৫. অস্থায়ী সদস্য (ব্লু) */
.header-temporary .page-badge { color: #0369a1; }
.header-temporary .glow-accent-line { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.card-temporary .blue-aura { border-color: #bae6fd; }
.card-temporary .blue-pill { background: #e0f2fe; color: #0369a1; }

/* ৬. সহযোগী সদস্য (পার্পল) */
.header-associate .page-badge { color: #6d28d9; }
.header-associate .glow-accent-line { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.card-associate .purple-aura { border-color: #ddd6fe; }
.card-associate .purple-pill { background: #ede9fe; color: #6d28d9; }

/* ৭. প্রয়াত সদস্য (গ্রেস্কেল / স্মরণে শ্রদ্ধাঞ্জলি) */
.header-deceased .page-badge { color: #475569; }
.header-deceased .glow-accent-line { background: #475569; }
.card-deceased { background: #fafafa; border-color: #cbd5e1; }
.grayscale-frame img { filter: grayscale(100%); }
.deceased-pill { background: #334155; color: #ffffff; }
.m-tribute-text { font-size: 12px; font-style: italic; color: #64748b; margin: 4px 0 0; }

/* ৮. কার্যনির্বাহী পিরামিড লেআউট */
.header-executive .page-badge { color: #15803d; }
.header-executive .glow-accent-line { background: linear-gradient(90deg, #15803d, #8b0000); }
.committee-group-banner { width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 22px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.committee-group-banner img { width: 100%; height: auto; display: block; }

.hierarchical-pyramid-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.pyramid-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 12px;
    width: calc(25% - 15px);
    text-align: center;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease;
}

.pyramid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.pyramid-card .avatar-wrap {
    width: 90px;
    height: 90px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pyramid-card .avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.pyramid-card .name {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px;
}

.pyramid-card .role {
    font-size: 11.5px;
    color: #15803d;
    font-weight: 700;
}

/* ========================================================
   ৪. গ্লোবাল পেজিনেশন (১৫ জনের পর পরবর্তী পেজ)
   ======================================================== */
.pressclub-pagination {
    margin-top: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.pressclub-pagination ul.page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.pressclub-pagination a.page-numbers,
.pressclub-pagination span.page-numbers,
.pressclub-pagination a,
.pressclub-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.pressclub-pagination a:hover {
    background: #8b0000;
    color: #ffffff !important;
    border-color: #8b0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.25);
}

.pressclub-pagination .current {
    background: linear-gradient(135deg, #8b0000, #b91c1c);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(139, 0, 0, 0.3);
}

.no-member-alert,
.no-members-found {
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    width: 100%;
    grid-column: 1 / -1;
}

/* ========================================================
   ৫. ডার্ক মোড সাপোর্ট
   ======================================================== */
body.dark-mode .member-single-card,
body.dark-mode .m-card,
body.dark-mode .pyramid-card,
body.dark-mode .member-page-header {
    background: #18181b !important;
    border-color: #27272a !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

body.dark-mode .member-single-card:hover,
body.dark-mode .m-card:hover {
    border-color: #8b0000 !important;
}

body.dark-mode .member-meta .name,
body.dark-mode .m-name a,
body.dark-mode .pyramid-card .name,
body.dark-mode .member-page-header h1 {
    color: #f1f5f9 !important;
}

body.dark-mode .member-avatar img,
body.dark-mode .m-avatar-frame img,
body.dark-mode .pyramid-card .avatar-wrap {
    border-color: #18181b;
}

body.dark-mode .pressclub-pagination a,
body.dark-mode .pressclub-pagination span {
    background: #27272a;
    border-color: #3f3f46;
    color: #e2e8f0;
}

body.dark-mode .tab-item {
    background: #27272a;
    color: #cbd5e1;
    border-color: #3f3f46;
}

/* ========================================================
   ৬. রেসপন্সিভ সমন্বয়
   ======================================================== */
@media (max-width: 992px) {
    .members-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pyramid-card {
        width: calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .members-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .member-cards-layout.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pyramid-card {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .members-gallery-grid {
        grid-template-columns: 1fr;
    }
    .member-cards-layout.layout-grid {
        grid-template-columns: 1fr;
    }
    .pyramid-card {
        width: 100%;
    }
}