/* Stylizacja kontenera z gridem */
.featured-categories {
  /* margin: 2rem; */
}
  
.featured-categories .categories-title {
  text-align: center;
  font-weight: 500;
  text-transform: uppercase !important;
}

.featured-categories h2 {
  text-align: start;
}

.featured-categories .grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% dla obu kolumn */
  gap: 20px;
  align-items: center;
  padding: 20px;
}

@media (max-width: 768px) {
  .featured-categories .grid-container {
    grid-template-columns: 1fr;
  }
}

.featured-categories .grid-container a {
  display: contents;
}

.featured-categories .category-content {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 80%;
}

/* Stylizacja dużego elementu */
.category-item.large {
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  position: relative;
  height: 100%;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease-in-out;
}

.category-item.large:hover {
  transform: scale(1.04);
}


/* Stylizacja tekstu na dużym obrazie */
.category-item.large h2 {
  font-size: 48px !important;
  position: relative;
  z-index: 1;
  text-align: center;
  /* top: 0.5rem; */
  top: 0;
  margin: 0;
  line-height: 1.2;
  color: #fff !important;
  background: rgba(224 124 53 / 0.8);
    /* Efekt rozmycia tła */
  /* backdrop-filter: blur(10px) */
  padding: 10px 20px; /* Dodatkowe marginesy wokół tekstu */
  border-radius: 10px; /* Zaokrąglone rogi dla ładniejszego efektu */
}

.category-item.small:hover .category-content h2,
.category-item.large:hover .category-content h2 {
  /* background-color: rgba(224 124 53 / 0.8); */
  background-color: rgba(221, 110, 66, 0.8);
}

.category-item.small,
.category-item.small:hover::after,
.category-item.large,
.category-item.large:hover::after {
  border-radius: 10px;
}

.category-item.small:hover::after,
.category-item.large:hover::after {
  /* border-color: #e07c35; */
  /* outline: 3px solid #e07c35; */
}


/* Stylizacja grupy mniejszych elementów w gridzie 2x2 */
.category-group-items {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Grid 2x2 */
  gap: 10px;
}

/* Stylizacja mniejszych elementów */
.category-item.small {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  position: relative;
  transition: transform 0.3s ease-in-out;
}

.category-item.small:hover {
  transform: scale(1.05);
}

/* Dodanie tła gradientowego, aby tekst był lepiej widoczny */
.category-item.small:hover::after,
.category-item.large:hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; 
  /* background: rgba(0, 0, 0, 0.3); */
  background: rgba(224, 124, 53, 0.7);
}

.category-item.small .category-content h2 {
  font-size: 24px !important;
  text-align: center;
  color: #fff !important;
  background: rgba(224 124 53 / 0.8);
  padding: 10px 20px;
  border-radius: 10px;
  position: relative;
  z-index: 2;
}


/* Mobilny układ - Flexbox */
@media (max-width: 768px) {
  .grid-container {
    display: flex;
    flex-direction: column;
  }

  .category-group-items {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Zachowanie układu grid 2x2 */
    gap: 10px;
  }
  
  .category-item.large {
    height: auto; /* Dynamiczna wysokość, zależna od zawartości */
    width: -webkit-fill-available;
    min-height: 300px; /* Minimalna wysokość, żeby obraz był zawsze widoczny */
    background-size: cover; /* Upewnij się, że tło się skaluje */
    background-position: center; /* Wyrównaj tło na środku */  
  }

  .category-item.large h2 {
    font-size: 24px !important; 
  }

  .category-item.small .h2 {
    font-size: 16px;
  }
}

@media (max-width: 500px) {
  .category-group-items {
    grid-template-columns: 1fr;
    width: -webkit-fill-available;
    gap: 25px;
  }

  .category-item.small {
    width: 100%;
    height: auto;
    min-height: 130px;
  }

  .category-item.small h2{
    font-size: 8px !important;
  }

  .category-content {
    min-height: 100px;
  }
}
