/* =========================================
   Researcher Directory — Redesigned Styles
   ========================================= */

/* Main Container */
.rd-directory {
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    margin: 20px 0;
}

/* ---- Top Bar ---- */
.rd-top-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.rd-top-bar input,
.rd-top-bar select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    flex: 1 1 250px;
    outline: none;
    background-color: #fff;
    color: #333;
    transition: all 0.3s ease;
}

.rd-top-bar input[type="text"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.rd-top-bar select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.rd-top-bar input:focus,
.rd-top-bar select:focus {
    border-color: #89CDE9;
    box-shadow: 0 0 0 3px rgba(137, 205, 233, 0.3);
}

/* ---- Grid ---- */
.rd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ---- Card ---- */
.rd-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    background: #ffffff;
    border-radius: 14px;
    padding: 36px 30px 32px;
    color: #475569;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    height: 100%;
    box-sizing: border-box;
}

.rd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1), 0 6px 10px rgba(0, 0, 0, 0.06);
    color: inherit;
}

/* ---- Avatar Wrapper ---- */
.rd-avatar-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Initials Circle / Avatar Image */
.rd-avatar-initials, img.rd-avatar-img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #0ea5e9;
    letter-spacing: 1px;
    user-select: none;
    transition: transform 0.3s ease;
    object-fit: cover !important;
}

.rd-card:hover .rd-avatar-initials,
.rd-card:hover img.rd-avatar-img {
    transform: scale(1.06);
}

/* ---- Card Content ---- */
.rd-card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* English Name */
h3.rd-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a4e7c;
    line-height: 1.3;
}

/* English Name / Title */
.rd-english-name {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Faculty */
.rd-faculty {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

/* ---- Tags ---- */
.rd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: auto;
    padding-top: 15px;
}

.rd-tag {
    display: inline-block;
    background-color: #f0f5ff;
    color: #3b5ea6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #c7d7f5;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.4;
    text-align: center;
}

/* Utility */
.rd-hide {
    display: none !important;
}

/* Pagination */
.rd-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%;
}
.rd-pagination button {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.rd-pagination button:hover {
    background: #f1f5f9;
}
.rd-pagination button.active {
    background: #89CDE9;
    color: #fff;
    border-color: #89CDE9;
}