/* ======================================
   AOD Mentor – Base & Page-Level Layout
   ====================================== */

/* ---------- Results grid (2 columns desktop / 1 column mobile) ---------- */
.mentor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 16px;
}
@media (max-width: 640px) {
  .mentor-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================================
   Advisors page: widen the content area up to 1440px
   (TT2 constrains inner blocks; we relax it here)
   ============================================================ */
.page-slug-advisors .wp-block-post-content,
.page-slug-advisors .entry-content {
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Break TT2/Gutenberg generated wrapper widths (hash changes per build) */
.page-slug-advisors [class^="wp-container-core-post-content-is-layout-"]
  > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.page-slug-advisors [class^="wp-container-"]
  > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Ensure our grid respects 1440px and is centered */
.page-slug-advisors .mentor-list {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Remove inner width limits inside mentor cards */
.page-slug-advisors .mentor-post .entry-content,
.page-slug-advisors .mentor-post .wp-block-post-content {
  max-width: none !important;
}

/* ============================================================
   Advisors page – HEADER exception
   Keep logo left and nav right; defeat accidental centering
   coming from global width overrides or TT2 defaults.
   ============================================================ */
.page-slug-advisors header * {
  /* neutralize margin:auto that could re-center blocks */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.page-slug-advisors header .wp-block-columns {
  align-items: center; /* vertically center within header row */
}

/* First column (logo) pinned left */
.page-slug-advisors header .wp-block-columns > .wp-block-column:first-child {
  display: flex;
  justify-content: flex-start;
}

/* Last column (navigation) pinned right */
.page-slug-advisors header .wp-block-columns > .wp-block-column:last-child {
  display: flex;
  justify-content: flex-end;
}

/* Make sure nav hugs the right side */
.page-slug-advisors header .wp-block-navigation {
  margin-left: auto !important; /* overrides the generic reset above */
}


/* =========================
   Mentor Card – Structure
   ========================= */

.mentor-post-container {
  border: 1px solid #e5e7eb;          /* neutral-200 */
  border-radius: 12px;
  padding: 16px;
  background: #fff;

  /* Two-column grid: left = image, right = text. */
  display: grid;
  grid-template-columns: clamp(140px, 18vw, 260px) 1fr;
  gap: 20px;
  align-items: start;
}
.mentor-post-container.deactivate { opacity: 0.6; }

/* Image */
.mentor-image { width: auto; }
.mentor-image__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Text blocks */
.mentor-title { margin: 0 0 6px 0; line-height: 1.2; }
.mentor-content-job-title,
.mentor-content-dep,
.mentor-content-join,
.mentor-content-findme,
.mentor-content-blurb { margin-bottom: 8px; font-size: 0.95rem; }
.mentor-field { font-weight: 600; }
.mentor-content-blurb { font-size: 1rem; line-height: 1.5; }
.mentor-content-blurb p { margin: 0 0 6px 0; }

/* Explicitly kill TT2 auto-centering inside card content */
.page-slug-advisors .mentor-post .entry-content > *,
.page-slug-advisors .mentor-post .wp-block-post-content > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-inline: 0 !important;          /* logical property, future-proof */
}
/* Some installs wrap content with wp-container-*; reset their children too */
.page-slug-advisors .mentor-post [class^="wp-container-"] > * {
  margin-inline: 0 !important;
}

/* Buttons */
.wp-block-buttons .custom-button,
.custom-button {
  display: inline-block;
  background: #ce0058 !important;     /* brand pink */
  color: #fff !important;
  border-radius: 8px;
  padding: 8px 16px !important;
  text-decoration: none !important;
  line-height: 1;
  border: 0 !important;
  cursor: pointer;
}
.custom-button:hover,
.custom-button:focus { filter: brightness(1.05); }
.custom-button[disabled] { opacity: .6; cursor: not-allowed; }
.unavailable { display:inline-block; font-size:.9rem; font-weight:600; color:#7c3aed; }
.wp-container-4.wp-block-buttons .wp-block-button { margin-top: 10px; }


/* ============================================
   Mentor filters row (Search | Department | Expertise)
   ============================================ */

/* Visually-hidden (for accessible labels) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Three inline columns; search wider */
.aod-mentor-search .mentor-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;    /* search is wider */
  gap: 16px;
  align-items: center;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Stack on small screens */
@media (max-width: 768px) {
  .aod-mentor-search .mentor-filters { grid-template-columns: 1fr; }
}

/* Shared field wrapper */
.aod-mentor-search .field { position: relative; }

/* Base control look */
.aod-mentor-search .search-bar,
.aod-mentor-search .filter-option {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;          /* neutral-200 */
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.2;
}

/* --------------------------------------------
   Search field: decorative magnifying glass
   (SVG mask so we can tint with background-color)
   -------------------------------------------- */
.aod-mentor-search .search-field .search-bar {
  padding-left: 40px;                  /* space for icon */
}
.aod-mentor-search .search-field .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  pointer-events: none;                /* do not block input focus/click */
  background-color: #ce0058;           /* brand pink */
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79L20 21.49 21.49 20l-5.99-6zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79L20 21.49 21.49 20l-5.99-6zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* --------------------------------------------
   Native select: remove default arrow + add pink pill
   -------------------------------------------- */
.aod-mentor-search .select-field .filter-option {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 52px;                 /* room for pink pill */
}

/* Pink pill that sits on the right */
.aod-mentor-search .select-field .select-caret {
  position: absolute;
  pointer-events: none;                /* clicks go to the select */
  right: 4px; top: 4px; bottom: 4px;
  width: 44px;
  border-radius: 8px;
  background: #ce0058;                 /* brand pink */
  display: grid;
  place-items: center;
}

/* White chevron inside the pink pill */
.aod-mentor-search .select-field .select-caret::after {
  content: "";
  width: 10px; height: 10px;
  transform: rotate(45deg);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

/* Focus rings for accessibility */
.aod-mentor-search .search-bar:focus,
.aod-mentor-search .filter-option:focus {
  outline: 2px solid #6366f1;          /* indigo */
  outline-offset: 2px;
}


/* ============================================
   Chips below the filters (click to clear)
   ============================================ */

#search_tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  max-width: 1440px;
  padding-inline: 16px;
  margin-left: auto; margin-right: auto;
}

/* Make chips look like compact tags */
#search_tags .tag.custom-button {
  position: relative;                  /* anchor the X */
  display: inline-flex;
  align-items: center;
  background: #ce0058 !important;      /* brand pink */
  color: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px;
  padding: 6px 28px 6px 10px !important;/* reserve space on the right for the X */
  line-height: 1;
}

/* Reposition the X so it never overlaps the label */
#search_tags .tag .close-icon {
  position: absolute;
  right: 8px;                          /* inside reserved padding area */
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px; height: 12px;
}
#search_tags .tag .close-icon::before,
#search_tags .tag .close-icon::after {
  content: ''; position: absolute; background: currentColor;
}
#search_tags .tag .close-icon::before { width: 100%; height: 2px; top: 5px; left: 0; }
#search_tags .tag .close-icon::after  { width: 2px; height: 100%; top: 0; left: 5px; }


/* ---------- Optional clear-all button (small pink square) ---------- */
.clear-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: #ce0058;
  color: #fff;
  cursor: pointer;
}
.clear-filters:before { content: "✕"; font-size: 14px; line-height: 1; }
.clear-filters:hover  { filter: brightness(1.05); }
.clear-filters:focus  { outline: 2px solid #861B41; outline-offset: 2px; }


/* =========================
   Responsive – Card Stack
   ========================= */
@media (max-width: 900px) {
  .mentor-post-container { grid-template-columns: 1fr; }
  .mentor-image { max-width: 220px; margin-inline: auto; }
  .mentor-image__img { aspect-ratio: 1 / 1; }
}

.page-id-6 [class*=" wp-container-"] > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 1440px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}