/*
Theme Name: Poziom Jeden Blog
Theme URI: https://poziomjeden.pl
Author: Poziom Jeden
Author URI: https://poziomjeden.pl
Description: Arcade-pixelowa skórka bloga Poziom Jeden. Stworzona na bazie wyglądu strony PoziomJeden.pl — niebo, chmurki, grube czarne obramowania i twarde cienie. Idealna dla bloga o gamedevie.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: poziom-jeden-blog
Tags: blog, news, grid-layout, custom-logo, one-column
*/

/* ============ BAZA / ZMIENNE ============ */
:root {
    --m-red: #FF0000;
    --m-yellow: #FFCC00;
    --m-blue: #0070FF;
    --m-green: #00A000;
    --m-sky: #5C94FC;
    --m-purple: #9d50bb;
    --ink: #000000;
    --paper: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--m-sky);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a { color: var(--m-blue); }
a:hover { color: var(--m-red); }

.pixel-font {
    font-family: 'Press Start 2P', 'Courier New', monospace;
}

/* ============ CHMURY ============ */
.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    z-index: -1;
    animation: cloud-move linear infinite;
}

@keyframes cloud-move {
    from { transform: translateX(-200px); }
    to { transform: translateX(calc(100vw + 200px)); }
}

/* ============ KONTENER ============ */
.pjb-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ============ NAGŁÓWEK / NAWIGACJA ============ */
.site-header {
    padding: 1.5rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 1rem; }

.brand-name {
    display: block;
    font-size: 0.9rem;
    letter-spacing: -1px;
    color: #fff;
    text-decoration: none;
    text-shadow: 2px 2px 0 #000;
}
@media (min-width: 768px) {
    .brand-name { font-size: 1.25rem; }
}

.brand-tag {
    display: inline-block;
    margin-top: 4px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fff;
    background: #000;
    padding: 4px 8px;
}

.logo-frame {
    background: white;
    border: 4px solid #000;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 4px 4px 0px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.floating { animation: float 3s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Menu */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav li a {
    display: block;
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-shadow: 1px 1px 0 #000;
    transition: all 0.1s ease;
}

.main-nav li a:hover,
.main-nav .current-menu-item > a {
    background: #000;
    color: var(--m-yellow);
    text-shadow: none;
    border-radius: 10px;
}

.main-nav .sub-menu {
    display: none;
    position: absolute;
    background: #fff;
    border: 4px solid #000;
    border-radius: 14px;
    box-shadow: 6px 6px 0 #000;
    z-index: 50;
    min-width: 200px;
}

.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu { display: block; }

.main-nav .sub-menu a {
    color: var(--ink);
    text-shadow: none;
}
.main-nav .sub-menu li a:hover {
    background: var(--m-yellow);
    color: var(--ink);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 52px;
    height: 52px;
    background: #fff;
    border: 4px solid #000;
    border-radius: 14px;
    box-shadow: 4px 4px 0 #000;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 4px;
    background: #000;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 1.25rem;
        right: 1.25rem;
        background: #fff;
        border: 4px solid #000;
        border-radius: 20px;
        box-shadow: 8px 8px 0 #000;
        padding: 1rem;
        z-index: 60;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
    .main-nav li a { color: var(--ink); text-shadow: none; }
    .main-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }
    .main-nav li:hover > .sub-menu { display: block; }
}

.site-header-inner { position: relative; }

/* ============ MAIN ============ */
.site-main {
    flex-grow: 1;
    padding-top: 3rem;
    padding-bottom: 6rem;
    z-index: 1;
    position: relative;
}

/* ============ BANNER ============ */
.page-banner {
    background: #fff;
    border: 4px solid #000;
    border-radius: 60px;
    box-shadow: 15px 15px 0 #000;
    padding: 2.5rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.page-banner-label {
    display: inline-block;
    background: var(--m-yellow);
    border: 3px solid #000;
    border-radius: 12px;
    padding: 6px 16px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 900;
    transform: rotate(-1deg);
}

.page-banner h1 {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin: 1.5rem 0 1rem;
    color: #fff;
    text-shadow: 6px 6px 0 #000;
}

.page-banner .banner-desc {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    max-width: 640px;
    margin: 0 auto;
}

/* ============ GRID POSTÓW ============ */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
}

@media (min-width: 640px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
    background: #fff;
    border: 4px solid #000;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 var(--m-blue) !important;
}

.post-card-thumb {
    border-bottom: 4px solid #000;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--m-blue);
    display: block;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }

.post-card-meta {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: #555;
}

.post-card-meta a { color: var(--m-blue); text-decoration: none; }

.post-card-title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.2;
}

.post-card-title a {
    color: var(--ink);
    text-decoration: none;
}
.post-card-title a:hover { color: var(--m-blue); }

.post-card-excerpt { font-size: 0.9rem; font-weight: 700; color: #4b5563; margin: 0 0 1.25rem; flex-grow: 1; }

/* ============ PRZYCISKI ============ */
.btn-arcade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    border: 4px solid #000;
    border-radius: 12px;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.1s;
    cursor: pointer;
    box-shadow: 6px 6px 0 #000;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    align-self: flex-start;
}

.btn-arcade:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #000;
}

.btn-blue { background-color: var(--m-blue); }
.btn-green { background-color: var(--m-green); }
.btn-red { background-color: var(--m-red); }
.btn-yellow { background-color: var(--m-yellow); color: #000; }
.btn-dark { background-color: #000; color: #fff; }
.btn-small { padding: 0.6rem 1.2rem; font-size: 12px; }

/* ============ POJEDYNCZY WPIS ============ */
.single-wrap { max-width: 820px; margin: 0 auto; }

.article-card {
    background: #fff;
    border: 4px solid #000;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 10px 10px 0 var(--m-blue);
}

.article-thumb img {
    width: 100%;
    display: block;
    border-bottom: 4px solid #000;
}

.article-content { padding: clamp(1.5rem, 5vw, 3.5rem); }

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 900;
    line-height: 1.2;
    margin: 1.75em 0 0.5em;
}

.article-content h1 { font-size: 2.2rem; margin-top: 0; }
.article-content h2 { font-size: 1.8rem; color: var(--m-blue); }
.article-content h3 { font-size: 1.4rem; color: var(--m-green); }
.article-content p { margin: 0 0 1.25em; color: #1f2937; }
.article-content ul, .article-content ol { margin: 0 0 1.25em; padding-left: 1.5em; }

.article-content a {
    color: var(--m-blue);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 2px;
}
.article-content a:hover { color: var(--m-red); }

.article-content blockquote {
    margin: 1.5em 0;
    padding: 1.25em 1.5em;
    background: var(--m-yellow);
    border: 4px solid #000;
    border-radius: 20px;
    box-shadow: 6px 6px 0 #000;
    font-weight: 900;
    font-style: italic;
}

.article-content img { border: 4px solid #000; border-radius: 16px; }
.article-content .wp-block-image, .article-content img { margin: 1.5em 0; }

.article-content pre,
.article-content code {
    font-family: 'Courier New', monospace;
    background: #000;
    color: var(--m-yellow);
    border-radius: 8px;
}
.article-content code { padding: 2px 6px; font-size: 0.9em; }
.article-content pre { padding: 1.25em; overflow-x: auto; }

.article-content table { border-collapse: collapse; width: 100%; margin: 1.5em 0; }
.article-content th, .article-content td {
    border: 3px solid #000;
    padding: 10px;
}

.article-content input[type="submit"],
.article-content .wp-block-button__link {
    background: var(--m-blue);
    color: #fff;
    border: 4px solid #000;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #000;
    padding: 0.8rem 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

/* ============ META WPISU ============ */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.entry-meta-item {
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border-radius: 999px;
}

.entry-meta-item a { color: var(--m-yellow); text-decoration: none; }

/* ============ TAGI ============ */
.tags-list {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 4px dashed #000;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-list a {
    background: var(--m-yellow);
    color: #000;
    border: 3px solid #000;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
}
.tags-list a:hover { background: var(--m-red); color: #fff; }

/* ============ PAGINACJA ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination .page-numbers,
.pagination .post-page-numbers {
    background: #fff;
    color: #000;
    border: 4px solid #000;
    border-radius: 14px;
    box-shadow: 4px 4px 0 #000;
    padding: 0.75rem 1.25rem;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    transition: all 0.1s;
}

.pagination .page-numbers.current,
.pagination .post-page-numbers.current {
    background: var(--m-yellow);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.pagination .page-numbers:hover:not(.current) {
    background: var(--m-blue);
    color: #fff;
}

/* ============ SEARCH / FORMULARZ ============ */
.search-form { display: flex; gap: 0.75rem; max-width: 560px; margin: 0 auto 2.5rem; }

.search-field {
    flex: 1;
    border: 4px solid #000;
    border-radius: 14px;
    background: #fff;
    padding: 0.9rem 1.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.search-submit {
    background: var(--m-red);
    color: #fff;
    border: 4px solid #000;
    border-radius: 14px;
    box-shadow: 4px 4px 0 #000;
    padding: 0 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

/* ============ 404 ============ */
.error-404 { text-align: center; padding: 3rem 0; }
.error-404 .code { font-size: clamp(3rem, 10vw, 6rem); }

/* ============ STOPKA ============ */
.site-footer {
    margin-top: auto;
    padding: 3rem 0;
    background: #fff;
    border-top: 8px solid #000;
    z-index: 1;
    position: relative;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    font-size: 12px;
    letter-spacing: -1px;
    margin: 0.75rem 0;
}

.footer-desc {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    font-style: italic;
    max-width: 300px;
    margin: 0 0 1rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    flex: 1;
}

@media (min-width: 768px) {
    .footer-widgets { grid-template-columns: repeat(3, 1fr); }
}

.footer-widget .widget-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.75rem;
}

.footer-widget ul { list-style: none; margin: 0; padding: 0; }
.footer-widget ul li { margin-bottom: 0.4rem; }
.footer-widget a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.footer-widget a:hover { border-bottom-color: var(--m-blue); color: var(--m-blue); }

.footer-bottom {
    border-top: 4px solid #000;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #9ca3af;
}

.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-nav a {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
}
.footer-nav a:hover { color: var(--m-blue); }

/* ============ KOMENTARZE ============ */
.comments-area { margin-top: 2.5rem; }

.comments-title { font-size: 1.25rem; font-weight: 900; margin: 0 0 1.5rem; }

.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .comment { margin-bottom: 1rem; }
.comment-body {
    background: #f9fafb;
    border: 3px solid #000;
    border-radius: 18px;
    padding: 1.25rem;
}
.comment-body .comment-author { font-weight: 900; }
.comment-body .comment-metadata { font-size: 12px; color: #6b7280; margin-bottom: 0.5rem; }
.comment-body .comment-metadata a { color: #6b7280; }
.comment-body .comment-content { color: #1f2937; }
.comment-body .reply { margin-top: 0.5rem; }
.comment-body .reply a {
    background: var(--m-green);
    color: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
}

.comment-form label { font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 3px solid #000;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin: 6px 0 1rem;
    background: #fff;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--m-blue);
    box-shadow: 4px 4px 0 var(--m-blue);
}
.comment-form .submit {
    background: var(--m-blue);
    color: #fff;
    width: auto;
    border: 4px solid #000;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #000;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

/* ============ STRONA BLOGOWA / ARCHIWUM ============ */
.archive-header { margin-bottom: 2.5rem; text-align: center; }

.archive-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 5px 5px 0 #000;
    margin: 0;
}

.archive-desc { color: #fff; font-weight: 700; text-shadow: 1px 1px 0 #000; }

/* ============ DOSTĘPNOŚĆ ============ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
}
.skip-link:focus { left: 0; }

/* ============ RESPONSYWNOŚĆ ============ */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .footer-bottom { letter-spacing: 0.2em; line-height: 1.8; }
    .article-content h1 { font-size: 1.7rem; }
}
