.portfolio-search {
  /* Red-bar clearance: gap between the breadcrumb hero and the
     search row, per the mockup. One knob to tune. */
  --redbar-clearance: 46px;
  padding: var(--redbar-clearance) 0 100px;
  position: relative;
  background-color: #fff;
  font-family: var(--font_regular);
}

/* section-rhythm.css loads after this file and may normalize
   section paddings — this override keeps the clearance in charge. */
section.portfolio-search#portfolioSearch {
  padding-top: var(--redbar-clearance) !important;
  padding-bottom: 100px !important;
}

.portfolio-search .container {
  position: relative;
  z-index: 2;
}

.portfolio-search__intro {
  margin-bottom: 44px;
}

.portfolio-search .filter-label {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 20px;
  color: var(--rr-heading-primary, #000000);
  text-transform: uppercase;
}

.portfolio-search .filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 34px;
  padding-bottom: 16px;
  border-bottom: 0;
  position: relative;
  z-index: 30;
}

.portfolio-search .filter-group {
  position: static; /* panel anchors to .filter-bar, not the trigger */
  z-index: 5;
}

.portfolio-search .filter-group.is-open {
  z-index: 50;
}

.portfolio-search .filter-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 22px 0 0;
  color: var(--rr-heading-primary, #000000);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  position: relative;
  cursor: pointer;
  transition: color 0.2s ease;
}

.portfolio-search .filter-trigger:hover {
  color: rgba(17, 17, 17, 0.55);
}

.portfolio-search .filter-group.is-open .filter-trigger {
  color: var(--rr-heading-primary, #000000);
}

.portfolio-search .filter-trigger:focus-visible {
  outline: 2px solid var(--rr-heading-primary, #000000);
  outline-offset: 4px;
}

.portfolio-search .filter-trigger::after {
  content: "\f078";
  font-family: "Font Awesome 6 Pro";
  font-weight: 300;
  font-size: 14px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
}

.portfolio-search .filter-group.is-open .filter-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Full-width panel below the trigger row */
.portfolio-search .filter-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  padding: 20px 24px 28px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: block;
}

.portfolio-search .filter-group.is-open .filter-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.portfolio-search .filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.portfolio-search .filter-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 26px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.portfolio-search .filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--secondary, #555555);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.portfolio-search .filter-option:hover {
  color: var(--rr-heading-primary, #000000);
  background: transparent;
}

.portfolio-search .filter-option:has(input[type="checkbox"]:checked) {
  color: var(--rr-heading-primary, #000000);
}

.portfolio-search .filter-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1.5px solid #000;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-search .filter-option input[type="checkbox"]:checked {
  background: #000;
  border-color: #000;
}

.portfolio-search .filter-option input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--rr-heading-primary, #000000);
  outline-offset: 2px;
}

.portfolio-search .filter-option input[type="checkbox"]::before {
  display: none;
}

.portfolio-search .selected-row {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 18px 0 0;
}

.portfolio-search .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 0px;
  background: #000000;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
}

.portfolio-search .chip-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.portfolio-search .results-meta {
  margin-top: 14px;
  color: rgba(17, 17, 17, 0.65);
  font-size: 16px;
  line-height: 1.4;
}

.portfolio-search #portfolioGrid {
  position: relative;
  z-index: 1;
}

.portfolio-search .works-section-12__item[hidden] {
  display: none !important;
}

.portfolio-search .empty {
  display: none;
  padding-top: 20px;
  color: rgba(17, 17, 17, 0.65);
  font-size: 18px;
}

.portfolio-search .empty.is-visible {
  display: block;
}

.portfolio-search .load-trigger {
  width: 100%;
  height: 1px;
  margin-top: 20px;
}

.portfolio-search .load-trigger[hidden] {
  display: none !important;
}

.portfolio-search .filter-action,
.portfolio-search .filter-action[data-action="close"],
.portfolio-search .filter-action[data-action="clear"] {
  appearance: none;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  padding: 6px 14px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-search .filter-action:hover,
.portfolio-search .filter-action[data-action="close"]:hover,
.portfolio-search .filter-action[data-action="clear"]:hover {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

/* =========================================================
   Keyword search — collapsed icon that expands into the
   full field (input + Search + Clear) on click.
========================================================= */
.portfolio-search .filter-searchbar {
  margin-bottom: 38px;
}

.portfolio-search .filter-search-wrap {
  display: flex;
  align-items: center;
  max-width: 780px;
}

/* --- Toggle (the collapsed state): borderless icon + "Search"
   label, grey by default, darkening to black on hover. --- */
.portfolio-search .search-toggle {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.4);
  cursor: pointer;
  transition: color 0.25s ease;
}

.portfolio-search .search-toggle:hover,
.portfolio-search .filter-search-wrap.is-expanded .search-toggle {
  color: var(--rr-heading-primary, #000000);
}

.portfolio-search .search-toggle:focus-visible {
  outline: 2px solid var(--rr-heading-primary, #000000);
  outline-offset: 4px;
}

/* Anchor box for the cross-fading glyphs */
.portfolio-search .search-toggle__icons {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portfolio-search .search-toggle__icon {
  position: absolute;
  font-size: 18px;
  line-height: 1;
  transition:
    opacity 0.3s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-search .search-toggle__icon--close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.portfolio-search .filter-search-wrap.is-expanded .search-toggle__icon--open {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.portfolio-search .filter-search-wrap.is-expanded .search-toggle__icon--close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.portfolio-search .search-toggle__text {
  display: inline-block;
  margin-left: 10px;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.2;
  user-select: none;
  opacity: 1;
  transition:
    opacity 0.3s ease,
    max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* The label tucks away once the field is open — the x alone closes it */
.portfolio-search .filter-search-wrap.is-expanded .search-toggle__text {
  max-width: 0;
  margin-left: 0;
  opacity: 0;
}

/* --- Collapsible field ---
   grid-template-columns 0fr -> 1fr gives a buttery width
   animation without hardcoded max-widths. */
.portfolio-search .search-field {
  display: grid;
  grid-template-columns: 0fr;
  flex: 1 1 auto;
  min-width: 0;
  transition: grid-template-columns 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-search .search-field__inner {
  overflow: hidden;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 0;
  opacity: 0;
  transform: translateX(-12px);
  visibility: hidden;
  transition:
    opacity 0.35s ease 0s,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s,
    padding-left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-search .filter-search-wrap.is-expanded .search-field {
  grid-template-columns: 1fr;
}

.portfolio-search .filter-search-wrap.is-expanded .search-field__inner {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  padding-left: 16px;
  transition:
    opacity 0.4s ease 0.12s,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s,
    padding-left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-search .filter-search-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-search .filter-search-input:focus {
  border: 1px solid #000;
}

.portfolio-search .filter-search-input::placeholder {
  color: rgba(17, 17, 17, 0.5);
}

.portfolio-search .search-btn {
  height: 48px;
  min-width: 120px;
  padding: 0 18px;
  border-radius: 0px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-search .search-btn:hover {
  background: #000;
}

.portfolio-search .search-clear-btn {
  height: 48px;
  min-width: 120px;
  padding: 0 18px;
  border-radius: 0px;
  background: transparent;
  color: #000;
  border: 1px solid #000;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-search .search-clear-btn:hover {
  background: #000;
  color: #fff;
}

@media (max-width: 1199px) {
  .portfolio-search .filter-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .portfolio-search {
    --redbar-clearance: 38px;
    padding: var(--redbar-clearance) 0 80px;
  }

  section.portfolio-search#portfolioSearch {
    padding-bottom: 80px !important;
  }

  .portfolio-search__intro {
    margin-bottom: 32px;
  }

  .portfolio-search .filter-trigger {
    font-size: 24px;
  }

  .portfolio-search .filter-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 20px;
  }
}

/* Mobile: stacked accordion. Each group is a full-width row with
   dividers; the panel opens in-flow and pushes content down. */
@media (max-width: 767px) {
  .portfolio-search {
    --redbar-clearance: 30px;
    padding: var(--redbar-clearance) 0 64px;
  }

  section.portfolio-search#portfolioSearch {
    padding-bottom: 64px !important;
  }

  /* No keyword search on mobile */
  .portfolio-search .filter-searchbar {
    display: none;
  }

  .portfolio-search .filter-bar {
    display: block;
    gap: 0;
    padding-bottom: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.12);
  }

  .portfolio-search .filter-group {
    border-bottom: 1px solid rgba(17, 17, 17, 0.12);
  }

  .portfolio-search .filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 20px 0;
    font-size: 26px;
    text-align: left;
  }

  .portfolio-search .filter-trigger:hover {
    color: var(--rr-heading-primary, #000000);
  }

  .portfolio-search .filter-trigger::after {
    position: static;
    transform: rotate(0deg);
    font-size: 15px;
  }

  .portfolio-search .filter-group.is-open .filter-trigger::after {
    transform: rotate(180deg);
  }

  .portfolio-search .filter-dropdown {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    min-width: 0;
    margin: 2px 0 24px;
    padding: 24px 20px 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  }

  .portfolio-search .filter-options {
    grid-template-columns: 1fr;
    gap: 6px;
    max-height: 320px;
  }

  .portfolio-search .filter-option {
    gap: 14px;
    padding: 10px 0;
    font-size: 17px;
  }

  .portfolio-search .filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 575px) {
  .portfolio-search .filter-options {
    max-height: 280px;
  }

  /* Keyword input takes the expanding row next to the icon;
     Search and Clear share the row below, side by side. */
  .portfolio-search .search-field__inner {
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .portfolio-search .filter-search-input {
    flex: 1 1 100%;
    width: 100%;
  }

  .portfolio-search .search-btn,
  .portfolio-search .search-clear-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .portfolio-search .filter-search-wrap.is-expanded .search-field__inner {
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-search .filter-trigger,
  .portfolio-search .filter-trigger::after,
  .portfolio-search .filter-option,
  .portfolio-search .filter-option input[type="checkbox"],
  .portfolio-search .filter-action,
  .portfolio-search .search-btn,
  .portfolio-search .search-clear-btn,
  .portfolio-search .search-toggle,
  .portfolio-search .search-toggle__icon,
  .portfolio-search .search-field,
  .portfolio-search .search-field__inner {
    transition: none;
  }
}


/* Override ONLY on this page */
/* =========================================================
   Project Card Hover - Video Matched
   Desktop: original translate-up hover
   Mobile: title sits higher by default, panel still reveals on hover
========================================================= */

.project-6__top .section-title-6__wrapper .title {
  max-width: 1010px;
}

.project-6__top-content {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 121px;
  margin-bottom: 80px;
}

@media only screen and (max-width: 1399px) {
  .project-6__top-content {
    margin-top: 60px;
  }
}

@media only screen and (max-width: 991px) {
  .project-6__top-content {
    margin: 50px 0;
  }
}

@media only screen and (max-width: 767px) {
  .project-6__top-content {
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
  }
}

.project-6__thumb,
.project-card-hover {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #5a5a5a;
}

.project-6__thumb img,
.project-card-hover img {
  width: 100%;
  display: block;
  transition: transform 0.45s ease-in-out;
  will-change: transform;
}

.project-6__thumb:hover img,
.project-card-hover:hover img {
  transform: scale(1.08);
}

.project-6__thumb::before,
.project-card-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(17, 17, 17, 0.14);
}

.project-6__thumb .content-top,
.project-card-hover .content-top {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.content-top {
  transition:
    transform 0.45s cubic-bezier(.19,1,.22,1),
    opacity 0.35s ease;
}

.content-top .sub-title {
  transition:
    transform 0.45s cubic-bezier(.19,1,.22,1),
    border-color 0.35s ease,
    background-color 0.35s ease,
    opacity 0.35s ease;
}

.project-6__arrow i {
  transition:
    transform 0.45s cubic-bezier(.19,1,.22,1),
    opacity 0.35s ease;
}

/* Hover */
.project-6__thumb:hover .content-top,
.project-card-hover:hover .content-top {
  transform: translateY(-4px);
}

.project-6__thumb:hover .sub-title,
.project-card-hover:hover .sub-title {
  border-color: rgba(255,255,255,.55);
}

.project-6__thumb:hover .project-6__arrow i,
.project-card-hover:hover .project-6__arrow i {
  transform: translateY(-4px);
}
.project-6__thumb .content-top .sub-title,
.project-card-hover .content-top .sub-title {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  color: var(--white);
  font-size: 12px;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: uppercase;
  font-family: var(--font_light);
}

.project-6__arrow i {
  font-size: 16px;
  line-height: 1;
  font-weight: 300;
  color: var(--white);

  transition:
    transform 0.35s cubic-bezier(.19,1,.22,1),
    opacity 0.35s ease;
}

.project-6__thumb:hover .project-6__arrow i,
.project-card-hover:hover .project-6__arrow i {
  transform: translateY(-4px);
}

/* Desktop/tablet hover: translated panel, matching original recording */
.project-6__content {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background-color: transparent;

  box-shadow:
    inset 1px 0 0 #ededed,
    inset -1px 0 0 #ededed,
    inset 0 -1px 0 #ededed;

  transform: translateY(54px);
  transition:
    transform 0.32s ease-in-out,
    background-color 0.32s ease-in-out,
    bottom 0.32s ease-in-out;
}

.project-6__thumb:hover .project-6__content,
.project-card-hover:hover .project-6__content {
  transform: translateY(0);
  background-color: var(--primary);
}

.project-6__content .price-plan {
  width: 100%;
  padding: 24px 24px 26px;
}

.project-6__content .title {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 30px;
  font-weight: normal;
  line-height: 1.08;
  letter-spacing: normal;
  font-family: var(--font_regular);
  transition: color 0.3s ease-in-out;
}

.project-6__content .title a {
  color: inherit;
}

.project-6__content .price-plan span {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  color: var(--white);
  font-size: 17px;
  font-weight: normal;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  font-family: var(--font_regular);
  transition:
    opacity 0.28s ease-in-out,
    visibility 0.28s ease-in-out,
    transform 0.28s ease-in-out;
}

.project-6__thumb:hover .project-6__content .price-plan span,
.project-card-hover:hover .project-6__content .price-plan span {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.project-6__content .price-plan h2,
.project-6__content .details-list {
  display: none;
}

.works-section-12__thumb {
  overflow: hidden;
}

.works-section-12 .meta .tag {
  display: inline-block;
  color: var(--primary);
  font-size: 22px;
  font-weight: normal;
  line-height: 24px;
}

.works-section-12 .meta .date {
  display: block;
  color: var(--primary);
  font-size: 22px;
  font-weight: normal;
  line-height: 24px;
}

@media only screen and (max-width: 1199px) {
  .project-6__content {
    transform: translateY(50px);
  }

  .project-6__content .title {
    font-size: 28px;
  }
}

@media only screen and (max-width: 991px) {
  .project-6__content {
    transform: translateY(48px);
  }

  .project-6__content .price-plan {
    padding: 22px 20px 24px;
  }

  .project-6__content .title {
    font-size: 26px;
  }
}

@media only screen and (max-width: 767px) {
  .project-6__thumb .content-top,
  .project-card-hover .content-top {
    top: 22px;
    left: 22px;
    right: 22px;
  }

  .project-6__content .title {
    font-size: 24px;
    line-height: 1.08;
  }
}

/* Mobile correction from second recording:
   Default title must sit higher, not on the card edge.
   Hover/tap still brings the black panel flush to the bottom. */
@media (max-width: 575px) {
  .project-6__thumb .content-top,
  .project-card-hover .content-top {
    top: 18px;
    left: 18px;
    right: 18px;
  }

  .project-6__thumb .content-top .sub-title,
  .project-card-hover .content-top .sub-title {
    font-size: 12px;
    padding: 5px 8px;
  }

  .project-6__content {
    left: 0;
    right: 0;
    bottom: 24px;
    transform: translateY(0);
    background-color: transparent;
  }

  .project-6__thumb:hover .project-6__content,
  .project-card-hover:hover .project-6__content {
    bottom: 0;
    transform: translateY(0);
    background-color: var(--primary);
  }

  .project-6__content .price-plan {
    padding: 18px;
  }

  .project-6__content .title {
    font-size: 22px;
    line-height: 1.08;
    letter-spacing: normal;
    margin-bottom: 10px;
  }

  .project-6__content .price-plan span {
    font-size: 15px;
    line-height: 1.4;
  }
}

/* =========================================================
   PEOPLE CARD — FINAL CLEAN VERSION
========================================================= */

.portfolio-search .project-card-hover {
  position: relative;
  overflow: hidden;
  background: transparent;
}

/* IMAGE */

.portfolio-search .project-card-hover img {
  width: 100%;
  display: block;
  transition: none;
  transform: none !important;
}

.portfolio-search .project-card-hover:hover img {
  transform: none !important;
}

/* =========================================================
   ORIGINAL CONTENT-TOP MATCH
========================================================= */

.project-6__thumb .content-top,
.project-card-hover .content-top {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: space-between;

  transition:
    transform 0.45s cubic-bezier(.19,1,.22,1),
    opacity 0.35s ease;
}

.project-6__thumb .content-top .sub-title,
.project-card-hover .content-top .sub-title {
  display: inline-block;

  padding: 5px 10px;

  border: 1px solid rgba(255, 255, 255, 0.28);

  border-radius: 0;

  color: var(--white);

  font-size: 12px;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: uppercase;

  font-family: var(--font_light);

  transition:
    transform 0.45s cubic-bezier(.19,1,.22,1),
    border-color 0.35s ease,
    background-color 0.35s ease,
    opacity 0.35s ease;
}

.project-6__arrow i {
  font-size: 16px;
  line-height: 1;
  font-weight: 300;
  color: var(--white);

  transition:
    transform 0.45s cubic-bezier(.19,1,.22,1),
    opacity 0.35s ease;
}

/* TOP HOVER */

.portfolio-search .project-card-hover:hover .content-top {
  transform: translateY(-4px);
}

.portfolio-search .project-card-hover:hover .sub-title {
  border-color: rgba(255,255,255,.55);
}

.portfolio-search .project-card-hover:hover .project-6__arrow i {
  transform: translateY(-4px);
}

/* CONTENT AREA */

.portfolio-search .project-card-hover .project-6__content {
  position: relative !important;

  left: auto !important;
  right: auto !important;
  bottom: auto !important;

  width: 100%;
  display: block;

  overflow: hidden;

  background: #fff;

  transform: none !important;
}

/* CONTENT SPACING */

.portfolio-search .project-card-hover .price-plan {
  position: relative;
  z-index: 3;

  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding: 22px 30px 24px;
}

/* TYPOGRAPHY */

.portfolio-search .project-card-hover .title {
  position: relative;
  z-index: 3;

  margin-bottom: 4px !important;
  line-height: 0.95 !important;

  color: #000 !important;

  transition: color 0.3s ease;
}

.portfolio-search .project-card-hover .title a {
  color: inherit !important;
}

.portfolio-search .project-card-hover span {
  position: relative;
  z-index: 3;

  display: block !important;

  opacity: 1 !important;
  visibility: visible !important;

  transform: none !important;

  margin-top: 6px;

  color: #000 !important;

  line-height: 1.15 !important;

  transition: color 0.3s ease;
}

/* SLIDING BLACK PANEL */

.portfolio-search .project-card-hover .project-6__content::before {
  content: "";

  position: absolute;
  left: 0;
  bottom: -1px;

  width: 100%;
  height: calc(100% + 2px);

  background: #000;

  transform: translateY(calc(100% + 2px));
  transition: transform 0.35s ease;

  z-index: 1;
}

/* HOVER PANEL */

.portfolio-search .project-card-hover:hover .project-6__content::before {
  transform: translateY(0%);
}

/* HOVER TEXT */

.portfolio-search .project-card-hover:hover .title,
.portfolio-search .project-card-hover:hover .title a,
.portfolio-search .project-card-hover:hover span {
  color: #fff !important;
}

/* REMOVE DIVIDERS */

.portfolio-search .works-section-12__item,
.portfolio-search .works-section-12__item::before,
.portfolio-search .works-section-12__item::after {
  border: none !important;
  box-shadow: none !important;
}
.portfolio-search .project-card-hover .person-role {
  display: flex !important;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-search .project-card-hover .person-role strong,
.portfolio-search .project-card-hover .person-role span {
  display: inline !important;
  margin-top: 0 !important;
  line-height: inherit !important;
}

.portfolio-search .project-card-hover .person-role strong {
  font-family: var(--font_regular);
  font-weight: normal;
}

.portfolio-search .project-card-hover .role-divider,
.portfolio-search .project-card-hover .role-department {
  font-family: var(--font_thin);
  opacity: 0.65;
}
/* =========================================================
   PEOPLE CARD — TOP CONTENT FADE + IMAGE ZOOM + OVERLAY
========================================================= */

/* make sure image area clips the zoom */
.portfolio-search .project-card-hover {
  overflow: hidden;
}

/* thumbnail zoom */
.portfolio-search .project-card-hover > img {
  transition: transform 0.6s cubic-bezier(.19,1,.22,1) !important;
  transform: scale(1) !important;
}

.portfolio-search .project-card-hover:hover > img {
  transform: scale(1.03) !important;
}

/* subtle black gradient overlay */
.portfolio-search .project-card-hover::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(100% - var(--people-content-height, 105px));
  z-index: 2;
  pointer-events: none;

  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.32) 0%,
    rgba(0,0,0,0.12) 35%,
    rgba(0,0,0,0) 100%
  );

  opacity: 0;
  transition: opacity 0.45s ease;
}

.portfolio-search .project-card-hover:hover::before {
  opacity: 1;
}

/* content-top hidden by default */
.portfolio-search .project-card-hover .content-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;

  transition:
    opacity 0.45s ease,
    visibility 0.45s ease,
    transform 0.45s cubic-bezier(.19,1,.22,1);
}

/* content-top fade in on hover */
.portfolio-search .project-card-hover:hover .content-top {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
/* =========================================================
   PEOPLE DETAIL PANEL — RESPONSIVE PREMIUM SLIDE
========================================================= */

.person-detail-panel {
  grid-column: 1 / -1;
  position: relative;
  background: #fff;
  overflow: hidden;

  border: 1px solid #ededed;

  padding: 60px 70px;
  margin: 0;

  animation: personPanelOpen 0.55s cubic-bezier(.19,1,.22,1) both;
}

.person-detail-panel.is-closing {
  animation: personPanelClose 0.42s cubic-bezier(.77,0,.175,1) both;
}

.person-detail-panel__content {
  max-width: 1280px;
  padding-right: 70px;
  opacity: 0;
  animation: personContentIn 0.45s ease 0.18s both;
}

.person-detail-panel p {
  color: #000;
  font-family: var(--font_light);
  font-size: 18px;
  line-height: 1.45;
}

.person-detail-panel p:not(:last-child) {
  margin-bottom: 24px;
}

/* thin close button */
.person-detail-panel__close {
  position: absolute;
  top: 22px;
  right: 22px;

  width: 44px;
  height: 44px;

  border: 1px solid rgba(0,0,0,0.16);
  border-radius: 50%;

  background: transparent;
  color: #000;

  font-size: 0;
  cursor: pointer;
  z-index: 5;

  transition: all 0.3s ease;
}

.person-detail-panel__close::before,
.person-detail-panel__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;

  width: 16px;
  height: 1px;

  background: currentColor;
  transform-origin: center;
}

.person-detail-panel__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.person-detail-panel__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.person-detail-panel__close:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* =========================================================
   ACTIVE (CLICKED) CARD
   Mirrors the :hover state of .project-6__content and its
   surrounding elements exactly, and keeps it pinned while
   the person-detail panel is open. Removing .is-active
   (done in closePanel/clearActiveCards) lets every property
   transition back to the default state.
========================================================= */

.portfolio-search .project-card-hover.is-active > img {
  transform: scale(1.03) !important;
}

.portfolio-search .project-card-hover.is-active::before {
  opacity: 1 !important;
}

/* Top row: same lift as :hover */
.portfolio-search .project-card-hover.is-active .content-top {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-4px) !important;
  pointer-events: auto !important;
}

/* Location tag border: same as :hover */
.portfolio-search .project-card-hover.is-active .sub-title {
  border-color: rgba(255, 255, 255, 0.55) !important;
}

/* Arrow icon: same lift as :hover */
.portfolio-search .project-card-hover.is-active .project-6__arrow i {
  transform: translateY(-4px) !important;
}

/* Sliding black panel behind .project-6__content: held up */
.portfolio-search .project-card-hover.is-active .project-6__content::before {
  transform: translateY(0%) !important;
}

/* Text inside .project-6__content: white, as on :hover */
.portfolio-search .project-card-hover.is-active .title,
.portfolio-search .project-card-hover.is-active .title a,
.portfolio-search .project-card-hover.is-active span {
  color: #fff !important;
}

/* animations */
@keyframes personPanelOpen {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

@keyframes personPanelClose {
  from {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }

  to {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    transform: translateY(-18px);
  }
}

@keyframes personContentIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199px) {
  .person-detail-panel {
    padding: 54px 56px;
  }

  .person-detail-panel__content {
    padding-right: 56px;
  }

  .person-detail-panel p {
    font-size: 17px;
    line-height: 1.4;
  }

  .person-detail-panel p:not(:last-child) {
    margin-bottom: 20px;
  }
}

@media (max-width: 991px) {
  .person-detail-panel {
    padding: 50px 38px 44px;
  }

  .person-detail-panel__content {
    padding-right: 52px;
  }

  .person-detail-panel__close {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
  }

  .person-detail-panel p {
    font-size: 16px;
    line-height: 1.38;
  }

  .person-detail-panel p:not(:last-child) {
    margin-bottom: 18px;
  }
}

@media (max-width: 767px) {
  .person-detail-panel {
    padding: 48px 26px 38px;
  }

  .person-detail-panel__content {
    padding-right: 0;
  }

  .person-detail-panel__close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  .person-detail-panel__close::before,
  .person-detail-panel__close::after {
    width: 14px;
  }

  .person-detail-panel p {
    font-size: 15px;
    line-height: 1.36;
  }

  .person-detail-panel p:not(:last-child) {
    margin-bottom: 16px;
  }
}

@media (max-width: 575px) {
  .person-detail-panel {
    padding: 46px 20px 34px;
  }

  .person-detail-panel p {
    font-size: 16px;
    line-height: 1.32;
  }

  .person-detail-panel p:not(:last-child) {
    margin-bottom: 14px;
  }
}
/* =========================================================
   Grid / List view toggle  (same pattern as the projects page)
   Sits at the right end of the filter-trigger row on desktop;
   the JS moves it onto the results row on mobile.
========================================================= */

.portfolio-search .view-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.portfolio-search .view-toggle__label {
  font-size: 18px;
  line-height: 1.2;
  color: rgba(17, 17, 17, 0.4);
  transition: color 0.25s ease;
  user-select: none;
  cursor: pointer;
}

.portfolio-search .view-toggle__label.is-active {
  color: var(--rr-heading-primary, #000000);
}

.portfolio-search .view-toggle__switch {
  appearance: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  width: 46px;
  height: 22px;
  border-radius: 999px;
  background: #000;
  flex: 0 0 auto;
}

.portfolio-search .view-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  will-change: transform;
  /* Fallback transition when GSAP is absent; GSAP overrides inline. */
  transition: transform 0.3s ease;
}

.portfolio-search .view-toggle__switch[aria-checked="true"] .view-toggle__knob {
  transform: translateX(24px);
}

/* Results row: holds #resultsMeta; on mobile the JS moves the
   view toggle in here, so meta sits left and toggle sits right
   on the same line. */
.portfolio-search .results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.portfolio-search .results-row .results-meta {
  margin-top: 0;
}

@media only screen and (max-width: 767px) {
  /* Mockup shows "Grid" / "List" only on mobile */
  .portfolio-search .view-toggle__label-suffix {
    display: none;
  }

  .portfolio-search .view-toggle {
    margin-left: 0;
    gap: 10px;
    flex: 0 0 auto;
  }

  .portfolio-search .view-toggle__label {
    font-size: 17px;
  }

  .portfolio-search .search-toggle__text {
    font-size: 17px;
  }

  .portfolio-search .view-toggle__label.is-active {
    font-weight: 500;
  }
}

/* =========================================================
   List view
   Columns: Name | Role | Department | Location
========================================================= */

.portfolio-search #portfolioGrid .list-row {
  display: none;
}

.portfolio-search #portfolioGrid.is-list {
  display: block;
}

.portfolio-search #portfolioGrid.is-list .works-section-12__item {
  /* !important needed: this page resets item borders with
     `border: none !important` further up the file. */
  border-bottom: 1px solid rgba(17, 17, 17, 0.14) !important;
}

.portfolio-search #portfolioGrid.is-list .works-section-12__item:first-child {
  border-top: 1px solid rgba(17, 17, 17, 0.14) !important;
}

.portfolio-search #portfolioGrid.is-list .works-section-12__thumb {
  display: none;
}

.portfolio-search #portfolioGrid.is-list .list-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) minmax(0, 280px) minmax(0, 240px) minmax(0, 140px);
  gap: 12px 30px;
  align-items: baseline;
  padding: 24px 0;
  text-decoration: none;
  color: var(--rr-heading-primary, #000000);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, padding 0.3s ease;
}

/* Active (detail panel open): dark band per mockup */
.portfolio-search #portfolioGrid.is-list .list-row.is-active {
  background: #000;
  color: #fff;
  padding-left: 24px;
  padding-right: 24px;
}

.portfolio-search #portfolioGrid.is-list .list-row.is-active .list-row__role,
.portfolio-search #portfolioGrid.is-list .list-row.is-active .list-row__department,
.portfolio-search #portfolioGrid.is-list .list-row.is-active .list-row__location {
  color: rgba(255, 255, 255, 0.7);
}


.portfolio-search #portfolioGrid.is-list .list-row__name {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  transition: transform 0.3s ease;
}

.portfolio-search #portfolioGrid.is-list .list-row:hover .list-row__name {
  transform: translateX(10px);
}

/* Active row is inset via padding; no extra shift on the name */
.portfolio-search #portfolioGrid.is-list .list-row.is-active .list-row__name {
  transform: none;
}

.portfolio-search #portfolioGrid.is-list .list-row__role,
.portfolio-search #portfolioGrid.is-list .list-row__department,
.portfolio-search #portfolioGrid.is-list .list-row__location {
  font-size: 16px;
  line-height: 1.4;
  color: rgba(17, 17, 17, 0.65);
}

@media only screen and (max-width: 1199px) {
  .portfolio-search #portfolioGrid.is-list .list-row {
    grid-template-columns:
      minmax(0, 1fr) minmax(0, 220px) minmax(0, 200px) minmax(0, 110px);
  }
}

@media only screen and (max-width: 991px) {
  /* Two columns: name/role left, department/location right */
  .portfolio-search #portfolioGrid.is-list .list-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 200px);
    gap: 6px 30px;
  }
}

@media only screen and (max-width: 767px) {
  .portfolio-search #portfolioGrid.is-list .list-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 0;
  }

  .portfolio-search #portfolioGrid.is-list .list-row__name {
    font-size: 20px;
  }
}

/* Floating thumbnail preview shown while hovering a list row.
   Portrait ratio to suit the people headshots. Lives on <body>. */
.list-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 220px;
  height: 270px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.list-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: none), (max-width: 991px) {
  .list-preview {
    display: none;
  }
}