/* Style przeniesione z index.php szablonu (LBM) */
.uc_material-team-member .toggle-more,
p.readmore a.btn {
  display: inline-flex !important;
  align-items: center;
  margin-top: 8px !important;
  padding: 0 12px;
  height: 30px;
  background: #F26722;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .2s;
  line-height: 30px;
  text-shadow: none;
}
.uc_material-team-member .toggle-more:hover,
p.readmore a.btn:hover {
  background: #d7391f;
  color: #fff !important;
  text-decoration: none !important;
}
/* Siatka wpisów blogowych/wyróżnionych (J4+: .blog-items.columns-N; w J3 była to siatka BS2 span*) */
.blog-items {
  display: grid;
  grid-gap: 0 2.127%;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  margin: 0 0 1em;
  padding: 0;
}
.blog-items .blog-item { padding: 0; }
@media (min-width: 768px) {
  .blog-items.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-items.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blog-items.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Paginacja (BS5) */
.pagination { display: flex; flex-wrap: wrap; list-style: none; padding-left: 0; }
/* Strzałki paginacji J4+ (klasy icon-angle-*) jako znaki tekstowe – bez dodatkowego fontu ikon */
.pagination .icon-angle-double-left::before  { content: "\00AB"; }
.pagination .icon-angle-left::before         { content: "\2039"; }
.pagination .icon-angle-right::before        { content: "\203A"; }
.pagination .icon-angle-double-right::before { content: "\00BB"; }
.pagination .page-link { cursor: pointer; }

/* ===== Strona wyników wyszukiwania (Smart Search) – wygląd jak w wyszukiwarce LBM (J3) ===== */
.search-lbm { padding: 0 15px; max-width: 1200px; margin: 0 auto; }
.search-lbm * { box-sizing: border-box; }
.search-lbm h1 { font-size: 22px; color: #F26722; margin: 0 0 20px; padding: 0; line-height: 1.3; }
.search-lbm .search-form { background: #f8f8f8; border-radius: 6px; border: 1px solid #e5e5e5; padding: 15px 20px; margin: 20px 0 25px; }
.search-lbm .search-form-row { display: flex; flex-wrap: nowrap; gap: 10px; align-items: center; margin-bottom: 12px; flex-direction: row; }
.search-lbm .search-form-row:last-child { margin-bottom: 0; }
.search-lbm .search-field { flex: 1 1 auto; min-width: 0; }
.search-lbm .search-field input[type="text"] { width: 100%; height: 40px; padding: 0 14px; border: 1px solid #ccc; border-radius: 4px; font-size: 15px; font-family: inherit; background: #fff; margin: 0; display: block; }
.search-lbm .search-field input:focus { outline: none; border-color: #F26722; box-shadow: 0 0 0 2px rgba(242,103,34,0.15); }
.search-lbm .search-btn { height: 40px; padding: 0 20px; background: #F26722; color: #fff; border: none; border-radius: 4px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0; white-space: nowrap; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.search-lbm .search-btn:hover { background: #d7391f; }
.search-lbm .search-options { display: flex; flex-wrap: wrap; gap: 15px 30px; align-items: flex-start; }
.search-lbm .search-options fieldset { border: none; padding: 0; margin: 0; }
.search-lbm .search-options legend { font-size: 11px; text-transform: uppercase; color: #888; font-weight: 700; letter-spacing: 0.5px; margin: 0 0 4px; padding: 0; float: none; width: auto; }
.search-lbm .search-options label.checkbox, .search-lbm .search-options label.radio { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #555; margin-right: 10px; cursor: pointer; }
.search-lbm .search-options select, .search-lbm .form-limit select { height: 32px; padding: 0 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; font-family: inherit; background: #fff; }
.search-lbm .form-limit { font-size: 13px; color: #666; }
.search-lbm .form-limit label { margin-right: 6px; }
.search-lbm .search-stats { font-size: 13px; color: #888; margin-bottom: 15px; }
.search-lbm .search-stats .badge { display: inline-block; background: #F26722; color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.search-lbm .search-results-list { list-style: none; padding: 0; margin: 0; }
.search-lbm .search-result-item { padding: 16px 0; border-bottom: 1px solid #eee; display: flex; gap: 12px; align-items: flex-start; }
.search-lbm .search-result-item:last-child { border-bottom: none; }
.search-lbm .search-result-num { flex-shrink: 0; width: 40px; height: 40px; background: #171F5E; color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.search-lbm .search-result-body { flex: 1; min-width: 0; }
.search-lbm .search-result-title { font-size: 15px; font-weight: 700; color: #222; margin: 0 0 3px; line-height: 1.4; }
.search-lbm .search-result-title a { color: inherit; text-decoration: none; }
.search-lbm .search-result-title a:hover { color: #F26722; }
.search-lbm .search-result-category { display: inline-block; font-size: 11px; padding: 0 8px; border-radius: 3px; background: #f0f0f0; color: #666; height: 22px; line-height: 22px; margin-bottom: 4px; }
.search-lbm .search-result-text { font-size: 13px; color: #555; line-height: 1.5; margin: 0; }
.search-lbm .search-result-date { font-size: 12px; color: #999; margin-top: 4px; }
.search-lbm .search-pagination { margin-top: 25px; padding: 15px 0; }
.search-lbm .search-pagination .pagination { margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; list-style: none; }
.search-lbm .search-pagination .page-item { display: block; margin: 0; padding: 0; }
.search-lbm .search-pagination .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #333; font-size: 14px; text-decoration: none; }
.search-lbm .search-pagination a.page-link:hover { background: #f0f0f0; border-color: #ccc; }
.search-lbm .search-pagination .page-item.active .page-link { background: #F26722; border-color: #F26722; color: #fff; font-weight: 700; }
.search-lbm .search-pagination .page-item.disabled .page-link { color: #aaa; background: #f8f8f8; border-color: #eee; }
.search-lbm .search-no-results { text-align: center; padding: 50px 20px; color: #999; }
.search-lbm .search-no-results h3 { color: #666; margin: 0 0 5px; }
@media (max-width: 768px) {
  .search-lbm .search-form-row { flex-direction: column; flex-wrap: wrap; }
  .search-lbm .search-field { width: 100%; min-width: 100%; }
  .search-lbm .search-btn { width: 100%; justify-content: center; }
  .search-lbm .search-options { flex-direction: column; gap: 10px; }
  .search-lbm .search-result-item { gap: 8px; }
  .search-lbm .search-result-num { width: 32px; height: 32px; font-size: 12px; }
}

/* Wpisy kategorii w kolumnach (masonry-N, J4+). W J3 wpisy szły w dół kolumnami, ale w wyrównanych rzędach:
   siatka wypełniana kolumnami; liczba rzędów = ceil(liczba wpisów / liczba kolumn) (reguły :has dla 1-12 wpisów). */
.blog-items[class*=" masonry-"] { display: grid; grid-auto-flow: column; grid-gap: 0 2.127%; column-count: auto; }
.blog-items[class*=" masonry-"] .blog-item { break-inside: auto; margin-bottom: 0; display: block; }
@media (min-width: 768px) {
  .blog-items.masonry-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(1, auto); }
  .blog-items.masonry-2:has(> :nth-child(3))  { grid-template-rows: repeat(2, auto); }
  .blog-items.masonry-2:has(> :nth-child(5))  { grid-template-rows: repeat(3, auto); }
  .blog-items.masonry-2:has(> :nth-child(7))  { grid-template-rows: repeat(4, auto); }
  .blog-items.masonry-2:has(> :nth-child(9))  { grid-template-rows: repeat(5, auto); }
  .blog-items.masonry-2:has(> :nth-child(11)) { grid-template-rows: repeat(6, auto); }
  .blog-items.masonry-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(1, auto); }
  .blog-items.masonry-3:has(> :nth-child(4))  { grid-template-rows: repeat(2, auto); }
  .blog-items.masonry-3:has(> :nth-child(7))  { grid-template-rows: repeat(3, auto); }
  .blog-items.masonry-3:has(> :nth-child(10)) { grid-template-rows: repeat(4, auto); }
  .blog-items.masonry-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(1, auto); }
  .blog-items.masonry-4:has(> :nth-child(5))  { grid-template-rows: repeat(2, auto); }
  .blog-items.masonry-4:has(> :nth-child(9))  { grid-template-rows: repeat(3, auto); }
}
@media (max-width: 767.98px) { .blog-items[class*=" masonry-"] { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); } }
/* Lista "więcej artykułów" (J3: ol.nav.nav-tabs.nav-stacked; J4+: ul.com-content-blog__links) */
.com-content-blog__links { list-style: none; margin: 0 0 20px; padding: 0; }
.com-content-blog__link { margin: 0; padding: 0; list-style: none; }
.com-content-blog__link a { display: block; padding: 8px 12px; border: 1px solid #ddd; margin-bottom: -1px; background: #fff; text-decoration: none; }
.com-content-blog__link a:hover { background: #eee; }
.com-content-blog__link:first-child a { border-radius: 4px 4px 0 0; }
.com-content-blog__link:last-child a { border-radius: 0 0 4px 4px; margin-bottom: 0; }

/* Lista załączników (Attachments 4.x) – ramka i krój jak w 3.x */
div.attachmentsList table { background: transparent; border: 1px solid #C0C0C0; clear: both; font-size: 90%; font-weight: bold; line-height: 160%; margin-bottom: 4px; }
div.attachmentsList caption { font-size: 110%; font-weight: bold; text-align: left; margin-top: 4px; }
/* Paginacja listy artykułów – wygląd jak w J3 (pomarańczowy aktywny numer) */
.pagination__wrapper { margin: 14px 0; }
.pagination { gap: 4px; }
.pagination .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #333; font-size: 14px; text-decoration: none; }
.pagination a.page-link:hover { background: #f0f0f0; border-color: #ccc; color: #333; }
.pagination .page-item.active .page-link { background: #F26722; border-color: #F26722; color: #fff; font-weight: 700; }
.pagination .page-item.disabled .page-link { color: #aaa; background: #f8f8f8; border-color: #eee; }
.com-content-category-blog__counter, .com-content-featured__counter, .counter.float-end { font-size: 13px; color: #888; }
/* BS5 dodaje .container-fluid padding 12px i ujemny margines – w J3 (BS2) było 0; bez tego treść przesuwa się o 12 px i pojawia się poziomy scroll */
.container-fluid { --bs-gutter-x: 0; width: auto; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }

/* ============================================
   DOSTĘPNOŚĆ (WCAG 2.2 AA)
   ============================================ */

/* Link „Przejdź do treści” (BS5 .visually-hidden-focusable chowa go, dopóki nie dostanie fokusu) */
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed !important;
  top: 8px;
  left: 8px;
  z-index: 100000;
  width: auto !important;
  height: auto !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  white-space: normal !important;
  background: #171F5E;
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline;
  border-radius: 4px;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 6px #171F5E;
}

/* Główna treść dostaje fokus programowo – bez ramki wokół całej strony */
#maincontent:focus { outline: none; }

/* Widoczny fokus klawiatury dla elementów interaktywnych */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #171F5E;
  outline-offset: 2px;
}

.search-lbm .search-field input:focus-visible {
  outline: 3px solid #171F5E;
  outline-offset: 2px;
}

/* Ograniczony ruch */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Linki w tekście muszą różnić się nie tylko kolorem (WCAG 1.4.1) */
#maincontent p a:not([class]),
#maincontent li a:not([class]),
#maincontent td a:not([class]),
#maincontent [itemprop="articleBody"] a:not(.btn):not([class*="btn"]) {
  text-decoration: underline;
}

/* Załączniki (com_attachments): tabela -> przyciski z ikoną typu pliku */
.attachmentsContainer .attachmentsList table { display: block; width: 100%; min-width: 0; border: 0; background: transparent; margin: 1.25rem 0 .5rem; font-size: 1rem; }
.attachmentsContainer .attachmentsList caption { display: block; padding: 0; margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; color: #333; }
.attachmentsContainer .attachmentsList thead { display: none; }
.attachmentsContainer .attachmentsList tbody { display: flex; flex-wrap: wrap; gap: .6rem; background: transparent; }
.attachmentsContainer .attachmentsList tbody tr,
.attachmentsContainer .attachmentsList tbody tr.odd,
.attachmentsContainer .attachmentsList tbody tr.even { display: flex; align-items: center; gap: .4rem; background: transparent; border: 0; }
.attachmentsContainer .attachmentsList tbody tr td,
.attachmentsContainer .attachmentsList tbody tr.odd td,
.attachmentsContainer .attachmentsList tbody tr.even td { display: block; padding: 0; border: 0; background: transparent; }
.attachmentsContainer .attachmentsList td.at_filename a { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1.1rem; border: 1px solid #F26722; border-radius: 4px; background: #fff; color: #222; font-weight: 600; line-height: 1.3; text-decoration: none; transition: background-color .15s, color .15s; }
.attachmentsContainer .attachmentsList td.at_filename a img { display: none; }
.attachmentsContainer .attachmentsList td.at_filename a::before { content: "\f019"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 1.25em; line-height: 1; color: #F26722; transition: color .15s; }
.attachmentsContainer .attachmentsList td.at_filename a[href*=".pdf" i]::before { content: "\f1c1"; }
.attachmentsContainer .attachmentsList td.at_filename a[href*=".doc" i]::before,
.attachmentsContainer .attachmentsList td.at_filename a[href*=".odt" i]::before { content: "\f1c2"; }
.attachmentsContainer .attachmentsList td.at_filename a[href*=".xls" i]::before,
.attachmentsContainer .attachmentsList td.at_filename a[href*=".csv" i]::before { content: "\f1c3"; }
.attachmentsContainer .attachmentsList td.at_filename a[href*=".ppt" i]::before { content: "\f1c4"; }
.attachmentsContainer .attachmentsList td.at_filename a[href*=".zip" i]::before,
.attachmentsContainer .attachmentsList td.at_filename a[href*=".rar" i]::before { content: "\f1c6"; }
.attachmentsContainer .attachmentsList td.at_filename a[href*=".jpg" i]::before,
.attachmentsContainer .attachmentsList td.at_filename a[href*=".jpeg" i]::before,
.attachmentsContainer .attachmentsList td.at_filename a[href*=".png" i]::before,
.attachmentsContainer .attachmentsList td.at_filename a[href*=".webp" i]::before { content: "\f1c5"; }
.attachmentsContainer .attachmentsList td.at_filename a:hover,
.attachmentsContainer .attachmentsList td.at_filename a:focus-visible { background: #F26722; color: #fff; text-decoration: none; }
.attachmentsContainer .attachmentsList td.at_filename a:hover::before,
.attachmentsContainer .attachmentsList td.at_filename a:focus-visible::before { color: #fff; }
.attachmentsContainer .attachmentsList td.at_description,
.attachmentsContainer .attachmentsList td.at_file_size { font-size: .85rem; color: #666; }
@media (max-width: 575.98px) {
  .attachmentsContainer .attachmentsList tbody, .attachmentsContainer .attachmentsList tbody tr { width: 100%; }
  .attachmentsContainer .attachmentsList td.at_filename { width: 100%; }
  .attachmentsContainer .attachmentsList td.at_filename a { display: flex; width: 100%; word-break: break-word; }
}
.attachmentsContainer, .attachmentsContainer .attachmentsList { overflow: visible; }
#maincontent .attachmentsContainer .attachmentsList td.at_filename a,
#maincontent .attachmentsContainer .attachmentsList td.at_filename a:hover { text-decoration: none; }
.attachmentsContainer .attachmentsList td.at_filename a { box-sizing: border-box; max-width: 100%; }
#maincontent .attachmentsList a,
#maincontent .attachmentsList a:link,
#maincontent .attachmentsList a:visited,
#maincontent .attachmentsList a:hover,
#maincontent .attachmentsList a:focus,
#maincontent .attachmentsList a:active { text-decoration: none !important; }
