@import 'variables.css';

/* TODO: поместить все hover эффекты в скобки, чтобы на мобилках не работали */

.main__title {
  margin: 0px auto 100px auto;
  font-size: 300%;
  line-height: 1.3em;
  text-align: center;
}

.category-list {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 50px;
  margin: 0 auto 0 auto;
  padding: 0 20px;
  list-style: none;
}

.category-list__item {
  z-index: 1;
  width: 25%;
  min-width: 300px;
  border: 1px solid var(--accentColor);
  border-radius: 10px;
  box-shadow: 3px 3px 0px 0px var(--accentColor);
  background: linear-gradient(var(--gradientAngle), rgba(231, 29, 7, 0.8), rgba(192, 29, 11, 0) 100%);
  background-color: #f8f9fa;
  background-color: #fff;
  background-size: 200% 200%;
  transition: transform 0.5s ease, opacity 0.5s ease;
  transition: 0.1s box-shadow ease-in, 0.2s background ease-out;
  animation: rotateGradient 20s cubic-bezier(0.73, 0.34, 0.19, 0.73) infinite;
}

.category-list__item:hover {
  box-shadow: 10px 10px 0px 0px var(--accentColor);
}

.category-list__item-title {
  max-width: 100%;
  margin: 0 0 10px;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.3;
  word-wrap: break-word;
  text-wrap: wrap;
}

.category-list__item-description {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.3;
  transition: opacity 0.5s ease;
}

@keyframes rotateGradient {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 100% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 0% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

.category-list__item-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  height: 100%;
  min-height: 300px;
  padding: 20px;
  color: #000;
  text-decoration: none;
}

@media (max-width: 700px) {
  .category-list__item {
    width: 100%;
  }
}