/* ============================================
   BINW Staff Directory Styles
   For no-AJAX / no-JS staff filter setup
   ============================================ */


/* ---------- Hide sidebar / full-width staff pages ---------- */

.single-staff #secondary,
.staff-search-page #secondary,
body.staff-search-page #secondary {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.single-staff .content-area,
.staff-search-page .content-area,
body.staff-search-page .content-area {
  width: 100% !important;
}

.staff-search-page #primary {
  width: 100% !important;
  float: none !important;
}

.staff-search-page .site-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ---------- Hide post meta on single staff posts ---------- */

.single-staff .entry-meta,
.single-staff .posted-on,
.single-staff .byline,
.single-staff .author,
.single-staff .post-meta {
  display: none !important;
}


/* ---------- Back to Staff button ---------- */

.back-to-staff-wrap {
  text-align: center;
  margin: 0.5rem auto 1rem;
}

.back-button {
  display: inline-block;
  margin: 20px auto;
  color: #78A22F;
  font-weight: bold;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid #78A22F;
  padding: 0.4rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.back-button:hover {
  background-color: #78A22F;
  color: #fff;
}


/* ---------- Staff filter toolbar ---------- */

form.staff-tools {
  max-width: 1200px;
  margin: 35px auto 24px auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}

form.staff-tools input[type="search"],
form.staff-tools select {
  height: 38px;
  min-width: 190px;
  max-width: 260px;
  margin: 0;
  padding: 7px 12px;
  font-size: 15px;
  line-height: 1.2;
  border: 1px solid #707372;
  border-radius: 0;
  box-sizing: border-box;
  font-family: inherit;
}

form.staff-tools input[type="search"] {
  min-width: 220px;
}

form.staff-tools button.learn-more,
form.staff-tools a.learn-more {
  height: 38px;
  margin: 0;
  padding: 7px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #78A22F;
  border-radius: 5px;
  background: transparent;
  color: #78A22F;
  font-size: 15px;
  font-weight: bold;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

form.staff-tools button.learn-more:hover,
form.staff-tools a.learn-more:hover {
  background: #78A22F;
  color: #fff;
}


/* ---------- Department tabs ---------- */

.tab-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px auto 32px auto;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  row-gap: 10px;
}

.tab-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.tab-item:first-child {
  padding-left: 0;
}

.tab-item:last-child {
  padding-right: 0;
}

.tab-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 2px;
  height: 22px;
  background-color: #78A22F;
}

.tab-button {
  display: inline-block;
  background: transparent !important;
  color: #111;
  border: none;
  padding: 6px 0;
  font-size: 16px;
  font-weight: bold;
  font-family: Trebuchet MS, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.tab-button.active {
  color: #78A22F;
  border-bottom: 3px solid #78A22F;
}

.tab-button:hover {
  color: #78A22F !important;
  background: transparent !important;
}


/* ---------- Staff content area ---------- */

.tab-content {
  max-width: 1200px;
  margin: 8px auto 0 auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.tab-panel.active {
  display: block;
}

.staff-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.staff-member {
  flex: 1 1 280px;
  max-width: 300px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  text-align: center;
}

.staff-member:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.staff-photo img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.staff-member h3 {
  margin-top: 18px;
}


/* ---------- Learn More buttons ---------- */

.learn-more {
  display: inline-block;
  border: 2px solid #78A22F;
  color: #78A22F;
  background: transparent;
  font-size: 16px;
  font-weight: bold;
  padding: 8px 18px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 20px;
  transition: all 0.3s ease-in-out;
}

.learn-more:hover {
  background: #78A22F;
  color: #fff;
}


/* ---------- Messages ---------- */

.staff-no-results {
  text-align: center;
  font-weight: bold;
  color: #707372;
  margin: 30px auto;
}


/* ---------- Animation ---------- */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ---------- Mobile ---------- */

@media (max-width: 700px) {
  form.staff-tools {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
    margin-top: 24px;
    gap: 8px;
  }

  form.staff-tools input[type="search"],
  form.staff-tools select,
  form.staff-tools button.learn-more,
  form.staff-tools a.learn-more {
    width: 100%;
    max-width: 100%;
  }

  .tab-row {
    row-gap: 8px;
  }

  .tab-item {
    padding: 0 10px;
  }

  .tab-button {
    font-size: 15px;
    padding: 5px 0;
  }

  .tab-item:not(:last-child)::after {
    height: 18px;
  }

  .staff-member {
    flex-basis: 100%;
    max-width: 340px;
  }
}