.post-item {
  /* flex: 1 0 40%; */
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;

  margin-bottom: 20px;
}

.post-image {
  /* flex: 1 1 180px; */
  /* max-height: 233px; */
  margin-bottom: 7px;
  /* overflow: hidden; */
}
.no-image .post-image,
.no-excerpt .post-excerpt,
.no-link .view-bio {
  display: none;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
  border-radius: 4px;
}

.post-content {
  flex: 1 1 60%;
}

.post-content .filters {
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 0;
}

.post-content p {
  margin: 0;
  padding: 0;
  color: var(--black);
}

.post-content p.surgery-type.dark-blue {
  color: var(--darkBlue);
}

.post-content p.post-excerpt {
  max-width: 90%;
  line-height: 1.5em;
}

.post-content h4 {
  font-weight: 700;
}

.post-content a:hover .post-title {
  color: var(--orange);
}

.post-content p + p {
  font-weight: normal;
}
/**** BOD Single Line ****/
.bod-single-line p.elected-date {
  margin-left: auto;
  margin-right: 4px;
}
.bod-single-line p.elected-date:before {
  content: "Elected";
  margin-right: 4px;
}
.bod-single-line .post-content {
  display: flex;
  align-items: baseline;
}
.bod-single-line .post-content a:not(.view-bio) {
  display: flex;
  align-items: center;
  pointer-events: none;
}
.bod-single-line .post-title {
  padding-bottom: 0;
  margin-right: 4px;
  color: var(--black);
}
.bod-single-line .team-title {
  font-size: clamp(var(--navFontMin), 1.8vw, var(--navFontMax));
  font-weight: 700;
  line-height: 1em;
  margin-right: 4px;
}
.bod-single-line .team-title:before {
  content: "(";
}
.bod-single-line .team-title:after {
  content: ")";
}
.bod-single-line .posts-container {
  max-width: 600px;
}
.bod-single-line .posts-container {
  display: table;
  width: 100%;
  border-collapse: collapse;
}
.bod-single-line .posts-container .post-item {
  display: table-row;
}
.bod-single-line .post-content {
  display: table-cell;
  padding: 10px 10px 10px 0;
}
.bod-single-line .title-container {
  display: flex;
  flex: 2;
}
.bod-single-line p.elected-date {
  margin-left: inherit;
  flex: 1;
}
.filter-container {
  display: flex;
  flex-direction: column;
}
.filter-container[data-post-type="patients"] .post-item,
.grid-layout:not(.bod-single-line) .post-item {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 4px;
  box-sizing: border-box;
}
.grid-layout:not(.bod-single-line) .post-item {
  flex: 0 1 calc(50% - 10px);
}
.filter-container[data-post-type="patients"] .post-item .custom-stats-panel,
.filter-container[data-post-type="patients"] .post-item .wcdp-progress-row {
  display: none;
}
.filter-container[data-post-type="patients"] .post-item .post-title {
  font-family: var(--minion);
  color: var(--darkBlue);
  text-align: center;
}
.filter-container[data-post-type="patients"] .post-item .post-content {
  padding: 10px 20px 40px;
  text-align: center;
}
.filter-container[data-post-type="patients"] .give-progress-bar {
  height: 22px;
  margin: 15px auto;
}
.filter-container[data-post-type="patients"] .needed-amount {
  margin-bottom: 20px;
}
.filter-container[data-post-type="patients"] .posts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}
.filter-container[data-post-type="patients"]
  .wcdp-fundraising-progress
  .wcdp-progress,
.filter-container[data-post-type="patients"]
  .wcdp-fundraising-progress
  .wcdp-progress
  .wcdp-thermometer {
  height: 21px;
}
body
  .filter-container[data-post-type="patients"]
  .wcdp-fundraising-progress
  .wcdp-progress
  > .wcdp-thermometer-fg {
  margin-top: -21px;
}
.filter-container[data-post-type="patients"]
  .wcdp-fundraising-progress
  .wcdp-thermometer-bg {
  background-color: transparent;
  border: 1px solid var(--orange);
  border-radius: 999px;
}
.fully-funded {
  position: relative;
}
.funding-status-overlay {
  position: absolute;
  top: -1px;
  color: var(--white);
  width: 100%;
  text-transform: uppercase;
  font-weight: 700;
}
.filter-container[data-post-type="patients"]
  .fully-funded
  .wcdp-fundraising-progress
  .wcdp-thermometer-bg {
  border: 1px solid var(--darkBlue);
}
.filter-container[data-post-type="patients"]
  .fully-funded
  .wcdp-fundraising-progress
  .wcdp-progress
  > .wcdp-thermometer-fg {
  background-color: var(--darkBlue);
  border: none;
  border-radius: 999px;
}
.filter-container .filtered-posts-see-more-link {
  border-top: 1px solid var(--midGrey);
  text-align: right;
  text-decoration: underline;
  padding-top: 10px;
}
.filter-container .filtered-posts-see-more-link:hover {
  color: var(--orange);
}
.filter-group {
  border-bottom: 1px solid var(--midGrey);
  padding-bottom: 5px;
  margin-bottom: 20px;
}
.filter-group.search-archive-container {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.search-archive-container .total-results {
  text-transform: uppercase;
}
ul.filter-dropdown {
  padding: 0;
  list-style: none;
  margin: 0;
  display: flex;
  gap: 7px;
  align-items: center;
}
.filter-group.single ul.filter-dropdown .clear-filters-item,
.filter-group.single ul.filter-dropdown .filter-list-item {
  background: transparent;
}
.filter-group.single ul.filter-dropdown li:first-of-type a.button-label {
  padding-left: 0;
}
.filter-dropdown > li.has-children {
  position: relative;
}
.filter-dropdown a {
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  text-transform: uppercase;
  color: var(--black);
}
.filter-dropdown a:not(.clear-filters).button-label.active {
  color: var(--darkBlue);
  font-weight: 700;
}
.filter-dropdown > li.has-children > a::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 8px;
  margin-left: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8' fill='none'%3E%3Cpath d='M1 1L6.5 6L12 1' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}
.filter-dropdown ul.sub-menu {
  list-style: none;
  background-color: var(--white);
  z-index: 1000;
  width: auto;
  white-space: nowrap;
}
.filter-dropdown .sub-menu a:hover {
  color: var(--orange);
}
.filter-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
}
.filter-btn:not(:last-child) {
  margin-right: 20px;
}
.filter-btn.active {
  font-weight: 700;
  color: var(--darkBlue);
}
.filter-btn.active[data-filter-value="disaster-relief"] {
  color: var(--primary-color);
}
.filter-btn.active[data-filter-value="hunger-relief"] {
  color: var(--green);
}
.filter-btn.active[data-filter-value="health-and-medical-care"] {
  color: var(--red);
}
.filter-btn.active[data-filter-value="clean-water"] {
  color: var(--blue);
}
.filter-list-item {
  margin: 0;
}

/* Default SVG state */
.clear-filters svg {
  fill: currentColor;
}
.clear-filters-item {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.clear-filters-item a {
  padding: 0 15px;
  line-height: 0;
}

/* Active state: Make the SVG red */
.clear-filters.active {
  color: red;
}

.pagination {
  border-top: 1px solid var(--midGrey);
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 7px;
  font-size: clamp(var(--buttonFontMin), 1.8vw, var(--buttonFontMax));
  text-transform: uppercase;
}
.pagination .pagination-summary {
  color: var(--black);
  /* margin-right: 20px; */
  text-transform: none;
  width: 100%;
}
.pagination a {
  transition: color 0.3s ease, background-color 0.3s ease;
  color: var(--black);
  text-decoration: none;
  padding: 5px 0px;
  border-radius: 4px;
  min-width: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pagination a:hover {
  color: var(--black);
  background-color: var(--lightGrey);
}

.pagination a.active {
  font-weight: bold;
  color: var(--black);
  background-color: var(--lightGrey);
  cursor: default;
  pointer-events: none;
}
.pagination .pagination-dots {
  display: inline-block;
  padding: 5px 5px;
  color: var(--black);
  cursor: default;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 10px;
}

#loading-spinner img {
  width: 50px;
  height: 50px;
}

.search-bar-container {
  margin-bottom: 40px;
  text-align: right;
}

.search-bar-container .search-input {
  width: 100%;
  width: 100%;
  max-width: 100%;
  height: 56px;
  padding: 20px;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  background-color: var(--lighterGrey);
  color: var(--black);
  transition: box-shadow 0.3s ease;
}

.search-bar-container .search-input:focus {
  box-shadow: 0px 0px 0px 1px var(--darkBlue);
  border-color: var(--highlightColor);
}
.search-bar-container .search-input::placeholder {
  font-style: italic;
}

/** GRID LAYOUT **/
.grid-layout:not(.bod-single-line) .posts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.grid-layout:not(.bod-single-line) .post-excerpt {
  display: none;
}
.grid-layout:not(.bod-single-line) .post-image {
  margin-right: 0;
}
.grid-layout:not(.bod-single-line) .post-image img {
  border-radius: 4px 4px 0 0;
}
.grid-layout:not(.bod-single-line) .post-item {
  border: 1px solid var(--midGrey);
}
.grid-layout:not(.bod-single-line) .post-title {
  padding-bottom: 0;
}
.grid-layout:not(.bod-single-line) .post-content {
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
}
.grid-layout:not(.bod-single-line) .view-bio {
  margin-top: auto;
  text-decoration: underline;
  text-transform: uppercase;
  transition: 0.4s ease;
}
.grid-layout:not(.bod-single-line) .view-bio:hover {
  color: var(--orange);
}

/** BIO MODAL **/
.bio-modal-columns {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

#view-bio-modal .modal-content {
  padding: 0;
  height: auto;
}

.bio-modal-columns > .bio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-modal-columns > .bio-details {
  padding: 50px;
}

#view-bio-modal .bio-details .bio-content-container {
  line-height: 1.5em;
  position: relative;
}

.pillar-icons {
  text-align: center;
}
.pillar-icons img {
  max-height: 42px;
}

span.relevanssi-query-term {
  background-color: var(--peach);
  display: inline-flex;
}

/* .post-excerpt span.relevanssi-query-term {
    background-color: transparent;
    position: relative;
}
.post-excerpt span.relevanssi-query-term:before {
    content: '';
    background: var(--orange);
    height: 1px;
    width: 100%;
    position: absolute;
    bottom: 4px;
    left: 0;
} */

/******* SINGLE POSTS ********/
body.single.single-post .et_pb_post_content *:not(figure):not(img) {
  max-width: 880px;
  margin: auto;
}
body.single.single-post #main-content p:not(.has-background):last-of-type {
  padding-bottom: 1em;
}
body.single.single-post figure.wp-block-gallery.has-nested-images {
  margin-bottom: 3em;
}
body.single.single-post figure {
  margin-top: 2em;
  margin-bottom: 3em;
  text-align: center;
}
/* body.single.single-post figure img {
    width: 100%;
} */
body.single.single-post .et_pb_title_container h1.entry-title {
  padding-bottom: 0;
}
.custom-cta {
  padding: 70px 20px;
}
.cta-content {
  max-width: 700px;
  margin: auto;
  line-height: 1.5;
}
.cta-button {
  margin-top: 30px;
}
.cta-button.custom-button:hover {
  border: 1px solid var(--orange);
}
.sticky-column-desktop #social-share-shortcode {
  text-align: center;
  margin-bottom: 30px;
}
.sticky-column-desktop #social-share-shortcode #sns-container {
  padding: 12px 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  background: var(--orange);
  border-radius: 4px;
  gap: 18px;
}
.sticky-column-desktop #social-share-shortcode ul#sns-container li {
  line-height: 1;
}
.sticky-column-desktop #social-share-shortcode ul#sns-container svg path {
  fill: var(--white);
  transition: 0.4s ease;
}
.sticky-column-desktop
  #social-share-shortcode
  ul#sns-container
  li
  a:hover
  svg
  path {
  fill: var(--orange-new);
}

@media only screen and (min-width: 768px) {
  .post-image {
    flex: 0 0 230px;
    max-width: 100%;
    margin-right: 20px;
  }
  .filter-container[data-post-type="patients"] .post-item,
  .grid-layout:not(.bod-single-line) .post-item {
    flex: 0 1 calc(50% - 50px);
  }
  .filter-container[data-post-type="patients"] .post-item .post-image {
    margin-right: 0;
  }
  .post-image img {
    max-height: 130px;
  }
  .grid-layout:not(.bod-single-line) .post-image img {
    max-height: 200px;
  }
  .filter-container[data-post-type="patients"] .post-item .post-image img {
    max-height: none;
    border-radius: 4px 4px 0 0;
  }
  .post-item {
    display: flex;
    flex-direction: row;
  }
  .post-content {
    flex: 1;
    min-width: 200px;
  }
  .bio-modal-columns {
    flex-direction: row;
  }
  .bio-modal-columns > .bio-image,
  .bio-modal-columns > .bio-details {
    flex: 1 1 50%;
    max-width: 50%;
  }

  .filter-dropdown {
    flex-wrap: wrap;
  }

  /* Default Desktop Behavior */
  .filter-dropdown ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 1px 1px 4px -2px rgb(0 0 0 / 50%);
  }
  .filter-dropdown ul.sub-menu.active {
    display: block;
  }
  .filter-dropdown .sub-menu a {
    text-decoration: none;
    display: block;
    padding: 10px;
    color: var(--black);
    transition: background 0.3s ease, color 0.3s ease;
  }

  .filter-dropdown .sub-menu a:hover {
    background-color: var(--lightGrey);
    color: var(--black);
  }
  .pagination a,
  span.page-numbers.current {
    padding: 5px 10px;
  }
  .pagination .pagination-summary {
    margin-right: 20px;
    width: auto;
  }
  #view-bio-modal .bio-details .bio-content-container {
    max-height: 450px;
    overflow-y: auto;
    padding-bottom: 45%;
    padding-left: 20px;
    padding-right: 20px;
    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
  #view-bio-modal .modal-content {
    overflow: hidden;
  }
}
@media only screen and (min-width: 981px) {
  .filter-container[data-post-type="patients"] .post-item {
    flex: 0 1 calc(33.333% - 50px);
  }
  .grid-layout:not(.bod-single-line) .post-item {
    flex: 0 1 calc(25% - 50px);
    min-height: 345px;
  }
  .grid-layout:not(.bod-single-line) .posts-container {
    gap: 50px;
  }
  .filter-group.search-archive-container {
    flex-direction: row;
  }
  .filter-list-item {
    margin: 0;
  }

  body.single .sticky-column-desktop,
  body.single.et-db #et-boc .et-l .sticky-column-desktop {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 62vh;
    z-index: 10;
    margin-right: 4%;
  }
  .sticky-column-desktop #social-share-shortcode {
    position: absolute;
    top: -30vh;
    right: -7vw;
  }
  .sticky-column-desktop #social-share-shortcode #sns-container {
    display: flex;
    flex-direction: column;
  }
}
@media only screen and (max-width: 981px) {
  .filter-group:not(.dropdown) ul.filter-dropdown {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;

    /* Hide scrollbar styles */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE + Edge */
  }

  .filter-group:not(.dropdown) ul.filter-dropdown::-webkit-scrollbar {
    display: none; /* Chrome + Safari */
  }

  .filter-list-item {
    flex: 0 0 auto;
    background: var(--lightGrey);
    border-radius: 4px;
    display: flex;
    align-items: center;
    height: 30px;
  }
  .filter-list-item a {
    padding: 0 15px;
  }
  .clear-filters-item {
    background: var(--lightGrey);
  }
  .bod-single-line .post-content a:not(.view-bio) {
    align-items: baseline;
    flex: 1;
  }
  .hide-filters-on-mobile .filter-group {
    display: none;
  }
}
@media only screen and (max-width: 767px) {
  .posts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  .filter-container[data-post-type="patients"] .posts-container {
    gap: 0;
  }

  /* Reset Desktop Behavior */
  .filter-dropdown {
    overflow-y: scroll;
    max-width: 100%;

    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE + Edge */
  }

  .filter-dropdown::-webkit-scrollbar {
    display: none; /* Chrome + Safari */
  }

  .filter-dropdown .sub-menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1001;
    transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    max-height: 75vh;
    overflow-y: auto;
    /* column-count: 2; */
    padding-top: 50px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    opacity: 0; /* Initially hidden */
    visibility: hidden;
  }

  .filter-dropdown .sub-menu.active {
    display: block !important;
    bottom: 0;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .filter-dropdown .sub-menu button.close-panel {
    background: none;
    border: none;
    font-size: 16px;
    color: #ed742e;
    margin-bottom: 10px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
  }

  .filter-dropdown .sub-menu a {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f9f9f9;
  }

  .filter-dropdown .sub-menu a:hover {
    background: #ed742e;
    color: #fff;
  }
  #view-bio-modal {
    background-color: var(--white);
  }
  .grid-layout:not(.bod-single-line) .post-image img {
    height: 150px;
  }
  .filter-group:not(.dropdown) ul.filter-dropdown {
    flex-direction: column;
    justify-content: flex-start;
    align-items: baseline;
  }
}
