/* Modern Research & Innovation Staff Profiles Styling */

/* 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: 1200px;
    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: 17px;
    color: #0046BE;
    transition: color 0.3s ease;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
}

.staff-member-position {
    color: #555;
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-align: center;
    font-size: 0.95rem;
}

.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(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Grid Image Layout */
.staff-members-grid-image {
    grid-template-columns: repeat(3, 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-image {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

/* List Layout */
.staff-member-list-layout {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 70, 190, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.staff-member-list-layout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 70, 190, 0.15);
}

.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 */
.staff-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.staff-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
}

.staff-modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    z-index: 1;
}

.staff-modal-close:hover {
    color: #333;
}

.staff-modal-header {
    padding: 2rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6f0fa 100%);
    border-radius: 8px 8px 0 0;
    text-align: center;
    border-bottom: 1px solid rgba(0, 70, 190, 0.08);
}

.staff-modal-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
}

.staff-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
}

.staff-modal-title h2 {
    font-size: 1.75rem;
    color: #333;
    margin: 0 0 0.5rem;
}

.staff-modal-position {
    font-size: 1.1rem;
    color: #666;
}

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

.staff-modal-content {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #444;
}

.staff-modal-details {
    margin-bottom: 1.5rem;
    box-shadow: none;
}

.staff-modal-email,
.staff-modal-departments {
    margin-bottom: 0.75rem;
}

.staff-modal-email a {
    color: #0046BE;
    text-decoration: none;
}

.staff-modal-email a:hover {
    text-decoration: underline;
}

.staff-modal-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f4f8;
    color: #0046BE;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #0046BE;
    color: #fff;
    transform: translateY(-2px);
}

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

@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: 10% auto;
        width: 95%;
    }

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

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

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

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

.staff-member-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.35s ease;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.staff-member-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #0046BE, #3a7bd5);
    transition: width 0.35s ease;
}

.staff-member-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.staff-member-card:hover::after {
    width: 100%;
}

.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 img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 4px solid #fff;
    box-shadow: 0 6px 20px rgba(0, 70, 190, 0.12);
    transition: all 0.4s ease;
}

.staff-member-card:hover .staff-member-image img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 70, 190, 0.18);
}

.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;
    }
    
    .staff-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .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) {
    .staff-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .single-staff-member {
        padding: 1.5rem;
    }
    
    .single-staff-member .staff-member-image img {
        max-width: 200px;
    }
}

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