/*
Theme Name: Fajny Katalog
Theme URI: https://fajny-katalog.pl
Author: Fajny Katalog
Author URI: https://fajny-katalog.pl
Description: Motyw blogowo-newsowy dla fajny-katalog.pl. Układ magazynowy na stronie głównej, strony kategorii i autora, ostylowany single, sidebar i stopka z widgetami.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
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: fajny-katalog
Tags: blog, news, magazine, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   1. Reset / podstawy
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --fk-color-bg: #ffffff;
    --fk-color-bg-alt: #f6f7fb;
    --fk-color-text: #1a1d24;
    --fk-color-muted: #5a6473;
    --fk-color-border: #e6e8ee;
    --fk-color-primary: #2a6df4;
    --fk-color-primary-dark: #1f56c8;
    --fk-color-accent: #ff5a5f;
    --fk-radius: 12px;
    --fk-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --fk-shadow-md: 0 6px 18px rgba(16, 24, 40, 0.08);
    --fk-container: 1200px;
    --fk-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --fk-font-serif: Georgia, "Times New Roman", serif;
}

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

body {
    margin: 0;
    font-family: var(--fk-font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--fk-color-text);
    background: var(--fk-color-bg);
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--fk-color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover,
a:focus {
    color: var(--fk-color-primary-dark);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fk-font-sans);
    line-height: 1.25;
    margin: 0 0 0.5em;
    color: var(--fk-color-text);
    font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 2.4vw + 1rem, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.4vw + 1rem, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

.fk-container {
    max-width: var(--fk-container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.fk-screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* =========================================================
   2. Header / nawigacja
   ========================================================= */
.fk-site-header {
    background: #fff;
    border-bottom: 1px solid var(--fk-color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--fk-shadow-sm);
}

.fk-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 1.25rem;
    max-width: var(--fk-container);
    margin: 0 auto;
}

.fk-site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fk-site-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

.fk-site-title a {
    color: var(--fk-color-text);
    text-decoration: none;
}

.fk-site-title a:hover { color: var(--fk-color-primary); }

.fk-site-description {
    font-size: 0.85rem;
    color: var(--fk-color-muted);
    margin: 0;
}

.fk-primary-nav { display: flex; align-items: center; }

.fk-primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 1.25rem;
}

.fk-primary-nav a {
    color: var(--fk-color-text);
    font-weight: 500;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    position: relative;
}

.fk-primary-nav a:hover,
.fk-primary-nav .current-menu-item > a {
    color: var(--fk-color-primary);
}

.fk-primary-nav .current-menu-item > a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--fk-color-primary);
    border-radius: 2px;
}

.fk-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--fk-color-border);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 1rem;
    cursor: pointer;
}

/* =========================================================
   3. Strona główna - hero / grid
   ========================================================= */
.fk-page-title {
    margin: 2rem 0 1.5rem;
    border-bottom: 2px solid var(--fk-color-border);
    padding-bottom: 0.75rem;
}

.fk-page-title span {
    border-bottom: 3px solid var(--fk-color-primary);
    padding-bottom: 0.75rem;
    display: inline-block;
    margin-bottom: -2px;
}

.fk-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.fk-hero-main {
    position: relative;
    border-radius: var(--fk-radius);
    overflow: hidden;
    background: #111;
    min-height: 380px;
    box-shadow: var(--fk-shadow-md);
}

.fk-hero-main img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute; inset: 0;
    opacity: 0.85;
}

.fk-hero-main .fk-hero-content {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    color: #fff;
}

.fk-hero-main .fk-card-category,
.fk-hero-main .fk-card-meta,
.fk-hero-main h2,
.fk-hero-main h2 a {
    color: #fff;
}

.fk-hero-main h2 {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
    margin-bottom: 0.5rem;
}

.fk-hero-side {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
}

.fk-hero-side .fk-card {
    margin: 0;
}

/* Karty wpisów */
.fk-card {
    background: #fff;
    border: 1px solid var(--fk-color-border);
    border-radius: var(--fk-radius);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
}

.fk-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fk-shadow-md);
}

.fk-card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--fk-color-bg-alt);
    overflow: hidden;
}

.fk-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.fk-card:hover .fk-card-thumb img { transform: scale(1.04); }

.fk-card-body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fk-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fk-color-primary);
    margin-bottom: 0.5rem;
}

.fk-card-category a { color: inherit; text-decoration: none; }
.fk-card-category a:hover { text-decoration: underline; }

.fk-card-title {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.fk-card-title a {
    color: var(--fk-color-text);
    text-decoration: none;
}

.fk-card-title a:hover { color: var(--fk-color-primary); }

.fk-card-excerpt {
    color: var(--fk-color-muted);
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.fk-card-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--fk-color-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.fk-card-meta a { color: var(--fk-color-muted); }

/* Grid newsów */
.fk-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Sekcja "Z kategorii" na home */
.fk-section {
    margin: 3rem 0;
}

.fk-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--fk-color-border);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.fk-section-header h2 {
    margin: 0;
    font-size: 1.25rem;
    border-left: 4px solid var(--fk-color-primary);
    padding-left: 0.75rem;
}

.fk-section-header .fk-section-link {
    font-size: 0.875rem;
    font-weight: 500;
}

/* =========================================================
   4. Layout z sidebarem
   ========================================================= */
.fk-content-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
    margin: 2rem 0 4rem;
}

.fk-content-wrap.fk-no-sidebar {
    grid-template-columns: minmax(0, 1fr);
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.fk-sidebar {
    font-size: 0.95rem;
}

.fk-widget {
    background: var(--fk-color-bg-alt);
    border: 1px solid var(--fk-color-border);
    border-radius: var(--fk-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.fk-widget-title,
.fk-widget h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fk-color-primary);
    display: inline-block;
}

.fk-widget ul {
    list-style: none;
    margin: 0; padding: 0;
}

.fk-widget li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--fk-color-border);
}

.fk-widget li:last-child { border-bottom: 0; }

.fk-widget a {
    color: var(--fk-color-text);
    text-decoration: none;
}

.fk-widget a:hover { color: var(--fk-color-primary); }

/* =========================================================
   5. Single post
   ========================================================= */
.fk-single {
    background: #fff;
}

.fk-single-header {
    margin: 2rem 0 1.5rem;
}

.fk-single-categories {
    margin-bottom: 1rem;
}

.fk-single-categories a {
    display: inline-block;
    background: var(--fk-color-primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-right: 0.4rem;
}

.fk-single-categories a:hover { background: var(--fk-color-primary-dark); }

.fk-single-title {
    font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.fk-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    color: var(--fk-color-muted);
    font-size: 0.9rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--fk-color-border);
}

.fk-single-meta a { color: var(--fk-color-muted); }

.fk-single-thumb {
    margin: 1.5rem 0;
    border-radius: var(--fk-radius);
    overflow: hidden;
}

.fk-single-thumb img {
    width: 100%;
    height: auto;
}

.fk-single-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.fk-single-content > * { max-width: 100%; }

.fk-single-content p { margin: 0 0 1.25rem; }

.fk-single-content h2 {
    margin-top: 2rem;
    font-size: 1.6rem;
    border-left: 4px solid var(--fk-color-primary);
    padding-left: 0.75rem;
}

.fk-single-content h3 {
    margin-top: 1.75rem;
    font-size: 1.3rem;
}

.fk-single-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--fk-color-bg-alt);
    border-left: 4px solid var(--fk-color-accent);
    font-style: italic;
    color: var(--fk-color-text);
    border-radius: 0 var(--fk-radius) var(--fk-radius) 0;
}

.fk-single-content blockquote p:last-child { margin-bottom: 0; }

.fk-single-content img {
    border-radius: var(--fk-radius);
    margin: 1rem 0;
}

.fk-single-content ul,
.fk-single-content ol {
    margin: 0 0 1.25rem 1.5rem;
    padding: 0;
}

.fk-single-content code {
    background: var(--fk-color-bg-alt);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
}

.fk-single-content pre {
    background: #1a1d24;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: var(--fk-radius);
    overflow-x: auto;
}

.fk-single-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.fk-tags {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--fk-color-border);
    border-bottom: 1px solid var(--fk-color-border);
    font-size: 0.9rem;
}

.fk-tags a {
    display: inline-block;
    background: var(--fk-color-bg-alt);
    color: var(--fk-color-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin: 0.15rem 0.2rem;
    text-decoration: none;
    font-size: 0.8rem;
}

.fk-tags a:hover {
    background: var(--fk-color-primary);
    color: #fff;
}

.fk-author-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--fk-color-bg-alt);
    border-radius: var(--fk-radius);
    padding: 1.25rem;
    margin: 2rem 0;
}

.fk-author-box img {
    border-radius: 50%;
}

.fk-author-box h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.fk-author-box p {
    margin: 0;
    color: var(--fk-color-muted);
    font-size: 0.9rem;
}

.fk-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.fk-post-nav a {
    display: block;
    background: #fff;
    border: 1px solid var(--fk-color-border);
    border-radius: var(--fk-radius);
    padding: 1rem;
    text-decoration: none;
    color: var(--fk-color-text);
}

.fk-post-nav a:hover {
    border-color: var(--fk-color-primary);
}

.fk-post-nav span {
    display: block;
    font-size: 0.75rem;
    color: var(--fk-color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.fk-post-nav .fk-next { text-align: right; }

/* =========================================================
   6. Komentarze
   ========================================================= */
.fk-comments {
    margin: 3rem 0;
}

.fk-comments h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.fk-comments .comment-list {
    list-style: none;
    margin: 0; padding: 0;
}

.fk-comments .comment {
    padding: 1.25rem;
    background: var(--fk-color-bg-alt);
    border-radius: var(--fk-radius);
    margin-bottom: 1rem;
}

.fk-comments .children {
    list-style: none;
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--fk-color-border);
}

.fk-comments .comment-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--fk-color-muted);
}

.fk-comments .comment-author img {
    border-radius: 50%;
}

.fk-comments .reply { font-size: 0.85rem; }

.fk-comment-form {
    background: var(--fk-color-bg-alt);
    padding: 1.5rem;
    border-radius: var(--fk-radius);
    margin-top: 2rem;
}

.fk-comment-form input[type="text"],
.fk-comment-form input[type="email"],
.fk-comment-form input[type="url"],
.fk-comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--fk-color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
}

.fk-comment-form textarea { min-height: 140px; resize: vertical; }

.fk-comment-form label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.fk-comment-form .form-submit { margin-top: 1rem; }

/* =========================================================
   7. Przyciski / formularze
   ========================================================= */
.fk-button,
button.submit,
input[type="submit"],
.fk-comment-form #submit {
    display: inline-block;
    background: var(--fk-color-primary);
    color: #fff;
    border: 0;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s ease;
}

.fk-button:hover,
input[type="submit"]:hover,
.fk-comment-form #submit:hover {
    background: var(--fk-color-primary-dark);
    color: #fff;
}

.fk-search-form {
    display: flex;
    gap: 0.5rem;
}

.fk-search-form input[type="search"] {
    flex: 1;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--fk-color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}

/* =========================================================
   8. Paginacja
   ========================================================= */
.fk-pagination {
    margin: 2.5rem 0;
    text-align: center;
}

.fk-pagination .page-numbers {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    margin: 0 0.15rem;
    border: 1px solid var(--fk-color-border);
    border-radius: 8px;
    color: var(--fk-color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.fk-pagination .page-numbers:hover,
.fk-pagination .page-numbers.current {
    background: var(--fk-color-primary);
    color: #fff;
    border-color: var(--fk-color-primary);
}

/* =========================================================
   9. Footer
   ========================================================= */
.fk-site-footer {
    background: #1a1d24;
    color: #c9cdd6;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.fk-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.fk-footer-col h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fk-footer-col a { color: #c9cdd6; text-decoration: none; }
.fk-footer-col a:hover { color: #fff; text-decoration: underline; }

.fk-footer-col ul { list-style: none; padding: 0; margin: 0; }
.fk-footer-col li { padding: 0.25rem 0; }

.fk-footer-bottom {
    border-top: 1px solid #2a2f3a;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #8b94a3;
}

/* =========================================================
   10. 404 / brak wyników
   ========================================================= */
.fk-not-found {
    text-align: center;
    padding: 4rem 1rem;
}

.fk-not-found h1 {
    font-size: clamp(3rem, 6vw + 1rem, 5rem);
    margin-bottom: 1rem;
    color: var(--fk-color-primary);
}

/* =========================================================
   11. Responsywność
   ========================================================= */
@media (max-width: 900px) {
    .fk-content-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .fk-hero {
        grid-template-columns: 1fr;
    }

    .fk-hero-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }
}

@media (max-width: 720px) {
    .fk-menu-toggle { display: inline-block; }

    .fk-primary-nav {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--fk-color-border);
        display: none;
        box-shadow: var(--fk-shadow-md);
    }

    .fk-primary-nav.is-open { display: block; }

    .fk-primary-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1.25rem;
    }

    .fk-primary-nav li { border-bottom: 1px solid var(--fk-color-border); }
    .fk-primary-nav li:last-child { border-bottom: 0; }
    .fk-primary-nav a { display: block; padding: 0.85rem 0; }

    .fk-hero-side { grid-template-columns: 1fr; }

    .fk-post-nav { grid-template-columns: 1fr; }
}

/* =========================================================
   12. Strona autora
   ========================================================= */
.fk-author-hero {
    background: linear-gradient(135deg, #f6f7fb 0%, #eef1f8 100%);
    border-bottom: 1px solid var(--fk-color-border);
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.fk-author-card {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.fk-author-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: var(--fk-shadow-md);
}

.fk-author-info { flex: 1; min-width: 0; }

.fk-author-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fk-color-primary);
    background: rgba(42, 109, 244, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.fk-author-name {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
    line-height: 1.15;
}

.fk-author-bio {
    color: var(--fk-color-muted);
    font-size: 1rem;
    margin: 0 0 1rem;
    max-width: 65ch;
}

.fk-author-stats {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.fk-author-stats li {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--fk-color-muted);
}

.fk-author-stats strong {
    color: var(--fk-color-text);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: capitalize;
}

.fk-author-link {
    font-weight: 600;
    color: var(--fk-color-primary);
}

.fk-section-author-heading {
    font-size: 1.25rem;
    border-left: 4px solid var(--fk-color-primary);
    padding-left: 0.75rem;
    margin: 0 0 1.5rem;
}

.fk-not-found-actions { margin-top: 2rem; }

@media (max-width: 720px) {
    .fk-author-card {
        flex-direction: column;
        text-align: center;
    }
    .fk-author-stats { justify-content: center; }
    .fk-author-bio { margin-left: auto; margin-right: auto; }
}

/* =========================================================
   13. Animacje
   ========================================================= */
@keyframes fk-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fk-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Stan początkowy elementu, zanim JS doda .is-visible */
.fk-animate {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}

.fk-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger w gridzie - kolejne karty wjeżdżają z drobnym opóźnieniem */
.fk-news-grid > .fk-animate:nth-child(1)  { transition-delay: 0.00s; }
.fk-news-grid > .fk-animate:nth-child(2)  { transition-delay: 0.06s; }
.fk-news-grid > .fk-animate:nth-child(3)  { transition-delay: 0.12s; }
.fk-news-grid > .fk-animate:nth-child(4)  { transition-delay: 0.18s; }
.fk-news-grid > .fk-animate:nth-child(5)  { transition-delay: 0.24s; }
.fk-news-grid > .fk-animate:nth-child(6)  { transition-delay: 0.30s; }
.fk-news-grid > .fk-animate:nth-child(7)  { transition-delay: 0.36s; }
.fk-news-grid > .fk-animate:nth-child(8)  { transition-delay: 0.42s; }

/* Hero animuje się od razu po załadowaniu strony */
.fk-hero-main,
.fk-hero-side .fk-card,
.fk-author-card {
    animation: fk-fade-up 0.6s ease both;
}
.fk-hero-side .fk-card:nth-child(1) { animation-delay: 0.08s; }
.fk-hero-side .fk-card:nth-child(2) { animation-delay: 0.16s; }

/* Header subtelnie zacienia się przy scrollu (klasa dodawana z JS) */
.fk-site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(16, 24, 40, 0.08);
}

/* Linki w meta i navigacji - delikatne podkreślenie */
.fk-card-title a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.3s ease;
    text-decoration: none;
}
.fk-card-title a:hover {
    background-size: 100% 1px;
    text-decoration: none;
}

/* Single thumb - delikatny zoom przy wejściu */
.fk-single-thumb img {
    transition: transform 0.6s ease;
}
.fk-single-thumb:hover img {
    transform: scale(1.02);
}

/* Reduced motion - szanujemy ustawienie systemu */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .fk-animate {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   14. Responsywność - dopracowanie edge case'ów
   ========================================================= */

/* Łamanie długich słów / URLi w tytułach */
.fk-card-title,
.fk-single-title,
.fk-author-name,
.fk-page-title {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Treść wpisu - zabezpieczenie przed przepełnieniem */
.fk-single-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.fk-single-content img,
.fk-single-content video,
.fk-single-content iframe,
.fk-single-content embed,
.fk-single-content object {
    max-width: 100%;
    height: auto;
}

.fk-single-content iframe { display: block; }

/* Tabele w treści - scrollowalne na mobile */
.fk-single-content figure.wp-block-table,
.fk-single-content .wp-block-table {
    overflow-x: auto;
    max-width: 100%;
    margin: 1rem 0;
}

.fk-single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.fk-single-content th,
.fk-single-content td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--fk-color-border);
    text-align: left;
    vertical-align: top;
}

.fk-single-content th {
    background: var(--fk-color-bg-alt);
    font-weight: 700;
}

/* Pre / kod - już ma overflow-x ale wzmocnienie */
.fk-single-content pre {
    max-width: 100%;
    white-space: pre;
}

/* Tablet (700-900px) - mniejsza wysokość hero */
@media (max-width: 900px) {
    .fk-hero-main { min-height: 320px; }
    .fk-hero-main .fk-hero-content { padding: 1.5rem; }
    .fk-content-wrap { margin-top: 1.5rem; }
}

/* Mały tablet / duży telefon (do 720px) */
@media (max-width: 720px) {
    .fk-hero { gap: 1rem; }
    .fk-hero-main { min-height: 260px; }
    .fk-hero-main .fk-hero-content { padding: 1.25rem; }
    .fk-hero-main h2 { font-size: 1.4rem; }

    .fk-section { margin: 2rem 0; }
    .fk-section-header h2 { font-size: 1.1rem; }

    /* Nav prev/next - po stackowaniu wyrównujemy do lewej */
    .fk-post-nav .fk-next { text-align: left; }

    /* Komentarze - mniejsze wcięcia, więcej miejsca na treść */
    .fk-comments .children {
        margin-left: 0.5rem;
        padding-left: 0.75rem;
    }
    .fk-comments .comment { padding: 1rem; }

    /* Author hero - już stackuje, dopasowanie paddingów */
    .fk-author-hero { padding: 1.75rem 0; }
}

/* Telefon (do 480px) */
@media (max-width: 480px) {
    body { font-size: 15.5px; }

    .fk-container { padding: 0 1rem; }
    .fk-header-inner { padding: 0.75rem 1rem; gap: 0.75rem; }

    .fk-site-title { font-size: 1.2rem; }
    .fk-site-description { display: none; }

    .fk-hero { margin: 1.25rem 0; }
    .fk-hero-main { min-height: 220px; }
    .fk-hero-main h2 { font-size: 1.2rem; }

    .fk-news-grid { gap: 1rem; }
    .fk-card-body { padding: 0.85rem 1rem 1rem; }
    .fk-card-title { font-size: 1.05rem; }

    /* Single - czytelniejsze proporcje */
    .fk-single-meta { gap: 0.5rem 1rem; font-size: 0.85rem; }
    .fk-single-content { font-size: 1rem; line-height: 1.7; }
    .fk-single-content h2 { font-size: 1.3rem; }
    .fk-single-content h3 { font-size: 1.1rem; }
    .fk-single-content blockquote { padding: 0.85rem 1rem; }

    /* Author hero - mniejszy avatar, ciaśniej */
    .fk-author-hero { padding: 1.5rem 0; margin-bottom: 1.25rem; }
    .fk-author-avatar img { width: 100px; height: 100px; border-width: 3px; }
    .fk-author-card { gap: 1rem; }
    .fk-author-stats { gap: 1rem; }
    .fk-author-stats strong { font-size: 1rem; }

    /* Wyszukiwarka - lepszy wrap */
    .fk-search-form { flex-wrap: wrap; }
    .fk-search-form input[type="search"] { min-width: 0; flex: 1 1 60%; }
    .fk-search-form .fk-button { flex: 1 1 100%; }

    /* Formularz komentarza */
    .fk-comment-form { padding: 1rem; }
}

/* Bardzo małe telefony (do 360px) - ostatnie dopasowania */
@media (max-width: 360px) {
    .fk-author-name { font-size: 1.4rem; }
    .fk-single-categories a {
        padding: 0.2rem 0.55rem;
        font-size: 0.7rem;
    }
}

/* Druk */
@media print {
    .fk-site-header,
    .fk-site-footer,
    .fk-sidebar,
    .fk-post-nav,
    .fk-comments,
    .fk-tags,
    .fk-menu-toggle { display: none; }

    body { font-size: 12pt; color: #000; background: #fff; }
    .fk-container { max-width: 100%; padding: 0; }
    .fk-single-content a { color: #000; text-decoration: underline; }
}

/* WP-core helper classes */
.alignleft  { float: left; margin: 0.5rem 1rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-size: 0.85rem;
    color: var(--fk-color-muted);
    text-align: center;
    margin-top: 0.5rem;
}
.sticky { position: relative; }
.sticky::before {
    content: "Wyróżnione";
    position: absolute;
    top: 0.5rem; left: 0.5rem;
    background: var(--fk-color-accent);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 1;
}
