/* =============================================
   Notariusze Gdańsk – one page
   Paleta i typografia zgodne z oryginałem (motyw The7),
   układ i komponenty zoptymalizowane pod UX/UI.
   ============================================= */

:root {
  --navy: #122454;
  --navy-card: #182b5d;
  --navy-card-open: #1b3068;
  --navy-deep: #0d1a3f;
  --line: #273c72;
  --text: #a0b2e3;
  --heading: #ffffff;
  --measure: 68ch;
  --header-h: 160px;
  --header-h-stuck: 88px;
  --page-inset: 0px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #ffffff;
  font: normal 16px/30px "Montserrat", Helvetica, Arial, Verdana, sans-serif;
  color: var(--text);
}

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
a { color: var(--heading); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 500;
  transform: translate(-50%, -120%);
  background: #ffffff;
  color: var(--navy);
  font: 700 13px/1 "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 24px;
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translate(-50%, 0); }

/* --- Page wrapper --- */
#page {
  background: var(--navy) url("../images/eagle-bg.png") no-repeat right 100px;
  background-size: 875px;
  min-height: 100vh;
}

/* --- Typography --- */
h1, .h1-size, .section-title {
  color: var(--heading);
  font: normal 40px/56px "Libre Baskerville", Helvetica, Arial, Verdana, sans-serif;
}

h2 {
  color: var(--heading);
  font: normal 26px/38px "Libre Baskerville", Helvetica, Arial, Verdana, sans-serif;
}

h3 {
  color: var(--heading);
  font: normal bold 20px/30px "Montserrat", Helvetica, Arial, Verdana, sans-serif;
}

h4 {
  color: var(--heading);
  font: normal bold 12px/16px "Montserrat", Helvetica, Arial, Verdana, sans-serif;
  text-transform: uppercase;
}

p { font-size: 16px; line-height: 30px; }
p + p { margin-top: 16px; }

h2 + p, h3 + p { margin-top: 12px; }
p + h2, ul + h2, p + h3, ul + h3 { margin-top: 32px; }

strong { color: var(--heading); font-weight: 600; }

.eyebrow {
  color: var(--text);
  font: 700 12px/16px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 22px;
}

.lead {
  color: var(--heading);
  font-size: 18px;
  line-height: 32px;
  max-width: 60ch;
}

.section-lead {
  color: var(--heading);
  font-size: 18px;
  line-height: 32px;
  max-width: var(--measure);
  margin-bottom: 40px;
}

.muted { color: var(--text); font-size: 15px; }
.note { color: var(--text); font-size: 14px; line-height: 24px; margin-top: 20px; }

/* --- Bullet lists --- */
.facts li,
.services li,
.doc-body li {
  position: relative;
  padding-left: 1.2em;
  font-size: 16px;
  line-height: 30px;
  max-width: var(--measure);
}

.facts li + li,
.services li + li,
.doc-body li + li { margin-top: 10px; }

.facts li::before,
.services li::before,
.doc-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}

.facts { margin: 20px 0; }
.services { margin: 20px 0 32px; }

.link-arrow {
  display: inline-block;
  color: var(--heading);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 8px 0 4px;
}
.link-arrow::after { content: " →"; }
.link-arrow:hover { border-bottom-color: var(--heading); }

.callout {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 24px;
  color: var(--text);
  max-width: var(--measure);
}

/* --- Header (sticky) --- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  overflow: visible;
  transition: box-shadow 0.25s ease;
}

.masthead.is-stuck {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.32);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: var(--header-h);
  padding: 0 0 0 40px;
  transition: min-height 0.25s ease;
}

.masthead.is-stuck .header-bar { min-height: var(--header-h-stuck); }

.branding {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.main-nav-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.logo {
  width: auto;
  height: 80px;
  transition: height 0.25s ease;
}

.masthead.is-stuck .logo { height: 56px; }

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav > li > a {
  display: block;
  padding: 20px 14px;
  color: var(--heading);
}

.main-nav .menu-text {
  font: normal bold 12px/16px "Montserrat", Helvetica, Arial, Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--heading);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.main-nav > li > a .menu-text::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background-color: var(--heading);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.main-nav > li > a:hover .menu-text::before,
.main-nav > li > a[aria-current="true"] .menu-text::before { transform: scaleX(1); }

.header-phone {
  --fold-size: 34px;
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  padding: 6px calc(28px + var(--page-inset)) 6px 28px;
  margin-right: calc(-1 * var(--page-inset));
  background: #ffffff;
  color: var(--navy);
  border-radius: 0;
  user-select: text;
  cursor: default;
  isolation: isolate;
  clip-path: polygon(
    var(--fold-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--fold-size)
  );
}

/* Zagięty róg kartki — styk z granatowym menu */
.header-phone-fold {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--fold-size);
  height: var(--fold-size);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    145deg,
    #ffffff 0%,
    #eef1f8 32%,
    #b0bbd4 33%,
    #7f90b4 100%
  );
  clip-path: polygon(0 0, 100% 0, 0 100%);
  box-shadow: 2px 3px 6px rgba(18, 36, 84, 0.28);
}

.header-phone-fold::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(var(--fold-size) + 8px);
  height: 1px;
  background: linear-gradient(90deg, rgba(18, 36, 84, 0.22), transparent);
  transform: rotate(-45deg);
  transform-origin: top left;
}

.header-phone-label,
.header-phone-number {
  position: relative;
  z-index: 1;
}

.header-phone-label {
  font: 700 10px/14px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.header-phone-number { font: 700 17px/22px "Montserrat", sans-serif; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  color: var(--heading);
  font: 700 12px/1 "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-height: 44px;
  padding: 0 16px;
}

.nav-toggle-bars { display: flex; flex-direction: column; gap: 4px; }

.nav-toggle-bars span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heading);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Main --- */
#main { padding: 20px 0; }

.wf-wrap {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 50px;
}

section[id] { scroll-margin-top: calc(var(--header-h-stuck) + 40px); }
section[id] + section[id] { margin-top: 100px; }

.section-title {
  position: relative;
  padding-bottom: 22px;
  margin-bottom: 32px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 2px;
  background: var(--text);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 35px;
  align-items: start;
}

.grid + .grid { margin-top: 60px; }

.grid-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* rozciągnięcie kolumny bocznej jest warunkiem działania sticky w .cta-card */
.col-side { align-self: stretch; }

.col-main > p,
.col-main > ul,
.grid-2 p,
.grid-2 ul { max-width: var(--measure); }

/* --- Hero --- */
.hero {
  max-width: 900px;
  padding-bottom: 60px;
  margin-bottom: 60px;
  border-bottom: 1px solid var(--line);
}

.hero h1 { margin-bottom: 24px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 8px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 700 13px/20px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary { background: #ffffff; color: var(--navy); }
.btn-primary:hover { background: var(--text); color: var(--navy); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: var(--heading); }
.btn-ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.08); }

.btn-quiet { border-color: var(--line); color: var(--text); background: transparent; }
.btn-quiet:hover { border-color: var(--text); color: var(--heading); }

/* --- Telefon: desktop = tekst, mobile = połączenie --- */
.tel-link,
.tel-link-only { display: none; }

.tel-text { color: var(--heading); }

.phone-box {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 26px;
  background: #ffffff;
  color: var(--navy);
  border-radius: 2px;
  user-select: text;
  cursor: default;
}

.phone-box-label {
  font: 700 10px/14px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.phone-box-number {
  font: 700 17px/22px "Montserrat", sans-serif;
}

.phone-box--card {
  display: flex;
  width: 100%;
  margin-bottom: 10px;
}

.cta-card .tel-link-only { width: 100%; margin-bottom: 10px; }

/* --- Buttons --- */
.contact-card,
.cta-card {
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 32px;
}

.cta-card { position: sticky; top: calc(var(--header-h-stuck) + 24px); }

.card-title {
  font: normal bold 20px/30px "Montserrat", sans-serif;
  color: var(--heading);
  margin-bottom: 14px;
}

.cta-card p { font-size: 15px; line-height: 26px; margin-bottom: 20px; }
.cta-card .btn { width: 100%; }
.cta-card .btn + .btn { margin-top: 10px; }

.cta-card .hours {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--text);
}

.contact-address {
  font-style: normal;
  color: var(--heading);
  font-size: 16px;
  line-height: 28px;
  margin-bottom: 22px;
}

.data-list { display: flex; flex-direction: column; gap: 12px; }

.data-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.data-row:last-child { border-bottom: 0; padding-bottom: 0; }

.data-row dt {
  color: var(--text);
  font-size: 15px;
  line-height: 26px;
  margin: 0;
}

.data-row dd {
  color: var(--heading);
  font-size: 16px;
  line-height: 26px;
  margin: 0;
}

.contact-card .data-row dd a.contact-link,
.contact-card .data-row dd .tel-link {
  color: var(--heading);
  text-decoration: none;
  border: none;
  padding: 0;
}

.contact-card .data-row dd a.contact-link:hover {
  opacity: 0.85;
}

.data-row .sep { color: var(--text); }

.contact-card-full { padding: 40px; }

.contact-actions .tel-link-only { display: none; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.contact-actions .btn { flex: 1 1 auto; }

/* --- Notariusze --- */
.notariusze-photo { margin-bottom: 40px; }
.notariusze-photo img { width: 100%; border-radius: 2px; }

.notary h3 { margin-bottom: 12px; }
.notary p { font-size: 15px; line-height: 28px; }

/* --- Zespół --- */
.team-gallery { width: 100%; }

.team-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.team-nav {
  display: none;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.team-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--navy-card);
  color: var(--heading);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.team-nav-btn:hover:not(:disabled) {
  border-color: var(--heading);
  background: var(--line);
}

.team-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.team-nav-btn:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 2px;
}

@media screen and (min-width: 1024px) {
  .team-nav { display: flex; }
  .team-carousel {
    mask-image: none;
    scrollbar-width: none;
  }
  .team-carousel::-webkit-scrollbar { display: none; }
}

.team-carousel:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 4px;
}

.team-carousel::-webkit-scrollbar { height: 6px; }
.team-carousel::-webkit-scrollbar-track { background: transparent; }
.team-carousel::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.team-track {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0 2px 12px;
}

.team-card {
  flex: 0 0 calc(50% - 12px);
  min-width: 0;
  scroll-snap-align: start;
}

.team-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  margin-bottom: 16px;
  background: var(--navy-card);
}

.team-card h3 {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 4px;
}

.team-card .role {
  color: var(--text);
  font-size: 14px;
  line-height: 22px;
}

/* --- Kroki wizyty --- */
.steps { counter-reset: step; list-style: none; }

.step {
  counter-increment: step;
  position: relative;
  padding-left: 70px;
  padding-bottom: 34px;
}

.step:last-child { padding-bottom: 0; }

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-card);
  border: 1px solid var(--line);
  color: var(--heading);
  font: 700 16px/42px "Montserrat", sans-serif;
  text-align: center;
}

.step::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 56px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}

.step:last-child::after { display: none; }
.step h3 { line-height: 44px; margin-bottom: 6px; }
.step p { max-width: var(--measure); }
.step a { border-bottom: 1px solid rgba(255, 255, 255, 0.4); }

/* --- Akordeon dokumentów --- */
.docs-intro {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 48px;
}
.docs-intro p { font-size: 15px; line-height: 28px; }

.accordion { border-top: 1px solid var(--line); }

.doc {
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0;
}

.doc:first-child { border-top: 0; }

.doc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 18px 28px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.doc summary::-webkit-details-marker { display: none; }
.doc summary::marker { content: ""; }
.doc summary:hover { background: var(--navy-card-open); }

.doc-name {
  font: 700 17px/26px "Montserrat", sans-serif;
  color: var(--heading);
}

.doc-icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.doc-icon::before,
.doc-icon::after {
  content: "";
  position: absolute;
  background: var(--text);
  transition: transform 0.2s ease;
}

.doc-icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.doc-icon::after { left: 8px; top: 0; width: 2px; height: 18px; }

.doc[open] { background: var(--navy-card-open); }
.doc[open] .doc-icon::after { transform: scaleY(0); }

.doc-body {
  margin: 0 28px;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.docs-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 18px 28px;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-top: 0;
  color: var(--heading);
  transition: background 0.2s ease;
}

.doc-link:hover { background: var(--navy-card-open); }

.doc-go {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.doc-link:hover .doc-go {
  color: var(--heading);
  transform: translateX(4px);
}

/* --- Artykuł CMS --- */
.article {
  max-width: 760px;
  padding-bottom: 40px;
}

.article-crumb {
  font: 600 12px/18px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 28px;
}

.article-crumb a {
  color: var(--text);
  border-bottom: 1px solid transparent;
}

.article-crumb a:hover { color: var(--heading); border-bottom-color: var(--heading); }

.article-crumb span { opacity: 0.55; margin: 0 10px; }

.article h1 {
  font-size: 36px;
  line-height: 48px;
  margin-bottom: 20px;
}

.article-lead {
  color: var(--heading);
  font-size: 18px;
  line-height: 32px;
  margin-bottom: 12px;
}

.article-block {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.article-num {
  font: 700 12px/16px "Montserrat", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
}

.article-block h2 { margin-bottom: 16px; }

.article-block p { max-width: var(--measure); }

.article-back { margin-top: 56px; }

body.page-article #page {
  background-position: right 40px top 180px;
}

/* --- Mapa --- */
.contact-grid { align-items: stretch; }

.map-frame {
  position: relative;
  height: 100%;
  min-height: 520px;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 520px;
  padding: 40px;
  background: var(--navy-card);
  border: 0;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: background 0.2s ease;
}

.map-placeholder:hover { background: var(--navy-card-open); }

.map-placeholder-title {
  font: 700 13px/20px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  background: #ffffff;
  padding: 14px 26px;
  border-radius: 2px;
}

.map-placeholder-text {
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
  max-width: 46ch;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
}

/* --- Footer --- */
#footer { background: var(--line); }

.wf-container-footer { padding: 70px 0 80px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.widget-title {
  font: 700 12px/16px "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--heading);
  margin-bottom: 20px;
}

.footer .widget { color: var(--text); font-size: 14px; line-height: 26px; }

.footer .custom-menu a,
.footer .widget-links a:not(.tel-link) {
  display: inline-block;
  padding: 9px 0;
  color: var(--text);
  border-bottom: 1px solid transparent;
}

.footer .widget-links .tel-link {
  color: var(--text);
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.footer .custom-menu a:hover,
.footer .widget-links a:not(.tel-link):hover,
.footer .widget-links .tel-link:hover { color: var(--heading); border-bottom-color: var(--heading); }

.footer .custom-menu li,
.footer .widget-links li { line-height: 22px; }

.footer .widget-info {
  font-style: normal;
  color: var(--text);
  font-size: 14px;
  line-height: 26px;
}

.footer .widget-hours { margin-top: 16px; font-size: 14px; line-height: 24px; }

/* --- Bottom bar --- */
#bottom-bar {
  background: rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

#bottom-bar .copyright {
  color: var(--heading);
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 150;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: var(--navy);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease, visibility 0.25s ease, background 0.2s ease;
}

.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--text); }

/* --- Mobilny pasek akcji --- */
.mobile-actions { display: none; }

/* --- Modal PDF --- */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 26, 63, 0.72);
  border: 0;
  cursor: pointer;
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--heading);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { color: var(--text); }

.modal-title {
  font: normal 26px/34px "Libre Baskerville", serif;
  color: var(--heading);
  margin-bottom: 10px;
  padding-right: 36px;
}

.modal-lead {
  color: var(--text);
  font-size: 15px;
  line-height: 26px;
  margin-bottom: 24px;
}

.pdf-modal-list { display: flex; flex-direction: column; gap: 8px; }

.pdf-modal-list a {
  display: block;
  padding: 14px 18px;
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--heading);
  font: 600 15px/22px "Montserrat", sans-serif;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pdf-modal-list a:hover {
  background: var(--navy-card-open);
  border-color: var(--text);
}

body.modal-open { overflow: hidden; }

/* --- Responsive --- */
@media screen and (min-width: 1600px) {
  body { padding: 20px; }
  :root { --page-inset: 20px; }
  #main { padding: 80px 0 120px; }
}

@media screen and (min-width: 1250px) and (max-width: 1599px) {
  body { padding: 20px; }
  :root { --page-inset: 20px; }
}

@media screen and (min-width: 1024px) and (max-width: 1249px) {
  body { padding: 20px; }
  :root { --page-inset: 20px; }
  #main { padding: 80px 0; }
  .header-bar { padding: 0 0 0 30px; }
  .main-nav > li > a { padding: 20px 10px; }
}

@media screen and (max-width: 1100px) {
  :root { --header-h: 96px; --header-h-stuck: 76px; }

  .logo,
  .masthead.is-stuck .logo { height: 62px; }

  .header-bar { padding: 0 0 0 30px; }
  .main-nav > li > a { padding: 16px 8px; }
}

@media screen and (max-width: 1023px) {
  #main { padding: 60px 0; }
  .grid-7-5,
  .grid-5-7 { grid-template-columns: minmax(0, 1fr); }
  .cta-card { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page { background-size: 620px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 767px) {
  :root { --header-h: 80px; --header-h-stuck: 72px; }

  body { padding-bottom: 60px; }

  #main { padding: 40px 0 60px; }
  .wf-wrap { padding: 0 20px; }

  #page { background-position: right -120px top 60px; background-size: 460px; }

  h1, .h1-size, .section-title, .article h1 { font-size: 26px; line-height: 38px; }
  h2 { font-size: 21px; line-height: 32px; }
  .lead, .section-lead { font-size: 17px; line-height: 30px; }

  .header-bar {
    min-height: var(--header-h);
    padding: 0 20px;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .logo,
  .masthead.is-stuck .logo { height: 50px; }

  .header-phone { display: none; }
  .nav-toggle { display: flex; }
  .main-nav-wrap { order: 0; width: auto; margin-left: auto; }

  /* mobile: linki tel zamiast tekstu */
  .phone-box,
  .tel-text { display: none; }

  .tel-link { display: inline; }
  .footer .widget-links .tel-link { display: inline-block; }
  .tel-link-only,
  .contact-actions .tel-link-only { display: inline-flex; }

  .hero-actions .tel-link-only { width: 100%; }
  .cta-card .tel-link-only { display: inline-flex; width: 100%; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    background: var(--navy);
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    margin: 0;
  }

  .main-nav.open { display: flex; }

  .main-nav > li { border-bottom: 1px solid var(--line); }
  .main-nav > li:last-child { border-bottom: 0; }
  .main-nav > li > a { padding: 14px 0; }

  .hero { padding-bottom: 40px; margin-bottom: 40px; }
  .hero-actions .btn { width: 100%; }

  .grid { gap: 28px; }
  .grid + .grid { margin-top: 40px; }
  .grid-2,
  .grid-3 { grid-template-columns: minmax(0, 1fr); }

  section[id] + section[id] { margin-top: 64px; }

  .contact-card,
  .contact-card-full,
  .cta-card { padding: 24px; }

  .data-row { grid-template-columns: 1fr; gap: 4px; }

  .step { padding-left: 56px; padding-bottom: 28px; }
  .step::before { width: 36px; height: 36px; font-size: 15px; line-height: 34px; }
  .step::after { left: 18px; top: 46px; }
  .step h3 { line-height: 26px; padding-top: 4px; margin-bottom: 8px; }

  .doc summary { padding: 16px 20px; min-height: 64px; gap: 16px; }
  .doc-name { font-size: 16px; line-height: 24px; }
  .doc-body { margin: 0 20px; padding: 18px 0 24px; }
  .docs-footer .btn { width: 100%; }

  .map-frame,
  .map-placeholder,
  .map-frame iframe { min-height: 360px; }

  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .wf-container-footer { padding: 48px 0 56px; }

  .back-to-top { right: 16px; bottom: 76px; width: 44px; height: 44px; }

  .mobile-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--navy-deep);
    border-top: 1px solid var(--line);
  }

  .mobile-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    color: var(--heading);
    font: 700 12px/16px "Montserrat", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .mobile-action + .mobile-action { border-left: 1px solid var(--line); }
  .mobile-action:active { background: var(--navy-card); }
}

@media screen and (max-width: 1023px) {
  .team-card { flex: 0 0 calc(33.333% - 16px); min-width: 180px; }
}

@media screen and (max-width: 767px) {
  .team-card { flex: 0 0 calc(50% - 12px); min-width: 160px; }
}

@media screen and (max-width: 420px) {
  .team-card { flex: 0 0 78%; min-width: 0; }
}

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

/* --- Druk (klient drukuje listę dokumentów) --- */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  #page { background: #fff; }

  .masthead,
  .mobile-actions,
  .back-to-top,
  .docs-footer,
  .map-frame,
  #bottom-bar,
  .hero-actions,
  .cta-card,
  .skip-link { display: none !important; }

  h1, h2, h3, h4, .section-title, .doc-name, strong, a { color: #000 !important; }
  p, li, dd, dt { color: #222 !important; }

  .doc,
  .contact-card { background: #fff !important; border: 1px solid #999; }
  .doc-body { display: block !important; }
  .grid { display: block; }
  section[id] { page-break-inside: avoid; }
  a[href^="tel:"]::after,
  a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 11px; }
}
