/* Container for the entire directory */
#expert-directory-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Two-column layout: filters on the left, results on the right */
.expert-directory-container {
  display: flex;
  flex-wrap: wrap;
}

/* Left Column (Filters) */
.expert-directory-filters {
  width: 25%;
  padding: 20px;
  box-sizing: border-box;
  background: #ffffff;
    border-radius: 4px; 
   
}

.expert-directory-filters h2 {
  margin-bottom: 15px;
  font-size: 1.5em;
}

.expert-directory-filters input,
.expert-directory-filters select {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Right Column (Results) */
.expert-directory-results {
  width: 75%;
  padding: 20px;
  box-sizing: border-box;
}

/* View toggle styles */
.view-toggle {
  text-align: right;
  margin-bottom: 15px;
}

.view-toggle .view-mode {
  padding: 8px 12px;
  margin-left: 5px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.view-toggle .view-mode.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* Expert item styles for list & grid views */
.experts.list-view .expert-item,
.experts.grid-view .expert-item {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  border-radius: 4px;
  flex-direction: column;
}

.experts.grid-view {
  display: flex;
  flex-wrap: wrap;
}

.experts.grid-view .expert-item {
  width: 48%;
  flex-direction: column;
  margin: 1%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
}

/* Expert Photo and Passport Size */
.expert-photo img,
.passport-photo {
  width: 150px;      /* Passport photo width */
  height: 200px;     /* Passport photo height */
  object-fit: cover; /* Prevent distortion, crop if necessary */
  object-position: center;
  border-radius: 4px;
  display: block;
}

/* Verified Badge Overlay on Photo */
.expert-photo {
  position: relative;
}

.verified-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  /* Optional: add a subtle box-shadow */
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Expert Details */
.expert-details {
  margin-left: 15px;
  flex: 1;
}

.experts.grid-view .expert-details {
  margin-left: 0;
  margin-top: 10px;
}

/* Verified Icon next to name */
.verified-icon {
  width: 20px;
  height: 20px;
  vertical-align: left;
  margin-left: 5px;
}

/* Pagination */
.expert-pagination {
  text-align: center;
  margin-top: 20px;
}

.expert-pagination a {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: #0073aa;
}

.expert-pagination a:hover {
  background: #0073aa;
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .expert-directory-filters,
  .expert-directory-results {
    width: 100%;
  }
  .experts.list-view .expert-item,
  .experts.grid-view .expert-item {
    flex-direction: column;
  }
  .expert-details {
    margin-left: 0;
    margin-top: 20px;
  }
}

/* Container for the submission form */
.expert-submission-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  font-family: inherit;
}

/* Heading */
.expert-submission-container h2 {
  text-align: left;
  margin-bottom: 25px;
  font-size: 1.5em;
  color: #333;
}

/* Form styling */
.expert-submission-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Each field */
.submission-field {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.submission-field label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.submission-field .required {
  color: #d00;
  margin-left: 4px;
}

.submission-field input[type="text"],
.submission-field input[type="email"],
.submission-field input[type="url"],
.submission-field input[type="file"],
.submission-field select,
.submission-field textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  box-sizing: border-box;
}

.submission-field .radio-group {
  display: flex;
  gap: 20px;
  margin-top: 5px;
}

.submission-field .radio-group label {
  font-weight: normal;
  color: #555;
}

/* Submit button */
.submit-button {
  background: #2e7968;
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-button:hover {
  background: #20564a;
}

/* Responsive adjustments for submission form */
@media (max-width: 600px) {
  .expert-submission-container {
    padding: 15px;
  }
  .submit-button {
    width: 100%;
  }
}

/* Force the photo to fill its container */
.passport-photo {
  width: 100%;
  height: auto;           /* Keep aspect ratio */
  object-fit: cover;      /* Crop to fill if needed */
  display: block;
}

/* Tweak the card body for a smaller, more compact layout */
.expert-details {
  font-size: 14px;        /* Decrease font size for detail text */
  line-height: 1.2;
}

/* Make the expert's name slightly larger, but still compact */
.expert-name {
  font-size: 16px;        /* Title font size */
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

/* Reduce spacing between detail lines */
.expert-details p {
  margin-bottom: 0.4rem;
}

/* Adjust the Melba Member badge (160x32) */
.melba-member-badge {
  width: 160px;
  height: 32px;
  object-fit: contain;
  vertical-align: middle; /* Align with the text baseline */
}

/* Optionally reduce margins in grid/list view for an even more compact look */
.experts .expert-item.col-md-12.mb-4 {
  margin-bottom: 1rem !important;
}

/* Make sure the .expert-photo column is tall enough, 
   or you can remove .no-gutters to allow default padding. */
.row.no-gutters {
  margin-right: 0;
  margin-left: 0;
}