/* ==========================================================================
   site-chrome.css: elementy wspólne z wczesniak.pl
   Top bar, nagłówek z logo i menu (z „Przekaż 1,5%”), stopka.
   Przy wdrożeniu w WordPressie/Elementorze te elementy dostarcza motyw,
   plik służy do wiernego podglądu projektu.
   ========================================================================== */

/* ---------- Top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  font-size: var(--fs-xs); color: rgba(255,255,255,.85);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.topbar__name { font-weight: 600; letter-spacing: .01em; }

.social { list-style: none; display: flex; gap: 6px; }
.social a {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  color: #fff; background: rgba(255,255,255,.14); transition: background-color .2s;
}
.social a:hover { background: rgba(255,255,255,.3); color: #fff; }
.social svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: absolute; top: 36px; left: 0; right: 0; z-index: 40;
  color: #fff; transition: background-color .25s, box-shadow .25s, padding .25s;
}
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.site-logo { flex: none; display: block; border-radius: 50%; }
.site-logo img { width: 72px; height: 72px; transition: width .25s, height .25s; }

.site-header.is-stuck {
  position: fixed; top: 0; background: rgba(36, 80, 143, .97);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header.is-stuck .site-header__inner { min-height: 68px; }
.site-header.is-stuck .site-logo img { width: 52px; height: 52px; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.menu { list-style: none; display: flex; align-items: center; gap: 2px; }
.menu__item { position: relative; }
.menu__item > a {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px;
  color: #fff; font-size: var(--fs-xs); font-weight: 600; text-decoration: none; border-radius: 8px;
}
.menu__item.has-sub > a::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .8;
}
.menu__item > a:hover, .menu__item.is-current > a { background: rgba(255,255,255,.14); color: #fff; }

.submenu {
  list-style: none; position: absolute; top: 100%; left: 0; min-width: 260px; padding: 10px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s var(--ease);
}
.menu__item:hover > .submenu,
.menu__item:focus-within > .submenu,
.menu__item.is-open > .submenu { opacity: 1; visibility: visible; transform: translateY(4px); }
.submenu a {
  display: block; padding: 9px 12px; border-radius: 8px;
  color: var(--c-ink); font-size: var(--fs-sm); text-decoration: none; line-height: 1.35;
}
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--c-tint); color: var(--c-navy); }
.submenu a[aria-current="page"] { font-weight: 700; }

.search-link { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; }
.search-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.search-link svg { width: 20px; height: 20px; fill: currentColor; }

.nav-toggle { display: none; }

/* ---------- Nawigacja mobilna ---------- */
@media (max-width: 1099px) {
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto; width: 48px; height: 48px;
    border: 0; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: .25s var(--ease);
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(380px, 88vw); z-index: 50;
    flex-direction: column; align-items: stretch; gap: 16px; margin: 0; padding: 88px 20px 32px;
    background: var(--c-navy-dark); overflow-y: auto;
    transform: translateX(100%); transition: transform .3s var(--ease); visibility: hidden;
  }
  .main-nav.is-open { transform: none; visibility: visible; box-shadow: -20px 0 60px rgba(0,0,0,.3); }
  .main-nav__cta { order: 2; align-self: flex-start; }
  .search-link { order: 3; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu__item > a { width: 100%; justify-content: space-between; padding: 14px 8px; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.12); border-radius: 0; }
  .menu__item.has-sub > a::after { transition: transform .2s; }
  .menu__item.is-open > a::after { transform: rotate(-135deg); margin-top: 3px; }
  .submenu {
    position: static; display: none; min-width: 0; padding: 6px 0 10px 12px;
    background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none;
  }
  .menu__item:hover > .submenu, .menu__item:focus-within > .submenu { transform: none; }
  .menu__item.is-open > .submenu { display: block; }
  .submenu a { color: rgba(255,255,255,.88); }
  .submenu a:hover, .submenu a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }

  .nav-toggle { position: relative; z-index: 60; }
  body.nav-open { overflow: hidden; }
  .topbar__name { font-size: .75rem; }
}

/* ---------- Stopka ---------- */
.site-footer { background: var(--c-navy); color: rgba(255,255,255,.9); font-size: var(--fs-sm); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; gap: 40px; padding-block: 64px 48px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.1fr 1fr 1fr; } }
.site-footer__title {
  font-family: var(--f-body); font-size: 1.0625rem; font-weight: 700; color: #fff; margin-bottom: 1.25rem;
  padding-bottom: .75rem; border-bottom: 2px solid rgba(255,255,255,.18);
}
.contact-list { list-style: none; display: grid; gap: .45rem; margin-bottom: 1.25rem; }
.social--footer a { width: 34px; height: 34px; border-radius: 50%; }
.social--footer svg { width: 17px; height: 17px; }

.site-footer__bottom { background: var(--c-navy-dark); font-size: var(--fs-xs); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-block: 18px; padding-bottom: 88px; }
.site-footer__bottom p { margin: 0; }
.legal-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (min-width: 900px) { .site-footer__bottom-inner { padding-bottom: 18px; } }

/* ---------- Mobilny pasek CTA ---------- */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px;
  background: rgba(255,255,255,.96); border-radius: 18px; box-shadow: var(--shadow-lg);
  transform: translateY(140%); transition: transform .3s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta .btn { min-height: 46px; }
@media (min-width: 900px) { .sticky-cta { display: none !important; } }

/* Przyciemnienie tła pod otwartym menu mobilnym */
@media (max-width: 1099px) {
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 39; background: rgba(13,26,46,.5);
    opacity: 0; visibility: hidden; transition: opacity .3s;
  }
  body.nav-open::after { opacity: 1; visibility: visible; }
}
