.index-block {
  --offset: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (width >= 1366px) {
  .index-block {
    min-height: calc(100vh - var(--font-line-height-l) - 3 * var(--offset));
  }
}

.index-block__header {
  padding: var(--offset);
  background-color: var(--accent-color);
}

@media (width >= 768px) and (width < 1366px) {
  .index-block__header {
    padding: calc(2 * var(--offset));
  }
}

.index-block__title {
  position: relative;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 10px;
  height: auto;
  font-size: var(--font-size-xl);
  line-height: var(--font-line-height-xl);
  font-weight: normal;
  white-space: initial;
  overflow: unset;
  clip-path: unset;
  clip: unset;
}

.index-block__filter {
  margin: 0;
  position: sticky;
  bottom: 0;
  padding: var(--offset);
  border: 0;
  display: flex;
  font-size: var(--font-size-s);
  line-height: var(--font-line-height-s);
  background-color: var(--color-background);
}

@media not all and (width >= 1366px) {
  .index-block__inner {
    display: grid;
    grid-template-rows: min-content auto min-content;
    min-height: calc(100vh - var(--font-line-height-m) - 3 * var(--offset));
  }

  .index-block__header {
    padding-top: clamp(20px, 8%, 130px);
  }

  .index-block__filter {
    order: 1;
    z-index: 1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--offset, 20px);
    border-block-start: 1px solid var(--color-border);
    font-size: var(--font-size-m);
    line-height: var(--font-line-height-m);
  }

  .index-block__filter::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 1px;
    height: 40px;
    background-image: linear-gradient(hsl(var(--color-base-background) / 0), var(--color-background));
  }
}

@media (width >= 1366px) {
  .index-block {
    --offset: 20px;
    display: grid;
    grid-template-columns: 420px 1fr;
  }

  .index-block__inner {
    display: contents;
  }

  .index-block__header {
    grid-column: 1;
    background-color: transparent;
  }

  .index-block__title {
    position: absolute;
    margin: -1px;
    clip-path: inset(50%);
    clip: rect(0 0 0 0);
    overflow: hidden;
    width: 1px;
    height: 1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
  }

  .index-block__filter {
    grid-column: 1;
    padding: var(--offset);
    padding-right: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 4px;
  }

  .index-block__main {
    grid-column: 2;
    grid-row: 1;
  }
}
