/* ============================================================
   ANLUTON — Legal pages shared stylesheet
   Used by: privacy.html, cookies.html, regulamin.html,
            careers.html (header only)
   MAJ-23 (2026-06-02): removed zgloszenie-naruszenia.html (page deleted MAJ-13)
   ============================================================ */

:root {
  --royal: #1A38D4;
  --navy: #0C1FA8;
  --cobalt: #3B6BFF;
  --light-blue: #7E9DFF;
  --bg-0: #1A1F3A;
  --bg-1: #232944;
  --bg-2: #2C334F;
  --bg-3: #353C5A;
  --line: rgba(59, 107, 255, 0.18);
  --line-strong: rgba(59, 107, 255, 0.45);
  --text-1: #FFFFFF;
  --text-2: #B8C0D9;
  --text-3: #6B7299;
  --green: #2EE6A8;
  --amber: #FFB547;
  --red: #FF6B6B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.6;
  font-size: 13.5px;       /* legal-document compact */
  overflow-x: hidden;
}
a { color: var(--light-blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: white; }

.bg-effects { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-grid {
  position: absolute; inset: 0;
  /* MAJ-19 (2026-06-01): фон с пузырьками вместо сетки (тема клининга) */
  background-image:
    radial-gradient(circle 92px at 15% 26%, transparent 88px, rgba(174,196,255,0.13) 90px, transparent 93px),
    radial-gradient(circle 60px at 75% 16%, transparent 56px, rgba(126,157,255,0.13) 58px, transparent 61px),
    radial-gradient(circle 120px at 87% 63%, transparent 114px, rgba(126,157,255,0.10) 116px, transparent 120px),
    radial-gradient(circle 46px at 31% 73%, transparent 42px, rgba(174,196,255,0.12) 44px, transparent 47px),
    radial-gradient(circle 74px at 53% 47%, transparent 69px, rgba(126,157,255,0.09) 71px, transparent 75px),
    radial-gradient(circle 36px at 8% 66%, transparent 32px, rgba(126,157,255,0.11) 34px, transparent 37px),
    radial-gradient(circle 52px at 64% 87%, transparent 48px, rgba(126,157,255,0.10) 50px, transparent 53px),
    radial-gradient(circle 28px at 43% 13%, transparent 24px, rgba(174,196,255,0.11) 26px, transparent 29px),
    radial-gradient(circle 22px at 92% 30%, transparent 18px, rgba(174,196,255,0.12) 20px, transparent 23px),
    radial-gradient(circle 16px at 24% 50%, transparent 12px, rgba(174,196,255,0.13) 14px, transparent 17px),
    radial-gradient(circle 200px at 78% 90%, rgba(59,107,255,0.05), transparent 70%),
    radial-gradient(circle 240px at 12% 8%, rgba(26,56,212,0.06), transparent 72%);
  background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(ellipse at center, black 58%, transparent 98%);
  mask-image: radial-gradient(ellipse at center, black 58%, transparent 98%);
}
.bg-glow-1, .bg-glow-2 { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; }
.bg-glow-1 { top: -200px; left: -200px; width: 600px; height: 600px; background: rgba(26, 56, 212, 0.30); }
.bg-glow-2 { bottom: -200px; right: -200px; width: 500px; height: 500px; background: rgba(59, 107, 255, 0.25); }

.container { max-width: 880px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ----------  NAV  ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(26, 31, 58, 0.82);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  overflow-x: clip; /* Safari iOS: prevent fixed-positioned children from escaping viewport */
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 32px;
  display: flex; align-items: center; justify-content: flex-start; gap: 24px;
}
.nav-inner .lang-switch { margin-left: auto; }
.nav-brand { display: flex; align-items: center; gap: 16px; }
.brand-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--royal), var(--cobalt));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 36px; color: white;
  box-shadow: 0 0 24px rgba(26, 56, 212, 0.4);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: 0.5px; color: white; }
.brand-text small { font-size: 11px; color: var(--text-3); letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }

/* Back link — supports both .nav-back and .back-link
   Defensive guards (MAJ-03, 2026-05-23): white-space nowrap + flex-shrink:0
   prevent label wrap or compression when narrow viewports + long brand block
   push the topbar layout. max-width + ellipsis are belt-and-suspenders for
   future label-length regressions; with current "← Powrót"/"← Back"/"← Назад"
   short labels they never engage, but if a future translation grows beyond
   the nav budget the button degrades gracefully instead of breaking layout. */
.nav-back, .back-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 50vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-back:hover, .back-link:hover { background: var(--bg-2); color: white; border-color: var(--line-strong); }

.lang-switch { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 8px; }
.lang-btn { padding: 6px 10px; background: transparent; border: none; color: var(--text-3); font-size: 11px; font-weight: 600; border-radius: 5px; transition: all 0.15s; cursor: pointer; }
.lang-btn:hover { color: white; }
.lang-btn.active { background: var(--royal); color: white; }

/* ----------  MAIN CONTENT  ---------- */
/* Nav height ~= 72(logo) + 24(padding) + 1(border) ≈ 97px.
   120px top padding gives ~23px breathing room above content. */
.content,
.legal-container {
  padding: 120px 0 50px;
}
.legal-container {
  max-width: 880px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  position: relative;
  z-index: 1;
}

/* Doc-meta chip (small chip above h1) — supports both .doc-meta and .legal-meta */
.doc-meta,
.legal-meta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 10px; font-weight: 600; color: var(--text-2);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 22px;
}
.meta-tag { font-weight: 700; color: var(--text-1); }
.meta-date { font-weight: 500; color: var(--text-3); letter-spacing: 0.5px; text-transform: none; }
.meta-date::before { content: "·"; margin-right: 8px; color: var(--text-3); }

/* Headings + body — apply to both .content and .legal-container */
.content h1,
.legal-container h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px; font-weight: 700;
  letter-spacing: -0.5px; line-height: 1.18;
  margin-bottom: 10px; color: white;
}
.content .lead,
.legal-container .lead {
  font-size: 14.5px; color: var(--text-2);
  margin-bottom: 36px; max-width: 720px;
  line-height: 1.65;
}
.content h2,
.legal-container h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px; font-weight: 600;
  margin: 32px 0 12px; color: white;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.content h2:first-of-type,
.legal-container h2:first-of-type { border-top: none; padding-top: 0; }
.content h3,
.legal-container h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px; font-weight: 600;
  margin: 22px 0 8px; color: var(--light-blue);
}
.content p,
.legal-container p { margin-bottom: 12px; color: var(--text-2); }
.content ul, .content ol,
.legal-container ul, .legal-container ol { margin: 10px 0 16px 22px; color: var(--text-2); }
.content li,
.legal-container li { margin-bottom: 6px; }
.content strong,
.legal-container strong { color: white; font-weight: 600; }

/* Info card (administrator panel, etc.) */
.info-card {
  background: linear-gradient(135deg, rgba(26, 56, 212, 0.08), rgba(59, 107, 255, 0.04));
  border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt);
  padding: 16px 20px; border-radius: 8px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.65;
}
.info-card strong { color: white; }

/* Notice / warning block */
.notice {
  background: rgba(255, 181, 71, 0.06);
  border: 1px solid rgba(255, 181, 71, 0.25);
  border-left: 3px solid var(--amber);
  padding: 14px 18px; border-radius: 8px;
  margin: 20px 0;
  font-size: 12.5px;
  color: var(--text-2);
}

/* Footer */
.legal-footer {
  margin-top: 36px;
  padding: 18px 0 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.7;
}
.legal-footer a { color: var(--text-2); }
.legal-footer .legal-links { margin-top: 8px; }
.legal-footer .legal-links a { margin: 0 8px; }

/* ----------  MOBILE  ---------- */
@media (max-width: 640px) {
  .container, .nav-inner, .legal-container { padding-left: 20px; padding-right: 20px; }
  .content, .legal-container { padding-top: 130px; padding-bottom: 60px; }
  .content h1, .legal-container h1 { font-size: 24px; }
  .content h2, .legal-container h2 { font-size: 17px; }
  .content h3, .legal-container h3 { font-size: 13.5px; }
  .nav-inner { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand-logo { width: 60px; height: 60px; font-size: 30px; border-radius: 14px; }
  .brand-text small { display: none; }
  .nav-back, .back-link { padding: 6px 12px; font-size: 12px; }
}

/* MAJ-04 (2026-05-31, bug #1, revised): icon-only fallback on narrow viewports.
   Widened from ≤430 to ≤640px because iPhone 15/16 Pro Max reports 430–440
   CSS px in Safari (the strict 430 cap was evading the rule). The legal/career
   pages have a wide brand block (72px logo + 24px text + lang switch) which
   leaves no room for "← Powrót" anywhere below desktop. Collapsing the label
   to a chevron is the safe degrade. */
@media (max-width: 640px) {
  .nav-back, .back-link {
    font-size: 0 !important;
    line-height: 0 !important;
    padding: 8px 11px !important;
    max-width: none !important;
    min-width: 36px;
  }
  .nav-back::before, .back-link::before {
    content: '\2190';        /* ← */
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
  }
}

/* MAJ-04 (2026-05-31, bug #5): hide back-button in print/PDF.
   When the user uses print-to-PDF on legal/careers pages, the nav back-link
   was being rendered into the PDF. Hide it (and the whole .nav strip would
   ideally also be hidden, but legal pages may want the brand header in the
   doc — minimal-scope: only the back control). */
@media print {
  .nav-back, .back-link { display: none !important; }
}

/* When logo PNG is used instead of CSS letter "A" */
.brand-logo.has-img {
  background: none !important;
  box-shadow: none !important;
}
.brand-logo.has-img::before { display: none !important; }
.brand-logo.has-img img {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
