/*
  global.css — style wspólne dla całej witryny ubezpieczamy-zycie.pl
  Ładowany na KAŻDEJ podstronie (patrz functions.php: uzz_enqueue_global_styles).
  Style specyficzne dla pojedynczych stron/sekcji (np. strona główna,
  formularz audytu) zostają w osobnych plikach i ładują się dodatkowo,
  tylko tam, gdzie są potrzebne.
*/

:root {
  --white: #ffffff;
  --surface: #f4f5f7;
  --navy: #0a2a57;
  --navy-soft: #22406b;
  --orange: #ff6b1a;
  --orange-deep: #e85a0c;
  --ink: #333b47;
  --ink-light: #6b7280;
  --border: #e4e7ec;
  --error: #c0392b;
  --success: #1e7b45;
  --radius: 6px;
  --serif: "Zilla Slab", Georgia, serif;
  --sans:
    "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Kontener — wspólny dla wszystkich sekcji na każdej stronie ---------- */
.uzz-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Przyciski — używane zarówno na stronie głównej, jak i w formularzu ---------- */
.uzz-btn-cta {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 0 0 0 rgba(255, 107, 26, 0.5);
  animation: uzz-pulse 2.6s infinite;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
.uzz-btn-cta:hover {
  background: var(--orange-deep);
  color: var(--white);
  transform: translateY(-1px);
}
@keyframes uzz-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 26, 0.45);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 107, 26, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 26, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .uzz-btn-cta {
    animation: none;
  }
}

.uzz-btn-ghost {
  display: inline-block;
  margin-left: 16px;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: 2px;
  text-decoration: none;
}
.uzz-btn-ghost:hover {
  border-color: var(--navy);
}

/* ---------- Nagłówki sekcji — wspólny wzorzec dla każdej podstrony ---------- */
.uzz-section-head {
  max-width: 60ch;
  margin-bottom: 48px;
}
.uzz-section-head h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 32px;
  margin-bottom: 12px;
}
.uzz-section-head p {
  color: var(--ink-light);
  font-size: 18px;
}

/* ---------- Focus visible — dostępność, wspólne dla całej witryny ---------- */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
/* ==========================================================================
   Artykuły blogowe — klasy pa-* (używane w treści wpisów, np. Ochrona Zdrowia,
   Baza Wiedzy i Poradnik). Ładowane razem z global.css na każdej podstronie.
   ========================================================================== */

/* ---------- Kontener artykułu ---------- */
#pa-article-body {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}
#pa-article-body h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 26px;
  margin: 40px 0 16px;
}
#pa-article-body h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 20px;
  margin: 0 0 12px;
}
#pa-article-body p {
  margin: 0 0 16px;
}
#pa-article-body ul {
  margin: 0 0 16px;
  padding-left: 22px;
}
#pa-article-body li {
  margin-bottom: 8px;
}
#pa-article-body a {
  color: var(--navy-soft);
  text-decoration: underline;
}
#pa-article-body a:hover {
  color: var(--orange-deep);
}

/* ---------- Lead — akapit wprowadzający nad #pa-article-body ---------- */
.pa-lead {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 70ch;
  margin: 0 0 32px;
}

/* ---------- Obrazek nagłówkowy ---------- */
.pa-image-wrapper {
  margin: 0 0 32px;
}
.pa-image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ---------- Kapsuła — wyróżniony skrót odpowiedzi pod każdym H2 ---------- */
.pa-capsule {
  background: var(--surface);
  border: none;
  border-left: 4px solid var(--orange-deep);
  border-bottom: 4px solid var(--orange-deep);
  border-radius: 0;
  padding: 16px 20px;
  margin: 0 0 20px;
  font-size: 16px;
}
.pa-capsule strong {
  color: var(--navy);
  font-weight: 600;
}
/* ---------- Tabela warunków umowy ---------- */
.pa-table-wrapper {
  overflow-x: auto;
  margin: 0 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}
.pa-table th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
}
.pa-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.pa-table tbody tr:nth-child(even) {
  background: var(--surface);
}

/* ---------- Podsumowanie — lista "co warto zapamiętać" ---------- */
.pa-summary {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.pa-summary h3 {
  margin-top: 0;
}
.pa-summary ul {
  margin-bottom: 0;
}

/* ---------- Box podsumowujący na końcu artykułu ---------- */
.pa-summary-box {
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 32px;
  font-size: 16px;
  color: var(--ink);
}
.pa-summary-box strong:first-child {
  color: var(--navy);
}

/* ---------- Blok CTA ---------- */
.pa-cta-block {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin: 40px 0;
  text-align: center;
}
.pa-cta-block h3.pa-cta-title {
  font-family: var(--serif);
  color: var(--white) !important;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.3;
}
.pa-cta-block p {
  color: var(--white);
}
.pa-btn-wrap {
  margin: 20px 0 8px;
}
.pa-cta-footer {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* ---------- O autorze ---------- */
.pa-author {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  margin: 32px 0;
  font-size: 16px;
}
.pa-author h3 {
  margin-top: 0;
}

/* ---------- Warto przeczytać również ---------- */
.pa-links {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 24px;
}
.pa-links ul {
  margin-bottom: 0;
}

/* ---------- Data aktualizacji ---------- */
.pa-update-info {
  font-size: 14px;
  color: var(--ink-light);
  margin: 0;
}
/* ---------- Wyjątek: przycisk CTA wewnątrz artykułu nie dziedziczy stylu linków ---------- */
#pa-article-body a.uzz-btn-cta {
  color: var(--white);
  text-decoration: none;
}
#pa-article-body a.uzz-btn-cta:hover {
  color: var(--white);
  text-decoration: none;
}
/* ==========================================================================
   Drzewo ubezpieczeń (.uzz-tree) — dopisz na końcu global.css
   Korzysta ze zmiennych :root z global.css: --navy, --success, --error,
   --ink, --serif, --sans, --radius
   ========================================================================== */

.uzz-tree {
  --tree-orange: #ff6200; /* pomarańcz Nationale-Nederlanden */
  --tree-line: var(--navy-soft, #22406b);
  --tree-gap: 24px;
  --tree-drop: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 0;
  font-family: var(--sans);
}

/* ---------- Główne okienko ---------- */
.uzz-tree-root {
  width: min(560px, 100%);
  margin: 0 auto;
  background: var(--tree-orange);
  color: var(--white);
  text-align: center;
  padding: 28px 24px;
  border-radius: var(--radius);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.25;
}
.uzz-tree-root span {
  display: block;
}
.uzz-tree-rootline {
  width: 3px;
  height: var(--tree-drop);
  background: var(--tree-line);
  margin: 0 auto;
}

/* ---------- 3 kolumny ---------- */
.uzz-tree-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tree-gap);
  align-items: start;
}
.uzz-tree-col {
  --c: var(--navy);
  --t: #e8eef7;
  position: relative;
  padding-top: var(--tree-drop);
}
.uzz-tree-col--green {
  --c: var(--success);
  --t: #e6f4ec;
}
.uzz-tree-col--red {
  --c: var(--error);
  --t: #fbe9e7;
}

/* łączniki */
.uzz-tree-col::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 1.5px);
  width: 3px;
  height: var(--tree-drop);
  background: var(--tree-line);
}
.uzz-tree-col::after {
  content: "";
  position: absolute;
  top: 0;
  height: 3px;
  background: var(--tree-line);
  left: calc(var(--tree-gap) / -2 - 1px);
  right: calc(var(--tree-gap) / -2 - 1px);
}
.uzz-tree-col:first-child::after {
  left: 50%;
}
.uzz-tree-col:last-child::after {
  right: 50%;
}

/* ---------- Nagłówek kolumny ---------- */
.uzz-tree-head {
  list-style: none;
  cursor: default;
  position: relative;
  background: var(--c);
  color: var(--white);
  text-align: center;
  padding: 24px 18px;
  border-radius: var(--radius);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.uzz-tree-head::-webkit-details-marker {
  display: none;
}
.uzz-tree-head h2 {
  margin: 0;
  font-family: var(--serif);
  color: var(--white);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.uzz-tree-head p {
  margin: 0;
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- Pozycje podrzędne ---------- */
.uzz-tree-items {
  list-style: none;
  margin: 0;
  padding: 0 14px;
}
.uzz-tree-items::before {
  content: "";
  display: block;
  width: 3px;
  height: 20px;
  background: var(--c);
  margin: 0 auto;
}
.uzz-tree-items li {
  position: relative;
  background: var(--t);
  border: 2px solid var(--c);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
  padding: 16px 14px;
  margin: 20px 0 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uzz-tree-items li:first-child {
  margin-top: 0;
}
.uzz-tree-items li::before {
  content: "";
  position: absolute;
  left: calc(50% - 1.5px);
  top: -22px;
  width: 3px;
  height: 20px;
  background: var(--c);
}
.uzz-tree-items li:first-child::before {
  display: none;
}

/* ---------- Telefon: zwijane sekcje ---------- */
@media (max-width: 860px) {
  .uzz-tree-root {
    font-size: 22px;
    padding: 22px 18px;
  }
  .uzz-tree-rootline,
  .uzz-tree-col::before,
  .uzz-tree-col::after {
    display: none;
  }
  .uzz-tree-root {
    margin-bottom: 20px;
  }
  .uzz-tree-cols {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .uzz-tree-col {
    padding-top: 0;
  }
  .uzz-tree-head {
    cursor: pointer;
    min-height: 0;
    padding: 18px 52px 18px 18px;
  }
  .uzz-tree-head::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 3px solid var(--white);
    border-bottom: 3px solid var(--white);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
  }
  .uzz-tree-col[open] > .uzz-tree-head::after {
    transform: translateY(-30%) rotate(-135deg);
  }
  .uzz-tree-items {
    padding: 0 8px 8px;
  }
}
/* ---------- Menu lewe: pomarańczowa rama z otwartym prawym górnym rogiem ---------- */
.widget.inner-padding {
  --frame-color: var(--orange-deep); /* #e85a0c, jak rama na reklamie */
  --frame-width: 4px;
  --frame-inset: 12px; /* odstęp ramy od krawędzi widgetu */
  --gap-x: 80%; /* góra: rama biegnie od lewej do tego miejsca */
  --gap-y: 40%; /* prawa: rama zaczyna się od tej wysokości w dół */
  position: relative;
}
.widget.inner-padding::before {
  content: "";
  position: absolute;
  inset: var(--frame-inset);
  border: var(--frame-width) solid var(--frame-color);
  pointer-events: none;
  clip-path: polygon(
    0 0,
    var(--gap-x) 0,
    var(--gap-x) var(--gap-y),
    100% var(--gap-y),
    100% 100%,
    0 100%
  );
}
/* ---------- Linki w drzewie ubezpieczeń ---------- */
/* ---------- Linki w drzewie ubezpieczeń ---------- */
.entry-content .uzz-tree a.drzewo {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

/* pomarańczowa kropka (niewidoczna, dopóki nie ma najechania) */
.entry-content .uzz-tree a.drzewo::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  pointer-events: none;
}

/* po najechaniu: pomarańczowy tekst + kropka */
.entry-content .uzz-tree a.drzewo:hover,
.entry-content .uzz-tree a.drzewo:focus-visible {
  color: var(--orange-deep);
  text-decoration: none;
}

.entry-content .uzz-tree a.drzewo:hover::before,
.entry-content .uzz-tree a.drzewo:focus-visible::before {
  opacity: 1;
  transform: scale(1);
  animation: uzz-pulse 1.8s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .entry-content .uzz-tree a.drzewo:hover::before,
  .entry-content .uzz-tree a.drzewo:focus-visible::before {
    animation: none;
  }
}

/* Baner cookies */
#eco-cc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: #fff;
  color: #222;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.18);
  padding: 20px;
  font:
    16px/1.5 system-ui,
    sans-serif;
  display: none;
}
#eco-cc .eco-cc-in {
  max-width: 960px;
  margin: 0 auto;
}
#eco-cc p {
  margin: 0 0 12px;
}
#eco-cc a {
  color: inherit;
  text-decoration: underline;
}
#eco-cc .eco-cc-opts {
  display: none;
  margin: 0 0 12px;
}
#eco-cc .eco-cc-opts label {
  display: block;
  margin: 6px 0;
}
#eco-cc .eco-cc-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#eco-cc button {
  cursor: pointer;
  border: 2px solid var(--navy);
  border-radius: 6px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  background: #fff;
  color: var(--navy);
}
#eco-cc button.eco-primary {
  background: var(--navy);
  color: #fff;
}
