/* ============================================================
   MILONOR — Blog design system (shared by blog/index.html and
   blog/post.php). Same tokens as index.html / sklep/css/shop.css.
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: #2563EB;
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  font-size: 0.9rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}
.nav-link-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.nav-link-btn:hover {
  color: var(--accent, #2563EB);
}

:root {
  --bg:            #0A0B10;
  --bg-elev:       #10111A;
  --bg-elev-2:     #151620;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --fg:            #E8EAF0;
  --fg-muted:      #9499AB;
  --fg-dim:        #8B90A0;

  --accent:        #2563EB;
  --accent-2:      #1E3A8A;
  --accent-hi:     #60A5FA;
  --accent-rgb:    37, 99, 235;
  --accent-soft:   rgba(37, 99, 235, 0.12);
  --accent-glow:   rgba(37, 99, 235, 0.40);
  --accent-fg:     #FFFFFF;

  --grad-accent:   linear-gradient(120deg, #3B82F6 0%, #2563EB 100%);
  --grad-text:     linear-gradient(120deg, #FFFFFF 0%, #93C5FD 52%, #BFDBFE 100%);

  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     26px;

  --shadow-glow:   0 0 0 1px rgba(37, 99, 235,0.16), 0 18px 60px -20px rgba(37, 99, 235,0.40);

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --maxw:          1200px;
  --maxw-article:  780px;

  --font-body:     'Inter', system-ui, -apple-system, sans-serif;
  --font-display:  'Space Grotesk', system-ui, sans-serif;
  --font-mono:     ui-monospace, 'SFMono-Regular', 'JetBrains Mono', 'Menlo', monospace;

  --space-band:    clamp(64px, 8vw, 110px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-fg); }

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(620px 460px at 82% -6%, rgba(37, 99, 235,0.13), transparent 70%),
    radial-gradient(560px 500px at 6% 8%, rgba(30, 58, 138,0.10), transparent 72%);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; z-index: 1; }
.band { padding: var(--space-band) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-hi);
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::after { content: ""; width: 30px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.page-head { padding: 150px 0 20px; text-align: center; }
.page-head .wrap { max-width: 680px; }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin: 18px 0 14px; }
.page-head p { color: var(--fg-muted); font-size: 1.04rem; margin-top: 10px; }

/* ============================================================ Buttons ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.98rem;
  padding: 14px 24px; border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--grad-accent); color: var(--accent-fg); box-shadow: 0 12px 34px -12px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.btn-ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }

/* ============================================================ Navigation (identical to shop.css) ============================================================ */
header.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 18px 0; transition: padding 0.4s var(--ease); }
header.nav.scrolled { padding: 10px 0; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 62px; padding: 0 10px 0 22px;
  border: 1px solid var(--border); border-radius: 18px;
  background: rgba(14, 15, 23, 0.55);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 12px 36px -20px rgba(0,0,0,0.85);
  transition: background 0.35s ease, border-color 0.35s ease;
}
header.nav.scrolled .nav-inner { background: rgba(14, 15, 23, 0.78); border-color: var(--border-strong); }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
header.nav .logo img { height: 28px; width: auto; }
.logo .dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { position: relative; font-family: var(--font-display); font-size: 0.93rem; color: var(--fg-muted); padding: 9px 14px; border-radius: 10px; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--accent-hi); }
.nav-right { display: flex; align-items: center; gap: 10px; padding-left: 16px; }
.nav-right::before { content: ""; width: 1px; height: 26px; background: var(--border); flex-shrink: 0; }

.lang-flags { display: inline-flex; align-items: center; gap: 7px; }
.lang-flag { width: 30px; height: 21px; border-radius: 5px; overflow: hidden; padding: 0; border: 1px solid var(--border-strong); opacity: 0.4; display: block; line-height: 0; transition: opacity 0.25s ease; }
.lang-flag svg { width: 100%; height: 100%; display: block; }
.lang-flag.active { opacity: 1; border-color: transparent; box-shadow: 0 0 0 2px var(--accent); }

.account-menu { position: relative; }
.account-link { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--fg); transition: border-color 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.account-link:hover { border-color: var(--accent); color: var(--accent-hi); }
.account-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.account-link.logged-in { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25); }
.account-link.logged-in svg { color: var(--accent-hi); }
.account-name { font-family: var(--font-display); font-size: 0.85rem; font-weight: 500; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.account-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px; z-index: 200;
  background: rgba(16, 17, 26, 0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 8px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.account-dropdown a, .account-dropdown button {
  display: block; width: 100%; text-align: left; padding: 10px 20px; font-size: 0.9rem; color: var(--fg);
  font-family: var(--font-body); transition: background 0.15s ease;
}
.account-dropdown a:hover, .account-dropdown button:hover { background: rgba(37,99,235,0.08); }
@media (max-width: 480px) {
  .account-name { display: none !important; }
  .account-dropdown { right: -10px; min-width: 220px; }
}

.cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--fg); transition: border-color 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.cart-link:hover { border-color: var(--accent); color: var(--accent-hi); }
.cart-link svg { width: 19px; height: 19px; }
.cart-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--grad-accent); color: #fff; font-size: 0.66rem; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); }

.hamburger { display: none; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); flex-shrink: 0; }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--fg); margin: 3px auto; border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 88px 0 auto 0; z-index: 99;
  background: rgba(10, 11, 16,0.96); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 18px 24px 26px; display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 12px; font-size: 1.05rem; color: var(--fg); border-radius: 12px; }
.mobile-menu a.active { color: var(--accent-hi); }
.mobile-menu .btn { margin-top: 12px; }

/* ============================================================ Category filter pills ============================================================ */
.cat-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 46px; }
.cat-pill {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 500; padding: 9px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--fg-muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cat-pill:hover { color: var(--fg); border-color: var(--border-strong); }
.cat-pill.active { color: var(--accent-fg); background: var(--grad-accent); border-color: transparent; }

/* ============================================================ Article grid / cards ============================================================ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.45s var(--ease);
}
.blog-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-glow); }
.blog-card .bc-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: radial-gradient(120% 90% at 70% 8%, rgba(37,99,235,0.14), transparent 55%), linear-gradient(160deg, #13141f, #0a0b12);
  display: grid; place-items: center; color: var(--fg-dim);
}
.blog-card .bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .bc-thumb svg { width: 30px; height: 30px; opacity: 0.4; }
.blog-card .bc-cat {
  position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  background: rgba(10,11,16,0.7); backdrop-filter: blur(8px); border: 1px solid var(--border-strong); color: var(--accent-hi);
}
.blog-card .bc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card h3 { font-size: 1.12rem; line-height: 1.35; transition: color 0.2s ease; }
.blog-card:hover h3 { color: var(--accent-hi); }
.blog-card .bc-excerpt {
  color: var(--fg-muted); font-size: 0.92rem; line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card .bc-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--fg-dim); }
.blog-card .bc-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-dim); flex-shrink: 0; }

.load-more-wrap { text-align: center; margin-top: 44px; }
.blog-empty { text-align: center; padding: 60px 20px; color: var(--fg-muted); grid-column: 1 / -1; }

/* ============================================================ Single article ============================================================ */
.article { max-width: var(--maxw-article); margin: 0 auto; padding: 150px 24px 100px; }
.article-cover {
  width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(120% 90% at 70% 8%, rgba(37,99,235,0.14), transparent 55%), linear-gradient(160deg, #13141f, #0a0b12);
  border: 1px solid var(--border); margin-bottom: 28px;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-dim); }
.article-meta .cat-badge {
  font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb),0.3); color: var(--accent-hi);
}
.article-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-dim); flex-shrink: 0; }
.article h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: 32px; }

.article-body { color: var(--fg); font-size: 1.05rem; line-height: 1.75; }
.article-body h2 { font-size: 1.5rem; margin: 40px 0 16px; color: var(--accent-hi); }
.article-body h3 { font-size: 1.22rem; margin: 30px 0 12px; }
.article-body p { margin-bottom: 18px; color: var(--fg); }
.article-body a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--fg); }
.article-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 24px 0; }
.article-body blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; margin: 24px 0; color: var(--fg-muted); font-style: italic; font-size: 1.08rem; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 18px; }
.article-body li { margin-bottom: 8px; color: var(--fg); }
.article-body code { font-family: var(--font-mono); font-size: 0.88em; background: rgba(255,255,255,0.06); padding: 2px 7px; border-radius: 5px; }
.article-body strong { color: var(--fg); font-weight: 700; }
.article-body em { font-style: italic; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.article-tag {
  font-family: var(--font-mono); font-size: 0.76rem; padding: 6px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--fg-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.article-tag:hover { color: var(--accent-hi); border-color: var(--accent); }

.article-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); margin: 56px 0 44px; }

.article-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 28px 32px; border-radius: var(--radius); margin-top: 48px;
  background: radial-gradient(90% 140% at 100% 0%, rgba(37,99,235,0.14), transparent 55%), var(--bg-elev);
  border: 1px solid var(--border-strong);
}
.article-cta p { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }

.related-section { max-width: var(--maxw); margin: 0 auto; padding: 0 24px var(--space-band); }
.related-section h2 { font-size: 1.6rem; margin-bottom: 26px; text-align: center; }

/* ============================================================ Footer (identical to shop.css) ============================================================ */
footer.site { border-top: 1px solid var(--border); padding: 60px 0 32px; position: relative; z-index: 1; background: linear-gradient(180deg, transparent, rgba(37,99,235,0.04)); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo img { height: 28px; }
.footer-brand p { color: var(--fg-muted); font-size: 0.95rem; max-width: 320px; }
.footer-col h5 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 18px; }
.footer-col a, .footer-col span { display: block; color: var(--fg-muted); font-size: 0.95rem; padding: 6px 0; }
.footer-col a:hover { color: var(--accent-hi); }
.socials { display: flex; gap: 10px; margin-top: 8px; }
.socials a { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--fg-muted); }
.socials a:hover { color: var(--accent-hi); border-color: var(--accent); background: var(--accent-soft); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--border); color: var(--fg-dim); font-size: 0.86rem; font-family: var(--font-mono); }
.footer-bottom .fb-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ============================================================ Reveal on scroll ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-right { padding-left: 0; }
  .nav-right::before { display: none; }
  .nav-right .btn.desktop-cta { display: none; }
  .hamburger { display: block; }
  .page-head { padding: 130px 0 16px; }
  .article { padding-top: 130px; }
}
@media (max-width: 520px) {
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-cta { flex-direction: column; align-items: flex-start; }
}
