/* --- FAQ Section (Figma "FAQ tabs", 10.10.2026) --- */
.faq-section {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible;
  background: #ffffff;
  margin-top: -1px;
  padding: 64px 0 80px;
}

.faq-stage {
  position: relative;
  width: min(calc(100% - var(--content-gutter-desktop)), var(--content-wide));
  height: auto;
  margin: 0 auto;
  background: transparent;
}

.faq-title {
  position: static;
  width: min(100%, 1180px);
  margin: 0 auto;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(44px, 4.1vw, 64px);
  font-weight: var(--section-title-weight);
  letter-spacing: var(--section-title-spacing);
  line-height: var(--section-title-line);
  text-align: center;
}

.faq-title span {
  color: var(--lime);
}

/* Topic filter: segmented tabs on wide screens, a branded dropdown on phones. */
.faq-filter {
  margin: 32px auto 0;
}

.faq-filter[hidden],
.faq-select-field {
  display: none;
}

.faq-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #f4f6f2;
}

.faq-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #565d63;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.faq-tab:active { transform: scale(0.97); }

.faq-tab[aria-pressed="true"] {
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 5%);
}

.faq-tab:focus-visible,
.faq-select:focus-visible,
.faq-select-option:focus-visible,
.faq-show-all:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.faq-container {
  position: static;
  width: 100%;
  margin: 32px auto 0;
  display: block;
}

.faq-list {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Questions stay available immediately, including keyboard and anchor visits. */
.faq-row {
  position: relative;
  display: flex;
  width: 100%;
  opacity: 1;
  transform: none;
}

.faq-row[hidden] {
  display: none;
}

.faq-row.faq-row--visible {
  opacity: 1;
  transform: none;
}

.faq-timeline-node {
  display: none !important;
}

.faq-item {
  flex: 1;
  min-width: 0;
  background: #f4f6f2;
  border: 0;
  border-radius: 20px;
  box-shadow: none;
  overflow: hidden;
}

.faq-trigger {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 12px 32px;
  border: none;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .faq-trigger::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 -10% 0 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1160C1120 18 1200 30 1160 50S1120 82 1160 100H0Z' fill='%23eceee8'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    transform: translateX(-100%);
    transition: transform 180ms cubic-bezier(.23, 1, .32, 1);
  }

  .faq-trigger:hover::before {
    transform: translateX(0);
    transition-duration: 280ms;
  }

  .faq-tab:not([aria-pressed="true"]):hover {
    color: var(--ink);
    background: rgb(255 255 255 / 55%);
  }

  .faq-show-all:hover {
    border-color: #cfd5cc;
    background: #f8f9f7;
  }
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -3px;
}

.faq-question {
  min-width: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.faq-chevron-icon {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
}

.faq-chevron-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.faq-plus-vertical {
  transform-origin: center;
  transition:
    opacity 160ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.faq-item.is-open .faq-plus-vertical {
  opacity: 0;
  transform: scaleY(0.25);
}

.faq-content-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms var(--ease-out);
}

.faq-item.is-open .faq-content-wrap {
  grid-template-rows: 1fr;
}

.faq-content {
  overflow: hidden;
  opacity: 0;
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.faq-item.is-open .faq-content {
  opacity: 1;
}

.faq-content p {
  margin: 0;
  padding: 0 96px 24px 32px;
  color: #565d63;
  font-size: 17px;
  line-height: 1.65;
}

.faq-content a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.faq-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.faq-more:has(.faq-show-all[hidden]) {
  display: none;
}

.faq-show-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px 0 22px;
  border: 1px solid #e3e7e0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.faq-show-all:active { transform: scale(0.97); }

.faq-show-all[hidden] {
  display: none;
}

.faq-show-all-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.faq-row[data-input="keyboard"] :is(.faq-content-wrap, .faq-content, .faq-plus-vertical) { transition: none; }
.faq-trigger:focus-visible::before { transform: none; transition: none; }

@media (max-width: 1100px) {
  .faq-tab {
    padding: 4px 10px;
    font-size: 15px;
  }
}

@media (max-width: 767px) {
  .faq-section {
    padding: 40px 0 48px;
  }

  .faq-filter {
    margin-top: 20px;
  }

  .faq-tabs {
    display: none;
  }

  /* Our own dropdown instead of the system select list. */
  .faq-select-field {
    position: relative;
    z-index: 5;
    display: block;
  }

  .faq-select {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 73px;
    align-content: center;
    gap: 2px;
    margin: 0;
    padding: 13px 52px 13px 18px;
    border: 1.5px solid #dde1dd;
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out);
  }

  .faq-select:active { transform: scale(0.99); }

  .faq-select[aria-expanded="true"] {
    border-color: var(--lime);
    box-shadow: inset 0 0 0 1px var(--lime);
  }

  .faq-select-label {
    color: #565d63;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
  }

  .faq-select-value {
    font-size: 17px;
    font-weight: 700;
    line-height: 24px;
  }

  .faq-select-chevron {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    transition: transform 200ms var(--ease-out);
    pointer-events: none;
  }

  .faq-select[aria-expanded="true"] .faq-select-chevron {
    transform: translateY(-50%) rotate(180deg);
  }

  .faq-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    gap: 2px;
    padding: 6px;
    border: 1px solid #dde1dd;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgb(0 0 0 / 12%), 0 2px 6px rgb(0 0 0 / 6%);
    transform-origin: top center;
    animation: faq-menu-in 180ms var(--ease-out);
  }

  .faq-select-menu[hidden] {
    display: none;
  }

  .faq-select-option {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    text-align: left;
    cursor: pointer;
  }

  .faq-select-option[aria-selected="true"] {
    background: #f2f9e6;
    font-weight: 700;
  }

  .faq-select-check {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--lime-text);
    opacity: 0;
  }

  .faq-select-option[aria-selected="true"] .faq-select-check {
    opacity: 1;
  }

  .faq-select-option:active {
    background: #eef1ec;
  }

  .faq-container {
    margin-top: 16px;
  }

  .faq-list {
    gap: 8px;
  }

  .faq-item {
    border-radius: 14px;
  }

  .faq-trigger {
    min-height: 64px;
    gap: 14px;
    padding: 12px 12px 12px 18px;
  }

  .faq-question {
    font-size: 17px;
    line-height: 1.42;
  }

  .faq-chevron-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .faq-content p {
    padding: 0 18px 20px;
    font-size: 15px;
    line-height: 1.6;
  }

  .faq-more {
    margin-top: 16px;
  }

  .faq-show-all {
    width: 100%;
  }
}

@keyframes faq-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

@media (hover: hover) and (pointer: fine) {
  .faq-select-option:not([aria-selected="true"]):hover { background: #f4f6f2; }
}

/* The narrowest phones keep "Pokaż wszystkie pytania (12)" on one line. */
@media (max-width: 360px) {
  .faq-show-all { gap: 6px; padding-inline: 16px 14px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-select-menu { animation: none; }
  .faq-select, .faq-select-chevron { transition: none; }
  .faq-trigger::before { display: none; }
  .faq-row :is(.faq-content-wrap, .faq-content, .faq-plus-vertical) { transition: none; }
}
