.app-container {
  .projects {
    .projects__container {
      position: relative;
      z-index: 2;
      max-width: 1400px;
      padding: 48px 100px;
      width: 100%;
      margin: auto;
      display: flex;
      flex-direction: column;
      gap: 48px;
      @media (max-width: 1400px) {
        padding: 48px 50px;
      }
      @media (max-width: 1000px) {
        padding: 32px 16px;
        gap: 32px;
      }
    }
    .projects__header {
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      gap: 8px;
      .case-study-selected__header-text {
        max-width: 584px;
        p {
          margin-bottom: 0;
        }
      }
    }

    .projects__item {
      width: calc(33.33% - 11px);
      text-decoration: none;
      display: flex;
      flex-direction: column;
      transition: 0.3s;
      @media (min-width: 768px) {
        &:hover {
          transform: translateY(-6px);
        }
      }

      @media (max-width: 768px) {
        width: 100%;
      }

      .projects__thumb {
        width: 100%;
        display: flex;
        img {
          width: 100%;
          object-fit: cover;
          height: 200px;
          border-radius: 4px;
          @media (max-width: 768px) {
            height: 180px;
          }
        }
      }
      p.title {
        color: #191325;
        font-size: 19px;
        font-weight: 600;
        line-height: 1.2;
        font-family: var(--mainfont);
        margin-bottom: 0px;
        padding: 16px;
        @media (max-width: 1000px) {
          font-size: 16px;
        }
      }
      .projects__item-text {
        p {
          font-size: 13px;
          margin-bottom: 24px;
        }
      }
      span.more {
        background-color: #7b4fff;
        color: white;
        border: none;
        cursor: pointer;
        border-radius: 360px;
        font-size: 16px;
        align-items: center;
        font-weight: 600;
        text-decoration: none;
        justify-content: center;
        padding: 12px 20px;
        transition: 0.3s;
        display: flex;
        width: fit-content;
        margin-top: auto;

        svg {
          margin-left: 12px;
          path {
            transition: 0.3s;
          }
        }
        &:hover {
          background-color: #5018bf;
        }
      }
    }
    .projects__items {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
    }
  }
  .projects .filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    @media (max-width: 768px) {
    position: relative;

    }
  }

  .filter {
    position: relative;
    @media (max-width: 768px) {
      position: static;

    }
    &.is-open {
      .filter__toggle {
        background-color: #f3f3f4;
      }
      .filter__caret {
        svg {
          transform: rotate(180deg);
        }
      }
    }
  }
  .filter__toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 360px;
    border: 1px solid #e8e7e9;
    background: #fff;
    padding: 12px 20px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s;
    @media (max-width: 768px) {
      padding: 8px 14px;
  
      }
  }

  .filter__label {
    font-size: 16px;
    font-weight: 600;
    color: #191325;
    line-height: 1.4;
  }
  .filter__chips {
    display: inline-flex;
    gap: 6px;
  }
  .chip {
    font-weight: 500;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f3f7;
  }
  .chip--count {
    background: #eee;
  }
  .filter__caret {
    margin-left: 4px;
    svg {
      transition: 0.3s;
    }
  }

  .filter__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
    z-index: 20;
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
    @media (max-width: 768px) {
      width: 100%;
    }
  }
  .filter.is-open .filter__panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  .filter__panel[aria-hidden="true"] {
    display: block;
  }

  .check {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
  }
  .check:hover {
    background: #f8f8fb;
  }

  .check input {
    display: none;
  }
  .check__box {
    width: 18px;
    height: 18px;
    border-radius: 2px;
    border: 2px solid #d1d0d3;
    display: inline-block;
    position: relative;
  }
  .check input:checked + .check__box {
    border-color: #7b4fff;
    background: #7b4fff;
  }
  .check input:checked + .check__box::after {
    content: "";
    position: absolute;
    inset: 0;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="%23fff" d="M6.5 11.3 3.7 8.5 2.3 9.9l4.2 4.2L14 6.6 12.6 5.2z"/></svg>')
      center / 12px 12px no-repeat;
    background: #fff;
  }
  .check__text {
    font-size: 16px;
    color: #191325;
    font-weight: 400;
  }

  .projects__items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  .projects__item {
    width: calc(33.33% - 11px);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
  }
  @media (min-width: 768px) {
    .projects__item:hover {
      transform: translateY(-6px);
    }
  }
  @media (max-width: 768px) {
    .projects__item {
      width: 100%;
 
    }
  }

  .projects__thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
  }
  @media (max-width: 768px) {
    .projects__thumb img {
      height: 180px;
    }
  }

  .projects__item .title {
    color: #191325;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    padding: 16px;
  }
  div#projects-list {
    position: relative;
    &::after {
      content: "";
      border: 6px solid #e9e9e9;
      border-top: 6px solid var(--secondarycolor);
      border-radius: 50%;
      width: 50px;
      height: 50px;
      animation: spin 2s linear infinite;
      position: absolute;
      left: calc(50% - 30px);
      top: calc(50% - 30px);
      transform: translate(-50%, -50%);
      z-index: 5;
      opacity: 0;
      visibility: hidden;
      transition: 0.3s;
    }
    &::before {
      content: "";
      width: 100%;
      height: 100%;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background-color: rgba(255, 255, 255, 0.494);
      z-index: 4;
      opacity: 0;
      visibility: hidden;
      transition: 0.3s;
    }
  }

  #projects-list.is-loading {
    pointer-events: none;
    &::after,
    &::before {
      opacity: 1;
      visibility: visible;
    }
  }
  .filters-selected {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }

  .fs-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #534e5c;
    color: #fff;
    border-radius: 999px;
    font-weight: 500;
    font-size: 13px;
  }
  .fs-chip__label {
    line-height: 1;
  }
  .fs-chip__remove {
    appearance: none;
    border: 0;
    background: transparent;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
  }

  .fs-clear {
    background: transparent;
    border: 0;
    color: #8c8992;
    font-weight: 500;
    cursor: pointer;
    font-size: 13px;
    display: none;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    &.active {
      display: flex;
    }
  }
  .fs-clear:hover {
    opacity: 1;
  }

  .sheet-lock,
  .sheet-lock body {
    overflow: hidden;
  }

  .project-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
.project-sheet {
  position: fixed;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.project-sheet__panel {
  transform: translateX(100%);
}

.project-sheet,
.project-sheet__panel {
  transition: none;
}

.project-sheet[data-ready="true"]      { transition: opacity .2s ease, visibility .2s ease; }
.project-sheet[data-ready="true"] .project-sheet__panel { transition: transform .25s ease; }

.project-sheet.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.project-sheet.is-open .project-sheet__panel {
  transform: translateX(0);
}

  .project-sheet.is-open {
    pointer-events: auto;
    opacity: 1;
  }

  .project-sheet__backdrop {
    position: absolute;
    inset: 0 0 0 0;
    background: rgba(21, 16, 32, 0.55);
    backdrop-filter: blur(1px);
  }

  .project-sheet__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 800px;
    max-width: 100%;
    background: #fff;
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow: auto;
  }
  .project-sheet.is-open .project-sheet__panel {
    transform: translateX(0);
  }

  .project-sheet__content {
    padding: 32px 64px;
    position: relative;
    @media (max-width: 768px) {
      padding: 32px 16px;

          }
  }

  .project-sheet__close {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 0;
    @media (max-width: 768px) {
      width: 32px;
    height: 32px;
    top:24px;
    right: 16px;

          }
    svg {
      width: 100%;
      height: 100%;
      path {
        transition: 0.3s;
      }
    }
    &:hover {
      svg {
        path {
          fill-opacity: 1;
        }
      }
    }
  }
  h2.project-sheet__title {
    font-size: 40px;
    line-height: 1.1;
    margin-top: 48px;
    font-weight: 500;
    color: #191325;
    margin-bottom: 32px;
    @media (max-width: 1000px) {
      font-size: 26px;
    }
  }
  .project-sheet__cover img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin-bottom: 20px;
  }

  .project-sheet__meta {
    display: flex;
    gap: 48px;
    @media (max-width: 1000px) {
     flex-direction: column;
     gap:24px;
    }
    .project-sheet__group {
      display: flex;
      flex-direction: column;
      gap: 16px;
      @media (max-width: 1000px) {
   width: 100%;
       }
      &:first-child {
        border-right: 1px solid #e8e7e9;
        padding-right: 48px;
        min-width: fit-content;
        @media (max-width: 1000px) {
          width: 100%;
              }
      }
      .project-sheet__group-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
        p.title {
          color: #8c8992;
          font-size: 11px;
          font-weight: 400;
          margin-bottom: 0;
        }
        p.client,
        a.client {
          display: flex;
          align-items: center;
          gap: 4px;
          color: #191325;
          font-weight: 600;
          font-size: 13px;
          text-decoration: none;
        }
      }
    }
  }
  .project-sheet__group-label {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a7590;
    margin-bottom: 6px;
  }
  .project-sheet__industry {
    .tag {
      font-size: 13px;
      font-weight: 400;
      color: #191325;
    }
  }
  .project-sheet__tags {
    columns: 2;
    column-gap: 16px;
  }

  .project-sheet__tags .tag {
    display: flex;
    margin-bottom: 8px;
    width: 100%;
    gap: 8px;
    color: #534e5c;
    font-size: 13px;
    font-weight: 400;
    svg {
      min-width: 16px;
    }
  }
  .project-sheet__body {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 32px;
    section > div:first-of-type {
      padding: 0 !important;
    }
    section {
      padding:0!important;
    }
  }
  .project-sheet__loader {
    position: absolute;
    width: 100%;
    height: 100vh;
    left: 0;
    top:0;
    z-index: 5;
    &::after {
      content: "";
      border: 6px solid #e9e9e9;
      border-top: 6px solid var(--secondarycolor);
      border-radius: 50%;
      width: 50px;
      height: 50px;
      animation: spin 2s linear infinite;
      position: absolute;
      left: calc(50% - 30px);
      top: calc(50% - 30px);
      transform: translate(-50%, -50%);
      z-index: 5;
      transition: 0.3s;
    }
    &::before {
      content: "";
      width: 100%;
      height: 100%;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background-color: rgba(255, 255, 255, 0.494);
      z-index: 4;
      transition: 0.3s;
    }
  }
  .project-sheet__loader,
  .project-sheet__error {
    padding: 32px;
  }
  @media (max-width: 900px) {
    .project-sheet__backdrop {
      inset: 0;
    }
    .project-sheet__panel {
      width: 100%;
    }
  }
  .project-sheet__gallery {
    display: grid;
    gap: 8px;
    margin-bottom: 32px;
    position: relative;
  }
  .project-sheet__gallery.cols-1 {
    grid-template-columns: 1fr;
    .project-sheet__gallery-img {
      height: 280px;
    }
  }
  .project-sheet__logo {
    padding: 6px 8px;
    background-color: white;
    width: fit-content;
    border-radius: 4px;
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;

    img {
      max-width: 141px;
      max-height: 90px;
      object-fit: contain;
    }
  }
  .project-sheet__gallery.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-sheet__gallery.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .project-sheet__gallery-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    height: 200px;
    object-fit: cover;
  }
  @media (max-width: 640px) {
    .project-sheet__gallery.cols-2,
    .project-sheet__gallery.cols-3 {
      grid-template-columns: 1fr;
    }
  }
}
