/* =========================================================
   7ELEMENT — style komponentów uzupełniające theme.json.
   Wzorce nazewnictwa (el-*) przeniesione 1:1 z prototypu React
   (src/styles/*.css), zgodnie z 7ELEMENT_DESIGN_SYSTEM.md, żeby
   redaktor treści mógł dopisywać te same klasy w polu "Dodatkowe
   klasy CSS" bloku w edytorze Gutenberga.
   ========================================================= */

/* --- Skip link (dostępność, część 9 design systemu) --- */
.el-skip {
  position: absolute;
  top: 0;
  left: var(--wp--preset--spacing--4, 1rem);
  transform: translateY(-140%);
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--wp--custom--radius--sm, 6px);
  z-index: 100;
  transition: transform var(--wp--custom--duration--base, 240ms) var(--wp--custom--easing);
}
.el-skip:focus {
  transform: translateY(0);
}

/* --- Focus visible: nigdy outline:none, kolor odwrócony na dark --- */
:focus-visible {
  outline: 2px solid var(--wp--preset--color--ink);
  outline-offset: 2px;
}
.el-header,
.is-style-el-dark :focus-visible,
footer.wp-block-template-part :focus-visible {
  outline-color: var(--wp--preset--color--white);
}

/* --- Eyebrow: mała złota etykieta wersalikowa nad nagłówkiem --- */
.el-eyebrow {
  display: inline-block;
  font-family: var(--wp--preset--font-family--sans);
  font-size: var(--wp--preset--font-size--eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold-text);
}
.is-style-el-dark .el-eyebrow {
  color: var(--wp--preset--color--gold);
}

/* --- Lead: zdanie wprowadzające pod H2 --- */
.el-lead {
  font-size: var(--wp--preset--font-size--lead);
  color: var(--wp--preset--color--muted);
  max-width: 62ch;
}
.is-style-el-dark .el-lead {
  color: #B3B2AB;
}

/* --- Przyciski: hierarchia primary/secondary/quiet, zawsze jeden primary na widok --- */
.el-btn,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--wp--custom--radius--default, 10px);
  font-weight: 600;
  transition: background-color var(--wp--custom--duration--base) var(--wp--custom--easing),
              border-color var(--wp--custom--duration--base) var(--wp--custom--easing),
              color var(--wp--custom--duration--base) var(--wp--custom--easing);
}
.is-style-el-secondary .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--wp--preset--color--ink);
  color: var(--wp--preset--color--ink);
}
.is-style-el-quiet .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--ink);
  text-decoration: underline;
  min-height: 44px;
}
.el-btn__arrow {
  display: inline-block;
  transition: transform var(--wp--custom--duration--base) var(--wp--custom--easing);
}
.el-btn:hover .el-btn__arrow,
.wp-block-button__link:hover .el-btn__arrow {
  transform: translateX(3px);
}

/* --- Karta (el-card): skorupa siatek, foot zawsze na dole --- */
.el-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--wp--custom--radius--default, 10px);
  background: var(--wp--preset--color--white);
  padding: var(--wp--preset--spacing--6, 2rem);
}
.el-card--interactive:hover {
  border-color: var(--wp--preset--color--gold-text);
  box-shadow: var(--wp--custom--shadow-soft);
}
.el-card__foot {
  margin-top: auto;
}

/* --- Checklist vs Tags: nie mieszać ról (część 5 design systemu) --- */
.el-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.el-checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--wp--preset--color--muted);
}
.el-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--wp--preset--color--gold-text);
}

.el-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.el-tags li {
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
}

/* --- Accordion (Program / FAQ): <details>/<summary> natywne, animacja CSS --- */
.el-faq {
  border-top: 1px solid var(--wp--preset--color--line);
}
.el-faq__item {
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.el-faq__item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-weight: 600;
}
.el-faq__item > summary::-webkit-details-marker { display: none; }
.el-faq__item > summary::after {
  content: "+";
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1.5rem;
  color: var(--wp--preset--color--gold-text);
  transition: transform var(--wp--custom--duration--base) var(--wp--custom--easing);
}
.el-faq__item[open] > summary::after {
  transform: rotate(45deg);
}
.el-faq__panel {
  padding-bottom: 1.25rem;
  color: var(--wp--preset--color--muted);
}

/* --- Header sticky --- */
.el-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--wp--preset--color--bg);
  border-bottom: 1px solid var(--wp--preset--color--line);
}

/* --- Sekcja "dark": jeden mocny akcent, używany oszczędnie --- */
.is-style-el-dark {
  background-color: var(--wp--preset--color--dark);
  color: var(--wp--preset--color--white);
}
.is-style-el-dark .wp-block-button__link.is-style-el-secondary,
.is-style-el-dark .wp-block-button__link {
  border-color: var(--wp--preset--color--white);
}

/* --- Reduced motion: wyłącza wszystko naraz --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Wysoki kontrast wymuszony systemowo: przyciski nie mogą znikać --- */
@media (forced-colors: active) {
  .el-btn, .wp-block-button__link { outline: 1px solid transparent; }
}
