/* Szablon devpage „Neon” – ciemna czołówka z mozaiką kafli i jasna część z listą wpisów, w stylu Foxiz PC News (home 4).
   Własny kod, czcionki systemowe (bez Google Fonts – RODO). Przebudowa pod inną domenę: w polu „własny CSS” domeny nadpisz tokeny,
   np. <style>:root{--accent:#2563eb;--glow:#7c3aed}</style>. Logo stoi na ciemnym tle i jest rozjaśniane (--logo-filter; jasne logo: none). */
:root {
  --accent: #e8114a;      /* róż wzoru #ff184e przyciemniony: z białym tekstem i na bieli 4,6:1 */
  --glow: #7c3aed;        /* fiolet poświaty w nagłówku */
  --night: #0b0f19;
  --night-2: #141a2a;
  --ink: #282828;
  --muted: #5f5f5f;
  --line: #ececec;
  --soft: #f5f6f8;
  --bg: #fff;
  --wrap: 1272px;
  --r: 8px;
  --sec-pad: 40px;
  --gap: 24px;
  --side: 300px;
  --logo-filter: brightness(0) invert(1);
  --head: Syne, "Segoe UI", "Trebuchet MS", Roboto, Arial, sans-serif;
  --body: Cabin, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* kolory etykiet działów – po kolei */
  --c1: #e8114a; --c2: #c2410c; --c3: #1d4ed8; --c4: #15803d; --c5: #7c3aed;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--head); font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -.01em; }
.nx-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.nx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nx-pill { display: inline-block; padding: 3px 8px; border-radius: 4px; background: var(--c1); color: #fff; font: 700 10px/1.4 var(--body); text-transform: uppercase; letter-spacing: .05em; }
a.nx-pill:hover { color: #fff; }
:is(.nx-mosaic, .nx-sec__grid) > :nth-child(5n+2) .nx-pill { background: var(--c2); }
:is(.nx-mosaic, .nx-sec__grid) > :nth-child(5n+3) .nx-pill { background: var(--c3); }
:is(.nx-mosaic, .nx-sec__grid) > :nth-child(5n+4) .nx-pill { background: var(--c4); }
:is(.nx-mosaic, .nx-sec__grid) > :nth-child(5n+5) .nx-pill { background: var(--c5); }
.nx-meta { display: block; font: 600 12px/1.4 var(--body); color: var(--muted); margin-top: 8px; }
.nx-img { display: block; overflow: hidden; border-radius: var(--r); background: var(--soft); position: relative; }
.nx-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.nx-img .nx-pill { position: absolute; left: 10px; bottom: 10px; }
a:hover .nx-img img, .nx-img:hover img { transform: scale(1.04); }
.nx-banner { max-width: var(--wrap); margin: 20px auto; padding: 0 16px; text-align: center; }
.nx-banner:empty, .nx-banner:not(:has(*)) { display: none; }
.nx-banner img { margin: 0 auto; }

/* Nagłówek: ciemny, z poświatą i dużym logo na środku */
.nx-top { background: radial-gradient(60% 140% at 50% 120%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%), radial-gradient(40% 120% at 70% 100%, color-mix(in srgb, var(--glow) 60%, transparent), transparent 70%), var(--night); }
.nx-top .nx-wrap { display: flex; justify-content: center; align-items: center; min-height: 110px; }
.nx-logo img { max-height: 56px; width: auto; filter: var(--logo-filter); }
.nx-head { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); }
.nx-head .nx-wrap { display: flex; align-items: center; justify-content: center; min-height: 50px; }
.nx-nav ul { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.nx-nav li a { display: block; padding: 8px 12px; font: 700 13px/20px var(--head); color: #fff; white-space: nowrap; }
.nx-nav li a:hover, .nx-nav li:has(> a[href="/"]) a { color: #ff6b8e; }
.nx-burger { display: none; }
.nx-burger-btn { display: none; cursor: pointer; font: 700 14px/1 var(--head); color: #fff; padding: 12px 0; min-height: 44px; }

/* Strona główna: ciemne pasmo z mozaiką 7 kafli */
.nx-dark { background: var(--night); padding: 22px 0 36px; }
.nx-mosaic { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(6, 78px); gap: 8px; }
.nx-ov { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--night-2); color: #fff; }
.nx-ov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.nx-ov:hover img { transform: scale(1.05); }
.nx-ov::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,15,25,.95) 0%, rgba(11,15,25,.45) 50%, rgba(11,15,25,0) 80%); }
.nx-ov__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; z-index: 1; }
.nx-ov h2, .nx-ov h3 { color: #fff; font-size: 16px; line-height: 1.25; margin-top: 8px; }
.nx-ov .nx-meta { color: rgba(255,255,255,.75); }
.nx-ov:hover, .nx-ov:hover h2, .nx-ov:hover h3 { color: #fff; }
/* kolejność w kodzie: 1 środek góra (główny), 2 lewa góra, 3 prawa góra, 4 środek dół, 5 lewa dół, 6–7 prawa */
.nx-mosaic > :nth-child(1) { grid-column: 2; grid-row: 1 / span 3; }
.nx-mosaic > :nth-child(2) { grid-column: 1; grid-row: 1 / span 4; }
.nx-mosaic > :nth-child(3) { grid-column: 3; grid-row: 1 / span 2; }
.nx-mosaic > :nth-child(4) { grid-column: 2; grid-row: 4 / span 3; }
.nx-mosaic > :nth-child(5) { grid-column: 1; grid-row: 5 / span 2; }
.nx-mosaic > :nth-child(6) { grid-column: 3; grid-row: 3 / span 2; }
.nx-mosaic > :nth-child(7) { grid-column: 3; grid-row: 5 / span 2; }
.nx-mosaic > :nth-child(-n+2) h2, .nx-mosaic > :nth-child(4) h3 { font-size: 21px; }

/* Układ treść + panel boczny */
.nx-main { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 40px; margin-top: var(--sec-pad); margin-bottom: var(--sec-pad); }
.nx-main > main { min-width: 0; }
.nx-aside { min-width: 0; display: flex; flex-direction: column; gap: 28px; }

/* Sekcje */
.nx-sec + .nx-sec { margin-top: var(--sec-pad); }
.nx-sec__title { display: flex; align-items: center; gap: 10px; font: 800 15px/1.2 var(--head); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.nx-sec__title::before { content: ""; width: 14px; height: 6px; background: var(--accent); }
.nx-sec__grid { display: grid; gap: var(--gap); align-items: start; }
.nx-sec__grid:has(> .nx-row) { grid-template-columns: 1fr; gap: 0; }
.nx-sec__grid:has(> .nx-card) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nx-sec__grid:has(> .nx-big) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nx-sec__grid:has(> .nx-ov) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nx-sec__grid > .nx-ov { aspect-ratio: 4 / 3; }
.nx-sec__grid > .nx-ov:first-child { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.nx-sec__grid > .nx-ov:first-child h3 { font-size: 26px; }
.nx-ov p { display: none; }
.nx-sec__grid > .nx-ov:first-child p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 0 0; max-width: 640px; font-size: 14px; color: rgba(255,255,255,.85); }
/* Lista z obrazkiem po lewej (sekcje „pionowe” – Najnowsze) */
.nx-row { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.nx-row .nx-img { aspect-ratio: 4 / 3; }
.nx-row h3 { font-size: 21px; line-height: 1.25; }
.nx-row p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Karty wyrównane (subgrid) */
.nx-card, .nx-big { display: grid; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.nx-card { grid-row: span 3; }
.nx-big { grid-row: span 4; }
.nx-card .nx-img { aspect-ratio: 4 / 3; margin-bottom: 12px; }
.nx-card h3 { font-size: 17px; line-height: 1.3; }
.nx-big .nx-img { aspect-ratio: 16 / 10; margin-bottom: 14px; }
.nx-big h3 { font-size: 21px; line-height: 1.25; }
.nx-big p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nx-card .nx-meta, .nx-big .nx-meta { align-self: end; }

/* Panel boczny */
.nx-widget { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.nx-widget__title { display: flex; align-items: center; gap: 10px; font: 800 14px/1.2 var(--head); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 14px; }
.nx-widget__title::before { content: ""; width: 12px; height: 5px; background: var(--accent); }
.nx-widget ul { list-style: none; margin: 0; padding: 0; }
.nx-widget li + li { margin-top: 12px; }
.nx-witem { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; align-items: center; }
.nx-witem img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.nx-witem b, .nx-wnum b { font: 700 14px/1.3 var(--head); }
.nx-widget ul:has(.nx-wnum) { counter-reset: nxw; }
.nx-wnum { counter-increment: nxw; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.nx-wnum::before { content: counter(nxw); width: 28px; height: 28px; border-radius: 6px; background: var(--night); color: #fff; font: 800 13px/28px var(--head); text-align: center; }
.nx-wbig { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; color: #fff; }
.nx-wbig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nx-wbig::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,15,25,.9), rgba(11,15,25,0) 65%); }
.nx-wbig b { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; font: 800 15px/1.3 var(--head); }
.nx-wbig:hover { color: #fff; }

/* Artykuł */
.nx-ahead { margin: 0 0 24px; }
.nx-ahead h1 { font-size: 36px; line-height: 1.15; margin: 12px 0 10px; }
.nx-ahead .nx-meta { font-size: 13px; }
.nx-ahead .nx-img { margin-top: 18px; aspect-ratio: 16 / 9; }
.nx-content { font-size: 16px; line-height: 1.8; }
.nx-content > p:first-of-type::first-letter { float: left; font: 800 60px/.85 var(--head); margin: 6px 12px 0 0; color: var(--accent); }
.nx-content h2 { font-size: 25px; line-height: 1.25; margin: 32px 0 12px; }
.nx-content h3 { font-size: 20px; line-height: 1.3; margin: 26px 0 10px; }
.nx-content p { margin: 0 0 16px; }
.nx-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.nx-content ul, .nx-content ol { padding-left: 22px; margin: 0 0 16px; }
.nx-content li + li { margin-top: 6px; }
.nx-content blockquote { margin: 28px 0; padding: 20px 22px; border-radius: var(--r); background: var(--night); color: #fff; font: 700 18px/1.5 var(--head); }
.nx-content blockquote::before { content: "“"; display: block; font: 800 46px/.6 Georgia, serif; color: var(--accent); margin: 8px 0 6px; }
.nx-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; display: block; overflow-x: auto; }
.nx-content th, .nx-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.nx-content th { background: var(--soft); }
/* Zdjęcia w treści na całą szerokość kolumny, niskie (wysokość jak wcześniej przy zdjęciu obok tekstu), przycięte do kadru;
   !important – stare wpisy mają rozmiar w style="" */
.nx-content img { float: none; display: block; width: 100% !important; max-width: none; height: 260px !important; object-fit: cover; object-position: center 30%; border-radius: var(--r); margin: 22px 0; }
.nx-content :is(h1, h2, h3, h4) img { float: none; display: block; margin: 0 0 12px; }
.nx-content::after { content: ""; display: block; clear: both; }
/* Oznaczenie wpisu sponsorowanego („Reklama”): obrazek bezpośrednio w treści, na końcu */
.nx-content > img { float: none; clear: both; display: block; width: auto !important; max-width: 120px; height: auto !important; max-height: 30px; aspect-ratio: auto; object-fit: contain; border-radius: 0; margin: 24px 0 0; }
.nx-pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin: 32px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nx-pn a { display: block; font: 800 15px/1.35 var(--head); }
.nx-pn span { display: block; font: 600 11px/1.4 var(--body); text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.nx-pn__next { text-align: right; grid-column: 2; }
.nx-related .nx-sec__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Stopka ciemna z falą */
.nx-foot { position: relative; background: var(--night); color: #c9cfdb; margin-top: 70px; }
.nx-foot::before { content: ""; position: absolute; left: 0; right: 0; top: -40px; height: 41px; background: var(--night); clip-path: path("M0 40 C 240 0, 480 0, 720 20 S 1200 40, 1920 10 L 1920 41 L 0 41 Z"); }
.nx-foot > .nx-wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding-top: 36px; padding-bottom: 28px; }
.nx-flogo img { max-height: 44px; width: auto; margin-bottom: 14px; filter: var(--logo-filter); }
.nx-foot p { margin: 0; font-size: 14px; line-height: 1.6; }
.nx-ftitle { font: 800 15px/1.2 var(--head) !important; color: #fff !important; margin: 0 0 14px !important; }
.nx-foot ul { list-style: none; margin: 0; padding: 0; }
.nx-foot li + li { margin-top: 12px; }
.nx-fitem { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; align-items: center; color: #fff; }
.nx-fitem img { width: 60px; height: 46px; object-fit: cover; border-radius: 6px; }
.nx-fitem b { display: block; font: 700 13px/1.3 var(--head); }
.nx-fitem small { display: block; font-size: 12px; color: #98a1b3; margin-top: 2px; }
.nx-foot a:hover { color: #ff6b8e; }
.nx-fcats li + li { margin-top: 8px; }
.nx-copy { background: var(--night); border-top: 1px solid rgba(255,255,255,.1); padding: 16px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 24px; font-size: 12px; color: #98a1b3; }
.nx-copy ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.nx-copy a:hover { color: #ff6b8e; }

@media (max-width: 1100px) {
  .nx-mosaic { grid-template-rows: repeat(6, 64px); }
  .nx-sec__grid:has(> .nx-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-foot > .nx-wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  .nx-main { grid-template-columns: 1fr; }
  .nx-burger-btn { display: block; }
  .nx-head .nx-wrap { flex-wrap: wrap; justify-content: flex-start; }
  .nx-nav { order: 3; width: 100%; display: none; }
  .nx-head:has(.nx-burger:checked) .nx-nav { display: block; }
  .nx-nav ul { flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  .nx-nav li a { padding: 12px 6px; border-top: 1px solid rgba(255,255,255,.12); }
  .nx-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 170px; }
  .nx-mosaic > :nth-child(n) { grid-column: auto; grid-row: auto; }
  .nx-mosaic > :nth-child(1) { grid-column: 1 / -1; grid-row: span 2; }
}
@media (max-width: 767px) {
  :root { --sec-pad: 30px; }
  .nx-top .nx-wrap { min-height: 80px; }
  .nx-logo img { max-height: 42px; }
  .nx-mosaic { grid-auto-rows: 150px; }
  .nx-mosaic > :nth-child(-n+2) h2, .nx-mosaic > :nth-child(4) h3 { font-size: 17px; }
  .nx-ov h2, .nx-ov h3 { font-size: 14px; }
  .nx-row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .nx-row h3 { font-size: 17px; }
  .nx-row p { display: none; }
  .nx-sec__grid:has(> .nx-big), .nx-related .nx-sec__grid { grid-template-columns: 1fr; }
  .nx-sec__grid:has(> .nx-ov) { grid-template-columns: 1fr 1fr; }
  .nx-sec__grid > .nx-ov:first-child { aspect-ratio: 4 / 3; }
  .nx-sec__grid > .nx-ov:first-child h3 { font-size: 20px; }
  .nx-ahead h1 { font-size: 27px; }
  .nx-content img { height: 190px !important; margin: 14px 0; }
  .nx-content > img { width: auto !important; max-width: 120px; margin: 24px 0 0; }
  .nx-foot > .nx-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 479px) {
  .nx-sec__grid:has(> .nx-card) { grid-template-columns: 1fr; }
  .nx-pn { grid-template-columns: 1fr; }
  .nx-pn__next { grid-column: 1; text-align: left; }
}
