/* Geneus Katalog — układ strony katalogu + lewy panel (akordeon) */
.gk-layout {
  max-width: var(--container-max, 1320px);
  margin: 0 auto 3.5rem;
  padding: 3rem var(--container-padding, 1.5rem) 0;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
/* Panel boczny — wyraźne tło, żeby wyglądał jak sidebar */
.gk-sidebar {
  width: 290px; flex-shrink: 0;
  background: var(--color-bg-light, #f5f5f5);
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 14px;
}
.gk-content { flex: 1; min-width: 0; }

/* Breadcrumb */
.gk-breadcrumb { font-size: .85rem; color: var(--color-text-light, #666); margin: 0 0 1rem; }
.gk-breadcrumb a { color: var(--color-text-light, #666); text-decoration: none; }
.gk-breadcrumb a:hover { color: var(--color-primary, #dd2821); }
.gk-breadcrumb span { color: var(--color-text, #333); font-weight: 600; }

/* Tytuł / treść */
.gk-title { font-size: 1.6rem; font-weight: 700; color: var(--color-primary, #dd2821); margin: 0 0 1rem; }
.gk-lead { color: var(--color-text-light, #666); }
.gk-article { line-height: 1.7; color: var(--color-text, #333); }
.gk-article p { margin: 0 0 1rem; }
.gk-article img { max-width: 100%; height: auto; border-radius: 8px; }
.gk-article a { color: var(--color-primary, #dd2821); }
.gk-article table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.gk-article th, .gk-article td { border: 1px solid #e6e6e6; padding: 8px 10px; text-align: left; }
/* Stary HTML landingu ma sztywne width:500px — rozciągamy na pełną szerokość */
.gk-article .main2, .gk-article .main3,
.gk-article div[style*="width"], .gk-article [style*="width: 500"], .gk-article [style*="width:500"] {
  width: auto !important; max-width: 100% !important;
}
.gk-article { overflow-wrap: break-word; word-break: break-word; }

/* Akordeon */
.gk-acc__item { border: 1px solid #e4e4e4; border-radius: 10px; overflow: hidden; margin-bottom: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.gk-acc__item:last-child { margin-bottom: 0; }
.gk-acc__head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; background: var(--color-nav-dark, #383838); color: #fff;
  border: none; cursor: pointer; font-family: inherit; font-size: 1rem; font-weight: 600;
}
.gk-acc__icon { display: inline-flex; flex-shrink: 0; }
.gk-acc__icon svg { width: 20px; height: 20px; }
.gk-acc__name { flex: 1; text-align: left; }
.gk-acc__item.is-open .gk-acc__head { background: var(--color-primary, #dd2821); }
.gk-acc__chev { transition: transform .2s ease; flex-shrink: 0; }
.gk-acc__item.is-open .gk-acc__chev { transform: rotate(180deg); }
.gk-acc__list { list-style: none; margin: 0; padding: 0; display: none; }
.gk-acc__item.is-open .gk-acc__list { display: block; }
.gk-acc__row a, .gk-acc__back a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; color: var(--color-text, #333); text-decoration: none;
  font-size: .92rem; border-top: 1px solid #f2f2f2;
}
.gk-acc__row a::after { content: "›"; color: #c2c2c2; font-size: 1.2em; margin-left: 8px; }
.gk-acc__row a:hover { color: var(--color-primary, #dd2821); background: #fafafa; }
.gk-acc__row.is-current a { color: var(--color-primary, #dd2821); font-weight: 700; }
.gk-acc__back { background: var(--color-bg-light, #f5f5f5); }
.gk-acc__back a { color: var(--color-primary, #dd2821); font-weight: 600; }

/* Przycisk "Na górę" — pojawia się po przewinięciu, sticky u góry po prawej */
.gk-totop {
  position: fixed;
  top: 138px;
  right: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--color-primary, #dd2821);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
}
.gk-totop.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.gk-totop:hover { background: var(--color-primary-hover, #c4231d); }
.gk-totop svg { flex-shrink: 0; }
@media (max-width: 767px) {
  .gk-totop { top: auto; bottom: 78px; right: 16px; padding: 10px; }
  .gk-totop span { display: none; }
}

/* Responsywność: panel nad treścią */
@media (max-width: 991px) {
  .gk-layout { flex-direction: column; gap: 1rem; }
  .gk-sidebar { width: 100%; box-sizing: border-box; }
}
@media (max-width: 767px) {
  .gk-layout { padding-left: 1rem; padding-right: 1rem; }
  .gk-content { width: 100%; }
  .gk-article * { max-width: 100% !important; }
  .gk-article img { height: auto; }
  .gk-article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
