/* =========================================================
   FAQ V2 PROSTY
   Stabilna, jednokolumnowa wersja
   ========================================================= */

.faq-simple-page {
  --faq-navy: #0d3566;
  --faq-blue: #2f79c8;
  --faq-blue-soft: #eef5fc;
  --faq-line: #ccd9ea;
  --faq-line-soft: #e7eef6;
  --faq-orange: #e99912;
  --faq-orange-soft: #fff7e8;
  --faq-text: #102f58;
  --faq-muted: #66798e;

  max-width: 1200px;
  margin-inline: auto;
  padding: 34px 28px 48px;
  color: var(--faq-text);
}

.faq-simple-page,
.faq-simple-page *,
.faq-simple-page *::before,
.faq-simple-page *::after {
  box-sizing: border-box;
}

.faq-simple-page button,
.faq-simple-page input {
  font: inherit;
}

.faq-simple-page button {
  cursor: pointer;
}

.faq-simple-page a:focus-visible,
.faq-simple-page button:focus-visible,
.faq-simple-page input:focus-visible,
.faq-simple-page summary:focus-visible {
  outline: 3px solid rgba(233, 153, 18, .38);
  outline-offset: 3px;
}

/* HERO */

.faq-simple-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 30px;
  margin-bottom: 28px;
}

.faq-simple-title {
  margin: 0;
  color: var(--faq-navy);
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}

.faq-simple-title-accent {
  display: block;
  width: 66px;
  height: 3px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--faq-orange);
}

.faq-simple-lead {
  max-width: 650px;
  margin: 25px 0 0;
  color: var(--faq-text);
  font-size: 1rem;
  line-height: 1.58;
}

.faq-simple-hero-art {
  justify-self: end;
  width: min(100%, 360px);
}

.faq-simple-hero-img {
  display: block;
  width: 100%;
  height: auto;
}

/* SEARCH */

.faq-simple-tools {
  margin-bottom: 28px;
}

.faq-simple-search-wrap {
  position: relative;
}

.faq-simple-search {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 52px 0 50px;
  border: 1px solid var(--faq-line);
  border-radius: 12px;
  background: #fff;
  color: var(--faq-text);
  font-size: .96rem;
  line-height: 1;
}

.faq-simple-search:focus {
  border-color: var(--faq-blue);
  box-shadow: 0 0 0 3px rgba(47,121,200,.08);
  outline: none;
}

.faq-simple-search::placeholder {
  color: #8190a4;
}

.faq-simple-search-icon {
  position: absolute;
  z-index: 2;
  left: 18px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 2px solid var(--faq-navy);
  border-radius: 50%;
  transform: translateY(-56%);
  pointer-events: none;
}

.faq-simple-search-icon::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--faq-navy);
  transform: rotate(45deg);
}

.faq-simple-search-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faq-navy);
  font-size: 1.35rem;
  line-height: 1;
  transform: translateY(-50%);
}

.faq-simple-search-clear:hover {
  background: var(--faq-blue-soft);
}

/* KATEGORIE */

.faq-simple-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.faq-simple-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--faq-line);
  border-radius: 999px;
  background: #fff;
  color: var(--faq-navy);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.2;
}

.faq-simple-category:hover {
  background: #f8fbff;
}

.faq-simple-category.is-active {
  border-color: var(--faq-navy);
  background: var(--faq-navy);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--faq-orange);
}

.faq-simple-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--faq-blue-soft);
  color: var(--faq-navy);
  font-size: .68rem;
  font-weight: 800;
}

.faq-simple-category.is-active .faq-simple-category-count {
  background: rgba(255,255,255,.16);
  color: #fff;
}

/* RESULTS */

.faq-simple-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--faq-line-soft);
}

.faq-simple-results-head h2 {
  margin: 0;
  color: var(--faq-navy);
  font-size: 1.35rem;
  line-height: 1.25;
}

.faq-simple-results-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--faq-blue-soft);
  color: var(--faq-navy);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.faq-simple-container {
  display: block;
}

.faq-simple-group {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--faq-line);
  border-radius: 12px;
  background: #fff;
}

.faq-simple-group:last-child {
  margin-bottom: 0;
}

.faq-simple-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--faq-line-soft);
  background: #fbfdff;
}

.faq-simple-group-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.faq-simple-group-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--faq-navy);
  color: #fff;
  font-size: .76rem;
  font-weight: 900;
}

.faq-simple-group-icon::before {
  content: '?';
}

.faq-simple-group-title {
  margin: 0;
  color: var(--faq-navy);
  font-size: 1rem;
  line-height: 1.3;
}

.faq-simple-group-count {
  flex: 0 0 auto;
  color: var(--faq-muted);
  font-size: .75rem;
  font-weight: 700;
}

.faq-simple-item + .faq-simple-item {
  border-top: 1px solid var(--faq-line-soft);
}

.faq-simple-question {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  color: var(--faq-navy);
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.4;
}

.faq-simple-question::-webkit-details-marker {
  display: none;
}

.faq-simple-question::marker {
  display: none;
}

.faq-simple-chevron {
  position: relative;
  width: 18px;
  height: 18px;
  justify-self: end;
}

.faq-simple-chevron::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--faq-navy);
  border-bottom: 2px solid var(--faq-navy);
  transform: rotate(45deg);
  transition: transform .18s ease, top .18s ease;
}

.faq-simple-item[open] .faq-simple-chevron::before {
  top: 7px;
  transform: rotate(-135deg);
}

.faq-simple-item[open] {
  background: #fbfdff;
}

.faq-simple-item[open] .faq-simple-question {
  box-shadow: inset 3px 0 0 var(--faq-orange);
}

.faq-simple-answer {
  padding: 2px 48px 17px 16px;
  color: var(--faq-text);
  font-size: .89rem;
  line-height: 1.65;
}

.faq-simple-answer p {
  margin: 0;
}

.faq-simple-answer a {
  color: var(--faq-navy);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.faq-simple-answer strong,
.faq-simple-answer b {
  color: var(--faq-navy);
}

.faq-simple-empty {
  padding: 22px;
  border: 1px dashed var(--faq-line);
  border-radius: 12px;
  color: var(--faq-muted);
  text-align: center;
}

/* TABLET */

@media (max-width: 1024px) {
  .faq-simple-page {
    padding-inline: 20px;
  }

  .faq-simple-hero {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .faq-simple-hero-art {
    width: min(100%, 310px);
  }
}

/* MOBILE */

@media (max-width: 768px) {
  .faq-simple-page {
    padding: 22px 14px 34px;
  }

  .faq-simple-hero {
    display: block;
    margin-bottom: 22px;
  }

  .faq-simple-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .faq-simple-title-accent {
    width: 44px;
    margin-top: 11px;
  }

  .faq-simple-lead {
    margin-top: 18px;
    font-size: .95rem;
  }

  .faq-simple-hero-art {
    width: min(76vw, 270px);
    margin: 12px auto 0;
  }

  .faq-simple-search {
    height: 48px;
    padding-left: 45px;
    font-size: .9rem;
  }

  .faq-simple-categories {
    flex-wrap: nowrap;
    margin-inline: -14px;
    padding-inline: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .faq-simple-categories::-webkit-scrollbar {
    display: none;
  }

  .faq-simple-category {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .faq-simple-results-head h2 {
    font-size: 1.12rem;
  }

  .faq-simple-group-head {
    padding: 10px 12px;
  }

  .faq-simple-question {
    min-height: 52px;
    padding: 11px 12px;
    font-size: .85rem;
  }

  .faq-simple-answer {
    padding: 2px 38px 15px 12px;
    font-size: .85rem;
  }
}

/* PRINT */

@media print {
  .faq-simple-tools,
  .faq-simple-hero-art {
    display: none !important;
  }

  .faq-simple-page {
    max-width: none;
    padding: 0;
  }

  .faq-simple-group {
    break-inside: avoid;
  }

  .faq-simple-answer {
    display: block !important;
  }
}


/* =========================================================
   FAQ V3 - POPRAWKI UX
   ========================================================= */

/* Większy odstęp tekstu od lupy na desktopie */
.faq-simple-search {
  padding-left: 56px;
}

/* Kategorie: licznik tylko tutaj */
.faq-simple-category.is-active {
  box-shadow: inset 3px 0 0 var(--faq-orange);
}

/* Usuwamy zbędny licznik wyników w nagłówku sekcji */
.faq-simple-results-count {
  display: none !important;
}

/* Usuwamy liczbę pytań z nagłówka każdej kategorii */
.faq-simple-group-count {
  display: none !important;
}

/* Nagłówek sekcji spokojniejszy */
.faq-simple-results-head {
  justify-content: flex-start;
}

/* Zwartsze wiersze pytań */
.faq-simple-question {
  min-height: 48px;
  padding-top: 9px;
  padding-bottom: 9px;
}

/* Mobile: bez lupy, pełna prostota */
@media (max-width: 768px) {
  .faq-simple-search-icon {
    display: none !important;
  }

  .faq-simple-search {
    padding-left: 16px;
  }
}


/* =========================================================
   FAQ V4 - SEARCH FIX
   Mechanizm jak w Internet-TV:
   - input type=text
   - własny X
   - osobny przycisk czyszczenia pod polem
   ========================================================= */

.faq-simple-search-wrap {
  position: relative;
}

.faq-simple-search {
  width: 100%;
  padding-left: 52px !important;
  padding-right: 52px !important;
}

/* Lupka nie może nachodzić na tekst */
.faq-simple-search-icon {
  left: 18px !important;
  z-index: 2;
  pointer-events: none;
}

/* Własny X, bez natywnego X przeglądarki */
.faq-simple-search-clear {
  right: 10px !important;
  z-index: 3;
}

.faq-simple-search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  margin-top: 10px;
}

.faq-simple-reset-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--faq-navy);
  border-radius: 8px;
  background: #fff;
  color: var(--faq-navy);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.2;
}

.faq-simple-reset-btn:hover {
  background: var(--faq-blue-soft);
}

.faq-simple-reset-btn[hidden],
.faq-simple-search-clear[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  /* Mobile: rezygnujemy zarówno z lupy, jak i małego X w polu.
     Zostaje czytelny przycisk pod wyszukiwarką. */
  .faq-simple-search-icon,
  .faq-simple-search-clear {
    display: none !important;
  }

  .faq-simple-search {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .faq-simple-search-actions {
    margin-top: 8px;
  }

  .faq-simple-reset-btn {
    width: 100%;
  }
}


/* =========================================================
   FAQ V5 FINAL - MOBILE CATEGORY GRID
   ========================================================= */

@media (max-width: 768px) {
  .faq-simple-categories {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  .faq-simple-category {
    width: 100%;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: space-between;
    white-space: normal;
    text-align: left;
    scroll-snap-align: none !important;
  }

  .faq-simple-category > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .faq-simple-category-count {
    flex: 0 0 auto;
  }
}

@media (max-width: 430px) {
  .faq-simple-category {
    padding-inline: 11px;
    font-size: .8rem;
  }
}


/* Final: FAQ bez dekoracyjnej grafiki hero. */
.faq-simple-hero.faq-simple-hero--no-art {
  grid-template-columns: minmax(0, 1fr);
}
