/* ProtoHUB 4.0 — style motywu
   Kolory, kroje i odstępy globalne siedzą w theme.json.
   Tutaj są style sekcji, których nie da się wyrazić przez theme.json. */

/* ---------- podstawy ---------- */
body { -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--wp--preset--color--cyjan); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

.ph-skip { position: absolute; left: -9999px; top: 0; background: var(--wp--preset--color--granat); color: #fff; padding: 12px 20px; z-index: 100; text-decoration: none; }
.ph-skip:focus { left: 8px; top: 8px; }

/* ---------- pasek nad nagłówkiem ---------- */
.ph-top { background: var(--wp--preset--color--granat); color: #A9BED4; font-size: .86rem; padding: 8px 0; }
.ph-top p { margin: 0; }

/* ---------- nagłówek ---------- */
.ph-pasek { border-bottom: 1px solid var(--wp--preset--color--linia); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.ph-marka { font-family: var(--wp--preset--font-family--naglowek); font-size: 1.6rem; font-weight: 700; line-height: 1.1; text-decoration: none; color: var(--wp--preset--color--granat); }
.ph-marka a { color: var(--wp--preset--color--granat); text-decoration: none; }
.ph-marka strong, .ph-marka a strong { color: var(--wp--preset--color--blekit); }
.ph-marka span { display: block; font-family: var(--wp--preset--font-family--tekst); font-size: .72rem; font-weight: 500; color: var(--wp--preset--color--stal); }
.ph-menu a { text-decoration: none; font-size: .97rem; font-weight: 500; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.ph-menu a:hover, .ph-menu .current-menu-item a { border-bottom-color: var(--wp--preset--color--cyjan); }

/* ---------- hero ---------- */
.ph-hero { position: relative; overflow: hidden; }
.ph-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 56px 56px; }
.ph-hero > * { position: relative; }
.ph-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.ph-nadtytul { font-family: var(--wp--preset--font-family--naglowek); font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 500; color: var(--wp--preset--color--cyjan); margin-bottom: .4rem; }
.ph-ramka { position: relative; aspect-ratio: 4 / 3; background: #0D2942; border: 1px solid rgba(255,255,255,.18); overflow: hidden; }
.ph-ramka img { width: 100%; height: 100%; object-fit: cover; }
.ph-ramka::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(0,179,212,.45);
  clip-path: polygon(0 0,58px 0,58px 1px,1px 1px,1px 58px,0 58px,0 100%,58px 100%,58px calc(100% - 1px),1px calc(100% - 1px),1px calc(100% - 58px),0 calc(100% - 58px)); }

/* ---------- pasek liczb ---------- */
.ph-liczby { background: var(--wp--preset--color--blekit); color: #fff; }
.ph-liczby .wp-block-column { padding: 38px 28px; border-left: 1px solid rgba(255,255,255,.22); }
.ph-liczby .wp-block-column:first-child { border-left: 0; padding-left: 0; }
.ph-liczba { font-family: var(--wp--preset--font-family--naglowek); font-size: 2.5rem; font-weight: 600; line-height: 1; margin: 0 0 8px; }
.ph-liczby p:last-child { font-size: .93rem; color: #D3E4F9; margin: 0; line-height: 1.45; }
@media (max-width: 860px) { .ph-liczby .wp-block-column { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); padding: 26px 0; } }

/* ---------- nagłówki sekcji ---------- */
.wp-block-separator.ph-kreska { width: 56px; max-width: 56px; height: 3px; border: 0; opacity: 1; background: var(--wp--preset--color--cyjan); margin: 0 0 22px 0 !important; }

/* ---------- filary ---------- */
.ph-filary { border: 1px solid var(--wp--preset--color--linia); background: var(--wp--preset--color--linia); display: grid; gap: 1px; }
.ph-filar { background: #fff; padding: 24px 26px; }
.ph-filar h3 { font-size: 1.18rem; margin: 0 0 6px; }
.ph-filar p { margin: 0; font-size: .97rem; color: #3B4F64; }

/* ---------- kafelki ---------- */
.ph-kafel { border: 1px solid var(--wp--preset--color--linia); border-top: 3px solid var(--wp--preset--color--blekit); padding: 26px 24px; background: #fff; height: 100%; }
.ph-kafel h3 { font-size: 1.2rem; margin: 0 0 8px; }
.ph-kafel p { margin: 0; font-size: .97rem; color: #3B4F64; }
.ph-kafel--cyjan { border-top-color: var(--wp--preset--color--cyjan); padding: 22px; }
.ph-kafel--cyjan h3 { font-size: 1.08rem; }
.ph-kafel--cyjan p { font-size: .92rem; }

/* ---------- proces ---------- */
.ph-proces { background: var(--wp--preset--color--granat-gleb); color: #fff; }
.ph-krok { border-top: 2px solid rgba(255,255,255,.2); padding: 28px 18px 0 0; position: relative; height: 100%; }
.ph-krok::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; background: var(--wp--preset--color--cyjan); border-radius: 50%; }
.ph-krok .ph-numer { font-family: var(--wp--preset--font-family--naglowek); font-size: .95rem; color: var(--wp--preset--color--cyjan); margin: 0 0 8px; letter-spacing: .04em; }
.ph-krok h3 { font-size: 1.1rem; margin: 0 0 8px; color: #fff; }
.ph-krok p { font-size: .93rem; color: #B7CADC; margin: 0; }

/* ---------- korzyści ---------- */
.ph-korzysc { border-bottom: 1px solid var(--wp--preset--color--linia); padding: 22px 0; }
.ph-korzysc h3 { font-size: 1.1rem; margin: 0 0 4px; }
.ph-korzysc p { margin: 0; font-size: .96rem; color: #3B4F64; }

/* ---------- galeria ---------- */
.ph-galeria img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

/* ---------- FAQ ---------- */
.ph-faq .wp-block-details { border-bottom: 1px solid var(--wp--preset--color--linia); padding: 0; }
.ph-faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-family: var(--wp--preset--font-family--naglowek); font-size: 1.25rem; font-weight: 600; position: relative; list-style: none; }
.ph-faq summary::-webkit-details-marker { display: none; }
.ph-faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; color: var(--wp--preset--color--blekit); }
.ph-faq .wp-block-details[open] summary::after { content: "\2013"; }
.ph-faq .wp-block-details > *:not(summary) { padding-bottom: 8px; color: #3B4F64; max-width: 72ch; }

/* ---------- logotypy unijne ---------- */
.ph-logotypy { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.ph-logotypy img { max-height: 74px; width: auto; }

/* ---------- formularz ---------- */
.ph-form { background: #fff; padding: 34px; color: var(--wp--preset--color--granat); }
.ph-form label { font-size: .9rem; font-weight: 600; display: block; margin-bottom: 6px; }
.ph-form input, .ph-form select, .ph-form textarea { font-family: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #B9C6D5; border-radius: 2px; width: 100%; }
.ph-form textarea { min-height: 130px; }
.ph-form .ff-btn-submit, .ph-form input[type="submit"] { background: var(--wp--preset--color--blekit); color: #fff; border: 2px solid var(--wp--preset--color--blekit); padding: 14px 26px; font-weight: 600; border-radius: 2px; cursor: pointer; width: 100%; }
.ph-rodo { font-size: .82rem; color: var(--wp--preset--color--stal); border-left: 3px solid var(--wp--preset--color--linia); padding-left: 14px; }

/* ---------- stopka ---------- */
.ph-stopka { background: var(--wp--preset--color--granat-gleb); color: #93AAC2; font-size: .92rem; }
.ph-stopka h3 { color: #fff; font-size: 1.1rem; }
.ph-stopka a { color: #93AAC2; text-decoration: none; }
.ph-stopka a:hover { color: #fff; text-decoration: underline; }
.ph-nota { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; font-size: .84rem; }

/* ---------- przyciski ---------- */
.wp-block-button__link { border-radius: 2px; font-weight: 600; padding: 14px 26px; }
.is-style-outline > .wp-block-button__link { border-width: 2px; }

/* ---------- wyrównanie wysokości elementów w wierszu kolumn ---------- */
.wp-block-column:has(> .ph-korzysc),
.wp-block-column:has(> .ph-kafel),
.wp-block-column:has(> .ph-krok) { display: flex; flex-direction: column; }
.ph-korzysc, .ph-kafel, .ph-krok { flex: 1; }

/* ---------- ikony w kafelkach ---------- */
.ph-ikona { width: 34px; height: 34px; display: block; margin-bottom: 14px; color: var(--wp--preset--color--blekit); }
.ph-kafel--cyjan .ph-ikona { color: var(--wp--preset--color--cyjan); }
.ph-kafel .wp-block-html { line-height: 0; }

/* ---------- film z zasłoną ---------- */
.ph-film { position: relative; aspect-ratio: 16 / 9; background: #0D2942; border: 1px solid rgba(255,255,255,.18); overflow: hidden; }
.ph-film::after { content: ""; position: absolute; inset: 14px; pointer-events: none; border: 1px solid rgba(0,179,212,.45);
  clip-path: polygon(0 0,58px 0,58px 1px,1px 1px,1px 58px,0 58px,0 100%,58px 100%,58px calc(100% - 1px),1px calc(100% - 1px),1px calc(100% - 58px),0 calc(100% - 58px)); }
.ph-film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ph-film__start { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: none; border: 0; cursor: pointer; color: #fff; font-family: inherit; font-size: 1rem; font-weight: 600; padding: 20px; }
.ph-film__krag { width: 78px; height: 78px; border-radius: 50%; background: var(--wp--preset--color--blekit); color: #fff; display: grid; place-items: center; transition: background .15s ease, transform .15s ease; }
.ph-film__krag svg { width: 34px; height: 34px; margin-left: 4px; }
.ph-film__start:hover .ph-film__krag, .ph-film__start:focus-visible .ph-film__krag { background: var(--wp--preset--color--cyjan); transform: scale(1.06); }
.ph-film__etykieta { max-width: 32ch; text-align: center; }
.ph-film__nota { font-size: .82rem; color: #93AAC2; margin-top: 14px; max-width: 70ch; }
@media (prefers-reduced-motion: reduce) { .ph-film__krag { transition: none; } .ph-film__start:hover .ph-film__krag { transform: none; } }

/* ---------- odsłanianie przy przewijaniu ---------- */
.ph-js .ph-odslon { opacity: 0; transform: translateY(14px); }
.ph-js .ph-odslon.ph-widoczny {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease var(--ph-zwloka, 0ms), transform .5s cubic-bezier(.22,.61,.36,1) var(--ph-zwloka, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .ph-js .ph-odslon { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- reakcja kafelków na wskaźnik ---------- */
.ph-kafel { transition: border-top-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.ph-kafel:hover { border-top-color: var(--wp--preset--color--cyjan); box-shadow: 0 10px 28px rgba(10,30,51,.09); transform: translateY(-3px); }
.ph-kafel--cyjan:hover { border-top-color: var(--wp--preset--color--blekit); }
.ph-kafel:hover .ph-ikona { color: var(--wp--preset--color--cyjan); }
.ph-kafel--cyjan:hover .ph-ikona { color: var(--wp--preset--color--blekit); }
@media (prefers-reduced-motion: reduce) { .ph-kafel, .ph-kafel:hover { transition: none; transform: none; } }

/* ---------- korekty dla telefonów ---------- */
@media (max-width: 782px) {
  .ph-top { font-size: .74rem; line-height: 1.4; padding: 6px 0; }
  .ph-top .wp-block-group { gap: 2px 16px; }

  /* logo i przycisk menu zostają w jednym rzędzie */
  .ph-pasek > .wp-block-group > .wp-block-group { flex-wrap: nowrap; gap: 12px; align-items: center; }
  .ph-pasek .wp-block-image, .ph-pasek figure { margin: 0; }
  .ph-pasek img, .ph-marka img, .wp-block-site-logo img { max-width: 185px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
  .ph-marka { font-size: 1.25rem; }
  .ph-pasek .wp-block-button__link { padding: 9px 14px; font-size: .84rem; white-space: nowrap; }

  .ph-hero { padding-top: 52px !important; padding-bottom: 52px !important; }
  .ph-hero h1 { font-size: clamp(2rem, 8.5vw, 2.7rem); }
  .ph-nadtytul { font-size: 1.05rem; }
  .ph-liczba { font-size: 2rem; }
  .ph-film__krag { width: 60px; height: 60px; }
  .ph-film__krag svg { width: 26px; height: 26px; }
}

/* ---------- logo w nagłówku ---------- */
.ph-pasek img, .ph-marka img, .wp-block-site-logo img { max-width: 260px; height: auto; }

/* ---------- blok logotypu witryny w nagłówku ---------- */
.ph-logo { line-height: 1; }
.ph-logo .wp-block-site-logo { margin: 0; }
.ph-logo__podpis { font-size: .72rem; font-weight: 500; color: var(--wp--preset--color--stal); margin: 4px 0 0; }
@media (max-width: 782px) { .ph-logo__podpis { display: none; } }

/* ---------- nagłówek na telefonach: jeden rząd ---------- */
@media (max-width: 782px) {
  .ph-pasek .wp-block-group.is-layout-flex { flex-wrap: nowrap !important; gap: 10px; }
  .ph-pasek .wp-block-site-logo,
  .ph-pasek .wp-block-site-logo img { max-width: 150px !important; width: auto !important; height: auto !important; }
  .ph-pasek .wp-block-navigation { margin-left: auto; }
}
@media (max-width: 600px) {
  .ph-pasek .wp-block-buttons { display: none; }
}

/* ---------- sekcja newslettera ---------- */
.ph-newsletter__pole { background: #fff; color: var(--wp--preset--color--granat); padding: 26px; }
.ph-newsletter__pole input[type="email"], .ph-newsletter__pole input[type="text"] { font-family: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #B9C6D5; border-radius: 2px; width: 100%; }
.ph-newsletter__pole input[type="submit"], .ph-newsletter__pole button[type="submit"] { background: var(--wp--preset--color--granat); color: #fff; border: 0; border-radius: 2px; padding: 13px 24px; font-weight: 600; font-family: inherit; cursor: pointer; }
.ph-newsletter__pole label { font-size: .9rem; }
.ph-newsletter__nota { color: var(--wp--preset--color--stal); border-left: 3px solid var(--wp--preset--color--linia); padding-left: 14px; margin-top: 16px; }

/* ---------- naprawa nakładki menu na telefonach ----------
   backdrop-filter na pasku tworzy układ odniesienia dla elementów
   pozycjonowanych na stałe, przez co rozwinięte menu było przycinane
   do wysokości nagłówka. Na wąskich ekranach rezygnujemy z rozmycia. */
@media (max-width: 782px) {
  .ph-pasek { backdrop-filter: none; background: #fff; }

  .ph-pasek .wp-block-navigation__responsive-container.is-menu-open { flex-wrap: wrap !important; }
  .ph-pasek .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
  .ph-pasek .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    width: 100%;
    gap: 18px;
    overflow: visible !important;
  }
  .ph-pasek .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
  .ph-pasek .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.15rem; }
}
