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

/* Common Styles for Staff Cards */
.staff-member-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.staff-member-name {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 15px !important;
    color: #333;
    transition: color 0.3s ease;
    text-align: center;
    font-weight: 700;
}

.staff-member-position {
    color: #0046BE;
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
    font-style: normal;
    text-align: center;
    font-size: 13px !important;
    font-weight: 600;
}

.default-staff-image {
    border-radius: 50%;
    background-color: #E5ECF8;
    border: 1px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
    display: block;
}

/* Motion keyframes */
@keyframes fadeInUp{
    0%{opacity:0;transform:translateY(30px);}
    100%{opacity:1;transform:translateY(0);}
}

/* Staff Members Grid Styling */
.staff-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.staff-member-card {
    border-top: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.staff-member-link-wrapper:hover .staff-member-card {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-top: 3px solid #0046BE;
}

.staff-member-link-wrapper:hover .staff-member-name {
    color: #0046BE;
}

.staff-member-image {
    overflow: hidden;
    position: relative;
    padding: 1.5rem 1.5rem 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.staff-member-image img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 2px solid #FFF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

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

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

/* 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 #0046BE;
    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;
}

/* Pagination Styling */
.staff-pagination{
    margin:2rem 0;
    text-align:center;
    display:flex;
    justify-content:center;
    gap:6px;
    flex-wrap:wrap;
}

.staff-pagination .page-numbers{
    display:inline-block;
    padding:8px 14px;
    border:1px solid #e0e0e0;
    border-radius:4px;
    color:#0046BE;
    font-weight:600;
    transition:all 0.3s ease;
}

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

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

/* Card entrance animation */
.staff-member-card{
    opacity:0;
    transform:translateY(30px);
    animation:fadeInUp .6s ease forwards;
}

/* 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;
    }
}