/* ==========================================================================
   Komponenty: ikony, przyciski, karty, akordeony, formularz, header, stopka
   ========================================================================== */

/* ---------- Ikony (jeden system: obrys, zaokrąglenia, stała grubość w px) ---------- */
.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 1.25rem; height: 1.25rem; }
.icon--lg { width: 2.5rem; height: 2.5rem; stroke-width: 2px; }

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: var(--icon-bg);
  color: var(--navy);
}
.icon-box--lg { width: 4.5rem; height: 4.5rem; border-radius: 16px; }
.icon-box--md { width: 3.5rem; height: 3.5rem; }
.icon-box--sm { width: 2.75rem; height: 2.75rem; }
.icon-box--dark { background: rgba(176, 221, 216, 0.14); color: var(--teal-light); }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn--lg { min-height: 3.5rem; padding-inline: 2rem; }
.btn--sm { min-height: 2.75rem; padding-inline: 1.25rem; font-size: var(--fs-small); }

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }

.btn--secondary { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--secondary:hover { background: var(--tint); color: var(--blue-dark); border-color: var(--blue-dark); }

.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--teal-light); color: var(--navy); }

.btn--outline-light { border-color: rgba(255, 255, 255, 0.55); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); color: var(--white); }

.btn--block { width: 100%; }

.link-arrow {
  display: inline;
  font-weight: 500;
  text-decoration: none;
  color: var(--blue);
}
.link-arrow .icon { display: inline-block; vertical-align: -0.2em; margin-left: 8px; transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.section--navy .link-arrow { color: var(--teal-light); }
.section--navy .link-arrow:hover { color: var(--white); }

/* ---------- Karty ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
a.card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
a.card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 1rem; }

/* ---------- Akordeon (natywny <details>) ---------- */
.acc > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  min-height: 3.5rem;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .acc__chev {
  margin-left: auto;
  flex: none;
  color: var(--blue);
  transition: transform 0.25s var(--ease);
}
.acc[open] > summary .acc__chev { transform: rotate(180deg); }

/* ---------- Chipy ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  font-size: var(--fs-small);
  color: var(--navy);
}

/* ---------- Formularz ---------- */
.field { margin-bottom: 20px; }
.field label, .field .label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: var(--fs-small);
  color: var(--navy);
}
.input, .select, .textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 12px 16px;
  font: inherit;
  font-size: 1.0625rem; /* ≥16 px – iOS nie przybliża pola */
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  padding-right: 44px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23036d87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--blue); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 142, 154, 0.25);
}
.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .textarea { border-color: var(--error); }
.field__error {
  display: none;
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--error);
}
.field.is-invalid .field__error { display: block; }

.file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  min-height: 3.5rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--tint-2);
  transition: border-color 0.2s var(--ease);
}
.file:hover { border-color: var(--blue); }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.file__text { font-size: var(--fs-small); color: var(--text-2); }
.file__text strong { color: var(--blue); font-weight: 500; }

.hint {
  display: none;
  margin: -6px 0 20px;
  padding: 16px 18px;
  border-left: 3px solid var(--teal);
  background: var(--tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--fs-small);
  color: var(--text);
}
.hint.is-visible { display: block; }
.hint a { font-weight: 500; }

.consent-slot:empty { display: none; }
.consent-slot {
  margin: 4px 0 20px;
  padding: 14px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  color: var(--text-2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(2, 43, 63, 0.08); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
  flex: none;
}
.brand:hover { color: var(--navy); }
.brand__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1;
}
.brand__sub {
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--text-2);
  line-height: 1;
}

.nav { display: none; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__link, .nav__toggle {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  min-height: 2.75rem;
  padding: 0 10px;
  border: 0;
  background: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.nav__link:hover, .nav__toggle:hover { color: var(--blue); background: var(--tint-2); }
.nav__toggle .icon { transition: transform 0.2s var(--ease); }
.nav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 2.75rem;
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--blue); }
.header-phone__text { display: none; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.menu-btn .icon--close { display: none; }
.menu-btn[aria-expanded="true"] .icon--open { display: none; }
.menu-btn[aria-expanded="true"] .icon--close { display: block; }

.header-cta { display: none; white-space: nowrap; }

/* Mega-menu (desktop) */
.mega {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 2 * var(--gutter)));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 28px 32px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.mega.is-open { display: grid; }
.mega h3 {
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.mega a {
  display: block;
  padding: 9px 0;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
}
.mega a:hover { color: var(--blue); }

/* Menu mobilne */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 59;
  background: var(--white);
  overflow-y: auto;
  padding: 8px var(--gutter) calc(var(--sticky-h) + 24px);
  display: none;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a.mm-link,
.mobile-menu summary.mm-link {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}
.mobile-menu summary.mm-link::-webkit-details-marker { display: none; }
.mobile-menu summary .icon { margin-left: auto; color: var(--blue); transition: transform 0.25s var(--ease); }
.mobile-menu details[open] summary .icon { transform: rotate(180deg); }
.mobile-menu .mm-sub { padding: 6px 0 14px 4px; }
.mobile-menu .mm-sub h3 {
  margin: 12px 0 4px;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.mobile-menu .mm-sub a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
}
.mobile-menu .mm-actions { display: grid; gap: 12px; margin-top: 24px; }
body.menu-open { overflow: hidden; }

@media (min-width: 1180px) {
  .nav { display: block; }
  .menu-btn { display: none; }
  .header-actions { margin-left: 0; }
  .header-cta { display: inline-flex; }
  .mobile-menu { display: none !important; }
}
@media (min-width: 1280px) {
  .header-phone__text { display: inline; }
}

/* ---------- Sticky pasek mobilny ---------- */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(2, 43, 63, 0.08);
  transition: transform 0.25s var(--ease);
}
.sticky-bar .btn { min-height: 3.25rem; padding-inline: 12px; }
.sticky-bar .btn:first-child { flex: 0 0 38%; }
.sticky-bar .btn:last-child { flex: 1; }
.sticky-bar.is-hidden { transform: translateY(110%); }
@media (min-width: 900px) { .sticky-bar { display: none; } }
@media (max-width: 899px) {
  .site-footer { padding-bottom: 28px; }
  html { scroll-padding-bottom: var(--sticky-h); }
}

/* ---------- Stopka ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-dark-2);
  padding-block: 64px 32px;
  font-size: var(--fs-small);
}
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer__grid { display: grid; gap: 36px; }
.footer__brand .brand__name { color: var(--white); }
.footer__brand .brand__sub { color: var(--on-dark-3); }
.footer__brand p { margin-top: 18px; max-width: 34ch; }
.footer__col h3 {
  margin-bottom: 14px;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.footer__col li { padding: 5px 0; }
.footer__col address { font-style: normal; line-height: 1.7; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--on-dark-3);
}
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1.3fr; gap: 48px; }
}

/* Nagłówek – korekty szerokości */
.site-header__inner { gap: 20px; }
.brand { min-width: 0; }
@media (max-width: 899px) {
  .brand__name { font-size: 0.9375rem; letter-spacing: 0.09em; }
  .site-header__inner { gap: 10px; }
}
@media (min-width: 1180px) { .site-header__inner { gap: 28px; } }

/* Znak V w nazwie serwisu */
.brand__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand__mark { height: 46px; width: auto; flex: none; }
@media (max-width: 899px) {
  .brand { gap: 10px; }
  .brand__mark { height: 34px; }
}
.footer__brand .brand__mark { height: 40px; }

/* Komunikaty formularza */
.notice {
  margin: 0 0 24px;
  padding: 16px 18px;
  border-left: 3px solid var(--teal);
  background: var(--tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--fs-small);
  color: var(--text);
}
.notice strong { display: block; margin-bottom: 4px; color: var(--navy); font-weight: 500; }
.notice p { margin: 0; color: var(--text); }
.notice a { font-weight: 500; }
.form-hint { margin: -4px 0 18px; font-size: var(--fs-small); color: var(--text-2); }
.form-error a { font-weight: 500; }
.form-error strong { display: block; margin-bottom: 4px; color: var(--navy); font-weight: 500; }
.unavailable__mail { display: inline-block; margin-top: 10px; font-weight: 500; }
@media (max-width: 899px) {
  .brand { flex: 0 1 auto; }
  .brand__name { line-height: 1.12; }
}
