/*
Theme Name: GRAFFY
Theme URI: https://graffy.pl/
Author: GRAFFY.PL
Description: Motyw portalu o kulturze kibicowskiej: oprawy, relacje, fotorelacje i graffiti.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: graffy
*/

:root {
    --bg: #0a0a0c;
    --bg-2: #121216;
    --bg-3: #1c1c22;
    --line: rgba(255, 255, 255, .11);
    --text: #f4f4f5;
    --muted: #a3a3ad;
    --red: #e4002b;
    --red-2: #ff2442;
    --on-red: #fff;
    --radius: 10px;
    --display: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --marker: "Permanent Marker", "Segoe Print", cursive;
    --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --wrap: 1320px;
    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #f3f3f1;
    --bg-2: #ffffff;
    --bg-3: #e8e8e4;
    --line: rgba(0, 0, 0, .13);
    --text: #111114;
    --muted: #5a5a63;
    --red: #cf0027;
    --red-2: #cf0027;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg) var(--noise);
    color: var(--text);
    font: 400 16px/1.55 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, video, iframe { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--red-2); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.04; text-transform: uppercase; letter-spacing: .005em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed !important;
    z-index: 1000;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    clip-path: none;
    padding: 12px 18px;
    background: var(--red);
    color: var(--on-red);
}

.icon { flex: none; }

/* ---------- Elementy wspólne ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius);
    background: var(--red);
    color: var(--on-red);
    font: 800 17px/1 var(--display);
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.btn:hover { background: var(--red-2); }

.btn .icon { width: 18px; height: 18px; }

.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--bg-3); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    list-style: none;
}

.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { color: var(--red-2); }

.label {
    display: inline-block;
    padding: 4px 9px 3px;
    background: var(--red);
    color: var(--on-red);
    font: 700 13px/1.1 var(--display);
    letter-spacing: .07em;
    text-transform: uppercase;
    transform: skewX(-8deg);
}

.label--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 500; transform: none; padding: 8px 12px; }
.label--ghost:hover { border-color: var(--red-2); color: var(--red-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; }
.meta__item { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 14px; height: 14px; }
.meta--lg { font-size: 14px; }
.meta--lg a { color: var(--text); font-weight: 600; }

.eyebrow { margin: 0 0 8px; color: var(--red-2); font: 700 15px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; }

.section-title {
    position: relative;
    padding-left: 16px;
    margin-bottom: 18px;
    font-size: clamp(28px, 3vw, 38px);
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 4px;
    width: 6px;
    background: var(--red);
    transform: skewX(-10deg);
}

.section-title--page { font-size: clamp(36px, 5vw, 56px); margin-top: 28px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head .section-title { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--red-2); font: 700 17px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }

/* ---------- Nagłówek ---------- */
.masthead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom: 1px solid var(--line);
}

.admin-bar .masthead { top: 32px; }

.masthead__row { display: flex; align-items: center; gap: 18px; min-height: 68px; }

.brand { flex: none; display: block; }
.brand img { display: block; height: 58px; width: auto; }

.mainnav { display: flex; align-items: center; gap: 2px; margin-right: auto; }

.mainnav a {
    position: relative;
    padding: 10px 10px;
    font: 700 18px/1 var(--display);
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mainnav a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 3px;
    height: 3px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s;
}

.mainnav a:hover::after, .mainnav a[aria-current]::after { transform: scaleX(1); }

.masthead__tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.masthead__tools .btn { margin-left: 6px; }

.searchbox { position: relative; }

.searchbox__form {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    display: flex;
    width: min(380px, calc(100vw - 32px));
    background: var(--bg-2);
    border: 1px solid var(--line);
}

.searchbox__form input, .inline-search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: 16px var(--body);
}

.searchbox__form button { padding: 0 16px; border: 0; background: var(--red); color: var(--on-red); font: 800 16px var(--display); text-transform: uppercase; cursor: pointer; }

.inline-search { display: flex; max-width: 520px; margin-top: 16px; background: var(--bg-2); border: 1px solid var(--line); }

.drawer { display: none; }
.drawer summary { cursor: pointer; }

.drawer__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: 8px 0 18px;
    background: var(--bg-2);
    border-bottom: 3px solid var(--red);
}

.drawer__panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    font: 700 21px/1 var(--display);
    letter-spacing: .03em;
    text-transform: uppercase;
}

.drawer__panel a .icon { color: var(--red-2); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; }

.slider { position: relative; overflow: hidden; background: var(--bg-3); }

.slider__track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.slider__track::-webkit-scrollbar { display: none; }

.slide { position: relative; flex: 0 0 100%; min-height: clamp(420px, 44vw, 620px); scroll-snap-align: start; display: flex; align-items: flex-end; isolation: isolate; color: #fff; }

.slide__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(5, 5, 7, .96) 2%, rgba(5, 5, 7, .55) 42%, rgba(5, 5, 7, .05) 72%);
}

.slide__body { width: 100%; padding: clamp(18px, 3vw, 38px); padding-bottom: 50px; }

.slide__title { margin: 12px 0 14px; font-size: clamp(34px, 5.2vw, 76px); line-height: .98; max-width: 17em; text-shadow: 0 2px 22px rgba(0, 0, 0, .6); }

.slide__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.slide .meta { color: #d5d5da; }

.slider__nav {
    position: absolute;
    top: 14px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(5, 5, 7, .55);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.slider__nav:hover { background: var(--red); border-color: var(--red); }
.slider__nav--prev { right: 62px; }
.slider__nav--next { right: 14px; }

.slider__dots { position: absolute; left: clamp(18px, 3vw, 38px); bottom: 12px; display: flex; gap: 2px; }

.slider__dots button { width: 30px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }

.slider__dots button::after { content: ""; position: absolute; left: 2px; right: 2px; top: 11px; height: 4px; background: rgba(255, 255, 255, .35); }

.slider__dots button.is-on::after { background: var(--red-2); }

.hero__side { display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px; }

.mini { position: relative; min-height: 150px; overflow: hidden; display: flex; align-items: flex-end; background: var(--bg-3); isolation: isolate; color: #fff; }

.mini__media { position: absolute; inset: 0; z-index: -2; }
.mini__media img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.mini:hover img { filter: brightness(1.12); }
.mini::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 5, 7, .92), rgba(5, 5, 7, .1) 75%); pointer-events: none; }
.mini__body { padding: 14px; }
.mini__title { margin-top: 7px; font-size: clamp(20px, 1.75vw, 25px); line-height: 1.05; }

/* ---------- Pasek kategorii ---------- */
.catbar { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.catbar::-webkit-scrollbar { display: none; }

.catbar__item {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 54px;
    padding: 0 15px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--line);
    font: 700 17px/1 var(--display);
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}

.catbar__item .icon { color: var(--red-2); }
.catbar__item:hover { border-bottom-color: var(--red); color: var(--red-2); }

/* ---------- Karty ---------- */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; margin-top: 34px; align-items: start; }

.news-layout__side { position: sticky; top: 84px; display: grid; gap: 20px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px 18px; }

.cards--lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cards--lead .card:first-child { grid-column: 1 / -1; }
.cards--lead .card:first-child .card__media { aspect-ratio: 2 / 1; }
.cards--lead .card:first-child .card__title { font-size: clamp(30px, 3.4vw, 46px); }

.card { display: flex; flex-direction: column; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .15s, transform .2s; }

@media (hover: hover) {
    .card:hover { border-color: var(--red); }
    .card:hover .card__media img { filter: brightness(1.12); }
}

.card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); }
.card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }

.card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--line); font: italic 800 42px var(--display); }

.card__body { position: relative; display: flex; flex-direction: column; gap: 9px; flex: 1; padding: 0 15px 15px; }
.card__body .label { align-self: flex-start; margin-top: -11px; }
.card__title { font-size: clamp(22px, 1.9vw, 27px); line-height: 1.07; }
.card__title a:hover { color: var(--red-2); }
.card .meta { margin-top: auto; }

/* ---------- Ranking ---------- */
.rank { padding: 18px; background: var(--bg-2); border: 1px solid var(--line); border-top: 4px solid var(--red); }
.rank .section-title { padding: 0; font-size: 30px; }
.rank .section-title::before { display: none; }

.rank__list { margin: 0; padding: 0; list-style: none; counter-reset: r; }

.rank__list li { counter-increment: r; border-top: 1px solid var(--line); }

.rank__list a { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 11px 0; }

.rank__list a::before {
    content: counter(r);
    grid-row: span 2;
    color: var(--red-2);
    font: italic 800 42px/.95 var(--display);
}

.rank__title { font: 700 19px/1.1 var(--display); text-transform: uppercase; }
.rank__list a:hover .rank__title { color: var(--red-2); }

/* ---------- Fotorelacje ---------- */
.photos {
    margin-top: 42px;
    padding: 34px 0 38px;
    background:
        radial-gradient(ellipse 50% 90% at 88% 0, rgba(228, 0, 43, .22), transparent 70%),
        radial-gradient(ellipse 40% 70% at 8% 100%, rgba(255, 255, 255, .06), transparent 70%),
        var(--bg-2);
    border-block: 1px solid var(--line);
}

.photos__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 15vw, 225px); gap: 8px; }

.photo { position: relative; overflow: hidden; background: var(--bg-3); color: #fff; }
.photo:first-child { grid-column: span 2; grid-row: span 2; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.photo:hover img { filter: brightness(1.12); }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 5, 7, .9), transparent 62%); }

.photo__cap { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: grid; gap: 5px; padding: 13px; }
.photo__cap strong { font: 800 20px/1.05 var(--display); text-transform: uppercase; }
.photo:first-child .photo__cap strong { font-size: clamp(26px, 3vw, 42px); }
.photo .meta { color: #d5d5da; }

/* ---------- Lista i strony ---------- */
.listing { margin-top: 38px; margin-bottom: 30px; }

.page-hero { padding: 38px 0 28px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 45% 110% at 90% 0, rgba(228, 0, 43, .16), transparent 70%); }

.page-hero__title { font-size: clamp(40px, 6.4vw, 84px); line-height: .98; }
.page-hero__lead { margin: 10px 0 0; color: var(--muted); max-width: 62ch; }
.page-hero .chips { margin-top: 16px; }

.page-hero--club { position: relative; min-height: 340px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; background: var(--bg-3); color: #fff; border: 0; }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero--club::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 5, 7, .95), rgba(5, 5, 7, .4)); }
.page-hero--club .page-hero__lead { color: #d5d5da; }

.profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile__avatar { border: 3px solid var(--red); }

.empty, .notfound { padding: 40px 0; }
.notfound__code { margin: 0; color: var(--red); font: italic 800 clamp(110px, 22vw, 240px)/.85 var(--display); }

/* ---------- Artykuł ---------- */
.entry__head { max-width: 1060px; padding-top: 30px; }
.entry__title { margin: 14px 0 14px; font-size: clamp(38px, 5.6vw, 76px); line-height: 1; }

.matchup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 12px 14px; background: var(--bg-2); border-left: 5px solid var(--red); font: 800 clamp(20px, 2.6vw, 30px)/1.05 var(--display); text-transform: uppercase; }
.matchup b { color: var(--red-2); font-style: italic; }

.entry__cover { margin-block: 22px 0; }
.entry__cover img { display: block; width: 100%; max-height: 74vh; object-fit: cover; }
.entry__cover figcaption { margin-top: 7px; color: var(--muted); font-size: 13px; }

.entry__content { max-width: 780px; margin: 30px auto 0; padding-inline: 20px; font-size: 18px; line-height: 1.72; overflow-wrap: break-word; }
.entry__content--page { max-width: 960px; }

.entry__content > * + * { margin-top: 1.1em; }
.entry__content p { margin-block: 0; }
.entry__content h2, .entry__content h3, .entry__content h4 { margin-top: 1.5em; line-height: 1.08; }
.entry__content h2 { font-size: clamp(30px, 3.6vw, 42px); }
.entry__content h3 { font-size: clamp(25px, 3vw, 32px); }
.entry__content a { color: var(--red-2); text-decoration: underline; text-underline-offset: 3px; }
.entry__content img { max-width: 100%; height: auto; }
.entry__content span[style*="font-family"] { font-family: inherit !important; }
.entry__content blockquote { margin-inline: 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--red); font-size: 1.1em; font-weight: 500; }
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry__content td, .entry__content th { padding: 8px; border: 1px solid var(--line); }
.entry__content figure { margin-inline: 0; }
.entry__content figcaption, .wp-caption-text { color: var(--muted); font-size: 13px; }

/* Galerie: pełna szerokość i duże zdjęcia; otwieranie w pełnym rozmiarze zapewnia Jetpack Carousel. */
.entry--gallery .entry__content { max-width: 1320px; }
.entry--gallery .entry__content > p, .entry--gallery .entry__content > h2, .entry--gallery .entry__content > h3 { max-width: 740px; margin-inline: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-block: 1.4em; }
.gallery-item { margin: 0; width: auto !important; max-width: none !important; }
.gallery-item a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-3); }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0 !important; transition: filter .2s; }
.gallery-item a:hover img { filter: brightness(1.12); }
.gallery br { display: none; }
.wp-block-gallery { gap: 8px; }

.entry__foot { max-width: 780px; margin: 24px auto 0; padding-inline: 20px; }

.related { margin-top: 42px; }

.entry-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.entry-nav__item { padding: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.entry-nav__item span { display: block; color: var(--muted); font-size: 13px; }
.entry-nav__item a { font: 700 21px/1.08 var(--display); text-transform: uppercase; }
.entry-nav__item a:hover { color: var(--red-2); }
.entry-nav__item--next { grid-column: 2; text-align: right; }

.entry__comments { max-width: 780px; margin: 34px auto 0; padding-inline: 20px; }
.comments__list { padding: 0; list-style: none; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; padding: 11px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: 16px var(--body); }

/* ---------- Reklamy ---------- */
.ad { text-align: center; }
.ad__label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.ad--banner { margin-top: 22px; }
.ad--banner ins { min-height: 90px; }
.ad--side ins, .ad--card ins { min-height: 250px; }
.ad--card { display: flex; flex-direction: column; justify-content: center; padding: 12px; background: var(--bg-2); border: 1px dashed var(--line); min-width: 0; }
.ad ins { width: 100%; }

/* ---------- Doładowywanie i ręczne strony ---------- */
.graffy-infinite-sentinel { height: 1px; }

.graffy-infinite-spinner { display: flex; justify-content: center; gap: 7px; padding: 24px 0; }
.graffy-infinite-spinner span { width: 10px; height: 10px; background: var(--red); animation: graffy-pulse 1s infinite ease-in-out; }
.graffy-infinite-spinner span:nth-child(2) { animation-delay: .15s; }
.graffy-infinite-spinner span:nth-child(3) { animation-delay: .3s; }
@keyframes graffy-pulse { 50% { opacity: .25; } }

.graffy-infinite-end { padding: 20px 0; text-align: center; color: var(--muted); }

.graffy-page-marker { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; color: var(--muted); font: 700 17px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.graffy-page-marker::before, .graffy-page-marker::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.graffy-load-more { display: block; margin: 10px auto 28px; min-height: 50px; padding: 0 28px; border: 0; background: var(--red); color: var(--on-red); font: 800 19px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.graffy-load-more:hover { background: var(--red-2); }
.graffy-load-more[hidden] { display: none; }

.graffy-pagination { margin: 26px 0 8px; text-align: center; }

.graffy-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; margin: 3px; padding: 0 10px; background: var(--bg-2); border: 1px solid var(--line); font: 700 18px/1 var(--display); }
.graffy-pagination a.page-numbers:hover { border-color: var(--red); color: var(--red-2); }
.graffy-pagination .current { background: var(--red); border-color: var(--red); color: var(--on-red); }
.graffy-pagination .dots { border: 0; background: none; }
.graffy-pager-ready .graffy-pagination .current { background: var(--bg-2); border-color: var(--line); color: var(--text); }

.graffy-pager { position: fixed; right: 70px; bottom: 16px; z-index: 90; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.graffy-pager.is-visible { opacity: 1; visibility: visible; transform: none; }
.graffy-pager button { font-family: inherit; cursor: pointer; }
.graffy-pager-bar { display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(0, 0, 0, .4); }
.graffy-pager-step, .graffy-pager-now { height: 44px; border: 0; background: transparent; color: var(--text); }
.graffy-pager-step { width: 44px; font-size: 24px; line-height: 1; }
.graffy-pager-now { min-width: 76px; padding: 0 8px; font: 800 18px/1 var(--display) !important; }
.graffy-pager-step:hover, .graffy-pager-now:hover { background: var(--bg-3); color: var(--red-2); }
.graffy-pager-panel { position: absolute; right: 0; bottom: 54px; width: 238px; padding: 11px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(0, 0, 0, .4); }
.graffy-pager-panel[hidden] { display: none; }
.graffy-pager-jump { display: flex; gap: 7px; margin: 0 0 7px; }
.graffy-pager-jump input { flex: 1; min-width: 0; height: 44px; padding: 0 9px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font: 16px var(--body); }
.graffy-pager-jump button { padding: 0 13px; border: 0; background: var(--red); color: var(--on-red); font: 800 17px var(--display) !important; text-transform: uppercase; }
.graffy-pager-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.graffy-pager-quick button { height: 44px; padding: 0 2px; border: 0; background: var(--bg-3); color: var(--text); font: 700 15px var(--display) !important; }
.graffy-pager-quick button:hover { color: var(--red-2); }

.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; background: var(--red); color: var(--on-red); font-size: 21px; opacity: 0; visibility: hidden; transition: opacity .2s; }
.to-top.is-on { opacity: 1; visibility: visible; }

/* ---------- Stopka ---------- */
.site-footer { margin-top: 54px; padding-top: 38px; background: #050507 var(--noise); color: #e8e8ea; border-top: 4px solid var(--red); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.site-footer .widget { margin-bottom: 22px; overflow-wrap: break-word; }
.site-footer .widget-title, .site-footer h2 { margin-bottom: 11px; font-size: 25px; }
.site-footer a:hover { color: var(--red-2); }
.site-footer img { max-width: 100%; height: auto; }
.site-footer select, .site-footer input[type=search] { max-width: 100%; min-height: 44px; padding: 0 9px; background: #15151a; border: 1px solid rgba(255, 255, 255, .15); color: #fff; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 18px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .11); font-size: 14px; }
.site-footer__bottom nav a { display: inline-block; padding: 10px 7px; }
.site-footer__claim { margin: 0; font: italic 800 21px/1 var(--display); text-transform: uppercase; color: var(--red-2); }
.site-footer__copy { margin: 0 0 0 auto; color: #a3a3ad; }
.social__list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.social__list a { display: inline-flex; align-items: center; min-height: 40px; }
.social__list .dashicons { display: none; }

/* ---------- Mniejsze ekrany ---------- */
@media (max-width: 1240px) {
    .mainnav { display: none; }
    .drawer { display: block; }
    .brand { margin-right: auto; }
}

@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; }
    .hero__side { grid-template-columns: repeat(3, 1fr); grid-template-rows: none; }
    .news-layout { grid-template-columns: 1fr; }
    .news-layout__side { position: static; }
    .photos__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(140px, 30vw, 240px); }
}

@media (max-width: 700px) {
    .wrap { padding-inline: 14px; }
    .masthead__row { min-height: 60px; gap: 6px; }
    .brand img { height: 48px; }
    .masthead__tools .btn { padding: 0; width: 44px; margin-left: 0; background: transparent; color: var(--text); }
    .masthead__tools .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .hero { margin-top: 0; padding-inline: 0; }
    .slide { min-height: 76vh; max-height: 640px; }
    .slide__title { font-size: clamp(34px, 10.5vw, 48px); }
    .slider__nav { top: 10px; }
    .hero__side { grid-template-columns: 1fr; padding-inline: 14px; }
    .mini { min-height: 170px; }
    .cards, .cards--lead { grid-template-columns: 1fr; }
    .cards--lead .card:first-child .card__media { aspect-ratio: 16 / 10; }
    .card__title { font-size: 27px; }
    .catbar { margin-inline: 0; }
    .catbar__item { flex: 0 0 auto; }
    .entry__content { font-size: 17px; }
    .entry-nav { grid-template-columns: 1fr; }
    .entry-nav__item--next { grid-column: 1; }
    .graffy-pager { right: 68px; }
    .site-footer__copy { margin-left: 0; }
    .admin-bar .masthead { top: 0; }
}

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

@media print {
    .masthead, .site-footer, .ad, .graffy-pager, .to-top, .related, .entry-nav { display: none !important; }
    body { background: #fff; color: #000; }
}

/* ==========================================================================
   Układ według wizualizacji: pełne tło z farbą i dymem, ciemne panele,
   pogrubione nagłówki zwykłą wielkością liter, kafelki kategorii.
   ========================================================================== */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 10% 40% at 100% 10%, rgba(228, 0, 43, .55), transparent 75%),
        radial-gradient(ellipse 7% 30% at 100% 60%, rgba(228, 0, 43, .25), transparent 75%),
        radial-gradient(ellipse 10% 42% at 0 22%, rgba(255, 255, 255, .13), transparent 75%),
        radial-gradient(ellipse 8% 28% at 0 78%, rgba(228, 0, 43, .22), transparent 75%);
}

html[data-theme="light"] body::before { opacity: .35; }

h1, h2, h3, h4 { text-transform: none; letter-spacing: -.02em; line-height: 1.14; }

.btn { font: 700 15px/1 var(--body); letter-spacing: 0; text-transform: none; }

.btn--line, .masthead__tools .btn { background: transparent; color: var(--text); border: 1px solid var(--red); }
.masthead__tools .btn:hover { background: var(--red); color: #fff; }

.label { padding: 4px 8px; border-radius: 3px; font: 700 11px/1.2 var(--body); letter-spacing: .04em; transform: none; }
.label--ghost { border-radius: 8px; font-size: 14px; }

.section-title { display: flex; align-items: center; gap: 12px; padding-left: 28px; margin: 0; font-size: clamp(25px, 2.4vw, 32px); font-weight: 800; }
.section-title::before { left: 3px; top: 50%; bottom: auto; width: 10px; height: 26px; margin-top: -13px; border-radius: 1px; transform: skewX(-22deg); }
.section-title--icon { padding-left: 0; }
.section-title--icon::before { display: none; }
.section-title--icon .icon { width: 30px; height: 30px; color: var(--red-2); }
.section-title--page { font-size: clamp(34px, 5vw, 52px); margin-bottom: 20px; }
.more { color: var(--text); font: 600 14px/1 var(--body); letter-spacing: 0; text-transform: none; }
.more:hover { color: var(--red-2); }
.section-head { align-items: center; margin-bottom: 14px; }

.news-layout > section > .cards { margin-top: 0; }

/* ---------- Nagłówek ---------- */
.masthead { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.masthead__row { min-height: 76px; gap: 16px; }

.brand { position: relative; color: #fff; padding-top: 7px; line-height: 1; transform: rotate(-4deg); }
html[data-theme="light"] .brand { color: #111; }
.brand__word { display: block; font: 400 34px/1 var(--marker); letter-spacing: .01em; }
.brand__word::after { content: ""; display: block; height: 5px; margin: -1px 12px 0 2px; background: var(--red-2); border-radius: 60% 40% 70% 30%; transform: rotate(-1.5deg); }
.brand__crown { position: absolute; top: -8px; right: 2px; transform: rotate(9deg); }

.tagline { flex: none; margin: 0; padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.3; }

.mainnav { gap: 0; }
.mainnav a, .navmore summary { padding: 9px 11px; border-radius: 8px; font: 600 14px/1 var(--body); letter-spacing: 0; text-transform: none; }
.mainnav a::after { display: none; }
.mainnav a:hover, .navmore summary:hover { color: var(--red-2); }
.mainnav a[aria-current] { background: rgba(228, 0, 43, .28); color: #fff; }
html[data-theme="light"] .mainnav a[aria-current] { color: var(--red); background: rgba(228, 0, 43, .12); }

.navmore { position: relative; }
.navmore summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; white-space: nowrap; }
.navmore summary::-webkit-details-marker { display: none; }
.navmore summary .icon { width: 15px; height: 15px; }
.navmore__panel { position: absolute; left: 0; top: calc(100% + 8px); min-width: 230px; padding: 7px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 32px rgba(0, 0, 0, .5); }
.navmore__panel a { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.navmore__panel .icon { width: 18px; height: 18px; color: var(--red-2); }

.masthead__tools .icon-btn[data-theme-toggle] { border-radius: 50%; background: var(--bg-3); margin-inline: 3px; }
.masthead__tools .btn { min-height: 40px; padding: 0 13px; font-size: 14px; }

.drawer__panel a { font: 600 16px/1 var(--body); letter-spacing: 0; text-transform: none; }

/* ---------- Hero ---------- */
.hero { grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.slider { border-radius: var(--radius); }
.slide { min-height: clamp(340px, 26vw, 400px); }
.slide__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: end; padding: 22px 56px 40px; }
.slide__body .label { justify-self: start; grid-column: 1 / -1; }
.slide__title { grid-column: 1; margin: 0; font-size: clamp(28px, 2.9vw, 42px); line-height: 1.12; max-width: none; }
.slide__foot { display: contents; }
.slide__foot .meta { grid-column: 1; grid-row: 3; font-size: 13px; }
.slide__foot .btn { grid-column: 2; grid-row: 2 / span 2; align-self: end; }

.slider__nav { top: 50%; width: 36px; height: 44px; margin-top: -24px; border: 0; border-radius: 8px; background: rgba(5, 5, 7, .78); font-size: 24px; }
.slider__nav--prev { left: 14px; right: auto; }
.slider__nav--next { right: 14px; }
.slider__dots { left: 50%; bottom: 10px; transform: translateX(-50%); }
.slider__dots button::after { height: 3px; border-radius: 2px; }

.hero__side { display: flex; flex-direction: column; padding: 4px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); gap: 0; }
.mini { flex: 1; display: grid; grid-template-columns: 122px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 0; padding: 12px 0; overflow: visible; background: none; color: var(--text); border-bottom: 1px solid var(--line); isolation: auto; }
.mini:last-child { border-bottom: 0; }
.mini::after { display: none; }
.mini__media { position: static; z-index: auto; display: block; height: 88px; overflow: hidden; border-radius: 7px; background: var(--bg-3); }
.mini__body { padding: 0; display: grid; gap: 6px; justify-items: start; }
.mini__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.26; letter-spacing: -.01em; }
.mini__title a:hover { color: var(--red-2); }
.mini .meta { font-size: 12px; }

/* ---------- Kafelki kategorii ---------- */
.catbar { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; margin-top: 10px; overflow: visible; padding: 0 20px; }
.catbar__item { flex-direction: column; gap: 6px; min-height: 86px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); text-align: center; font: 600 12.500px/1.15 var(--body); letter-spacing: 0; text-transform: none; white-space: normal; }
.catbar__item .icon { width: 28px; height: 28px; color: var(--text); stroke-width: 1.7; }
.catbar__item:hover { border-color: var(--red); color: var(--text); }
.catbar__item:hover .icon { color: var(--red-2); }

/* ---------- Karty ---------- */
.news-layout { grid-template-columns: minmax(0, 1fr) 372px; gap: 22px; margin-top: 22px; }
.news-layout__side { top: 92px; }
.cards { gap: 14px; }
.cards--lead { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--lead .card:first-child { grid-column: auto; }
.cards--lead .card:first-child .card__media { aspect-ratio: 16 / 10; }
.cards--lead .card:first-child .card__title { font-size: 17px; }

.card { border-radius: var(--radius); overflow: hidden; }
.card__media { aspect-ratio: 16 / 10; }
.card__body { gap: 8px; padding: 0 14px 13px; }
.card__body .label { margin-top: -30px; position: relative; z-index: 1; margin-bottom: 8px; }
.card__title { font-size: 17px; font-weight: 700; line-height: 1.24; letter-spacing: -.012em; }
.card .meta { font-size: 12px; }

.rank { padding: 0; border-top: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rank__head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; background: var(--bg-3); font-size: 21px; font-weight: 800; }
.rank__head .icon { width: 25px; height: 25px; color: var(--red-2); }
.rank__list { padding: 0 18px; }
.rank__list li:first-child { border-top: 0; }
.rank__list a { grid-template-columns: 58px 1fr; column-gap: 8px; align-items: center; padding: 11px 0; }
.rank__list a::before { content: counter(r, decimal-leading-zero); font: 800 27px/1 var(--body); }
.rank__title { font: 600 14.500px/1.27 var(--body); text-transform: none; letter-spacing: -.01em; }
.rank .meta { grid-column: 2; margin-top: 4px; font-size: 12px; }

/* ---------- Fotorelacje ---------- */
.photos { margin-top: 26px; padding: 0; background: none; border: 0; }
.photos__grid { grid-template-columns: 1.24fr 1.1fr 1fr 1fr; grid-auto-rows: clamp(200px, 19vw, 280px); }
.photo { border-radius: var(--radius); }
.photo:first-child { grid-column: auto; grid-row: auto; }
.photo__cap strong, .photo:first-child .photo__cap strong { font: 700 15px/1.24 var(--body); text-transform: none; }

/* ---------- Podstrony ---------- */
.page-hero__title { font-size: clamp(34px, 5vw, 62px); line-height: 1.06; }
.eyebrow { font: 700 12px/1 var(--body); letter-spacing: .14em; }
.page-hero--club { min-height: 300px; }

.entry__title { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.08; }
.entry__cover img { border-radius: var(--radius); }
.matchup { font: 800 clamp(16px, 2vw, 22px)/1.2 var(--body); text-transform: none; border-radius: 0 8px 8px 0; }
.entry__content h2 { font-size: clamp(25px, 3vw, 34px); }
.entry__content h3 { font-size: clamp(21px, 2.4vw, 26px); }
.gallery-item a { border-radius: 7px; }
.entry-nav__item { border-radius: var(--radius); }
.entry-nav__item a { font: 700 16px/1.25 var(--body); text-transform: none; }
.graffy-page-marker { font: 700 13px/1 var(--body); }
.graffy-load-more { border-radius: 8px; font: 700 15px/1 var(--body); text-transform: none; letter-spacing: 0; }
.graffy-pagination .page-numbers { border-radius: 8px; font: 600 15px/1 var(--body); }
.graffy-pager-bar, .graffy-pager-panel, .graffy-pager-jump input, .graffy-pager-jump button, .graffy-pager-quick button { border-radius: 8px; }
.graffy-pager-now, .graffy-pager-jump button, .graffy-pager-quick button { font-family: var(--body) !important; font-size: 14px !important; }
.to-top { border-radius: 8px; }
.ad--card { border-radius: var(--radius); }
.site-footer .widget-title, .site-footer h2 { font-size: 20px; }
.site-footer__claim { font: 400 21px/1 var(--marker); text-transform: none; }
.notfound__code { font-family: var(--marker); font-style: normal; font-weight: 400; }

@media (max-width: 1400px) {
    .tagline { display: none; }
}

@media (max-width: 1240px) {
    .navmore { display: none; }
}

@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; }
    .hero__side { display: flex; }
    .catbar { display: flex; overflow-x: auto; }
    .catbar__item { flex: 0 0 104px; }
    .photos__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .brand__word { font-size: 28px; }
    .masthead__row { min-height: 62px; }
    .masthead__tools .btn { border: 0; }
    .hero { padding-inline: 0; }
    .slider { border-radius: 0; }
    .slide { min-height: 72vh; max-height: 600px; }
    .slide__body { display: block; padding: 18px 16px 42px; }
    .slide__title { margin: 10px 0 10px; font-size: clamp(27px, 7.800vw, 34px); }
    .slide__foot { display: flex; }
    .slider__nav { top: 16px; margin-top: 0; }
    .slider__nav--prev { left: auto; right: 58px; }
    .hero__side { margin-inline: 14px; padding: 2px 12px; }
    .mini { grid-template-columns: 104px minmax(0, 1fr); }
    .mini__media { height: 76px; }
    .catbar { padding-inline: 14px; }
    .cards--lead { grid-template-columns: 1fr; }
    .card__title, .cards--lead .card:first-child .card__title { font-size: 20px; }
    .news-layout__side { margin-top: 2px; }
    .photos__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }
}

/* ---------- Prawdziwe logo ---------- */
.brand { padding: 0; transform: none; transform-origin: left center; transition: transform .25s ease; }
.brand img { display: block; width: auto; height: 68px; }

/* ---------- Reklamy: miejsce zawsze zostaje ---------- */
.ad__box { position: relative; min-height: 90px; }
.ad__house { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; background: var(--bg-2); border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.ad__house:hover { color: var(--red-2); border-color: var(--red); }
.ad ins.adsbygoogle { position: relative; z-index: 1; min-height: 90px; }
.ad ins.adsbygoogle[data-ad-status="unfilled"] { pointer-events: none; }
.ad--side .ad__box, .ad--card .ad__box { min-height: 250px; }
.ad--side ins.adsbygoogle, .ad--card ins.adsbygoogle { min-height: 250px; }
.ad--card .ad__box { flex: 1; }
.ad--footer { margin-top: 34px; }
.entry .ad--banner { margin-block: 24px 0; }
@media (max-width: 767px) {
    .ad--banner .ad__box { min-height: 250px; }
    .ad--banner ins.adsbygoogle { min-height: 250px; }
}

/* ---------- Pasek najnowszych ---------- */
.ticker { display: flex; align-items: stretch; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.ticker__head { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 max(14px, calc((100vw - var(--wrap)) / 2 + 20px)); background: var(--red); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ticker__head i { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.ticker__view { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__track { display: flex; width: max-content; }
.ticker ul { display: flex; margin: 0; padding: 0; list-style: none; }
.ticker li a { display: block; padding: 9px 22px; font-weight: 600; white-space: nowrap; }
.ticker li a:hover { color: var(--red-2); }
.ticker li + li a { border-left: 1px solid var(--line); }

/* ---------- Stopka: ikony ---------- */
.social { margin-left: auto; }
.social__list { gap: 6px; }
.social__list a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; color: #fff; transition: background .18s, border-color .18s, transform .18s; }
.social__list a:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-2px); }
.site-footer__copy { margin-left: 0; }

/* ---------- Ruch na górze strony ----------
   Tylko transform i opacity: płynne na słabych telefonach i bez przesuwania układu. */
.mainnav a { position: relative; transition: color .18s, background .18s; }
.mainnav a::after { display: block; left: 11px; right: 11px; bottom: 3px; height: 2px; transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.mainnav a:hover::after { transform: scaleX(1); }
.mainnav a[aria-current]::after { display: none; }
.masthead { transition: box-shadow .25s; }
.masthead.is-scrolled { box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.masthead.is-scrolled .brand { transform: scale(.82); }

.btn { position: relative; overflow: hidden; transition: background .18s, color .18s, transform .18s; }
.btn:hover { transform: translateY(-1px); }
.btn::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.btn:hover::before { left: 120%; }
.btn .icon { position: relative; transition: transform .18s; }
.btn:hover .icon { transform: translateX(2px); }

.icon-btn .icon { transition: transform .22s ease; }
.icon-btn:hover .icon { transform: scale(1.14) rotate(-6deg); }
.catbar__item { transition: border-color .18s, background .18s, transform .18s; }
.catbar__item .icon { transition: transform .22s ease, color .18s; }
.catbar__item:hover { transform: translateY(-3px); background: var(--bg-3); }
.catbar__item:hover .icon { transform: scale(1.14); }
.mini__media img { transition: filter .2s ease; }
.more .icon { transition: transform .18s; }
.more:hover .icon { transform: translateX(4px); }
.slider__nav { transition: background .18s, transform .18s; }
.slider__nav:hover { transform: scale(1.08); }

@media (prefers-reduced-motion: no-preference) {
    @keyframes graffy-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
    @keyframes graffy-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
    @keyframes graffy-side { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
    @keyframes graffy-ticker { to { transform: translateX(-50%); } }
    @keyframes graffy-dot { 50% { opacity: .35; } }
    @keyframes graffy-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

    .brand img { animation: graffy-drop .55s ease both; }
    .mainnav > a, .tagline, .masthead__tools > * { animation: graffy-drop .5s ease both; }
    .mainnav > a:nth-child(2) { animation-delay: .05s; }
    .mainnav > a:nth-child(3) { animation-delay: .1s; }
    .mainnav > a:nth-child(4) { animation-delay: .15s; }
    .mainnav > a:nth-child(5) { animation-delay: .2s; }
    .mainnav > a:nth-child(6) { animation-delay: .25s; }
    .mainnav > a:nth-child(7) { animation-delay: .3s; }

    .ticker__track { animation: graffy-ticker 70s linear infinite; }
    .ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
    .ticker__head i { animation: graffy-dot 1.3s ease-in-out infinite; }

    .slider { animation: graffy-rise .6s ease both; }
    .slide.is-active .slide__body > *, .slide.is-active .slide__foot > * { animation: graffy-rise .6s ease both; }
    .slide.is-active .slide__title { animation-delay: .1s; }
    .slide.is-active .slide__foot > * { animation-delay: .2s; }
    .slider.is-playing .slider__dots button.is-on::after { background: rgba(255, 255, 255, .35); }
    .slider.is-playing .slider__dots button.is-on::before { content: ""; position: absolute; z-index: 1; left: 2px; right: 2px; top: 11px; height: 3px; border-radius: 2px; background: var(--red-2); transform-origin: left; animation: graffy-fill 7s linear both; }

    .hero__side { animation: graffy-side .6s ease .1s both; }
    .mini { animation: graffy-rise .5s ease both; }
    .mini:nth-child(1) { animation-delay: .2s; }
    .mini:nth-child(2) { animation-delay: .3s; }
    .mini:nth-child(3) { animation-delay: .4s; }

    .catbar__item { animation: graffy-rise .45s ease both; }
    .catbar__item:nth-child(2) { animation-delay: .05s; }
    .catbar__item:nth-child(3) { animation-delay: .1s; }
    .catbar__item:nth-child(4) { animation-delay: .15s; }
    .catbar__item:nth-child(5) { animation-delay: .2s; }
    .catbar__item:nth-child(6) { animation-delay: .25s; }
    .catbar__item:nth-child(7) { animation-delay: .3s; }
    .catbar__item:nth-child(8) { animation-delay: .35s; }
    .catbar__item:nth-child(9) { animation-delay: .4s; }

    .page-hero__title, .entry__title { animation: graffy-rise .55s ease both; }
}

@media (max-width: 700px) {
    .brand img { height: 50px; }
    .masthead__tools .btn::before { display: none; }
    .ticker__head { padding-inline: 12px; }
    .ticker li a { padding-inline: 16px; }
    .social { margin-left: 0; }
}

/* ---------- Galeria we wpisie ---------- */
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block: 1.4em -0.4em; }
.gallery-head strong { font-size: 19px; font-weight: 800; }

.gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 7px; }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item:first-child a { height: 100%; aspect-ratio: auto; }
.gallery-item a { position: relative; cursor: zoom-in; }
.gallery-item a::after { content: ""; position: absolute; inset: 0; background: rgba(228, 0, 43, 0); transition: background .2s; }
.gallery-item a:hover::after, .gallery-item a:focus-visible::after { background: rgba(228, 0, 43, .22); }
.gallery-caption { padding: 5px 2px; color: var(--muted); font-size: 12px; line-height: 1.3; }

@media (max-width: 900px) {
    .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .gallery-head .btn { width: 100%; }
}

/* ---------- Przeglądarka zdjęć ---------- */
html.lb-open { overflow: hidden; }

.lb { position: fixed; inset: 0; z-index: 2147483000; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(5, 5, 7, var(--lb-fade, .97)); color: #fff; font-family: var(--body); }
.lb[hidden] { display: none; }

.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 6px 18px; background: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent); }
.lb__count { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb__tools { display: flex; gap: 2px; }
.lb__tool { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; transition: background .15s, color .15s; }
.lb__tool:hover { background: rgba(255, 255, 255, .12); }
.lb__tool.is-on { color: var(--red-2); }
.lb__close:hover { background: var(--red); color: #fff; }

.lb__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; }
.lb.is-zoomed .lb__stage { cursor: move; }
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; will-change: transform; -webkit-user-drag: none; }

.lb__spin { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--red-2); border-radius: 50%; opacity: 0; transition: opacity .15s; animation: lb-spin .8s linear infinite; pointer-events: none; }
.lb.is-loading .lb__spin { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

.lb__nav { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 56px; height: 76px; margin-top: -38px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; transition: background .15s, transform .15s; }
.lb__nav svg { width: 30px; height: 30px; }
.lb__nav:hover { background: var(--red); }
.lb__nav--prev { left: 14px; }
.lb__nav--next { right: 14px; }
.lb__nav--prev:hover { transform: translateX(-2px); }
.lb__nav--next:hover { transform: translateX(2px); }
.lb.is-zoomed .lb__nav { opacity: 0; pointer-events: none; }

.lb__foot { padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); }
.lb__caption { margin: 0 auto 7px; max-width: 900px; padding-inline: 16px; color: #dcdce0; font-size: 14px; text-align: center; }
.lb__caption[hidden] { display: none; }
.lb__thumbs { position: relative; display: flex; gap: 5px; padding: 3px 14px; overflow-x: auto; scrollbar-width: none; }
.lb__thumbs::-webkit-scrollbar { display: none; }
.lb__thumbs button { flex: 0 0 auto; width: 86px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #1a1a20; opacity: .55; cursor: pointer; transition: opacity .15s, border-color .15s; }
.lb__thumbs button:hover { opacity: .9; }
.lb__thumbs button.is-on { opacity: 1; border-color: var(--red-2); }
.lb__thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
    @keyframes lb-next { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
    @keyframes lb-prev { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
    .lb-in-next { animation: lb-next .24s ease both; }
    .lb-in-prev { animation: lb-prev .24s ease both; }
}

@media (max-width: 700px) {
    .lb__nav { display: none; }
    .lb__thumbs button { width: 64px; height: 46px; }
    .lb__bar { padding-left: 14px; }
    .lb__tool { width: 44px; height: 44px; }
}

/* ---------- Własna promocja zamiast pustego slotu ---------- */
.ad__house { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px; border: 0; border-radius: 8px; color: #fff; text-align: center; overflow: hidden; }
.ad__house b { font: 800 clamp(21px, 2.2vw, 27px)/1.05 var(--body); letter-spacing: -.02em; }
.ad__house span { color: rgba(255, 255, 255, .85); font-size: 14px; font-weight: 500; line-height: 1.3; }
.ad__house em { margin-top: 7px; padding: 8px 13px; border-radius: 6px; background: #fff; color: #111; font-size: 13px; font-style: normal; font-weight: 700; transition: transform .18s; }
.ad__house:hover { color: #fff; }
.ad__house:hover em { transform: translateY(-2px); }
.ad__house--eimpreza { background: linear-gradient(120deg, #2a0f63, #6a1fb0 58%, #c026a8); }
.ad__house--graffy { background: linear-gradient(120deg, #17171c, #7c0019 62%, #e4002b); }

.ad__box.is-empty .ad__house { display: flex; }
.ad__box.is-empty ins.adsbygoogle { position: absolute; inset: 0; min-height: 0; height: 0 !important; overflow: hidden; pointer-events: none; }

/* Baner poziomy: promocja w jednym rzędzie */
.ad--banner .ad__box.is-empty { min-height: 0; }
.ad--banner .ad__house { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; min-height: 96px; }
.ad--banner .ad__house em { margin-top: 0; }
.ad--side .ad__box.is-empty, .ad--card .ad__box.is-empty { display: flex; }
.ad--side .ad__house, .ad--card .ad__house { position: static; flex: 1; min-height: 250px; }

/* Karta reklamowa bez ramki przerywanej: wygląda jak pozostałe karty */
.ad--card { border-style: solid; }

/* Kolumna obok Aktualności ma tyle samo wysokości co karty */
.news-layout { align-items: stretch; }
.news-layout__side { position: static; align-content: start; }
.news-layout > section > .cards--lead { grid-auto-rows: 1fr; }

@media (max-width: 767px) {
    .ad--banner .ad__box.is-empty { min-height: 0; }
    .ad--banner .ad__house { flex-direction: column; min-height: 170px; }
}

/* Jedna kolumna na mniejszych ekranach: ranking pod kartami, a nie obok. */
@media (max-width: 1100px) {
    .news-layout { grid-template-columns: minmax(0, 1fr); }
    .news-layout__side { margin-top: 4px; }
    .cards--lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .cards--lead { grid-template-columns: minmax(0, 1fr); }
    .news-layout > section > .cards--lead { grid-auto-rows: auto; }
}

/* Logotypy w promocji własnej */
.ad__house img { display: block; width: auto; max-width: 70%; object-fit: contain; }
.ad__house--eimpreza img { height: 44px; }
.ad__house--graffy img { height: 92px; }
.ad--banner .ad__house--graffy img { height: 76px; }

/* Slot Google zostaje w układzie (przezroczysty), żeby spóźniona reklama mogła się wczytać. */
.ad__box.is-empty ins.adsbygoogle { position: absolute; inset: 0; width: 100%; height: 100% !important; min-height: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.ad__box.is-filled ins.adsbygoogle { opacity: 1; pointer-events: auto; }

/* Wyszukiwarka na telefonie otwiera się na całą szerokość, nie poza ekranem. */
@media (max-width: 700px) {
    .searchbox__form { position: fixed; left: 12px; right: 12px; top: 68px; width: auto; }
}

/* Karta rozciągnięta do końca rzędu: układ poziomy, żeby nie była ogromnym zdjęciem. */
@media (min-width: 701px) {
    .card.graffy-row-fill { flex-direction: row; }
    .card.graffy-row-fill .card__media { flex: 1 1 50%; aspect-ratio: auto; }
    .card.graffy-row-fill .card__body { flex: 1 1 50%; justify-content: center; padding: 18px; }
    .card.graffy-row-fill .label { margin-top: 0; }
}

/* Stopka prawna */
.site-footer__legal { display: flex; align-items: center; gap: 20px; padding-block: 18px 24px; border-top: 1px solid rgba(255, 255, 255, .11); color: #a3a3ad; font-size: 13px; line-height: 1.55; }
.site-footer__legal p { margin: 0; }
.site-footer__legal p a { color: #e8e8ea; text-decoration: underline; text-underline-offset: 2px; }
.site-footer__owner { flex: none; display: block; transition: opacity .18s; }
.site-footer__owner:hover { opacity: .8; }
.site-footer__owner img { display: block; width: auto; height: 44px; }
.site-footer__bottom .social { margin-left: auto; }
@media (max-width: 700px) {
    .site-footer__legal { flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-footer__bottom .social { margin-left: 0; }
}

/* Logo eIMPREZA czytelne na ciemnym tle */
.ad__house--eimpreza { background: radial-gradient(ellipse 70% 120% at 85% 10%, rgba(192, 38, 168, .42), transparent 70%), radial-gradient(ellipse 60% 110% at 10% 100%, rgba(106, 31, 176, .45), transparent 70%), #0d0a1c; }

/* Animacja tworzy kontener dla position: fixed, więc wyszukiwarka jest z niej wyłączona. */
.masthead__tools > .searchbox { animation: none !important; }

/* Promocja własna w miejscu pustego slotu we wpisie */
.ad__house--inline { position: static; inset: auto; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; min-height: 110px; margin-block: 1.2em; text-decoration: none !important; color: #fff !important; }
.ad__house--inline em { margin-top: 0; }
.entry__content .ad__house img { border-radius: 0; }

/* Slider przewija się tylko w poziomie: pionowy ruch palca ma przesuwać stronę.
   Bez tego powiększane zdjęcie wystawało poza slajd i slider przejmował przewijanie. */
.slider__track { overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.slide { overflow: hidden; }
.catbar { overflow-y: hidden; }


/* Zanim Google odpowie, w slocie stoi już promocja. Reklama przykrywa ją, gdy dotrze. */
.ad__box:not(.is-filled):not(.is-empty) .ad__house { display: flex; position: absolute; inset: 0; min-height: 0; }
.ad__box:not(.is-filled) ins.adsbygoogle { pointer-events: none; }
