.collection {
  min-height: 100vh;
  background: var(--bgDark);
}

.collection__box {
}

.collection__content {
}

.collection__title {
}

.collection__desc {
  margin: 20px auto 50px;
  text-align: center;
  max-width: 580px;
}

.collection__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.collection__item {
  position: relative;
  background: var(--bgLight);
  border-radius: 12px;
  padding: 20px;
  border: 2px solid var(--textDark);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collection__banner {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.collection__text {
  display: grid;
  grid-template-rows: 58px auto;
  gap: 12px;
}

.collection__text-top {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
}

.collection__item-title {
  font-weight: 500;
}

.collection__icon {
  width: 100%;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.collection__item-btn {
  margin-top: auto;
  cursor: pointer;
  background: var(--colorAccent);
  color: var(--bgLight);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--colorAccent);
}

.collection__item-btn.closed {
  background: var(--bgLight);
  color: var(--colorAccent);

  .collection__item-btn-plus {
    &::after,
    &::before {
      background: var(--colorAccent);
    }
  }
}

.collection__item-btn-plus {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  &::after,
  &::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--bgLight);
  }

  &::before {
    rotate: 90deg;
  }
}

.collection__item-card {
  border-radius: 12px;
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bgLight);
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collection__item-btn-plus.closed {
  &::before {
    display: none;
  }
}

.collection__item-card-name {
  display: flex;
  flex-direction: column;
  gap: 4px;

  h4 {
    line-height: 120%;
    font-size: 20px;
  }

  p {
    font-size: 16px;
  }
}

.collection__item-desc {
  text-align: center;
}

.collection__item-card.active {
  opacity: 1;
  pointer-events: all;
}

@media (hover: hover) {
  .collection__item:hover {
    transform: translateY(-2px);
    box-shadow: 2px 2px 2px 4px var(--borderDark);
  }

  .collection__item-btn:hover {
    background: var(--bgLight);
    color: var(--colorAccent);

    .collection__item-btn-plus {
      &::after,
      &::before {
        background: var(--colorAccent);
      }
    }
  }

  .collection__item-btn.closed:hover {
    margin-top: auto;
    background: var(--colorAccent);
    color: var(--bgLight);

    .collection__item-btn-plus {
      &::after,
      &::before {
        background: var(--bgLight);
      }
    }
  }
}

@media screen and (max-width: 1300px) {
  .collection__list {
    gap: 20px;
  }

  .collection__text {
    gap: 8px;
  }

  .collection__item-title {
    font-size: 18px;
    line-height: 120%;
  }

  .collection__item-desc {
    font-size: 16px;
  }

  .collection__item-card-name {
    h4 {
      font-size: 18px;
    }

    p {
      font-size: 16px;
    }
  }
}

@media screen and (max-width: 1200px) {
  .collection__item-btn {
    font-size: 16px;
  }

  .collection__item-btn-plus {
    width: 16px;
    height: 16px;
  }

  .collection__item-card-name {
    h4 {
      font-size: 16px;
    }

    p {
      font-size: 14px;
    }
  }
}

@media screen and (max-width: 1160px) {
  .collection__text {
    grid-template-rows: 48px 1fr;
  }

  .collection__text-top {
    grid-template-columns: 32px 1fr;
    gap: 8px;
  }

  .collection__item-title {
    font-size: 16px;
  }

  .collection__item-desc {
    font-size: 14px;
  }
}

@media screen and (max-width: 1100px) {
  .collection__item-btn {
    padding: 6px 10px;
    font-size: 14px;
  }

  .collection__item-btn-plus {
    width: 14px;
    height: 14px;
  }

  .collection__item-card-name {
    h4 {
      font-size: 14px;
    }

    p {
      font-size: 12px;
    }
  }
}

@media screen and (max-width: 900px) {
  .collection__list {
    grid-template-columns: 1fr 1fr;
  }

  .collection__text {
    grid-template-rows: auto auto;
  }

  .collection__text-top {
    grid-template-columns: 42px 1fr;
    gap: 10px;
  }

  .collection__item-title {
    font-size: 20px;
  }

  .collection__item-desc {
    font-size: 18px;
    text-align: left;
    margin-left: 52px;
  }

  .collection__item-btn {
    padding: 10px;
    font-size: 16px;
  }

  .collection__item-btn-plus {
    width: 16px;
    height: 16px;
  }

  .collection__item-card-name {
    h4 {
      font-size: 18px;
    }

    p {
      font-size: 16px;
    }
  }
}

@media screen and (max-width: 700px) {
  .collection__item-card-name {
    h4 {
      font-size: 16px;
    }

    p {
      font-size: 14px;
    }
  }
}

@media screen and (max-width: 600px) {
  .collection__list {
    gap: 12px;
  }

  .collection__text-top {
    grid-template-columns: 32px 1fr;
    gap: 8px;
  }
  .collection__item-title {
    font-size: 16px;
  }

  .collection__item-desc {
    font-size: 14px;
    margin-left: 0;
  }

  .collection__item-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .collection__item-btn-plus {
    width: 14px;
    height: 14px;

    &::after,
    &::before {
      height: 1px;
    }
  }

  .collection__item-card {
    gap: 6px;
  }

  .collection__item-card-name {
    gap: 0;

    h4 {
      font-size: 14px;
    }

    p {
      font-size: 12px;
    }
  }
}

@media screen and (max-width: 500px) {
  .collection__item-card-name {
    h4 {
      font-size: 12px;
    }

    p {
      font-size: 10px;
    }
  }
}

@media screen and (max-width: 460px) {
  .collection__item {
    padding: 12px;
  }

  .collection__text-top {
    grid-template-columns: 24px 1fr;
  }

  .collection__item-card {
    padding: 12px;
  }
  .collection__item-title {
    font-size: 14px;
  }

  .collection__item-desc {
    font-size: 12px;
  }
}

@media screen and (max-width: 400px) {
  .collection__item {
    border-radius: 8px;
    padding: 10px;
  }

  .collection__text-top {
    grid-template-columns: 20px 1fr;
    gap: 6px;
  }

  .collection__item-title {
    font-size: 12px;
  }

  .collection__item-desc {
    font-size: 10px;
  }

  .collection__item-btn {
    font-size: 10px;
  }

  .collection__item-btn-plus {
    width: 10px;
    height: 10px;
  }

  .collection__item-card {
    padding: 10px;
  }

  .collection__item-card-name {
    h4 {
      font-size: 10px;
    }

    p {
      font-size: 10px;
    }
  }
}
