/* Staff Directory */
.staff-directory {
    direction: rtl;
    max-width: 1180px;
    margin: 25px auto;
    padding: 0 12px 25px;
    color: #24364b;
    font-family: inherit;
}

.staff-directory,
.staff-directory * {
    box-sizing: border-box;
}

/* Header */
.staff-directory .sd-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
    padding: 30px 34px;
    margin-bottom: 30px;
    border-radius: 15px;
    background: linear-gradient(120deg, #173b5d, #245e7c);
    color: #fff;
}

.staff-directory .sd-heading:after {
    content: "";
    position: absolute;
    left: -55px;
    top: -105px;
    width: 260px;
    height: 260px;
    border: 42px solid rgba(255,255,255,.055);
    border-radius: 50%;
}

.staff-directory .sd-heading-content {
    position: relative;
    z-index: 1;
}

.staff-directory .sd-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #a8ddeb;
    font-size: 12px;
    font-weight: 700;
}

.staff-directory .sd-heading h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.7;
}

.staff-directory .sd-heading p {
    margin: 0;
    color: #d5e4ef;
    font-size: 13px;
}

.staff-directory .sd-count {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-width: 94px;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    background: rgba(255,255,255,.09);
    text-align: center;
}

.staff-directory .sd-count strong {
    display: block;
    color: #fff;
    font-size: 27px;
    line-height: 1.3;
}

.staff-directory .sd-count span {
    color: #c7dce9;
    font-size: 11px;
}

/* Section heading */
.staff-directory .sd-section-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 19px;
    color: #24445f;
    font-size: 17px;
    font-weight: 800;
}

.staff-directory .sd-section-title:before {
    content: "";
    width: 4px;
    height: 23px;
    border-radius: 5px;
    background: #1596b5;
}

/* Cards */
.staff-directory .sd-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.staff-directory .sd-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e2eaf0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(25, 55, 80, .07);
    transition: transform .25s ease, box-shadow .25s ease;
}

.staff-directory .sd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(25, 55, 80, .13);
}

.staff-directory .sd-card-top {
    height: 6px;
    background: linear-gradient(90deg, #1596b5, #245e7c, #173b5d);
}

/* Card body */
.staff-directory .sd-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 25px 18px 20px;
    text-align: center;
}

/* Photo frame */
.staff-directory .sd-photo {
    position: relative;
    width: 150px;
    height: 175px;
    padding: 5px;
    margin-bottom: 19px;
    border: 1px solid #d5e4ed;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fcff, #dceaf2);
    box-shadow:
        0 0 0 4px #f0f5f8,
        0 8px 20px rgba(27, 69, 98, .16);
    transition: transform .3s ease, box-shadow .3s ease;
}

.staff-directory .sd-photo:after {
    content: "";
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 35px;
    height: 35px;
    border-right: 3px solid #2992ad;
    border-bottom: 3px solid #2992ad;
    border-radius: 0 0 10px 0;
    pointer-events: none;
}

.staff-directory .sd-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 11px;
    object-fit: cover;
    object-position: center top;
    transition: transform .4s ease;
}

.staff-directory .sd-card:hover .sd-photo {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 4px #e5f1f7,
        0 12px 24px rgba(27, 69, 98, .20);
}

.staff-directory .sd-card:hover .sd-photo img {
    transform: scale(1.035);
}

/* Avatar */
.staff-directory .sd-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 175px;
    margin-bottom: 19px;
    border: 1px solid #d5e4ed;
    border-radius: 16px;
    background: linear-gradient(145deg, #f2f8fc, #dceaf2);
    color: #286582;
    font-size: 34px;
    font-weight: 800;
    box-shadow: 0 0 0 4px #f0f5f8, 0 8px 20px rgba(27, 69, 98, .12);
}

/* Name */
.staff-directory .sd-name {
    min-height: 30px;
    margin: 0 0 9px;
    color: #1d3e5a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.8;
}

/* Role */
.staff-directory .sd-role {
    display: inline-block;
    max-width: 100%;
    padding: 6px 15px;
    margin-bottom: 14px;
    border: 1px solid #dcecf3;
    border-radius: 7px;
    background: #edf6fa;
    color: #176987;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
}

/* Education */
.staff-directory .sd-education {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid #edf1f4;
    color: #718091;
    font-size: 12px;
    line-height: 1.9;
}

.staff-directory .sd-education i {
    flex: 0 0 auto;
    margin-top: 5px;
    color: #2992ad;
    font-size: 13px;
}

.staff-directory .sd-education span {
    text-align: center;
}

/* Social icons */
.staff-directory .sd-social {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 15px;
    border-top: 1px solid #edf1f4;
    background: #f8fafc;
}

.staff-directory .sd-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    border: 1px solid #e0eaf1;
    border-radius: 50%;
    background: #edf3f8;
    color: #315d7d;
    font-size: 15px;
    text-decoration: none !important;
    transition: all .25s ease;
}

.staff-directory .sd-social a:hover {
    border-color: #245f85;
    background: #245f85;
    color: #fff;
    transform: translateY(-3px);
}

/* Bootstrap Popover */
.popover {
    direction: rtl;
    text-align: right;
    font-family: inherit;
    z-index: 9999;
}

.popover .popover-header {
    text-align: right;
    font-weight: 700;
}

.popover .popover-body {
    text-align: right;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

/* Responsive */
@media (max-width: 900px) {
    .staff-directory .sd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 560px) {
    .staff-directory {
        padding: 0 5px 20px;
    }

    .staff-directory .sd-heading {
        align-items: flex-start;
        padding: 23px 18px;
        gap: 10px;
    }

    .staff-directory .sd-heading h2 {
        font-size: 19px;
    }

    .staff-directory .sd-heading p {
        font-size: 11px;
        line-height: 1.9;
    }

    .staff-directory .sd-count {
        min-width: 65px;
        padding: 9px 7px;
    }

    .staff-directory .sd-count strong {
        font-size: 22px;
    }

    .staff-directory .sd-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .staff-directory .sd-card-body {
        padding: 22px 15px;
    }
}
