.letter-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 16px;
}

.letter-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 0;
    margin-left: -1px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.letter-btn:hover {
    background: #e6f4f4;
    border-color: #1f8585;
    color: #1f8585;
}

.letter-btn.active {
    background: #1f8585;
    color: #fff;
    border-color: #1f8585;
}

.letter-btn:first-child {
    border-radius: 4px 0 0 4px;
    margin-left: 0;
}

.letter-btn:last-child {
    border-radius: 0 4px 4px 0;
}

#directory-filters input,
#directory-filters select {
    margin: 5px 0;
    padding: 5px;
}

.staff-card {
    padding: 10px;
    border: 1px solid #ccc;
    margin: 10px 0;
}

/* Staff directory card hover effects */
.iiumcard {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    position: relative;
}

.iiumcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(31, 133, 133, 0.18);
    border-color: #1f8585;
}

.iiumcard .card-img-top {
    transition: filter 0.2s ease;
}

.iiumcard:hover .card-img-top {
    filter: brightness(1.05);
}

.iiumcard .card-body {
    position: relative;
}

/* "View Profile" pill that slides up on hover */
.iiumcard::after {
    content: "View Profile →";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f8585;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 7px 0;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.iiumcard:hover::after {
    opacity: 1;
    transform: translateY(0);
}

#loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.my-directory-widget .form-control-directory {
    border: 1px solid #ccc;
    font-size: 14px;
}

.my-directory-widget label {
    display: block;
    margin-left: 0;
    padding-left: 0;
}

/* Avoid theme overrides */
.my-directory-widget h3 {
    font-weight: bold;
}

.my-directory-widget .my-field {
    width: 100%;
    max-width: 300px;
    height: 40px;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    box-sizing: border-box;
}

.my-directory-widget .my-field:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #ced4da;
    cursor: not-allowed;
    opacity: 1;
}

.my-directory-widget .my-button {
    width: 100%;
    max-width: 300px;
    height: 40px;
    background: #1f8585;
    color: #fff;
    border-color: #1f8585;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pagination */
.dir-pagination-nav .page-link {
    color: #1f8585;
    border-color: #dee2e6;
    border-radius: 6px !important;
    margin: 0 2px;
    min-width: 38px;
    text-align: center;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dir-pagination-nav .page-link:hover,
.dir-pagination-nav .page-link:focus {
    color: #fff;
    background-color: #1f8585;
    border-color: #1f8585;
    box-shadow: 0 2px 6px rgba(31, 133, 133, 0.25);
}

.dir-pagination-nav .page-item.active .page-link {
    background-color: #1f8585;
    border-color: #1f8585;
    color: #fff;
    box-shadow: 0 2px 8px rgba(31, 133, 133, 0.35);
}

.dir-pagination-nav .page-item.disabled .page-link {
    color: #adb5bd;
    border-color: #dee2e6;
    background: #f8f9fa;
}

.dir-page-info {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 0;
}

#directory-results {
    max-width: 1200px;
    margin: 0 auto;
}

.card-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.card-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.card-contact-row i {
    flex-shrink: 0;
    margin-top: 2px;
    width: 14px;
    text-align: center;
    color: black;
}

.card-email {
    color: inherit;
    word-break: break-all;
}

/* ── Publication links ── */
.read table a {
    text-decoration: none;
    color: #1f8585;
}

.read table a:hover {
    text-decoration: underline;
    color: #1f8585;
}

/* ── Supervision badges (progressive grey shading) ── */
.supervision-font {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.program-level {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-complete,
.status-progress {
    background-color: rgba(0, 0, 0, 0.52);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-year {
    background-color: rgba(0, 0, 0, 0.52);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.supervision-type {
    background-color: rgba(0, 0, 0, 0.12);
    color: #333;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Read More / Read Less button ── */
.mdp-readmore-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px auto 20px;
    padding: 7px 22px;
    background: #fff;
    color: #1f8585;
    border: 1.5px solid #1f8585;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(31, 133, 133, 0.08);
}

.mdp-readmore-btn:hover {
    background: #1f8585;
    color: #fff;
    box-shadow: 0 3px 10px rgba(31, 133, 133, 0.25);
}

.mdp-readmore-btn .mdp-chevron {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    margin-bottom: 3px;
}

.mdp-readmore-btn.mdp-open .mdp-chevron {
    transform: rotate(-135deg);
    margin-bottom: -3px;
}