/* Modern Research & Innovation Staff Profiles Styling */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.staff-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Enhanced Shortcode Wrapper */
.staff-shortcode-wrapper {
    position: relative;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 70, 190, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(58, 123, 213, 0.03) 0%, transparent 50%);
}

.staff-shortcode-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0046BE, #3a7bd5, #0046BE);
    border-radius: 2px;
    animation: shimmer 2s infinite;
    box-shadow: 0 0 10px rgba(0, 70, 190, 0.3);
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Archive Header Styling */
.staff-archive-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2.5rem 1rem 2rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6f0fa 100%);
    border-bottom: 3px solid #0046BE;
    position: relative;
}

.staff-archive-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: linear-gradient(90deg, #0046BE, #3a7bd5);
    border-radius: 5px;
}

.staff-archive-title {
    font-size: 2.25rem;
    color: #0046BE;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.staff-archive-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

/* Department Filter Styling */
.staff-filter-container {
    max-width: 1350px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.staff-filter {
    background-color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 70, 190, 0.08);
    position: relative;
    z-index: 1;
}

.filter-label {
    font-weight: 600;
    color: #333;
    margin-right: 1.25rem;
    display: inline-block;
    position: relative;
    padding-left: 22px;
}

.filter-label::before {
    content: '\f0b0'; /* Filter icon */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 0;
    color: #0046BE;
    font-size: 16px;
}

.department-filter {
    display: inline-flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.6rem;
}

.department-filter li {
    margin: 0;
    padding: 0;
}

.department-filter a {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    color: #555;
    background-color: #f0f4f8;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 70, 190, 0.08);
    font-weight: 500;
}

.department-filter a:hover {
    background-color: rgba(0, 70, 190, 0.1);
    color: #0046BE;
    border-color: rgba(0, 70, 190, 0.15);
    transform: translateY(-1px);
}

.department-filter a.active {
    background-color: #0046BE;
    color: #fff;
    border-color: #0046BE;
    box-shadow: 0 2px 8px rgba(0, 70, 190, 0.25);
}

/* General Staff Styling */
.staff-error {
    color: #d63638;
    font-weight: bold;
}

.staff-no-results {
    text-align: center;
    padding: 3rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #666;
}

/* Common Styles for Staff Cards */
.staff-member-link-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.staff-member-name {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 18px;
    color: #0046BE;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}

.staff-member-card:hover .staff-member-name {
    color: #3a7bd5;
    transform: translateY(-2px);
}

.staff-member-position {
    color: #555;
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.staff-member-card:hover .staff-member-position {
    color: #0046BE;
    font-weight: 600;
}

.default-staff-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
    display: block;
    object-fit: cover;
}

/* Staff Members Grid Styling */
.staff-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1350px;
    margin: 0 auto;
    position: relative;
}

.staff-members-grid.staff-shortcode-wrapper {
    padding-top: 3rem;
}

/* Grid Image Layout */
.staff-members-grid-image {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.staff-members-grid-image .staff-member-card {
    text-align: center;
    padding: 0;
    border: none;
    background: transparent;
    transition: transform 0.3s ease;
}

.staff-members-grid-image .staff-member-card:hover {
    transform: translateY(-5px);
}

.staff-members-grid-image .staff-member-image {
    width: 100%;
    padding-top: 100%;
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.staff-members-grid-image .staff-member-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.staff-members-grid-image .staff-member-card:hover .staff-member-image img {
    transform: scale(1.05);
}

.staff-members-grid-image .staff-member-name {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: #333;
}

.staff-members-grid-image .staff-member-position {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
    .staff-members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .staff-members-grid-image {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .staff-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .staff-members-grid-image {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .staff-members-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-members-grid-image {
        grid-template-columns: 1fr;
    }
}

.staff-members-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.staff-members-list.staff-shortcode-wrapper {
    padding-top: 3rem;
}

/* Compact Layout - Clean Card Style */
.staff-members-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1350px;
    margin: 0 auto;
}

.staff-members-compact.staff-shortcode-wrapper {
    padding-top: 3rem;
}

.staff-member-compact-layout {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.staff-member-compact-layout:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.staff-member-compact-layout .staff-member-image {
    width: 100%;
    padding: 0;
    background: #f5f5f5;
    border: none;
    overflow: hidden;
    aspect-ratio: 1;
}

.staff-member-compact-layout .staff-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.staff-member-compact-layout:hover .staff-member-image img {
    transform: scale(1.05);
}

.staff-member-compact-layout .staff-member-content {
    padding: 1.5rem 1.25rem;
    text-align: left;
    background: #fff;
}

.staff-member-compact-layout .staff-member-name {
    font-size: 16px;
    font-weight: 600;
    color: #4169E1;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    text-align: left;
}

.staff-member-compact-layout .staff-member-underline {
    width: 40px;
    height: 3px;
    background: #000;
    margin: 0 0 0.75rem 0;
}

.staff-member-compact-layout .staff-member-position {
    font-size: 14px;
    color: #333;
    font-weight: 400;
    margin: 0;
    text-align: left;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .staff-members-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .staff-members-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .staff-members-compact {
        grid-template-columns: 1fr;
    }
}

/* Horizontal Layout */
.staff-members-horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem 1rem;
    max-width: 1350px;
    margin: 0 auto;
}

.staff-members-horizontal.staff-shortcode-wrapper {
    padding-top: 3rem;
}

.staff-member-horizontal-layout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.staff-member-horizontal-layout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0046BE, #3a7bd5);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.staff-member-card:hover .staff-member-horizontal-layout::before {
    opacity: 1;
}

.staff-member-horizontal-layout .staff-member-image {
    width: 120px;
    min-width: 120px;
    height: 120px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    border: none;
    overflow: hidden;
}

.staff-member-horizontal-layout .staff-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.staff-member-horizontal-layout .staff-member-content {
    flex: 1;
    padding: 0.5rem 0;
    text-align: left;
}

.staff-member-horizontal-layout .staff-member-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
    text-align: left;
    line-height: 1.3;
}

.staff-member-horizontal-layout .staff-member-position {
    font-size: 13px;
    color: #555;
    margin: 0;
    text-align: left;
    line-height: 1.4;
}

@media (max-width: 992px) {
    .staff-members-horizontal {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .staff-members-horizontal {
        grid-template-columns: 1fr;
    }
    
    .staff-member-horizontal-layout .staff-member-image {
        width: 100px;
        min-width: 100px;
        height: 100px;
    }
}

/* List Layout */
.staff-member-list-layout {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(0, 70, 190, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.staff-member-list-layout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #0046BE, #3a7bd5, #00d4ff);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.staff-member-list-layout:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0, 70, 190, 0.12);
    border-color: rgba(0, 70, 190, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

.staff-member-list-layout:hover::before {
    transform: scaleY(1);
}

.staff-member-list-layout .staff-member-image {
    width: 100px;
    height: 100px;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.staff-member-list-layout .staff-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 70, 190, 0.12);
}

.staff-member-list-layout .staff-member-content {
    flex-grow: 1;
    text-align: left;
}

.staff-member-list-layout .staff-member-name {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
    color: #333;
}

.staff-member-list-layout .staff-member-position {
    font-size: 0.9rem;
    color: #666;
}

/* Modal Styling - Enhanced */
.staff-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    overflow-y: auto;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.staff-modal-content {
    position: relative;
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

.staff-modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    font-weight: 300;
}

.staff-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

.staff-modal-header {
    padding: 2rem;
    background: #fff;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.staff-modal-header::before {
    display: none;
}

.staff-modal-image {
    width: 180px;
    min-width: 180px;
    height: 240px;
    margin: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.staff-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.staff-modal-image img:hover {
    transform: scale(1.05);
}

.staff-modal-title {
    position: relative;
    z-index: 1;
    flex: 1;
}

.staff-modal-title h2 {
    font-size: 1.75rem;
    color: #333;
    margin: 0 0 0.75rem;
    font-weight: 700;
    text-shadow: none;
}

.staff-modal-position {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    text-shadow: none;
    margin-bottom: 1rem;
}

.staff-modal-header-contact {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.staff-modal-header-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #333;
}

.staff-modal-header-email .dashicons {
    color: #0046be;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.staff-modal-header-email a {
    color: #0046be;
    text-decoration: none;
    transition: color 0.3s ease;
}

.staff-modal-header-email a:hover {
    color: #3a7bd5;
    text-decoration: underline;
}

.staff-research-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #0046be 0%, #3a7bd5 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 70, 190, 0.2);
    align-self: flex-start;
}

.staff-research-profile-btn:hover {
    background: linear-gradient(135deg, #003a9e 0%, #2d6bc4 100%);
    box-shadow: 0 4px 12px rgba(0, 70, 190, 0.3);
    transform: translateY(-2px);
}

.staff-research-profile-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.staff-modal-body {
    padding: 2.5rem;
    background-color: #fff;
}

.staff-modal-bio {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #444;
    font-size: 13px;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0046BE;
}

.staff-modal-details {
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.staff-modal-details-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0046BE;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-modal-details-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background-color: #0046BE;
    border-radius: 2px;
}

.staff-modal-email,
.staff-modal-departments {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.staff-modal-email strong,
.staff-modal-departments strong {
    color: #333;
    font-weight: 600;
    min-width: 110px;
}

.staff-modal-email a {
    color: #0046BE;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.staff-modal-email a:hover {
    color: #3a7bd5;
    text-decoration: underline;
}

.staff-modal-email a::before {
    content: '\f466';
    font-family: 'dashicons';
    font-size: 16px;
}

.staff-modal-departments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.department-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6f0fa 100%);
    color: #0046BE;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 70, 190, 0.15);
    transition: all 0.3s ease;
}

.department-badge:hover {
    background: linear-gradient(135deg, #0046BE 0%, #3a7bd5 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 70, 190, 0.3);
}

.staff-modal-social-wrapper {
    margin-top: 2rem;
}

.staff-modal-social {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.staff-modal-social-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.staff-modal-social-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0046BE, #3a7bd5);
    border-radius: 2px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6f0fa 100%);
    color: #0046BE;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 70, 190, 0.1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 70, 190, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

.social-link:hover {
    background: linear-gradient(135deg, #0046BE 0%, #3a7bd5 100%);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 70, 190, 0.4);
    border-color: #0046BE;
}

.social-link .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .staff-member-list-layout {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .staff-member-list-layout .staff-member-image {
        margin: 0 0 1rem;
    }

    .staff-member-list-layout .staff-member-content {
        text-align: center;
    }

    .staff-modal-content {
        margin: 5% auto;
        width: 95%;
        border-radius: 12px;
    }

    .staff-modal-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
    }

    .staff-modal-image {
        width: 150px;
        min-width: 150px;
        height: 200px;
    }

    .staff-modal-title h2 {
        font-size: 1.5rem;
    }

    .staff-modal-body {
        padding: 1.5rem;
    }

    .staff-modal-email,
    .staff-modal-departments {
        flex-direction: column;
        gap: 0.3rem;
    }

    .staff-modal-email strong,
    .staff-modal-departments strong {
        min-width: auto;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .social-link .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

.staff-member-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 70, 190, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

.staff-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #0046BE, #3a7bd5, #00d4ff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.staff-member-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #0046BE, #3a7bd5, #00d4ff);
    transition: width 0.4s ease;
    border-radius: 12px 12px 0 0;
}

.staff-member-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 70, 190, 0.15), 
                0 0 30px rgba(0, 70, 190, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

.staff-member-card:hover::before {
    opacity: 1;
    animation: pulse 2s infinite;
}

.staff-member-card:hover::after {
    width: 100%;
    box-shadow: 0 0 20px rgba(0, 70, 190, 0.4);
}

.staff-member-image {
    overflow: hidden;
    position: relative;
    padding: 1.75rem 1rem 0.75rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6f0fa 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0, 70, 190, 0.08);
}

.staff-member-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(0, 70, 190, 0.05), rgba(0, 70, 190, 0.15), rgba(0, 70, 190, 0.05));
}

.staff-member-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 70, 190, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.staff-member-card:hover .staff-member-image::after {
    opacity: 1;
}

.staff-member-image img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 5px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 70, 190, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.staff-member-card:hover .staff-member-image img {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 12px 35px rgba(0, 70, 190, 0.25);
    border-color: rgba(0, 70, 190, 0.2);
}

.staff-member-content {
    padding: 1.25rem 1.25rem 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Department Tags */
.staff-member-department {
    margin: 0.75rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.department-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background-color: rgba(0, 70, 190, 0.08);
    color: #0046BE;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    border: 1px solid rgba(0, 70, 190, 0.12);
    transition: all 0.3s ease;
}

.staff-member-card:hover .department-tag {
    background-color: rgba(0, 70, 190, 0.12);
    border-color: rgba(0, 70, 190, 0.18);
}

/* Staff Excerpt */
.staff-member-excerpt {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.75rem 0 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.8rem; /* 3 lines × 1.6 line-height */
}

/* View Profile Button */
.staff-member-view-profile {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0046BE;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 70, 190, 0.2);
    border-radius: 4px;
    background-color: rgba(0, 70, 190, 0.03);
}

.view-profile-text {
    margin-right: 0.5rem;
}

.view-profile-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    position: relative;
    top: 1px;
}

.staff-member-card:hover .staff-member-view-profile {
    color: #fff;
    background-color: #0046BE;
    border-color: #0046BE;
}

.staff-member-card:hover .view-profile-icon {
    transform: translateX(4px);
}

/* Pagination Styling */
.staff-pagination {
    margin: 3rem auto;
    text-align: center;
}

.staff-pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    background-color: #fff;
    color: #0046BE;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.staff-pagination .page-numbers.current {
    background-color: #0046BE;
    color: #fff;
}

.staff-pagination .page-numbers:hover {
    background-color: #e6f0fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .staff-archive-title {
        font-size: 2rem;
    }
    
    .filter-label {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .department-filter {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    .staff-members-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-member-image img,
    .default-staff-image {
        width: 140px;
        height: 140px;
    }
}

/* Single Staff Member Styling - Legacy Vertical Card */
.single-staff-member {
    max-width: 320px;
    margin: 2rem auto;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    text-align: center;
}

.single-staff-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.single-staff-member .staff-member-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.single-staff-member .staff-member-image img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
    margin: 0 auto;
    display: block;
}

.single-staff-member:hover .staff-member-image img {
    transform: scale(1.08);
}

.single-staff-member .default-staff-image {
    width: 180px;
    height: 180px;
    display: block;
    margin: 0 auto;
}

.single-staff-member .staff-divider {
    margin: 1rem auto;
    border: 0;
    height: 2px;
    width: 80%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
}

.single-staff-member .staff-member-content {
    text-align: center;
    padding: 1.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.single-staff-member .staff-member-name {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    text-align: center;
    color: #2c3e50;
}

.single-staff-member .staff-member-position {
    font-size: 1.15rem;
    text-align: center;
    color: #5a6a7e;
}

/* Single Staff Card - New Horizontal Card Layout */
.single-staff-card {
    max-width: 100%; /* Responsive width instead of fixed width */
    margin: 2rem auto;
    background-color: #f7f8fb;
    overflow: hidden;
    display: block;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent; /* Transparent border initially */
}

.single-staff-card:hover {
    border-bottom: 3px solid #0046BE; /* Blue bottom border on hover */
}

.staff-card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    /* width: 100%; */
    height: 100%;
}

.staff-card-layout {
    display: flex;
    flex-direction: row;
    min-height: 120px; /* Increased height */
    width: 100%;
}

.staff-card-image {
    flex: 0 0 120px; /* Fixed width for image */
    position: relative;
    overflow: hidden;
    min-height: 120px; /* Increased height to match layout */
    margin: 5px; /* Add margin around the image */
}

.staff-card-image img {
    width: 100%;
    height: calc(100% - 10px); /* Subtract margin to prevent overflow */
    object-fit: cover;
    object-position: center top;
    display: block;
    position: absolute;
    top: 5px; /* Add space at top */
    left: 0;
    bottom: 5px; /* Add space at bottom */
    right: 0;
    border-radius: 0;
}

.staff-card-image .default-staff-image {
    width: 100%;
    height: calc(100% - 10px);
    border-radius: 0;
    object-fit: cover;
    border: none;
    box-shadow: none;
    position: absolute;
    top: 5px;
    left: 0;
}

.staff-card-content {
    flex: 1; /* Take remaining space */
    padding: 1.2rem 1.5rem 1rem; /* Adjusted padding for better alignment */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    background-color: #f7f8fb; /* Updated background color to match */
}

.staff-card-name {
    font-size: 15px; /* Reduced font size as requested */
    margin-top: 0;
    margin-bottom: 0.4rem;
    color: #333;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
}

.staff-card-position {
    font-size: 13px; /* Reduced font size as requested */
    color: #555;
    font-style: normal;
    text-align: left;
    line-height: 1.3;
}

/* Responsive Styles for Staff Card - Maintain horizontal layout on all devices */
@media (max-width: 768px) {
    .single-staff-card {
        width: 100%;
        max-width: 100%;
        margin: 1rem auto;
    }
    
    .staff-card-layout {
        flex-direction: row; /* Keep horizontal layout */
        min-height: 100px; /* Slightly reduce height on mobile */
    }
    
    .staff-card-image {
        flex: 0 0 100px; /* Slightly smaller image on mobile */
        min-height: 100px;
    }
    
    .staff-card-content {
        padding: 0.8rem 1rem; /* Reduce padding on mobile */
    }
    
    .staff-card-name {
        font-size: 14px; /* Slightly smaller title on very small screens */
    }
    
    .staff-card-position {
        font-size: 12px; /* Slightly smaller position on very small screens */
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .staff-card-layout {
        min-height: 90px; /* Further reduce height on very small screens */
    }
    
    .staff-card-image {
        flex: 0 0 80px; /* Even smaller image on very small screens */
        min-height: 90px;
    }
}

/* Responsive Styling */
@media (max-width: 768px) {
    .staff-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .single-staff-member {
        max-width: 300px;
    }
    
    .single-staff-member .staff-member-image img {
        max-width: 140px;
    }
    
    .single-staff-member .default-staff-image {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .staff-members-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 2rem auto;
    }
    
    .single-staff-member {
        max-width: 280px;
    }
    
    .single-staff-member .staff-member-image img {
        max-width: 120px;
    }
    
    .single-staff-member .default-staff-image {
        width: 120px;
        height: 120px;
    }
}

/* Responsive Styling */
@media (max-width: 768px) {
    .single-staff-member {
        padding: 1.5rem;
    }
    
    .single-staff-member .staff-member-image img {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .single-staff-member {
        padding: 1rem;
    }
    
    .single-staff-member .staff-member-image img {
        max-width: 150px;
    }
}

/* Professional Layout - Matching the provided design */
.staff-members-professional {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.staff-members-professional.staff-shortcode-wrapper {
    padding-top: 3rem;
}

.staff-member-professional-layout {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.staff-member-professional-layout:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.staff-member-professional-layout .staff-member-image {
    width: 100%;
    padding: 0;
    background: #f5f5f5;
    border: none;
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
}

.staff-member-professional-layout .staff-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
    display: block;
}

.staff-member-professional-layout:hover .staff-member-image img {
    transform: scale(1.05);
}

.staff-member-professional-layout .staff-member-content {
    padding: 1rem 1rem;
    text-align: left;
    background: #fff;
}

.staff-member-professional-layout .staff-member-name {
    font-size: 15px;
    font-weight: 600;
    color: #0046be;
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
    text-align: left;
}

.staff-member-professional-layout .staff-member-underline {
    width: 35px;
    height: 2.5px;
    background: #000;
    margin: 0 0 0.6rem 0;
}

.staff-member-professional-layout .staff-member-position {
    font-size: 13px;
    color: #333;
    font-weight: 400;
    margin: 0;
    text-align: left;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .staff-members-professional {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .staff-members-professional {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .staff-members-professional {
        grid-template-columns: 1fr;
    }
}