/**
 * FAFEN Team Members Stylesheet
 * Custom styles for team/council member grid and single profiles.
 */

.fafen-members-container {
    width: 100%;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Base Grid (5 Columns for Desktop) */
.fafen-members-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 24px;
    row-gap: 40px;
    justify-content: center;
    align-content: start;
}

/* Individual Card Styling (Link compatible) */
.fafen-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    color: inherit !important;
    outline: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fafen-member-card:hover {
    transform: translateY(-4px);
}

/* Circular Photo Wrapper & Image */
.fafen-member-photo-wrapper {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background-color: var(--paper2, #f2f0eb);
    transition: box-shadow 0.3s ease;
}

.fafen-member-card:hover .fafen-member-photo-wrapper {
    box-shadow: 0 8px 20px rgba(10, 45, 110, 0.15);
}

.fafen-member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fafen-member-card:hover .fafen-member-photo {
    transform: scale(1.08);
}

/* Typography matching the site theme */
.fafen-member-name {
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #1a1917);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.fafen-member-designation {
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted, #6b6760);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.fafen-member-location {
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 11.5px;
    font-weight: 400;
    color: var(--muted, #888);
    line-height: 1.3;
}

/* -------------------------------------------------------------
 * Single Member Profile Detail Page Styles
 * ------------------------------------------------------------- */
.fafen-single-member-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.fafen-member-back-link {
    display: inline-flex;
    align-items: center;
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--navy, #0a2d6e);
    text-decoration: none;
    margin-bottom: 30px;
    transition: opacity 0.2s ease;
}

.fafen-member-back-link:hover {
    opacity: 0.8;
}

.fafen-member-profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.fafen-member-sidebar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    padding: 30px 20px;
    border-radius: 4px;
    border: 1px solid var(--rule, #ddd9d0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.fafen-member-large-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: var(--paper2, #f2f0eb);
}

.fafen-member-profile-name {
    font-family: var(--serif, Georgia, serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--navy, #0a2d6e);
    margin: 0 0 10px 0;
}

.fafen-member-profile-designation {
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #1a1917);
    margin: 0 0 8px 0;
}

.fafen-member-profile-location {
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted, #6b6760);
    margin: 0;
}

.fafen-member-bio-section {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    border: 1px solid var(--rule, #ddd9d0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.fafen-member-bio-title {
    font-family: var(--serif, Georgia, serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--navy, #0a2d6e);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold, #e8a000);
}

.fafen-member-bio-content {
    font-family: var(--serif, Georgia, serif);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink, #1a1917);
}

.fafen-member-bio-content p {
    margin: 0 0 16px 0;
}

.fafen-member-bio-content p:last-child {
    margin: 0;
}

/* -------------------------------------------------------------
 * RTL Styling Support
 * ------------------------------------------------------------- */
.fafen-members-rtl {
    direction: rtl;
}

.fafen-members-rtl .fafen-members-grid {
    direction: rtl;
}

.fafen-members-rtl .fafen-member-card {
    text-align: center;
}

.fafen-members-rtl .fafen-member-back-link {
    flex-direction: row-reverse;
}

.fafen-members-rtl .fafen-member-profile-grid {
    direction: rtl;
    grid-template-columns: 1fr 280px;
}

/* -------------------------------------------------------------
 * Responsive Layout Breakpoints
 * ------------------------------------------------------------- */

/* Laptops & Small Desktops */
@media (max-width: 1100px) {
    .fafen-members-grid {
        grid-template-columns: repeat(4, 1fr);
        column-gap: 20px;
        row-gap: 36px;
    }
    .fafen-member-photo-wrapper {
        width: 120px;
        height: 120px;
    }
}

/* Tablets & Mobile Adaptations */
@media (max-width: 850px) {
    .fafen-members-grid {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 16px;
        row-gap: 32px;
    }
    
    .fafen-member-profile-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .fafen-member-sidebar-card {
        padding: 24px 15px;
    }
    
    .fafen-member-bio-section {
        padding: 24px;
    }
}

/* Small Tablets / Large Mobiles (2 Columns) */
@media (max-width: 600px) {
    .fafen-members-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 12px;
        row-gap: 28px;
    }
    .fafen-member-photo-wrapper {
        width: 110px;
        height: 110px;
    }
    .fafen-member-name {
        font-size: 14px;
    }
    .fafen-member-designation {
        font-size: 12px;
    }
    .fafen-member-location {
        font-size: 11px;
    }
}

/* Small Mobiles (1 Column) */
@media (max-width: 380px) {
    .fafen-members-grid {
        grid-template-columns: 1fr;
        row-gap: 24px;
    }
}
