/* =====================================================================
   Parafia w sieci — style własne
   Większość wyglądu to klasy Tailwind w index.html. Tutaj są tylko
   komponenty powtarzalne, animacje i elementy, których Tailwind nie opisze.
   ===================================================================== */

:root {
  --blue: #0B57D0;
  --navy: #0A192F;
  --amber: #F59E0B;
  --amber-deep: #D97706;
  --text: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --header-h: 80px;
}

/* ---------- Podstawy ---------- */
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id] { scroll-margin-top: var(--header-h); }
img { max-width: 100%; }
body.menu-open { overflow: hidden; }

:focus-visible {
  outline: 3px solid rgba(11, 87, 208, 0.45);
  outline-offset: 3px;
  border-radius: 8px;
}
[tabindex="-1"]:focus { outline: none; }

/* ---------- Nawigacja (sticky) ---------- */
.site-header {
  transition: background-color .3s ease, box-shadow .3s ease, transform .35s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 32px -8px rgba(10,25,47,.10), 0 8px 16px -4px rgba(10,25,47,.05);
}
.site-header.is-hidden { transform: translateY(-100%); }

.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 0;
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover { color: var(--blue); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--blue); }

.mobile-menu { border-top: 1px solid var(--line); }
.mobile-menu:not([hidden]) { animation: menu-in .25s ease both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}
.mobile-link:hover, .mobile-link.is-active { background: rgba(11,87,208,.06); color: var(--blue); }

#menu-toggle[aria-expanded="true"] .icon-open { display: none; }
#menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Płynne przejścia między tłami sekcji ----------
   Każde zdjęcie tła łagodnie zanika u góry i u dołu do wspólnego koloru
   strony (#F8FAFC), więc granice między sekcjami są niewidoczne.
   --blend = wysokość strefy przejścia. */
.bg-blend {
  --blend: clamp(90px, 12vw, 200px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--blend), #000 calc(100% - var(--blend)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 var(--blend), #000 calc(100% - var(--blend)), transparent 100%);
}
/* Hero: zanikanie tylko u dołu (u góry jest menu) */
.bg-blend--bottom {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--blend)), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--blend)), transparent 100%);
}
/* Telefon w sekcji „Funkcje” rozpływa się razem z tłem zamiast być ucięty */
@media (min-width: 1024px) {
  .phone-fade {
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 360px), transparent calc(100% - 160px));
            mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 360px), transparent calc(100% - 160px));
  }
}

/* ---------- Dekoracyjne łuki (motyw z tła) ---------- */
.deco-arc--hero {
  position: absolute;
  left: -180px;
  bottom: -260px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 60% 40%, rgba(255,255,255,0) 52%, rgba(245,158,11,.18) 53%, rgba(245,158,11,0) 66%),
    radial-gradient(circle at 50% 50%, rgba(11,87,208,.16), rgba(11,87,208,0) 62%);
  filter: blur(2px);
  pointer-events: none;
}
.deco-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 0% 20%, rgba(11,87,208,.08), transparent 70%),
    radial-gradient(600px 400px at 100% 0%, rgba(245,158,11,.10), transparent 70%);
}

/* ---------- Karty funkcji ---------- */
.feature-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 84px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 8px -2px rgba(10,25,47,.04), 0 8px 16px -4px rgba(10,25,47,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(11,87,208,.12), 0 4px 12px -2px rgba(10,25,47,.05);
}
.feature-title {
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  color: var(--navy);
}

/* ---------- Sekcja „Opieka” — grafika laptopa z nałożonymi ikonami ----------
   .care-canvas zachowuje proporcje zdjęcia (1672×941), więc ikony ustawione
   w procentach zawsze trafiają w to samo miejsce na laptopie. */
.care-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.care-canvas {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  aspect-ratio: 1672 / 941;
}
.care-fade { display: none; }

@media (min-width: 1024px) {
  .care-art {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    container-type: size;
    z-index: -1;
  }
  .care-canvas {
    top: 50%;
    height: auto;
    width: max(100cqw, 177.7cqh);
    transform: translateY(-50%);
  }
  .care-fade {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(250,250,251,.94) 0%, rgba(250,250,251,.78) 30%, rgba(250,250,251,0) 52%);
  }
}

.care-logo {
  position: absolute;
  left: 57.5%;
  top: 56%;
  width: 6.2%;
  transform: translate(-50%, -50%) rotate(-3deg);
  filter: drop-shadow(0 0 12px rgba(255,255,255,.6));
}
.care-ring {
  position: absolute;
  left: 75.6%;
  top: 48%;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.75);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 40px rgba(255,210,150,.25) inset;
}
.care-ring--outer {
  width: 42%;
  border-color: rgba(255,255,255,.35);
  box-shadow: none;
}
.care-shield {
  position: absolute;
  left: 75.6%;
  top: 48%;
  width: 11%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 18px rgba(255,190,90,.95)) drop-shadow(0 0 40px rgba(255,170,60,.55));
}
.care-shield svg { display: block; width: 100%; height: auto; }
.care-bubble {
  position: absolute;
  width: 4.4%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 22px rgba(255,200,120,.45);
  transform: translate(-50%, -50%);
}
.care-bubble svg { width: 52%; height: 52%; filter: drop-shadow(0 0 4px rgba(255,180,80,.8)); }

@media (prefers-reduced-motion: no-preference) {
  .care-shield { animation: glow 4s ease-in-out infinite; }
}
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(255,190,90,.95)) drop-shadow(0 0 40px rgba(255,170,60,.55)); }
  50%      { filter: drop-shadow(0 0 24px rgba(255,200,110,1)) drop-shadow(0 0 60px rgba(255,170,60,.7)); }
}

.care-item {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.care-item-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px -4px rgba(10,25,47,.12);
}
.care-item-icon svg { width: 22px; height: 22px; }

/* ---------- Oś współpracy (5 kroków) ---------- */
.step {
  position: relative;
  display: flex;
  gap: 20px;
}
.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.step-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(255,255,255,.7);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px -6px rgba(10,25,47,.18);
}
.step-icon svg { width: 26px; height: 26px; }
.step-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.step-text { margin-top: 6px; font-size: 14px; line-height: 21px; color: var(--muted); }

/* Łącznik mobilny (pionowy) */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 118px;
  bottom: -32px;
  width: 1px;
  background: rgba(10,25,47,.22);
}
@media (min-width: 1024px) {
  .step { display: block; }
  .step-marker { align-items: flex-start; margin-bottom: 18px; }
  .step-badge { margin-left: 12px; }
  /* Łącznik poziomy między ikonami */
  .step:not(:last-child)::after {
    left: 80px;
    right: -8px;
    top: 77px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
}

/* ---------- Formularz ---------- */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.form-field {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #fff;
  color: var(--navy);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,87,208,.15);
}
.form-field.is-invalid { border-color: #DC2626; }

/* ---------- Animacje Fade-In (Intersection Observer) ----------
   Ukrywamy elementy tylko gdy działa JavaScript (klasa .js na <html>). */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Baner cookies (pliki: js/cookies.js) ---------- */
.cc-banner {
  position: fixed;
  z-index: 90;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 560px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -10px rgba(10,25,47,.25);
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  animation: cc-in .35s ease both;
}
@media (min-width: 640px) { .cc-banner { left: 24px; bottom: 24px; } }
@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cc-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.cc-banner a, .cc-modal a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cc-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  color: var(--navy);
  background: #fff;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.cc-btn:hover { border-color: var(--blue); color: var(--blue); }
.cc-btn--primary { background: linear-gradient(135deg, var(--amber), var(--amber-deep)); border-color: transparent; color: #fff; }
.cc-btn--primary:hover { color: #fff; border-color: transparent; filter: brightness(1.05); }

.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10,25,47,.45);
  animation: cc-fade .2s ease both;
}
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
.cc-modal {
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  box-shadow: 0 30px 60px -12px rgba(10,25,47,.35);
}
.cc-category { border-top: 1px solid var(--line); padding: 16px 0; }
.cc-category-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-category-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.cc-details { margin-top: 8px; }
.cc-details summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 13px; }
.cc-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12.5px; }
.cc-table th, .cc-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #F1F5F9; vertical-align: top; }
.cc-table th { color: var(--navy); font-weight: 600; }

/* Przełącznik */
.cc-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.cc-switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.cc-switch span {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: #CBD5E1;
  transition: background-color .2s ease;
  pointer-events: none;
}
.cc-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.cc-switch input:checked + span { background: var(--blue); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:disabled + span { opacity: .6; }
.cc-switch input:focus-visible + span { outline: 3px solid rgba(11,87,208,.45); outline-offset: 2px; }
