/* ——— ZMIENNE DLA MOTYWÓW ——— */
:root {
  /* Domyślnie: ciemny motyw */
  --my-bg:      #061114;
  --my-text:    #FFFFFF;
  --my-btn-bg:  #101B1E;
}

body.light-mode {
  /* Po przełączeniu na jasny: */
  --my-bg:      #FFFFFF;
  --my-text:    #000000;
  --my-btn-bg:  #061114;
}

/* ——— Nadpisanie Elementor Global */
:root {
  --e-global-color-primary:   var(--my-btn-bg);
  --e-global-color-secondary: var(--my-text);
}

body.light-mode {
  --e-global-color-primary:   var(--my-btn-bg);
  --e-global-color-secondary: var(--my-text);
}

body {
  background-color: var(--my-bg);
  color:            var(--my-text);
  transition:       background-color .3s, color .3s;
}

/** 4. Category Badges */
.cat-badge {
  display: inline-block;
  font-family: "Satoshi", Sans-serif;
  font-size: 16px;
  font-weight: 300;
  padding: 2px 8px;
  border: 2px solid currentColor;
  border-radius: 50px;
}
.cat-badge-small {
  font-size: 14px;
}
@media (max-width: 768px) {
  .cat-badge-small {
    font-size: 12px;
  }
}

/** 5. Elementor Counter Suffix */
.elementor-counter .elementor-counter-number-suffix {
  font-size: 18px;
  align-self: flex-end;
  padding-bottom: 8px;
}

/** 6. Default Link Styling */
a:not([style]) {
  color: var(--my-text);
  transition: color .3s;
}
body.light-mode a:not([style]) {
  color: var(--my-btn-bg);
}
a:not([style]):hover {
  opacity: .8;
}

/* 8. Breadcrumbs */
body.home .rank-math-breadcrumb,
body.front-page .rank-math-breadcrumb {
    display: none;
}


.okruszki a {
	font-weight: 700;
}

/* Odstęp listowanie - obrazek */
.wp-block-list {
	margin-bottom: 25px;
}

.elementor-widget-theme-post-content li {
  margin-bottom: 15px;
}
/* 1. RESET STRUKTURY */
.stopka-akordeon .sub-menu {
    position: static !important;
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* 2. POKAZYWANIE PO KLIKNIĘCIU */
.stopka-akordeon .menu-item-has-children.active-click > .sub-menu {
    display: block !important;
}

/* 3. BLOKADA ZNIKANIA - Twoja zmienna systemu motywów */
.stopka-akordeon .elementor-item, 
.stopka-akordeon .elementor-sub-item,
.stopka-akordeon .elementor-item:hover,
.stopka-akordeon .elementor-item.elementor-item-active,
.stopka-akordeon .menu-item-has-children.active-click > a {
    color: var(--my-text, inherit) !important; 
    background: transparent !important; 
    fill: var(--my-text, inherit) !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

/* 4. BEZPIECZNY HOVER */
.stopka-akordeon .elementor-item:hover,
.stopka-akordeon .elementor-sub-item:hover {
    filter: brightness(0.8); 
    transition: filter 0.2s ease;
}

/* 5. MECHANIKA STRZAŁKI */
.stopka-akordeon .sub-arrow {
    margin-left: 8px;
    vertical-align: middle;
}
.stopka-akordeon .menu-item-has-children.active-click > a .sub-arrow {
    transform: rotate(180deg) !important;
}

/* 6. ZAWIJANIE I KLIKALNOŚĆ (Desktop) */
.stopka-akordeon .elementor-sub-item {
    white-space: nowrap !important; /* Blokada zawijania */
    padding-left: 10px !important;
    padding-right: 0 !important;
}
.stopka-akordeon .elementor-item, 
.stopka-akordeon .elementor-sub-item {
    display: inline-block !important; /* Klikalne tylko słowo, nie cała kolumna */
    width: auto !important;
}

/* 7. DOPASOWANIE POD MOBILE (Dla widżetu w kontenerze mobilnym) */
@media (max-width: 767px) {
    .stopka-akordeon .elementor-sub-item {
        white-space: normal !important; /* Na komórce pozwalamy zawijać w razie długich nazw */
        padding-left: 5px !important;
    }
    .stopka-akordeon .elementor-item, 
    .stopka-akordeon .elementor-sub-item {
        padding-top: 10px !important; /* Większy obszar do kliknięcia palcem */
        padding-bottom: 10px !important;
    }
}
/* Wymuszenie koloru opartego na trybie (jasny/ciemny) dla głównego tytułu */
.elementor-widget-theme-post-title h1.elementor-heading-title {
    color: var(--my-text) !important;
}

/* ========================================= */
/* NAPRAWA STOPKI AUTORA (TRYB CIEMNY)       */
/* ========================================= */

/* Celujemy w tekst opisu autora oraz nagłówki w tej sekcji */
.elementor-widget-text-editor, 
.elementor-widget-heading .elementor-heading-title {
    color: var(--my-text) !important;
}

/* Ten kod zadziała TYLKO tam, gdzie ręcznie dopisaliśmy klasę */
.tytul-na-grafice .elementor-heading-title {
    color: #ffffff !important;
}

/* Reszta wpisów (bez tej klasy) będzie grzecznie słuchać Twojego 
   głównego kodu i zmieniać się na czarno w trybie jasnym */
/* ========================================= */
/* STYLIZACJA PAGINACJI (AJAX)               */
/* ========================================= */

/* Kontener paginacji - centrowanie i odstęp */
.elementor-pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px !important;
    font-family: "Satoshi", Sans-serif; /* Spójność z resztą strony */
}

/* Wygląd przycisków (Liczby i Poprzedni/Następny) */
.elementor-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-width: 45px;
    border: 2px solid var(--my-text);
    border-radius: 50px; /* Zaokrąglone jak Twoje badge */
    color: var(--my-text) !important;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Obecna strona (Aktywna) */
.elementor-pagination .page-numbers.current {
    background-color: var(--my-text);
    color: var(--my-bg) !important; /* Odwrócenie kolorów dla kontrastu */
}

/* Efekt najechania (Hover) */
.elementor-pagination a.page-numbers:hover {
    background-color: var(--my-text);
    color: var(--my-bg) !important;
    opacity: 0.9;
}

/* Specyficzne ustawienia dla przycisków Poprzedni/Następny */
.elementor-pagination .prev, 
.elementor-pagination .next {
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Ukrycie kropek (...) jeśli chcesz czystszy wygląd */
.elementor-pagination .dots {
    border: none !important;
    color: var(--my-text);
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
}
/* Ukrycie nieaktywnego przycisku poprzedniej strony, jeśli Elementor go wypluje */
.elementor-pagination .page-numbers.prev:not([href]),
.elementor-pagination .page-numbers.prev.disabled {
    display: none !important;
}

/* To samo dla przycisku następnej strony na końcu listy */
.elementor-pagination .page-numbers.next:not([href]),
.elementor-pagination .page-numbers.next.disabled {
    display: none !important;
}
/* GŁÓWNY KONTENER FAQ */
.rank-math-block {
    background-color: transparent; 
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.3));
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

/* PYTANIE - BIERZE KOLOR Z MOTYWU */
.rank-math-question {
    /* Najpierw próbuje wziąć kolor tekstu z Twojego motywu, potem dziedziczy */
    color: var(--text-color, inherit) !important; 
    background-color: rgba(128, 128, 128, 0.1); 
    padding: 12px 18px !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Efekt najechania */
.rank-math-question:hover {
    background-color: rgba(128, 128, 128, 0.15);
}

/* ODPOWIEDŹ - 100% DYNAMIKI */
.rank-math-answer {
    padding: 15px 18px;
    background-color: transparent;
    /* Usunięty wymuszony biały - teraz bierze kolor reszty artykułu */
    color: var(--text-color, inherit) !important; 
    font-size: 15px;
    line-height: 1.6;
    display: none;
    /* Usunięte opacity - pełna czytelność w każdym trybie */
}

/* STRZAŁKA ROZWIJANIA - TEŻ BIERZE KOLOR TEKSTU */
.rank-math-question:after {
    content: '\25BC';
    font-size: 10px;
    margin-left: 10px;
    color: inherit; /* Strzałka ma taki sam kolor jak tekst pytania */
    opacity: 0.6;
    transition: transform 0.3s ease;
}

/* KLASA AKTYWNA */
.rank-math-list-item.active .rank-math-answer {
    display: block;
}

.rank-math-list-item.active .rank-math-question:after {
    transform: rotate(180deg);
    opacity: 1;
}

/* LINKI - BIORĄ KOLOR Z TWOICH USTAWIEŃ */
.rank-math-answer a {
    color: var(--link-color, inherit);
    text-decoration: underline;
}