.portfolio-search {
  padding: 60px 0 140px;
  position: relative;
  background-color: #fff;
  font-family: var(--font_regular);
}

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

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

.portfolio-search .filter-label {
  margin-bottom: 18px;
  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: 24px;
  border-bottom: 0;
  position: relative;
  z-index: 30;
}

.portfolio-search .filter-group {
  position: relative;
  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;
}

.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);
}

.portfolio-search .filter-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  min-width: 720px;
  padding: 20px 24px 24px;
  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(3, minmax(0, 1fr));
  gap: 10px 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;
  background: transparent;
  cursor: pointer;
}

.portfolio-search .filter-option:hover {
  background: transparent;
}

.portfolio-search .filter-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  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"]::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: 18px;
  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;
}

.portfolio-search .filter-searchbar {
  margin-bottom: 54px;
}

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

.portfolio-search .filter-search-input {
  flex: 1;
  min-width: 220px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #999;
  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: 2px 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: 991px) {
  .portfolio-search {
    padding: 90px 0 110px;
  }

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

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

@media (max-width: 767px) {
  .portfolio-search {
    padding: 70px 0 90px;
  }
}

@media (max-width: 575px) {
  .portfolio-search .filter-search-wrap {
    align-items: stretch;
  }
}


/* 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;
  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: 36px;
  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_light);
  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: 32px;
  }
}

@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: 30px;
  }
}

@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: 30px;
    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: 28px;
    line-height: 1.08;
    letter-spacing: normal;
    margin-bottom: 10px;
  }

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

/* Direct category filters: animated underline like the main navigation */
.portfolio-search .filter-trigger {
  padding-right: 0;
  cursor: pointer;
  overflow: visible;
  text-decoration: none;
}

.portfolio-search .filter-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  top: auto;
  bottom: -4px;
  width: 100%;
  height: 1px;
  display: block;
  background: currentColor;
  font-family: inherit;
  font-size: 0;
  line-height: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.portfolio-search .filter-trigger:hover::after,
.portfolio-search .filter-trigger:focus-visible::after,
.portfolio-search .filter-trigger.is-active::after,
.portfolio-search .filter-trigger[aria-pressed="true"]::after {
  transform: scaleX(1);
}

.portfolio-search .filter-trigger:focus-visible {
  outline: none;
}


/* Mobile: category filters stack as full-width accordion-style rows
   with dividers (no dropdown panels on this page). The active/hover
   underline sits directly on the row divider. */
@media (max-width: 767px) {
  .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: block;
    width: 100%;
    padding: 20px 0;
    font-size: 26px;
    text-align: left;
  }

  /* Underline sits exactly on top of the row divider, so on
     hover/active the black line replaces the grey one instead
     of stacking above it */
  .portfolio-search .filter-trigger::after {
    bottom: -1px;
    height: 1px;
  }
}

@media (max-width: 575px) {
  /* Keyword input takes its own full-width row;
     Search and Clear share the row below, side by side. */
  .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;
  }
}

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

/* =========================================================
   SORT CONTROL (Latest / Oldest)
   Exact mirror of .careers-filter__sort from filter_careers.css,
   namespaced for the news page.
   ========================================================= */

/* Desktop: the sort control lives INSIDE #portfolioFilterBar as its
   last child and margin-left:auto pushes it to the right end of the
   pill row — exactly how the Grid/List toggle sits in filter_projects.
   At <=767px filter_news.js moves it into .results-row instead. */
.news-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
  /* Lift the whole control above the card grid: the GSAP-animated
     cards create their own stacking contexts, so the menu's inner
     z-index alone can't win — the ancestor needs one too. */
  z-index: 45;
}

.news-sort__label {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--rr-heading-primary, #000000);
}

.news-sort__trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--rr-heading-primary, #000000);
  cursor: pointer;
}

.news-sort__trigger:focus-visible {
  outline: 2px solid var(--rr-heading-primary, #000000);
  outline-offset: 3px;
}

.news-sort__value {
  font-size: 16px;
  font-family: var(--font_light);
  line-height: 1.2;
}

.news-sort__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(17, 17, 17, 0.25);
  border-radius: 50%;
  font-size: 11px;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}

.news-sort__trigger:hover .news-sort__icon,
.news-sort.is-sort-open .news-sort__icon {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.news-sort.is-sort-open .news-sort__icon {
  transform: rotate(180deg);
}

.news-sort__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
  z-index: 60;
}

.news-sort__menu[hidden] {
  display: none;
}

.news-sort__menu li {
  padding: 9px 18px;
  font-size: 15px;
  font-family: var(--font_light);
  color: var(--secondary, #555555);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.news-sort__menu li:hover {
  color: var(--rr-heading-primary, #000000);
  background: rgba(17, 17, 17, 0.05);
}

.news-sort__menu li[aria-selected="true"] {
  color: var(--rr-heading-primary, #000000);
  font-family: var(--font_regular);
}

/* Results row: holds #resultsMeta; on mobile the JS moves the
   sort control in here, so meta sits left and sort sits right
   on the same line (mirrors .results-row in filter_projects.css). */
.portfolio-search .results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  /* Keep the row (and the sort menu inside it on mobile) painting
     above the card grid that follows it in the DOM. */
  position: relative;
  z-index: 45;
}

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

@media only screen and (max-width: 767px) {
  .news-sort {
    margin-left: 0;
    flex: 0 0 auto;
  }
}
