.categories {
  overflow-y: hidden;
  background-color: white;
  width: 300px;
  height: 200px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  cursor: pointer;
}
.cat-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.categories img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.categories p {
  font-size: 30px;
  font-family: var(--font);
  font-weight: 1000;
  text-align: center;
  text-shadow: 0px 0px 20px;
  z-index: 2;
}

.categories:nth-child(1) {
  background-image: url();
}

.categories:nth-child(2) {
  background-image: url();
}

.categories:nth-child(3) {
  background-image: url();
}

.categories:nth-child(4) {
  background-image: url();
}

.dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--secondary);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.categories:hover .dark-overlay {
  opacity: 0;
}

@media only screen and (max-width: 1080px) {
  .cat-center {
    flex-direction: column;
    gap: 10px;
  }
}