/* Existing styles from previous code */

.staff-members {
    padding: 30px;
    max-width: 1000px;
    margin: 20px auto;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.staff-members h2 {
    text-align: center;
    color: #2a6c8e;
    margin-bottom: 20px;
    font-size: 2em;
}

/* Search Box Styles */
.search-container-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-input-group {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    box-shadow: 0 4px 15px rgba(42, 108, 142, 0.3);
    border-color: #2a6c8e;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    width: 100%;
}

.search-input::placeholder {
    color: #999;
    transition: color 0.3s ease;
}

.search-input:focus::placeholder {
    color: #ccc;
}

.clear-input {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-input:hover {
    background: #f0f0f0;
    color: #666;
}

.search-results-info {
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2a6c8e;
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 500px;
}

.search-results-info p {
    margin: 0 0 10px 0;
    color: #555;
    font-weight: 500;
}

.clear-search {
    color: #2a6c8e;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border: 1px solid #2a6c8e;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.clear-search:hover {
    background: #2a6c8e;
    color: white;
}

/* CSS for the members list */
.members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.member {
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #f8f9fa;
    padding: 20px 15px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    animation: fadeInUp 0.5s ease;
}

.member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #2a6c8e;
    display: block;
    margin: 0 auto;
}

.member h3 {
    font-size: 1.2em;
    margin: 10px 0 5px;
    color: #2a6c8e;
}

.member p {
    font-size: 1em;
    margin: 0;
    color: #666;
}

.member:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.search-input:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Responsive styling for smaller screens */
@media (max-width: 768px) {
    .staff-members {
        padding: 20px;
        margin: 10px auto;
    }
    
    .staff-members h2 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    .search-container {
        margin-bottom: 20px;
    }
    
    .search-input-group {
        border-radius: 25px;
    }
    
    .search-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .clear-input {
        right: 12px;
    }
    
    .members-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .member {
        padding: 15px 10px;
    }
    
    .member img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .staff-members {
        padding: 15px;
    }
    
    .staff-members h2 {
        font-size: 1.6em;
    }
    
    .members-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-input {
        padding: 10px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .search-input-group {
        border-radius: 15px;
    }
}

/* Focus styles for accessibility */
.search-input:focus {
    background-color: #fff;
}

/* Smooth transitions for all interactive elements */
.member, .search-input, .clear-input, .clear-search, .clear-search-btn {
    transition: all 0.3s ease;
}