#block-webmedio-webmediojobcategoryfilterblock {
  max-width: 100%;
}

/* Category Filter Block
-------------------------------------------------*/

.webmedio-category-filter-wrapper h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: bold;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.3em;
}

/* Ukryte elementy */
.hidden {
  display: none !important;
}

/* Wybrane kategorie */
.selected-categories-display {
  margin-bottom: 1rem;
}
.selected-categories-display h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.selected-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.selected-categories-list li {
  display: flex;
  align-items: center;
  background-color: #e0f0ff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #c0e0ff;
}
.remove-category {
  background: none;
  border: none;
  color: #0e1b77;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0 0 0.3rem;
  line-height: 1;
}
.remove-category:hover {
  color: #ff3333;
}



/* Styl dla body przy otwartym modalu */
body.modal-open {
  overflow: hidden;
}

/* Modal */
.categories-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.categories-modal-content {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.categories-modal-header {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.categories-modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
}
.close-modal {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.categories-modal-body {
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}
.categories-modal-footer {
  padding: 1rem;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ===============================================
   POPRAWIONE STYLE DLA PRZYCISKU KATEGORII
   =============================================== */

/* Wyszukiwanie kategorii - główny kontener */
.category-search {
  margin-bottom: 1.5rem;
  position: relative;
}

/* Wrapper dla pola wyszukiwania - ULEPSZONE */
.search-input-wrapper {
  position: relative;
  background: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  overflow: visible;
}


/* Stan hover - wyraźniejszy */
.search-input-wrapper:hover {
  box-shadow: 0 4px 12px rgba(14, 27, 119, 0.15);
  border-color: #0e1b77;
  transform: translateY(-2px);
}

/* Stan focus - lepszy kontrast */
.search-input-wrapper:focus-within {
  box-shadow: 0 0 0 3px rgba(14, 27, 119, 0.1),
              0 4px 12px rgba(14, 27, 119, 0.15);
  border-color: #0e1b77;
  background: #ffffff;
}

.search-input-wrapper:active {
  transform: translateY(-1px);
}

/* Label z licznikiem - ZWIĘKSZONY KONTRAST */
.search-label {
  display: block;
  margin-bottom: 0;
  padding: 14px 18px 8px;
  font-weight: 700;
  font-size: 12px;
  color: #0e1b77;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.search-label .counter {
  font-weight: 800;
  color: #ffffff;
  background: #0e1b77;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  margin-left: 8px;
  box-shadow: 0 2px 4px rgba(14, 27, 119, 0.2);
  display: inline-block;
  min-width: 26px;
  text-align: center;
  transition: all 0.3s ease;
}

.search-label .counter:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(14, 27, 119, 0.3);
}

/* Pole wyszukiwania - LEPSZE FORMATOWANIE */
.search-input {
  width: 100%;
  padding: 14px 55px 14px 18px;
  border: none;
  border-radius: 0 0 10px 10px;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  background: transparent;
  font-family: inherit;
  box-shadow: none;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.search-input:hover {
  background: rgba(248, 249, 250, 0.5);
}

.search-input:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #0e1b77;
}

.search-input::placeholder {
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
}

/* Ikona strzałki - LEPSZA WIDOCZNOŚĆ I ANIMACJA */
.search-icon {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: #0e1b77;
  pointer-events: none;
  width: 22px;
  height: 22px;
  transition: all 0.3s ease;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.category-search.active .search-icon {
  transform: rotate(180deg);
  color: #0e1b77;
}

.search-input-wrapper:hover .search-icon {
  transform: scale(1.1);
}

.category-search.active .search-input-wrapper:hover .search-icon {
  transform: rotate(180deg) scale(1.1);
}

/* Specyficzne style dla #category w formularzu dodawania ogłoszenia */
#category .category-search {
  margin-bottom: 0;
}

/* Dodatkowe wzmocnienie stylów dla formularza */
#category .category-search .search-input-wrapper {
  background: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(14, 27, 119, 0.08);
}

#category .category-search .search-input-wrapper:hover {
  box-shadow: 0 4px 12px rgba(14, 27, 119, 0.15);
  border-color: #0e1b77;
  transform: translateY(-2px);
}

#category .category-search .search-label {
  padding: 14px 18px 8px;
  font-weight: 700;
  font-size: 12px;
  color: #0e1b77;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#category .category-search .search-label .counter {
  font-weight: 800;
  color: #ffffff;
  background: #0e1b77;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  box-shadow: 0 2px 4px rgba(14, 27, 119, 0.2);
}

#category .category-search .search-input {
  padding: 14px 55px 14px 18px;
  border: none;
  border-radius: 0 0 10px 10px;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  background: transparent;
  font-family: inherit;
  box-shadow: none;
}

#category .category-search .search-input:hover {
  background: rgba(248, 249, 250, 0.5);
}

#category .category-search .search-input:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #0e1b77;
}

#category .category-search .search-input::placeholder {
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
}

#category .category-search .search-icon {
  right: 18px;
  bottom: 16px;
  color: #0e1b77;
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Stan aktywny - po kliknięciu */
#category .category-search.active .search-input-wrapper {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: #0e1b77;
  box-shadow: 0 4px 12px rgba(14, 27, 119, 0.15);
}

#category .category-search.active .search-icon {
  color: #0e1b77;
}

/* Responsywność dla przycisku */
@media (max-width: 768px) {
  .search-input-wrapper {
    border-radius: 10px;
  }

  .search-label {
    font-size: 11px;
    padding: 12px 15px 6px;
    letter-spacing: 0.8px;
  }

  .search-label .counter {
    padding: 3px 8px;
    font-size: 10px;
  }

  .search-input {
    padding: 12px 50px 12px 15px;
    font-size: 14px;
  }

  .search-icon {
    right: 15px;
    bottom: 14px;
    width: 20px;
    height: 20px;
  }
}

/* Animacja pulse dla licznika gdy się zmienia */
@keyframes counterPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

/* Drzewo kategorii */
.category-tree {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}
.category-tree-container {
  max-height: 400px;
  overflow-y: auto;
}
.category-tree ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}
.category-tree ul li {
  padding: 0.25rem 0;
  position: relative;
}
.category-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 3px;
  transition: background-color 0.15s ease;
}
.category-item:hover {
  background-color: #f5f5f5;
}
.category-item.selected {
  background-color: #e3f2fd;
  color: #0e1b77;
}
.category-checkbox {
  margin-right: 0.5rem;
}
.toggle-children {
  margin-left: 0.5rem;
  display: inline-block;
  width: 1.2em;
  text-align: center;
  cursor: pointer;
}
.children.hidden {
  display: none;
}
.children.show {
  display: block;
}

/* Układ kolumn */
.column-split-3 {
  width: 33.333%;
  float: left;
}
@media (max-width: 768px) {
  .column-split-3 {
    width: 100%;
    float: none;
  }
}

/* Przycisk submit */
.form-actions {
  margin-top: 1rem;
  text-align: center;
}
.btn-primary {
  background-color: #0e1b77;
  color: white;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn-primary:hover {
  background-color: #091254;
}
.btn-secondary {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  padding: 0.7rem 2rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn-secondary:hover {
  background-color: #e5e5e5;
}

.webmedio-category-filter-form .category-search {
  display: none !important;
}

/* Zachowaj widoczność pola wyszukiwania w oknie modalnym */
.categories-modal .category-search {
  display: block !important;
  margin-bottom: 1rem;
}


/* Dodatkowe style dla modalu kategorii */

/* Info box zamiast ::before */
.category-info-box {
  padding: 10px 15px;
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 13px;
  text-align: center;
}

/* Zmiana informacji w trybie wyszukiwania */
.categories-modal.search-mode .category-info-box {
  background-color: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

/* Kategorie główne - wyróżnienie */
.categories-modal .category-tree-container > ul > li > .category-item,
.categories-modal .column-split > ul > li > .category-item {
  font-size: 16px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  margin-bottom: 5px;
  padding-left: 15px !important; /* Dodatkowy padding zamiast checkboxa */
}

.categories-modal .category-tree-container > ul > li > .category-item:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

/* Zaznaczona kategoria główna */
.categories-modal .category-tree-container > ul > li > .category-item.selected {
  background-color: #0e1b77;
  color: white;
  border-color: #0e1b77;
  box-shadow: 0 2px 8px rgba(14, 27, 119, 0.3);
}

.categories-modal .category-tree-container > ul > li > .category-item.selected:hover {
  background-color: #091254;
  box-shadow: 0 2px 10px rgba(14, 27, 119, 0.4);
}

/* Podkategorie - mniejsze wcięcie i rozmiar */
.categories-modal .children {
  margin-left: 20px;
  margin-top: 5px;
  border-left: 2px solid #dee2e6;
  padding-left: 10px;
}

.categories-modal .children .category-item {
  font-size: 14px;
  padding: 5px 10px;
  padding-left: 15px !important; /* Dodatkowy padding zamiast checkboxa */
  margin: 2px 0;
}

/* Zaznaczona podkategoria */
.categories-modal .children .category-item.selected {
  background-color: #e0f0ff;
  font-weight: 600;
  color: #0e1b77;
}

/* Ukryj toggle-children w modalu */
.categories-modal .toggle-children {
  display: none !important;
}

/* Kategorie główne z podkategoriami - wskaźnik */
.categories-modal .category-item.has-children::after {
  content: "▶";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.5;
  transition: transform 0.3s;
}

.categories-modal .category-item.has-children.expanded::after {
  transform: translateY(-50%) rotate(90deg);
}

/* Animacja rozwijania */
.categories-modal .children {
  transition: all 0.3s ease;
  overflow: hidden;
}

.categories-modal .children.hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.categories-modal .children.show {
  max-height: 1000px;
  opacity: 1;
}

/* Ukryj punktory listy */
.categories-modal ul {
  list-style: none !important;
  padding-left: 0;
}

.categories-modal li {
  list-style: none !important;
}

/* Wcięcia dla struktury drzewa */
.categories-modal .children ul {
  padding-left: 20px;
}

/* Kursor dla kategorii */
.categories-modal .category-item {
  cursor: pointer;
  user-select: none;
}

/* Przycisk zamknięcia X */
.close-modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1;
  color: #666;
  z-index: 10;
}

.close-modal-x:hover {
  color: #000;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

/* Responsywność modalu */
@media (max-width: 768px) {
  .categories-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .categories-modal .children {
    margin-left: 15px;
    padding-left: 8px;
  }
}

.categories-section {
  position: relative;
  padding: 40px 0;
}

.categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 15px;
}

.categories-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
}

.main-categories-fullwidth {
  padding: 40px 0;
  background-color: #f8f9fa;
}

.main-categories-fullwidth .container {
  position: relative;
}

.all-categories-button-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
  padding: 0 50px;
}

.all-categories-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  line-height: 1;
}

.all-categories-button:focus {
  outline: none;
}

.all-categories-button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.all-categories-button span {
  position: relative;
  z-index: 1;
}

.all-categories-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(14, 27, 119, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.all-categories-button:hover {
  background-color: #f8f8f8;
  border-color: #0e1b77;
  color: #0e1b77;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 27, 119, 0.15);
}

.all-categories-button:hover::before {
  opacity: 1;
}

.all-categories-button:hover svg {
  transform: rotate(45deg);
  stroke: #0e1b77;
}

.all-categories-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(14, 27, 119, 0.1);
}

.all-categories-button:disabled,
.all-categories-button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.main-categories-carousel-container {
  position: relative;
  overflow: visible;
  padding: 0 50px;
}

.main-categories-carousel .main-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 100%;
  min-height: 120px;
  text-align: center;
}

.main-categories-carousel .main-category-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.2;
}

.main-categories-carousel .main-category-count {
  font-size: 14px;
  color: #6b7280;
}

.main-categories-carousel .main-category-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #0e1b77;
}

.main-categories-carousel .main-category-item:hover .main-category-name {
  color: #0e1b77;
}

.main-categories-carousel .main-category-item.active {
  background-color: #0e1b77;
  border-color: #0e1b77;
}

.main-categories-carousel .main-category-item.active .main-category-name {
  color: #ffffff;
}

.main-categories-carousel .main-category-item.active .main-category-count {
  color: rgba(255, 255, 255, 0.8);
}

.main-categories-carousel-container .carousel-prev,
.main-categories-carousel-container .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  font-size: 18px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.main-categories-carousel-container .carousel-prev:hover:not(.disabled),
.main-categories-carousel-container .carousel-next:hover:not(.disabled) {
  background-color: #0e1b77;
  color: white;
  border-color: #0e1b77;
  box-shadow: 0 4px 12px rgba(14, 27, 119, 0.2);
}

.main-categories-carousel-container .carousel-prev.disabled,
.main-categories-carousel-container .carousel-next.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.main-categories-carousel-container .carousel-prev {
  left: 0;
}

.main-categories-carousel-container .carousel-next {
  right: 0;
}

.main-categories-carousel-container .carousel-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.main-categories-carousel-container .pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d1d5db;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.main-categories-carousel-container .pagination-dot:hover {
  background-color: #9ca3af;
}

.main-categories-carousel-container .pagination-dot.active {
  background-color: #0e1b77;
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 992px) {
  .main-categories-fullwidth {
    padding: 30px 0;
  }

  .main-categories-carousel-container {
    padding: 0 45px;
  }

  .all-categories-button-wrapper {
    padding: 0 45px;
  }
}

@media (max-width: 768px) {
  .categories-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .all-categories-button-wrapper {
    padding: 0 40px;
    margin-bottom: 16px;
    justify-content: center;
  }

  .all-categories-button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 14px 24px;
  }

  .main-categories-carousel-container {
    padding: 0 40px;
  }

  .main-categories-carousel-container .carousel-prev,
  .main-categories-carousel-container .carousel-next {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.all-categories-button-wrapper {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.main-categories-carousel li {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.main-categories-carousel li:nth-child(1) { animation-delay: 0.3s; }
.main-categories-carousel li:nth-child(2) { animation-delay: 0.4s; }
.main-categories-carousel li:nth-child(3) { animation-delay: 0.5s; }
.main-categories-carousel li:nth-child(4) { animation-delay: 0.6s; }
.main-categories-carousel li:nth-child(5) { animation-delay: 0.7s; }
.main-categories-carousel li:nth-child(6) { animation-delay: 0.8s; }
.main-categories-carousel li:nth-child(7) { animation-delay: 0.9s; }
.main-categories-carousel li:nth-child(8) { animation-delay: 1.0s; }
.main-categories-carousel li:nth-child(9) { animation-delay: 1.1s; }
.main-categories-carousel li:nth-child(10) { animation-delay: 1.2s; }
