﻿/*=========================================================
    MEMBER DIRECTORY
    Enterprise v2
=========================================================*/

/*=========================================================
    ROOT
=========================================================*/

:root {
    --primary: #2f5bea;
    --primary-dark: #2448c9;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ff9800;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #222;
    --text-light: #666;
    --border: #e8edf5;
    --radius: 16px;
    --shadow: 0 8px 25px rgba(0,0,0,.08);
}

/*=========================================================
    GLOBAL
=========================================================*/

body {
    background: var(--bg);
    font-family: 'Poppins',sans-serif;
    color: var(--text);
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

.member-directory-page {
    padding-bottom: 40px;
}

/*=========================================================
    HERO
=========================================================*/

.directory-hero {
    background: linear-gradient( 135deg, #1d4ed8, #2563eb);
    padding: 40px 0 70px;
    position: relative;
}

.directory-title {
    color: #fff;
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 8px;
}

.directory-subtitle {
    color: rgba(255,255,255,.88);
    font-size: 15px;
    margin-bottom: 28px;
}

/*=========================================================
    SEARCH BAR
=========================================================*/

.directory-search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 35px rgba(0,0,0,.15);
    overflow: hidden;
    height: 58px;
}

.search-icon {
    width: 58px;
    text-align: center;
    color: #999;
    font-size: 18px;
}

.search-text {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-size: 15px;
    padding: 0 8px;
    height: 58px;
}

    .search-text:focus {
        outline: none;
        box-shadow: none;
    }

.search-loader {
    width: 55px;
    text-align: center;
    color: var(--primary);
    display: none;
}
/*=========================================================
    COMPACT STATISTICS
=========================================================*/

.directory-statistics {
    margin-top: -30px;
    position: relative;
    z-index: 20;
    margin-bottom: 22px;
}

.mini-stat-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    height: 82px;
    padding: 0 18px;
    box-shadow: var(--shadow);
    transition: .25s;
    border: 1px solid var(--border);
}

    .mini-stat-card:hover {
        transform: translateY(-3px);
    }

.mini-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    background: #edf3ff;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.mini-stat-content {
    flex: 1;
}

.mini-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.mini-stat-title {
    margin-top: 4px;
    color: #777;
    font-size: 13px;
    font-weight: 500;
}

/*=========================================================
    RESULTS
=========================================================*/

.member-directory-results {
    position: relative;
    padding-bottom: 40px;
}

#memberResults {
    min-height: 250px;
    position: relative;
}

/*=========================================================
    SEARCH INFORMATION
=========================================================*/

.search-result-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 14px;
    color: #666;
}

    .search-result-info strong {
        color: var(--primary);
        font-weight: 700;
    }

/*=========================================================
    AJAX LOADER
=========================================================*/

.member-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

    .member-loading i {
        font-size: 40px;
        color: var(--primary);
        margin-bottom: 15px;
    }

    .member-loading span {
        color: #666;
        font-size: 14px;
    }

@keyframes memberSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.member-loading i {
    animation: memberSpin .9s linear infinite;
}

/*=========================================================
    SECTION SPACING
=========================================================*/

.directory-section {
    margin-bottom: 28px;
}

    .directory-section:last-child {
        margin-bottom: 0;
    }
/*=========================================================
    MEMBER GRID
=========================================================*/

.member-grid {
    margin-top: 8px;
}

    .member-grid .row {
        --bs-gutter-x: 18px;
        --bs-gutter-y: 18px;
    }

/*=========================================================
    MEMBER CARD
=========================================================*/

.member-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    transition: all .25s ease;
    box-shadow: var(--shadow);
}

    .member-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 18px 35px rgba(0,0,0,.12);
    }

    /*=========================================================
    TOP STRIP
=========================================================*/

    .member-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient( 90deg, var(--primary), #4f46e5);
    }

/*=========================================================
    IMAGE
=========================================================*/

.member-image-wrapper {
    text-align: center;
    padding-top: 18px;
}

.member-image {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    transition: .30s;
}

.member-card:hover .member-image {
    transform: scale(1.05);
}

/*=========================================================
    BODY
=========================================================*/

.member-body {
    padding: 14px 16px 18px;
    text-align: center;
}

/*=========================================================
    NAME
=========================================================*/

.member-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.35;
}

/*=========================================================
    DESIGNATION
=========================================================*/

.member-designation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 25px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

/*=========================================================
    WING
=========================================================*/

.member-wing {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

    .member-wing i {
        color: var(--primary);
        margin-right: 5px;
    }

/*=========================================================
    LOCATION
=========================================================*/

.member-location {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
    margin-bottom: 10px;
    min-height: 36px;
}

    .member-location i {
        color: #ff9800;
        margin-right: 5px;
    }

/*=========================================================
    BIO
=========================================================*/

.member-bio {
    font-size: 12px;
    color: #666;
    line-height: 1.55;
    min-height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/*=========================================================
    LEADERSHIP BADGE
=========================================================*/

.leadership-ribbon {
    position: absolute;
    top: 14px;
    right: -42px;
    width: 145px;
    padding: 6px 0;
    background: linear-gradient( 135deg, #ff4d4f, #d90429);
    color: #fff;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    transform: rotate(45deg);
    z-index: 5;
}

    .leadership-ribbon i {
        margin-right: 4px;
        font-size: 9px;
    }

/*=========================================================
    ACTIONS
=========================================================*/

.member-actions {
    margin-top: 14px;
}

    .member-actions .btn {
        width: 100%;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 10px;
        background: linear-gradient( 135deg, var(--primary), var(--primary-dark));
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        transition: .25s;
    }

        .member-actions .btn i {
            margin-right: 6px;
        }

        .member-actions .btn:hover {
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 10px 22px rgba(47,91,234,.28);
        }

/*=========================================================
    EMPTY STATE
=========================================================*/

.no-record-section {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 70px 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.no-record-icon {
    width: 90px;
    height: 90px;
    margin: auto;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #eef3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: var(--primary);
}

.no-record-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.no-record-section p {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    max-width: 520px;
    margin: auto;
}

/*=========================================================
    PAGINATION
=========================================================*/

.directory-pagination {
    margin-top: 30px;
    margin-bottom: 10px;
}

.pagination {
    gap: 8px;
    justify-content: center;
}

    .pagination .page-item {
        border: none;
    }

    .pagination .page-link {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 10px;
        background: #fff;
        color: #666;
        font-size: 13px;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
        transition: .25s;
    }

        .pagination .page-link:hover {
            background: var(--primary);
            color: #fff;
        }

    .pagination .page-item.active .page-link {
        background: linear-gradient( 135deg, var(--primary), var(--primary-dark));
        color: #fff;
    }

/*=========================================================
    CARD ENTRY ANIMATION
=========================================================*/

.member-card {
    animation: fadeMember .35s ease;
}

@keyframes fadeMember {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/*=========================================================
    LIVE SEARCH
=========================================================*/

.search-loader {
    display: none;
    width: 52px;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}

    .search-loader.active {
        display: flex;
    }

.directory-search.loading {
    pointer-events: none;
    opacity: .75;
}

    .directory-search.loading
    .search-loader {
        display: flex;
    }

    .directory-search.loading
    .search-icon {
        display: none;
    }

/*=========================================================
    SEARCH FOCUS
=========================================================*/

.directory-search {
    transition: box-shadow .25s ease, transform .25s ease;
}

    .directory-search:hover {
        transform: translateY(-2px);
    }

    .directory-search:focus-within {
        box-shadow: 0 15px 35px rgba(47,91,234,.22);
    }

.search-text::placeholder {
    color: #999;
    transition: .25s;
}

.search-text:focus::placeholder {
    opacity: .45;
}

/*=========================================================
    TABLET
=========================================================*/

@media (max-width:991px) {

    .directory-hero {
        padding: 32px 0 60px;
    }

    .directory-title {
        font-size: 30px;
    }

    .directory-subtitle {
        font-size: 14px;
    }

    .directory-search {
        height: 54px;
    }

    .search-text {
        height: 54px;
        font-size: 14px;
    }

    .mini-stat-card {
        height: 72px;
        padding: 0 14px;
    }

    .mini-stat-number {
        font-size: 20px;
    }

    .member-image {
        width: 68px;
        height: 68px;
    }

    .member-name {
        font-size: 16px;
    }
}

/*=========================================================
    MOBILE
=========================================================*/

@media (max-width:767px) {

    .directory-hero {
        padding: 24px 0 45px;
    }

    .directory-title {
        font-size: 24px;
        line-height: 1.4;
    }

    .directory-subtitle {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .directory-search {
        height: 48px;
        border-radius: 12px;
    }

    .search-icon {
        width: 46px;
        font-size: 15px;
    }

    .search-text {
        height: 48px;
        font-size: 13px;
    }

    .directory-statistics {
        margin-top: -20px;
    }

    .mini-stat-card {
        height: 62px;
        border-radius: 12px;
        padding: 0 12px;
    }

    .mini-stat-icon {
        width: 38px;
        height: 38px;
        font-size: 14px;
        margin-right: 10px;
    }

    .mini-stat-number {
        font-size: 17px;
    }

    .mini-stat-title {
        font-size: 11px;
    }

    .member-card {
        border-radius: 14px;
    }

    .member-image {
        width: 62px;
        height: 62px;
    }

    .member-name {
        font-size: 15px;
    }

    .member-designation {
        font-size: 11px;
    }

    .member-wing {
        font-size: 11px;
    }

    .member-location {
        font-size: 11px;
    }

    .member-bio {
        display: none;
    }

    .member-actions .btn {
        height: 34px;
        font-size: 12px;
    }

    .leadership-ribbon {
        width: 130px;
        right: -40px;
        font-size: 9px;
    }
}

/*=========================================================
    EXTRA SMALL
=========================================================*/

@media (max-width:480px) {

    .directory-title {
        font-size: 20px;
    }

    .directory-search {
        height: 44px;
    }

    .search-text {
        height: 44px;
        font-size: 12px;
    }

    .mini-stat-card {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        height: 78px;
    }

    .mini-stat-icon {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .mini-stat-title {
        display: none;
    }
}

/*=========================================================
    UTILITIES
=========================================================*/

.text-primary {
    color: var(--primary) !important;
}

.shadow-none {
    box-shadow: none !important;
}

.rounded-xl {
    border-radius: 18px !important;
}

.border-light {
    border: 1px solid var(--border) !important;
}
/*=========================================================
    PROFESSIONAL LIVE SEARCH REFRESH
=========================================================*/

.directory-hero {
    background: linear-gradient(135deg, #0f6f3a, #168143 52%, #215f38);
}

.directory-search {
    border: 1px solid rgba(255,255,255,.75);
}

.search-result-info {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(25, 135, 84, .08);
    padding: 12px 16px;
}

.search-result-info em {
    color: #168143;
    font-style: normal;
    font-weight: 700;
}

.latest-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #168143;
    background: #ecfdf3;
    border: 1px solid #c9f4d9;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#memberResults {
    transition: opacity .18s ease, transform .18s ease;
}

#memberResults.is-refreshing {
    opacity: .62;
    transform: translateY(2px);
}

.member-grid-row {
    align-items: stretch;
}

.member-card::before {
    background: linear-gradient(90deg, #168143, #f59e0b);
}

.member-designation {
    background: #ecfdf3;
    color: #116b38;
}

.member-actions .btn {
    background: linear-gradient(135deg, #168143, #0f6f3a);
}

.member-actions .btn:hover {
    box-shadow: 0 10px 22px rgba(22,129,67,.24);
}

@media (max-width: 767px) {
    .search-result-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}
