/* ==========================================================
   FF ESS front-end fixes (Oct 26, 2026)
   Restores styling for custom markup that lost its CSS after
   the Oct 2026 Elementor 4.x updates. Loaded site-wide by
   mu-plugins/ff-ess-frontend-fixes.php. Remove a block here
   once the underlying template is fixed properly.
   ========================================================== */

/* ---------- 1. Team member pages: Fun Facts accordion ---------- */
.fun-facts-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}
.fun-facts-accordion .e-n-accordion-item {
  border: 1px solid #cc3366;
  background: #fff;
}
.fun-facts-accordion .e-n-accordion-item-title {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  cursor: pointer;
  background: #fff;
  color: #cc3366;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 20px;
  line-height: 1.35;
  text-align: left;
  transition: background-color .2s, color .2s;
}
.fun-facts-accordion .e-n-accordion-item-title:hover,
.fun-facts-accordion .e-n-accordion-item-title:focus-visible {
  background: #fdf0f4;
  color: #cc3366;
}
.fun-facts-accordion .e-n-accordion-item-title:focus-visible {
  outline: 2px solid #4055a5;
  outline-offset: 2px;
}
.fun-facts-accordion .e-n-accordion-item.is-open > .e-n-accordion-item-title {
  background: #cc3366;
  color: #fff;
}
.fun-facts-accordion .e-n-accordion-item-title-header {
  flex: 1 1 auto;
}
.fun-facts-accordion .e-n-accordion-item-title-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fun-facts-accordion .e-n-accordion-item-title-icon > span {
  display: flex;
  width: 34px;
  height: 34px;
}
.fun-facts-accordion .e-n-accordion-item-title-icon svg {
  width: 34px !important;
  height: 34px !important;
  display: block;
}
.fun-facts-accordion .e-n-accordion-item .e-opened { display: none; }
.fun-facts-accordion .e-n-accordion-item.is-open .e-opened { display: flex; }
.fun-facts-accordion .e-n-accordion-item.is-open .e-closed { display: none; }
.fun-facts-accordion .fun-facts-panel {
  overflow: hidden;
  transition: max-height .3s ease;
}
.fun-facts-accordion .fun-facts-panel > * {
  margin: 0;
  padding: 14px 18px 16px;
  color: #050505;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
@media (max-width: 767px) {
  .fun-facts-accordion .e-n-accordion-item-title { font-size: 17px; padding: 12px 14px; }
  .fun-facts-accordion .fun-facts-panel > * { font-size: 16px; padding: 12px 14px 14px; }
}

/* ---------- 2. Resources page: hover cards ----------
   Card turns brand blue on hover; text and button must turn white. */
.elementor-73 .elementor-element-fa36d3a:hover .elementor-heading-title,
.elementor-73 .elementor-element-108aaeb:hover .elementor-heading-title,
.elementor-73 .elementor-element-9a0fddc:hover .elementor-heading-title,
.elementor-73 .elementor-element-c42829d:hover .elementor-heading-title,
.elementor-73 .elementor-element-fa36d3a:hover .elementor-widget-text-editor,
.elementor-73 .elementor-element-108aaeb:hover .elementor-widget-text-editor,
.elementor-73 .elementor-element-9a0fddc:hover .elementor-widget-text-editor,
.elementor-73 .elementor-element-c42829d:hover .elementor-widget-text-editor,
.elementor-73 .elementor-element-fa36d3a:hover .elementor-widget-text-editor *,
.elementor-73 .elementor-element-108aaeb:hover .elementor-widget-text-editor *,
.elementor-73 .elementor-element-9a0fddc:hover .elementor-widget-text-editor *,
.elementor-73 .elementor-element-c42829d:hover .elementor-widget-text-editor * {
  color: #fff !important;
}
.elementor-73 .elementor-element-fa36d3a:hover .elementor-button,
.elementor-73 .elementor-element-108aaeb:hover .elementor-button,
.elementor-73 .elementor-element-9a0fddc:hover .elementor-button,
.elementor-73 .elementor-element-c42829d:hover .elementor-button {
  color: #fff !important;
  border-color: #fff !important;
}
.elementor-73 .elementor-element-fa36d3a:hover .elementor-button .elementor-button-text,
.elementor-73 .elementor-element-108aaeb:hover .elementor-button .elementor-button-text,
.elementor-73 .elementor-element-9a0fddc:hover .elementor-button .elementor-button-text,
.elementor-73 .elementor-element-c42829d:hover .elementor-button .elementor-button-text {
  color: #fff !important;
}

/* ---------- 3. Slide-in nav (popup 2170): submenus expand inline ---------- */
.elementor-2170 .elementor-nav-menu--layout-vertical .sub-menu {
  position: static !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 2px 0 6px 0 !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.elementor-2170 .elementor-nav-menu--layout-vertical .sub-menu a {
  padding-left: 18px !important;
  font-size: 0.85em;
  white-space: normal !important;
}

/* ---------- 4. Blog / newsletter / news filters: search button ---------- */
.blog-filters .site-search {
  position: relative;
}
.blog-filters .site-search__input {
  width: 100%;
  padding-right: 54px !important;
}
.blog-filters .site-search__btn {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #4055a5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.blog-filters .site-search__btn:hover,
.blog-filters .site-search__btn:focus-visible {
  background: #2f4189;
}
.blog-filters .site-search__btn img {
  width: 20px !important;
  height: 20px !important;
  display: block;
}

/* ---------- 5. Homepage Contact Us form: visible submit ----------
   Matches the arrow treatment on /contact-us/ (#send-btn). */
.elementor-38 .elementor-element-16f51b9 .elementor-field-type-submit {
  justify-content: flex-end;
}
.elementor-38 .elementor-element-16f51b9 .elementor-button[type="submit"] {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0 !important;
  background: url("/wp-content/uploads/2025/11/back.png") center / contain no-repeat !important;
  cursor: pointer;
}

/* ---------- 6. Post grids (Blog, Newsletters, News): pagination ----------
   Page links were white text with no box on a white background. */
.elementor-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.elementor-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  line-height: 1;
}
.elementor-pagination a.page-numbers:not(.dots) {
  background: #4055a5;
  color: #fff !important;
  text-decoration: none;
  transition: background-color .2s;
}
.elementor-pagination a.page-numbers:not(.dots):hover,
.elementor-pagination a.page-numbers:not(.dots):focus-visible {
  background: #185673;
}
.elementor-pagination .page-numbers.dots {
  color: #4055a5;
  padding-left: 4px;
  padding-right: 4px;
}

/* ---------- 7. Search Jobs: filter column fits mobile screens ----------
   The listing's inline <style> sets #filter-wrapper min-width 380px !important,
   causing sideways scroll at 375px. Extra specificity needed to beat it. */
@media (max-width: 767px) {
  html body #filter-wrapper {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ---------- 8. Footer: hide legacy agency credit (now redundant, harmless) ---------- */
#site_credits,
#site_credits_text {
  display: none !important;
}
