/* ==========================================================================
   PRAVDA — Ghost Theme
   Publication-first. Analytical. Credible.
   ========================================================================== */

/* 1. CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* ── Brand palette ─────────────────────────── */
    --c-navy: #161d51;
    --c-blue: #5174f0;
    --c-lavender: #e2cfff;
    --c-sandy: #fff5e4;
    --c-banana: #fff2ba;
    --c-black: #1c1c1c;
    --c-sky: #8dd9f2;

    /* ── Functional tokens ─────────────────────── */
    --c-bg: var(--c-black);
    --c-text: #ede6da;
    --c-text-secondary: rgba(237, 230, 218, 0.55);
    --c-text-tertiary: rgba(237, 230, 218, 0.35);
    --c-accent: var(--c-lavender);
    --c-card-bg: rgba(255, 245, 228, 0.04);
    --c-card-hover: rgba(255, 245, 228, 0.07);
    --c-divider: rgba(255, 245, 228, 0.1);

    /* ── Typography ────────────────────────────── */
    --f-heading: "Rubik", system-ui, sans-serif;
    --f-body: "Arimo", system-ui, sans-serif;

    --fs-xs: 0.75rem;
    --fs-sm: 0.8125rem;
    --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --fs-lg: clamp(1.0625rem, 1.02rem + 0.2vw, 1.125rem);
    --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --fs-3xl: clamp(1.75rem, 1.35rem + 2vw, 2.5rem);
    --fs-4xl: clamp(2rem, 1.4rem + 3vw, 3rem);

    --lh-tight: 1.18;
    --lh-snug: 1.3;
    --lh-normal: 1.7;

    /* ── Spacing (8 px grid) ───────────────────── */
    --sp-1: 0.25rem; /*  4 */
    --sp-2: 0.5rem; /*  8 */
    --sp-3: 0.75rem; /* 12 */
    --sp-4: 1rem; /* 16 */
    --sp-5: 1.5rem; /* 24 */
    --sp-6: 2rem; /* 32 */
    --sp-8: 3rem; /* 48 */
    --sp-10: 4rem; /* 64 */
    --sp-12: 6rem; /* 96 */
    --sp-16: 8rem; /* 128 */

    /* ── Layout ────────────────────────────────── */
    --w-reading: 720px;
    --w-wide: 1000px;
    --w-content: 1200px;
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

    /* ── Misc ──────────────────────────────────── */
    --radius: 6px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --dur: 0.2s;
}

/* 2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    hanging-punctuation: first last;
    background: var(--c-sandy);
}

body {
    font-family: var(--f-body);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--c-text);
    background: var(--c-sandy);
    min-height: 100vh;
    overflow-x: hidden;
}

.site-content {
    background: var(--c-bg);
}

img,
video,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}
a {
    color: var(--c-accent);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}
a:hover {
    color: var(--c-sandy);
}

::selection {
    background: var(--c-lavender);
    color: var(--c-navy);
}

:focus-visible {
    outline: 2px solid var(--c-lavender);
    outline-offset: 2px;
}

/* 3. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--f-heading);
    font-weight: 600;
    line-height: var(--lh-tight);
    letter-spacing: -0.01em;
    color: var(--c-text);
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

h1 {
    font-size: var(--fs-4xl);
    font-weight: 700;
}
h2 {
    font-size: var(--fs-3xl);
}
h3 {
    font-size: var(--fs-2xl);
}
h4 {
    font-size: var(--fs-xl);
}
h5 {
    font-size: var(--fs-lg);
    font-weight: 700;
}
h6 {
    font-size: var(--fs-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

p {
    overflow-wrap: break-word;
}

/* 4. LAYOUT
   ========================================================================== */

.reading-column {
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
    padding-right: var(--gutter);
}
@media (max-width: 640px) {
    .post-content.reading-column {
        padding-right: 0;
    }
}

.feed-container {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: var(--sp-8) var(--gutter) var(--sp-12);
}

/* 5. HEADER
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-sandy);
    transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
    box-shadow: 0 2px 16px rgba(22, 29, 81, 0.1);
}

/* ── Top bar (row 1): search | logo | auth ── */

.header-topbar {
    border-bottom: 1px solid rgba(22, 29, 81, 0.1);
}

.header-topbar-inner {
    max-width: var(--w-content);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) var(--gutter);
    min-height: 48px;
}

@media (min-width: 768px) {
    .header-topbar-inner {
        min-height: 52px;
    }
}

.header-topbar-left {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex: 1;
    min-width: 0;
}

.header-topbar-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

/* Logo (centered in topbar) */
.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 120px;
    height: 30px;
    overflow: hidden;
    color: var(--c-navy);
    font-family: var(--f-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    transition: opacity var(--dur) var(--ease);
    will-change: width;
}
.site-logo:hover {
    color: var(--c-navy);
    opacity: 0.7;
}
.site-logo-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    color: currentColor;
    fill: currentColor;
    flex: 0 0 auto;
}
.site-logo-morph-target,
.site-logo-full-target {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 768px) {
    .site-logo {
        width: 144px;
        height: 36px;
    }
}

/* Auth links in topbar */
.header-signin {
    display: none;
    align-items: center;
    padding: 6px 14px;
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-navy);
    letter-spacing: 0.01em;
    border-radius: 999px;
    transition: opacity var(--dur) var(--ease);
}
.header-signin:hover {
    color: var(--c-navy);
    opacity: 0.6;
}

@media (min-width: 768px) {
    .header-signin {
        display: inline-flex;
    }
}

.header-subscribe {
    display: none;
    align-items: center;
    padding: 6px 16px;
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-lavender);
    background: var(--c-navy);
    border-radius: 999px;
    transition:
        background var(--dur) var(--ease),
        color var(--dur) var(--ease);
}
.header-subscribe:hover {
    background: #1e2766;
    color: var(--c-sandy);
}

@media (min-width: 768px) {
    .header-subscribe {
        display: inline-flex;
    }
}

/* ── Navigation bar (row 2, desktop) ── */

.site-nav {
    display: none;
}

@media (min-width: 768px) {
    .site-nav {
        display: block;
    }
}

.site-nav-inner {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-1);
    list-style: none;
}

.nav-link {
    display: block;
    padding: var(--sp-2) var(--sp-3);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: #000;
    transition: opacity var(--dur) var(--ease);
}
.nav-link:hover {
    color: #000;
    opacity: 0.7;
}
.nav-link.nav-current {
    color: #000;
}

/* ── Nav dropdown (desktop) ── */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown-toggle svg {
    transition: transform var(--dur) var(--ease);
}

.nav-dropdown-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: fixed;
    min-width: 180px;
    background: var(--c-bg);
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    padding: var(--sp-2) 0;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.nav-dropdown-menu.is-open {
    display: block;
}

.nav-dropdown-link {
    display: block;
    padding: var(--sp-2) var(--sp-4);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-secondary);
    transition:
        color var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.nav-dropdown-link:hover {
    color: var(--c-text);
    background: rgba(255, 255, 255, 0.05);
}

/* ── Mobile nav dropdown ── */

.mobile-nav-dropdown-menu {
    display: none;
    list-style: none;
    padding-left: var(--sp-4);
}

.mobile-nav-dropdown-menu.is-open {
    display: block;
}

.mobile-nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 4px;
    width: 100%;
    text-align: left;
}

.mobile-nav-dropdown-toggle svg {
    transition: transform var(--dur) var(--ease);
}

.mobile-nav-dropdown-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* ── Nav toggle (mobile) ── */

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--c-navy);
    border-radius: var(--radius);
    transition: background var(--dur) var(--ease);
}
.nav-toggle:hover {
    background: rgba(22, 29, 81, 0.06);
}
.nav-toggle .icon-close {
    display: none;
}
.nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}
.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
}

/* ── Mobile nav panel ── */

.mobile-nav {
    display: none;
    background: var(--c-sandy);
    border-bottom: 2px solid var(--c-navy);
    padding: var(--sp-4) var(--gutter) var(--sp-5);
}

.mobile-nav.is-open {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

body.nav-open .site-header {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.mobile-nav-link {
    display: block;
    padding: var(--sp-3) var(--sp-4);
    font-family: var(--f-heading);
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    border-radius: var(--radius);
    transition: background var(--dur) var(--ease);
}
.mobile-nav-link:hover,
.mobile-nav-link.nav-current {
    color: #000;
    background: rgba(22, 29, 81, 0.06);
}

.mobile-nav-auth {
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px solid rgba(22, 29, 81, 0.08);
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.mobile-nav-subscribe {
    font-weight: 600;
    color: var(--c-blue);
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Body scroll lock */
body.nav-open {
    overflow: hidden;
}
@media (min-width: 768px) {
    body.nav-open {
        overflow: auto;
    }
}

/* Ghost Announcement Bar */
.gh-announcement-bar {
    background: var(--c-navy) !important;
    font-family: var(--f-body);
    font-size: var(--fs-sm);
    letter-spacing: 0.01em;
    padding: var(--sp-2) var(--sp-6);
}
.gh-announcement-bar .gh-announcement-bar-content {
    color: var(--c-sandy);
}
.gh-announcement-bar .gh-announcement-bar-content a {
    color: var(--c-lavender);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gh-announcement-bar .gh-announcement-bar-content a:hover {
    color: var(--c-sandy);
}
.gh-announcement-bar button {
    color: var(--c-sandy) !important;
    opacity: 0.5;
    transition: opacity var(--dur) var(--ease);
}
.gh-announcement-bar button:hover {
    opacity: 1;
}
.gh-announcement-bar button svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Ghost Sodo search overrides */
.site-header .gh-search-icon {
    color: var(--c-navy) !important;
    transition: color var(--dur) var(--ease);
}
.site-header .gh-search-icon:hover {
    color: var(--c-blue) !important;
}

/* ── Nav row collapse on scroll ───────────────────────────────────────────
   Tylko menu (row 2, desktop) zwija się przy scrollu w dół.
   Header topbar (logo + auth) pozostaje bez zmian.
*/
@media (min-width: 768px) {
    .site-nav {
        display: grid;
        grid-template-rows: 1fr;
        transition:
            grid-template-rows 0.3s var(--ease),
            border-bottom-width 0.25s var(--ease),
            border-bottom-color 0.25s var(--ease);
    }
    .site-nav > .site-nav-inner {
        min-height: 0;
        overflow: hidden;
    }
    .site-header.is-scrolled .site-nav {
        grid-template-rows: 0fr;
        border-bottom-width: 0;
        border-bottom-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav {
        transition-duration: 0.01ms !important;
    }
}

/* 6. POST FEED
   ========================================================================== */

.feed-tagline {
    font-family: var(--f-heading);
    font-size: var(--fs-xl);
    font-weight: 400;
    color: var(--c-text-secondary);
    text-align: center;
    margin-bottom: var(--sp-4);
    padding: var(--sp-2) var(--sp-4) var(--sp-6);
    border-bottom: 1px solid var(--c-divider);
    letter-spacing: 0.02em;
}

.post-feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}

@media (min-width: 640px) {
    .post-feed {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-4);
    }
}

@media (min-width: 1024px) {
    .post-feed {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-5) var(--sp-4);
    }
}

/* All non-hero cards in index use the same grid */
.feed-container > .post-card:not(.post-card--hero) {
    /* These cards sit inside the flow as inline elements on the grid */
}

/* Make index page use CSS grid for non-hero cards */
.feed-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
}

@media (min-width: 640px) {
    .feed-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .feed-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feed-tagline,
.feed-container > .post-card--hero,
.feed-container > .post-feed,
.feed-container > .pagination {
    grid-column: 1 / -1;
}

/* 7. POST CARDS
   ========================================================================== */

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 534px;
    opacity: 0;
    transform: translateY(16px);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition:
        opacity 0.5s var(--ease),
        transform 0.5s var(--ease),
        background var(--dur) var(--ease),
        border-color 0.3s var(--ease);
}

.post-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-card:hover {
    background: var(--c-card-hover);
    border-color: var(--c-divider);
}

.post-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    color: var(--c-text);
}
.post-card-link:hover {
    color: var(--c-text);
}
.post-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
}

.post-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-card-bg);
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}
.post-card:hover .post-card-image img {
    transform: scale(1.03);
}

.post-card-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: var(--sp-4) var(--sp-2) var(--sp-2);
}

.post-card-tag {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-lavender);
    margin-bottom: var(--sp-2);
    transition: color var(--dur) var(--ease);
}
.post-card-tag:hover {
    color: var(--c-sandy);
}

.post-card-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    line-height: var(--lh-snug);
    margin-bottom: var(--sp-2);
}

.post-card-excerpt {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.6;
    margin-bottom: var(--sp-3);
    flex: 1;
    min-height: 0;

    display: -webkit-box;
    -webkit-line-clamp: 99;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-xs);
    color: var(--c-text-tertiary);
    padding: 0 var(--sp-2) var(--sp-2);
}

.post-card-author {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--c-text-tertiary);
    transition: color var(--dur) var(--ease);
}
.post-card-author:hover {
    color: var(--c-text);
}

.post-card-author-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.post-card-separator {
    opacity: 0.5;
}

/* ── Hero card (first post on index) ───────── */

.post-card--hero {
    margin-bottom: var(--sp-6);
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid var(--c-divider);
}

.post-card--hero .post-card-link {
    flex-direction: column;
    border: none;
    background: none;
}

.post-card--hero .post-card-link:hover {
    background: none;
    border-color: transparent;
}

.post-card--hero .post-card-image {
    aspect-ratio: 2 / 1;
}

.post-card--hero .post-card-title {
    font-size: var(--fs-3xl);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.post-card--hero .post-card-title:hover {
    color: var(--c-accent);
}

.post-card--hero .post-card-excerpt {
    font-size: var(--fs-base);
    -webkit-line-clamp: 6;
}

.post-card--hero .post-card-content {
    padding: var(--sp-5) 0 0;
}

.post-card--hero .post-card-meta {
    padding: 0;
}

@media (min-width: 768px) {
    .post-card--hero .post-card-link {
        flex-direction: row;
        gap: var(--sp-8);
    }
    .post-card--hero .post-card-image {
        flex: 1.2;
        aspect-ratio: 4 / 3;
    }
    .post-card--hero .post-card-content {
        flex: 1;
        padding: var(--sp-4) 0;
        justify-content: center;
    }
}

/* 8. SINGLE POST
   ========================================================================== */

.single-post {
    padding-bottom: var(--sp-12);
    background: linear-gradient(
        to bottom,
        rgba(255, 245, 228, 0.025) 0%,
        rgba(255, 245, 228, 0.015) 60%,
        transparent 100%
    );
}

/* Post header */
.post-header {
    padding: var(--sp-8) 0 var(--sp-6);
}

.post-header--split {
    padding-bottom: var(--sp-8);
    border-bottom: 1px solid var(--c-divider);
    margin-bottom: var(--sp-8);
}

.post-header-inner {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.post-header-tag {
    display: inline-block;
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-lavender);
    margin-bottom: var(--sp-4);
}
.post-header-tag:hover {
    color: var(--c-sandy);
}

.post-title {
    font-size: var(--fs-4xl);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: -0.015em;
    margin-bottom: var(--sp-4);
}

.post-subtitle {
    font-size: var(--fs-xl);
    color: var(--c-text-secondary);
    line-height: var(--lh-snug);
    margin-bottom: var(--sp-5);
}

/* Post meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-4);
    margin-top: var(--sp-6);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--c-divider);
}

.post-meta-authors {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.post-meta-author {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.post-meta-author-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta-author-name {
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
}
.post-meta-author-name:hover {
    color: var(--c-accent);
}

.post-meta-details {
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
}

.post-meta-separator {
    margin: 0 var(--sp-1);
    opacity: 0.4;
}

/* Feature image */
.post-feature-image {
    max-width: var(--w-reading);
    margin: 0 auto var(--sp-8);
    padding: 0 var(--gutter);
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius);
}

.post-feature-image figcaption {
    display: none;
    text-align: center;
}

/* ── Post hero (full-bleed cover with gradient fade) ─────────────── */

.post-hero {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--c-bg);
}

/* exact 32px gap between hero and title (beats media-query overrides via higher specificity) */
.single-post .post-header--has-hero {
    padding-top: 32px;
}
/* when header is completely hidden (show_title_and_feature_image off), pad the content */
.single-page .post-content:first-child {
    padding-top: var(--sp-12);
}

/* Pages have no .post-body wrapper to supply the horizontal gutter (posts do),
   so the page's reading column must provide its own — otherwise the body text
   runs edge-to-edge on narrow viewports. */
.single-page .post-content.reading-column {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.post-hero img {
    display: block;
    width: 100%;
    height: clamp(240px, 38vh, 460px);
    object-fit: cover;
    object-position: center;
}

.post-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 35%;
    background: linear-gradient(
        to bottom,
        rgba(28, 28, 28, 0) 0%,
        rgba(28, 28, 28, 0.5) 55%,
        var(--c-bg) 100%
    );
    pointer-events: none;
}

.post-hero figcaption {
    display: none;
}

/* ── Post content (article body) ───────────── */

.post-content {
    font-size: var(--fs-lg);
    line-height: var(--lh-normal);
}

.post-content > * + * {
    margin-top: var(--sp-5);
}

.site-main > *:first-child,
.site-main > *:first-child > *:first-child,
.site-main > *:first-child > *:first-child > *:first-child {
    margin-top: 0;
}

.post-content h2 {
    font-size: var(--fs-2xl);
    margin-top: var(--sp-10);
    margin-bottom: 0;
}

.post-content h3 {
    font-size: var(--fs-xl);
    margin-top: var(--sp-8);
    margin-bottom: 0;
}

.post-content h4 {
    font-size: var(--fs-lg);
    margin-top: var(--sp-6);
    margin-bottom: 0;
}

.post-content a {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-color: rgba(226, 207, 255, 0.4);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--dur) var(--ease);
}
.post-content a:hover {
    text-decoration-color: var(--c-lavender);
}

.post-content strong {
    font-weight: 700;
    color: var(--c-text);
}

.post-content em {
    font-style: italic;
}

.post-content blockquote {
    padding: var(--sp-6) var(--sp-8);
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: var(--c-text);
    background: rgba(255, 245, 228, 0.07);
    border-radius: var(--radius);
}

.post-content blockquote p + p {
    margin-top: var(--sp-4);
}

.post-content ul,
.post-content ol {
    padding-left: var(--sp-5);
}

.post-content li + li {
    margin-top: var(--sp-2);
}

.post-content hr {
    border: none;
    height: 1px;
    background: var(--c-divider);
    margin: var(--sp-8) 0;
}

.post-content pre {
    background: rgba(255, 245, 228, 0.05);
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-content code {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.9em;
}

.post-content :not(pre) > code {
    background: rgba(226, 207, 255, 0.12);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.post-content figure {
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-6);
}

.post-content figcaption {
    margin-top: var(--sp-3);
    font-size: var(--fs-sm);
    color: var(--c-sandy);
    text-align: center;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--c-divider);
    text-align: left;
}

.post-content th {
    font-family: var(--f-heading);
    font-weight: 600;
    color: var(--c-text);
    background: rgba(226, 207, 255, 0.06);
}

.post-content tbody tr:hover {
    background: var(--c-card-bg);
}

/* Post tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--c-divider);
}

.post-tag-pill {
    display: inline-block;
    padding: var(--sp-1) var(--sp-3);
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-lavender);
    background: rgba(226, 207, 255, 0.08);
    border-radius: 100px;
    transition: background var(--dur) var(--ease);
}
.post-tag-pill:hover {
    color: var(--c-lavender);
    background: rgba(226, 207, 255, 0.16);
}

/* Author card (below post) */
.post-authors {
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--c-divider);
}

.author-card {
    display: flex;
    gap: var(--sp-5);
    align-items: flex-start;
}

.author-card + .author-card {
    margin-top: var(--sp-6);
}

.author-card-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-card-name {
    font-size: var(--fs-base);
    font-weight: 600;
    margin-bottom: var(--sp-1);
}

.author-card-name a {
    color: var(--c-text);
}
.author-card-name a:hover {
    color: var(--c-accent);
}

.author-card-bio {
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    line-height: 1.6;
}

/* ── Split header (article two-column intro) ── */
.post-header-top {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.post-header-top .post-subtitle {
    font-size: var(--fs-lg);
    line-height: var(--lh-normal);
    color: var(--c-text-secondary);
    margin-bottom: 0;
}

/* ── Wide feature image ── */
.post-feature-image--wide {
    max-width: var(--w-content);
    margin: 0 auto var(--sp-8);
    padding: 0 var(--gutter);
}

.post-feature-image--wide img {
    width: 100%;
    border-radius: var(--radius);
}

.post-feature-image--wide figcaption {
    display: none;
}

/* ── Post body (content + sidebar) ── */
.post-body {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
}

@media (min-width: 1024px) {
    .post-body {
        grid-template-columns: 1fr 280px;
        gap: var(--sp-10);
    }
}

@media (min-width: 1280px) {
    .post-body {
        grid-template-columns: 1fr 320px;
    }
}

.post-body-content {
    min-width: 0;
    /* max-width removed — the reading column inside now uses a grid with
     content/wide/full tracks, so the outer cell must be 1fr for breakouts. */
}

/* ── Post sidebar ── */
.post-sidebar {
    padding-top: var(--sp-2);
}

/* To restore sticky sidebar, uncomment:
@media (min-width: 1024px) {
  .post-sidebar-sticky {
    position: sticky;
    top: 110px;
  }
}
*/

.post-sidebar-title {
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-secondary);
    margin-bottom: var(--sp-5);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--c-divider);
}

/* ── Sidebar card ── */
.sidebar-card {
    margin-bottom: var(--sp-5);
}

.sidebar-card-link {
    display: flex;
    gap: var(--sp-4);
    color: var(--c-text);
    transition: color var(--dur) var(--ease);
}

.sidebar-card-link:hover {
    color: var(--c-accent);
}

.sidebar-card-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: calc(var(--radius) - 1px);
    overflow: hidden;
}

.sidebar-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-card-content {
    flex: 1;
    min-width: 0;
}

.sidebar-card-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-card-meta {
    margin-top: var(--sp-1);
    font-size: var(--fs-xs);
    color: var(--c-text-tertiary);
}

.sidebar-card-meta .post-card-separator {
    margin: 0 var(--sp-1);
    opacity: 0.4;
}

/* 9. PAGES
   ========================================================================== */

.single-page .post-header-inner {
    max-width: var(--w-reading);
}

.single-page .post-header {
    padding-top: var(--sp-10);
    padding-bottom: var(--sp-8);
    border-bottom: 1px solid var(--c-divider);
    margin-bottom: var(--sp-6);
}

.single-page .post-title {
    text-align: center;
}

.single-page .post-subtitle {
    text-align: center;
    margin-bottom: 0;
}

/* 10. TAG & AUTHOR ARCHIVES
   ========================================================================== */

.archive-header {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: var(--sp-6);
    margin-bottom: var(--sp-2);
    border-bottom: 1px solid var(--c-divider);
}

.archive-label {
    display: block;
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-lavender);
    margin-bottom: var(--sp-3);
}

.archive-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--sp-3);
}

.archive-description {
    max-width: 540px;
    margin: 0 auto var(--sp-3);
    font-size: var(--fs-base);
    color: var(--c-text-secondary);
}

.archive-count {
    font-size: var(--fs-sm);
    color: var(--c-text-tertiary);
}

/* ── Author page: two-column header ───────── */

.author-header {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--sp-8);
    align-items: center;
    justify-content: center;
    padding-bottom: var(--sp-6);
    margin-bottom: var(--sp-2);
    border-bottom: 1px solid var(--c-divider);
}

.author-header-inner {
    display: flex;
    gap: var(--sp-8);
    align-items: center;
    max-width: 700px;
}

.author-header-inner:not(:has(.author-header-left)) {
    justify-content: center;
    text-align: center;
    max-width: none;
    width: 100%;
}

.author-header-inner:not(:has(.author-header-left)) .author-header-bio {
    margin-left: auto;
    margin-right: auto;
}

.author-header-left {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    width: 180px;
}

.author-header-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--c-lavender);
}

.author-header-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-2);
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-1) var(--sp-3);
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-text-secondary);
    background: rgba(226, 207, 255, 0.06);
    border-radius: 100px;
    transition:
        color var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.author-link:hover {
    color: var(--c-lavender);
    background: rgba(226, 207, 255, 0.14);
}

.author-link svg {
    flex-shrink: 0;
}

.author-header-location {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--fs-xs);
    color: var(--c-text-tertiary);
}

.author-header-location svg {
    flex-shrink: 0;
}

.author-header-right {
    flex: 1;
    min-width: 0;
    padding-top: var(--sp-2);
}

.author-header-name {
    font-size: var(--fs-3xl);
    font-weight: 700;
    margin-bottom: var(--sp-4);
}

.author-header-bio {
    font-size: var(--fs-base);
    color: var(--c-text-secondary);
    line-height: var(--lh-normal);
    margin-bottom: var(--sp-4);
    max-width: 540px;
}

.author-header-count {
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-tertiary);
}

/* Author header: stack on mobile */
@media (max-width: 639px) {
    .author-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-5);
    }

    .author-header-left {
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: var(--sp-5);
    }

    .author-header-image {
        width: 80px;
        height: 80px;
    }

    .author-header-links {
        justify-content: flex-start;
    }

    .author-header-name {
        font-size: var(--fs-2xl);
    }
}

/* 10b. PRESS — "Pisali o nas"
   ========================================================================== */

.press {
    /* padding (not margin) so vertical spacing stays inside the dark
       .site-content and never collapses into the footer.
       Tighter top gap to the article feed, roomy bottom before the footer. */
    padding: var(--sp-4) var(--gutter) var(--sp-12);
}

.press-inner {
    max-width: var(--w-content);
    margin: 0 auto;
}

.press-heading {
    font-family: var(--f-heading);
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--c-text);
    text-align: center;
    margin-bottom: var(--sp-8);
}

.press-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 820px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 × 3 = 9 logos */
    gap: var(--sp-5);
}

.press-item {
    display: flex;
}

/* Each logo stacks a sandy (default) and a colour (hover) image. */
.press-logo {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius);
    transition: background var(--dur) var(--ease);
}

.press-logo-img {
    /* min() so the logo never forces its grid cell wider than available space
       (the source PNGs are 450–600px wide); capped at 150px on roomy desktop cells. */
    max-width: min(150px, 100%);
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.press-logo-tint {
    opacity: 0.6;
    transition: opacity var(--dur) var(--ease);
}

/* Colour version overlays the tinted one, hidden until hover. */
.press-logo-color {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

/* On hover: swap to the original colours on a sandy chip (matching the
   site's sandy background) so every logo reads in its brand colours. */
.press-logo:hover {
    background: var(--c-sandy);
}
.press-logo:hover .press-logo-tint {
    opacity: 0;
}
.press-logo:hover .press-logo-color {
    opacity: 1;
}

@media (max-width: 640px) {
    .press-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 11. FOOTER
   ========================================================================== */

.site-footer {
    background: var(--c-sandy);
    color: var(--c-navy);
    margin-top: auto;
    border-top: 3px solid var(--c-navy);
}

.footer-inner {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: var(--sp-10) var(--gutter) var(--sp-6);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: 2fr 1fr 1.5fr;
        gap: var(--sp-8);
    }
}

/* Footer about */
.footer-logo {
    display: inline-flex;
    margin-bottom: var(--sp-4);
    color: var(--c-navy);
}
.footer-logo:hover {
    color: var(--c-navy);
    opacity: 0.7;
}
.footer-logo img {
    height: 24px;
    width: auto;
}

.footer-description {
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--c-navy);
    opacity: 0.7;
    margin-bottom: var(--sp-3);
}

.footer-legal {
    font-size: var(--fs-xs);
    color: var(--c-navy);
    opacity: 0.45;
}

/* Footer social media */
.footer-social {
    margin-top: var(--sp-5);
}
.footer-social-text {
    margin: 0 0 var(--sp-4);
    max-width: 34ch;
    font-size: var(--fs-sm);
    color: var(--c-navy);
}
.footer-social-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-4);
}
.footer-social-list a {
    display: inline-flex;
    color: var(--c-navy);
    transition:
        opacity var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}
.footer-social-list a:hover {
    opacity: 0.65;
    transform: translateY(-2px);
}
.footer-social-list svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}

.footer-contact {
    font-size: var(--fs-sm);
    color: var(--c-navy);
    opacity: 0.6;
    margin-top: var(--sp-3);
    margin-bottom: var(--sp-3);
}

.footer-contact a {
    color: var(--c-navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-contact a:hover {
    color: var(--c-blue);
}

/* Footer nav */
.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.footer-nav-list a {
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-navy);
    transition: opacity var(--dur) var(--ease);
}
.footer-nav-list a:hover {
    color: var(--c-navy);
    opacity: 0.6;
}

/* Footer newsletter */
.footer-badges {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
    flex-wrap: wrap;
}
.footer-badges a {
    display: inline-flex;
}
.footer-badges img {
    height: 96px;
    width: auto;
    display: block;
}

.footer-newsletter-text {
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--c-navy);
    opacity: 0.7;
    margin-bottom: var(--sp-4);
}

/* Footer bottom */
.footer-bottom {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: var(--sp-4) var(--gutter);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--sp-2);
    font-size: var(--fs-xs);
    color: var(--c-navy);
    opacity: 0.4;
    border-top: 1px solid rgba(22, 29, 81, 0.08);
}

/* 12. BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition:
        background var(--dur) var(--ease),
        color var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.btn-lavender {
    background: var(--c-lavender);
    color: var(--c-black);
}
.btn-lavender:hover {
    background: #d4bcff;
    color: var(--c-black);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 245, 228, 0.15);
    color: var(--c-sandy);
}
.btn-outline:hover {
    border-color: rgba(255, 245, 228, 0.35);
    color: var(--c-lavender);
    transform: translateY(-1px);
}

.btn-navy {
    background: var(--c-navy);
    color: var(--c-lavender);
}
.btn-navy:hover {
    background: #1e2766;
    color: var(--c-sandy);
    transform: translateY(-1px);
}

/* 13. ERROR PAGES
   ========================================================================== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: var(--sp-8) var(--gutter);
}

.error-code {
    display: block;
    font-family: var(--f-heading);
    font-size: clamp(4rem, 3rem + 5vw, 8rem);
    font-weight: 700;
    color: var(--c-lavender);
    line-height: 1;
    margin-bottom: var(--sp-4);
    opacity: 0.3;
}

.error-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--sp-4);
}

.error-description {
    font-size: var(--fs-base);
    color: var(--c-text-secondary);
    margin-bottom: var(--sp-6);
}

/* 14. PAGINATION
   ========================================================================== */

.pagination {
    padding-top: var(--sp-6);
    padding-bottom: var(--sp-2);
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-secondary);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius);
    transition:
        color var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.pagination-link:hover {
    color: var(--c-accent);
    background: var(--c-card-bg);
}

.pagination-link svg {
    flex-shrink: 0;
}

.pagination-disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

.pagination-info {
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    color: var(--c-text-tertiary);
    white-space: nowrap;
}

@media (max-width: 639px) {
    .pagination-inner {
        flex-direction: column;
        gap: var(--sp-3);
    }
}

/* 14b. LOAD MORE
   ========================================================================== */

.load-more-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: var(--sp-8) 0 var(--sp-2);
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-width: 200px;
    padding: var(--sp-3) var(--sp-6);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-sandy);
    background: transparent;
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    cursor: pointer;
    transition:
        color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.load-more-btn:hover {
    color: var(--c-lavender);
    border-color: var(--c-lavender);
    background: rgba(226, 207, 255, 0.06);
}

.load-more-btn .load-more-spinner {
    display: none;
}

.load-more-btn.is-loading .load-more-text {
    display: none;
}

.load-more-btn.is-loading .load-more-spinner {
    display: inline-flex;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 15. GHOST EDITOR CARDS (kg-*)
   ========================================================================== */

.post-content .kg-card {
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-6);
}

.post-content .kg-image-card img,
.post-content .kg-gallery-card img {
    border-radius: var(--radius);
}

.post-content .kg-image-card img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Wide and full-width break out via CSS grid on the reading column
   (the old viewport-based calc() broke because the content column is
   offset-left of viewport center when the sidebar is present). */
.post-content.reading-column {
    display: grid;
    grid-template-columns:
        [full-start wide-start] minmax(0, 1fr)
        [content-start] min(100%, var(--w-reading)) [content-end]
        minmax(0, 1fr) [wide-end full-end];
    max-width: none;
    /* row-gap intentionally 0 — children keep their own margin-top rhythm */
    row-gap: 0;
}

.post-content.reading-column > * {
    grid-column: content;
    min-width: 0;
}

.post-content.reading-column > .kg-width-wide,
.post-content.reading-column > .kg-card.kg-width-wide {
    grid-column: wide;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-self: stretch;
}

.post-content.reading-column > .kg-width-full,
.post-content.reading-column > .kg-card.kg-width-full {
    grid-column: full;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-self: stretch;
}

/* Bookmark card */
.post-content .kg-bookmark-card {
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    overflow: hidden;
}

.post-content .kg-bookmark-container {
    display: flex;
    flex-direction: column;
    color: var(--c-text);
    text-decoration: none;
}

@media (min-width: 640px) {
    .post-content .kg-bookmark-container {
        flex-direction: row;
    }
}

.post-content .kg-bookmark-content {
    flex: 1;
    padding: var(--sp-4) var(--sp-5);
}

.post-content .kg-bookmark-card,
.post-content a.kg-bookmark-container,
.post-content .kg-bookmark-container {
    background: var(--c-card-bg) !important;
    color: var(--c-text) !important;
}

.post-content .kg-bookmark-title {
    font-family: var(--f-heading);
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--c-text) !important;
}

.post-content .kg-bookmark-description {
    font-size: var(--fs-sm);
    color: rgba(237, 230, 218, 0.75) !important;
    margin-top: var(--sp-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    font-size: var(--fs-xs);
    color: var(--c-text-tertiary) !important;
}

.post-content .kg-bookmark-author,
.post-content .kg-bookmark-publisher {
    color: var(--c-text-tertiary) !important;
}

.post-content .kg-bookmark-icon {
    width: 16px;
    height: 16px;
}

.post-content .kg-bookmark-thumbnail {
    flex-shrink: 0;
}

.post-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 640px) {
    .post-content .kg-bookmark-thumbnail {
        width: 180px;
    }
}

/* Callout card */
.post-content .kg-callout-card {
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
}

/* Toggle card */
.post-content .kg-toggle-card {
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
}

/* Custom toggle: a native <details> styled to match .kg-toggle-card, but it
   accepts images and any other content (drop it inside an HTML card).
   Ghost's native toggle content is text-only; this is the image-friendly version. */
.post-content details.toggle-card {
    border: 1px solid var(--c-divider);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    margin: var(--sp-5) 0;
}
.post-content details.toggle-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    cursor: pointer;
    list-style: none;
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: var(--fs-lg);
    line-height: var(--lh-tight, 1.25);
    color: var(--c-text);
}
.post-content details.toggle-card > summary::-webkit-details-marker {
    display: none;
}
/* +/× icon, rotates 45° when open — mirrors the native toggle icon */
.post-content details.toggle-card > summary::after {
    content: "";
    flex: none;
    width: 24px;
    height: 24px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23000' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23000' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform var(--dur) var(--ease);
}
.post-content details.toggle-card[open] > summary::after {
    transform: rotate(45deg);
}
/* Content spacing + reveal animation when opened */
.post-content details.toggle-card > summary ~ * {
    margin-top: var(--sp-4);
}
.post-content details.toggle-card[open] > summary ~ * {
    animation: toggleCardReveal var(--dur) var(--ease);
}
.post-content details.toggle-card img {
    border-radius: var(--radius);
    margin: var(--sp-3) 0;
}
@keyframes toggleCardReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Team variant: photo + name always visible in the summary, bio on toggle.
   Use <details class="toggle-card toggle-team"> — see /toggle-image snippet. */
.post-content details.toggle-card.toggle-team > summary {
    justify-content: flex-start;
    gap: var(--sp-4);
}
.post-content details.toggle-card.toggle-team > summary::after {
    margin-left: auto; /* push the +/× icon to the far right */
}
.post-content details.toggle-card.toggle-team .toggle-team-photo {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
}
.post-content details.toggle-card.toggle-team .toggle-team-name {
    display: flex;
    flex-direction: column;
    font-family: var(--f-heading);
    font-weight: 600;
    line-height: 1.2;
}
.post-content details.toggle-card.toggle-team .toggle-team-name small {
    margin-top: 2px;
    font-family: var(--f-body);
    font-weight: 400;
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
}
.post-content details.toggle-card.toggle-team .toggle-team-bio {
    color: var(--c-text-secondary);
}

/* "W skrócie" / TL;DR summary box — lightly tinted callout with bullets.
   Drop into an HTML card (snippet: /w-skrocie). */
.post-content .summary-card {
    margin: var(--sp-6) 0;
    padding: var(--sp-5) var(--sp-6);
    background: rgba(226, 207, 255, 0.07);
    border: 1px solid var(--c-divider);
    border-left: 4px solid var(--c-lavender);
    border-radius: var(--radius);
}
.post-content .summary-card-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin: 0 0 var(--sp-3);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-lavender);
}
.post-content .summary-card-label svg {
    flex: none;
    width: 16px;
    height: 16px;
}
.post-content .summary-card-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.post-content .summary-card-list li {
    position: relative;
    padding-left: var(--sp-5);
    margin: var(--sp-2) 0;
    color: var(--c-text);
}
.post-content .summary-card-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-lavender);
}

/* Button card — matches .btn-navy from styleguide */
.post-content .kg-button-card {
    text-align: center;
}
.post-content .kg-button-card .kg-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius);
    background: var(--c-navy);
    color: var(--c-lavender);
    text-decoration: none;
    cursor: pointer;
    transition:
        background var(--dur) var(--ease),
        color var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}
.post-content .kg-button-card .kg-btn:hover {
    background: #1e2766;
    color: var(--c-sandy);
    transform: translateY(-1px);
}

/* Product card — subtle bordered card */
.post-content .kg-product-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
.post-content .kg-product-card .kg-product-card-container {
    background: var(--c-card-bg) !important;
    color: var(--c-text) !important;
    border: 1px solid var(--c-divider) !important;
    border-radius: var(--radius) !important;
    padding: 0 !important;
    overflow: hidden;
}
.post-content .kg-product-card .kg-product-card-title-container,
.post-content .kg-product-card .kg-product-card-description {
    padding: 0 var(--sp-5) !important;
}
.post-content .kg-product-card .kg-product-card-title-container {
    padding-top: 0 !important;
}
.post-content .kg-product-card .kg-product-card-description {
    padding-bottom: var(--sp-5) !important;
}
.post-content .kg-product-card-image {
    border-radius: var(--radius);
    max-width: 100%;
    margin-bottom: 0 !important;
}
.post-content .kg-product-card-title {
    color: var(--c-text) !important;
}
.post-content .kg-product-card-description {
    color: rgba(237, 230, 218, 0.75) !important;
}
.post-content .kg-product-card-rating {
    color: var(--c-text-secondary) !important;
}

/* Product card button — purple (accent) background needs black text */
.post-content .kg-product-card-button,
.post-content .kg-product-card-button:hover,
.post-content a.kg-product-card-button.kg-product-card-btn-accent {
    color: var(--c-black) !important;
}

/* File card — dark background + light text matching theme */
.post-content .kg-file-card,
.post-content .kg-file-card-container,
.post-content a.kg-file-card-container {
    background: var(--c-card-bg) !important;
    color: var(--c-text) !important;
    border: 1px solid var(--c-divider) !important;
    border-radius: var(--radius) !important;
    text-decoration: none !important;
}
.post-content .kg-file-card-title {
    color: var(--c-text) !important;
}
.post-content .kg-file-card-caption,
.post-content .kg-file-card-metadata {
    color: rgba(237, 230, 218, 0.75) !important;
}
.post-content .kg-file-card-filename {
    color: var(--c-text) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.post-content .kg-file-card-container,
.post-content a.kg-file-card-container {
    overflow: hidden !important;
    min-width: 0 !important;
}
.post-content .kg-file-card-contents {
    overflow: hidden;
    min-width: 0;
}
.post-content .kg-file-card-metadata {
    overflow: hidden;
    min-width: 0;
}
.post-content .kg-file-card-filesize {
    color: var(--c-text-tertiary) !important;
}
.post-content .kg-file-card-icon {
    background: transparent !important;
    border: 1px solid var(--c-divider) !important;
    border-radius: var(--radius) !important;
}
.post-content .kg-file-card-icon svg,
.post-content .kg-file-card-icon svg path,
.post-content .kg-file-card-icon svg circle {
    stroke: var(--c-lavender) !important;
    color: var(--c-lavender) !important;
}

/* TikTok embed — override TikTok's inline max-width/min-width + blockquote padding */
.post-content .tiktok-embed {
    max-width: min(100%, 605px) !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: var(--c-bg) !important;
    border: none !important;
    color: var(--c-text) !important;
}
/* Hide TikTok's white fallback content before iframe loads */
.post-content .tiktok-embed > section {
    display: none !important;
}
.post-content .tiktok-embed iframe {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius);
}
/* Embed card wrapper — no padding/bg when content is narrower than column */
.post-content .kg-embed-card {
    max-width: 100%;
    padding: 0 !important;
    background: transparent !important;
    text-align: center;
}
.post-content .kg-embed-card > * {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Embed card (YouTube, Twitter, etc) — fill the column width */
.post-content .kg-embed-card {
    display: flex;
    justify-content: center;
    width: 100%;
}
.post-content .kg-embed-card iframe {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius);
}
/* YouTube embeds specifically — override fixed sizing */
.post-content .kg-embed-card iframe[src*="youtube.com"],
.post-content .kg-embed-card iframe[src*="youtu.be"],
.post-content .kg-embed-card iframe[src*="vimeo.com"] {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Video card — respect Ghost's native container, don't let it overflow */
.post-content .kg-video-card .kg-video-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}
.post-content .kg-video-card video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* 15. READING PROGRESS
   ========================================================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--c-lavender);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 200;
    pointer-events: none;
}

/* Only show on post pages */
.post-template .reading-progress {
    display: block;
}
body:not(.post-template) .reading-progress {
    display: none;
}

/* 16. ANIMATIONS
   ========================================================================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Duration matches Swup fade (0.25s) so post-header finishes settling at
   the same moment as the page transition — no trailing lift. */
.post-header-inner {
    animation: fadeUp 0.15s var(--ease) both;
}

.post-feature-image {
    animation: fadeUp 0.15s var(--ease) both;
}

/* 17. UTILITIES
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 18. HOMEPAGE
   ========================================================================== */

/* ── Featured hero (404 Media-style) ──────── */

.featured-hero {
}

.featured-hero-inner {
    display: flex;
    flex-direction: column;
    max-width: var(--w-content);
    margin: 0 auto;
    padding: var(--sp-8) var(--gutter);
}

.featured-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 2;
    padding-top: var(--sp-5);
}

.featured-hero-tag {
    display: none;
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color var(--dur) var(--ease);
    margin-bottom: var(--sp-3);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}
.featured-hero-tag:hover {
    color: var(--c-sandy);
}

.featured-hero-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-4);
}
.featured-hero-title a {
    color: var(--c-text);
    transition: color var(--dur) var(--ease);
}
.featured-hero-title a:hover {
    color: var(--c-accent);
}

.featured-hero-excerpt {
    color: var(--c-text-secondary);
    font-size: var(--fs-base);
    line-height: 1.65;
    margin-bottom: var(--sp-5);
    max-width: 540px;

    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-hero-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--f-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--c-text-tertiary);
    letter-spacing: 0.04em;
}

.featured-hero-author-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-hero-author {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--c-text-secondary);
    transition: color var(--dur) var(--ease);
}
.featured-hero-author:hover {
    color: var(--c-text);
}

.featured-hero-sep {
    opacity: 0.4;
}

.featured-hero-image {
    display: block;
    order: 1;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.featured-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.featured-hero-image:hover img {
    transform: scale(1.02);
}

@media (min-width: 768px) {
    .featured-hero-inner {
        flex-direction: row;
        gap: var(--sp-8);
        padding: var(--sp-10) var(--gutter);
        align-items: center;
    }
    .featured-hero-content {
        flex: 0 0 42%;
        order: 1;
        padding-top: 0;
    }
    .featured-hero-image {
        flex: 1;
        order: 2;
        aspect-ratio: 4 / 3;
    }
    .featured-hero-title {
        font-size: var(--fs-2xl);
    }
}

@media (min-width: 1280px) {
    .featured-hero-content {
        flex: 0 0 40%;
    }
    .featured-hero-excerpt {
        font-size: var(--fs-lg);
    }
}

/* ── Breaker (skewed CTA strip) ──────────── */

.breaker {
    position: relative;
    margin: var(--sp-12) 0;
    padding: var(--sp-10) var(--gutter);
    text-align: center;
}

.breaker::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--c-sandy);
    transform: skewY(-2deg);
    z-index: 0;
}

.breaker-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.breaker-logo {
    height: 36px;
    width: auto;
    margin: 0 auto var(--sp-6);
}

.breaker-text {
    font-family: var(--f-body);
    font-size: var(--fs-lg);
    line-height: var(--lh-normal);
    color: var(--c-navy);
    margin-bottom: var(--sp-4);
}

.breaker-subtext {
    font-family: var(--f-body);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--c-navy);
    opacity: 0.6;
    margin-bottom: var(--sp-6);
}

.breaker-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-3) var(--sp-6);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-lavender);
    background: var(--c-navy);
    border-radius: var(--radius);
    transition:
        background var(--dur) var(--ease),
        color var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.breaker-btn:hover {
    background: #1e2766;
    color: var(--c-sandy);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .breaker {
        margin: var(--sp-12) 0;
        padding: var(--sp-10) var(--gutter);
    }
}

/* ── Legacy home hero (tagline) ───────────── */

.home-hero {
    padding: var(--sp-10) var(--gutter) var(--sp-6);
    text-align: center;
    border-bottom: 1px solid var(--c-divider);
}

.home-hero-inner {
    max-width: var(--w-content);
    margin: 0 auto;
}

.home-hero-tagline {
    font-family: var(--f-heading);
    font-size: var(--fs-3xl);
    font-weight: 400;
    color: var(--c-text-secondary);
    letter-spacing: 0.01em;
    line-height: var(--lh-snug);
    max-width: 640px;
    margin: 0 auto;
}

/* Sections */
.home-section {
    padding: var(--sp-8) 0;
}

.home-section + .home-section {
    border-top: 1px solid var(--c-divider);
}

.home-section-inner {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
    padding-bottom: var(--sp-4);
    border-bottom: 1px solid var(--c-divider);
}

.home-section-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.home-section-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--f-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-secondary);
    white-space: nowrap;
    transition: color var(--dur) var(--ease);
}

.home-section-link:hover {
    color: var(--c-accent);
}

/* Make post cards visible on home (no scroll animation) */
.home-template .post-card {
    opacity: 1;
    transform: none;
}

/* Hero card on home needs full width */
.home-section .post-card--hero {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 19. RESPONSIVE — FINE TUNING
   ========================================================================== */

/* Ensure comfortable reading on very small screens */
@media (max-width: 375px) {
    :root {
        --gutter: 1rem;
    }
    .post-title {
        font-size: clamp(1.5rem, 1.2rem + 2vw, 2rem);
    }
}

/* Tablet refinements */
@media (min-width: 768px) {
    .post-header {
        padding: var(--sp-10) 0 var(--sp-8);
    }

    .post-feature-image,
    .post-feature-image--wide {
        margin-bottom: var(--sp-10);
    }
}

/* Desktop refinements */
@media (min-width: 1024px) {
    .post-header {
        padding: var(--sp-12) 0 var(--sp-8);
    }
}

/* Stack sidebar below content on mobile */
@media (max-width: 1023px) {
    .post-sidebar {
        border-top: 1px solid var(--c-divider);
        padding-top: var(--sp-6);
        margin-top: var(--sp-4);
    }
}

/* Large screens — keep reading column comfortable */
@media (min-width: 1280px) {
    :root {
        --gutter: 2rem;
    }
}

/* 13. CUSTOM TEMPLATES
   ========================================================================== */

/* ── Showcase Page (About / Association) ─────── */

.showcase-hero {
    background: var(--c-navy);
    padding: var(--sp-16) var(--gutter) var(--sp-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative lavender bar at bottom of hero */
.showcase-hero::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--c-lavender);
    border-radius: 2px;
}

.showcase-hero-inner {
    max-width: var(--w-wide);
    margin: 0 auto;
}

.showcase-title {
    font-family: var(--f-heading);
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: var(--c-sandy);
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-4);
}

.showcase-excerpt {
    font-size: var(--fs-xl);
    color: rgba(255, 245, 228, 0.5);
    line-height: var(--lh-normal);
    max-width: 640px;
    margin: 0 auto;
}

.showcase-feature {
    max-width: var(--w-wide);
    margin: var(--sp-8) auto;
    padding: 0 var(--gutter);
}

.showcase-feature img {
    width: 100%;
    border-radius: var(--radius);
}

/* Body — wider than standard reading column */
.showcase-body {
    max-width: var(--w-wide);
    margin: 0 auto;
    padding: var(--sp-10) var(--gutter) var(--sp-12);
}

/* Content h1 hidden — template hero shows title */
.page-showcase .post-content > h1:first-child {
    display: none;
}

/* H5 as tagline / motto */
.page-showcase .post-content > h5 {
    font-size: var(--fs-2xl);
    font-weight: 400;
    font-style: italic;
    color: var(--c-lavender);
    text-align: center;
    max-width: var(--w-reading);
    margin: var(--sp-2) auto var(--sp-8);
}

/* H6 as lavender section label */
.page-showcase .post-content > h6 {
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-lavender);
    margin-top: var(--sp-10);
    margin-bottom: var(--sp-4);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--c-divider);
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
}

/* First h6 after image doesn't need extra top margin */
.page-showcase .post-content > .kg-image-card + h6 {
    margin-top: var(--sp-6);
}

/* H2 as bold section dividers */
.page-showcase .post-content > h2 {
    font-size: var(--fs-3xl);
    margin-top: var(--sp-12);
    margin-bottom: var(--sp-6);
    padding-top: var(--sp-10);
    border-top: 2px solid var(--c-divider);
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
}

/* H3 for sub-sections */
.page-showcase .post-content > h3 {
    margin-top: var(--sp-10);
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
}

/* Text stays at reading width, centered in the wider container */
.page-showcase .post-content > p {
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
}

/* Sticker / illustration images — centered, restrained size */
.page-showcase
    .post-content
    > .kg-image-card:not(.kg-width-wide):not(.kg-width-full) {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-6);
}

.page-showcase
    .post-content
    > .kg-image-card:not(.kg-width-wide):not(.kg-width-full)
    img {
    border-radius: var(--radius);
}

/* Image + short description pairs — centered visual blocks */
.page-showcase .post-content > .kg-image-card + p {
    text-align: center;
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: var(--fs-lg);
    color: var(--c-text);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--sp-8);
}

/* Blockquotes — navy panel with lavender border */
.page-showcase .post-content blockquote {
    background: var(--c-navy);
    color: var(--c-sandy);
    border-left: 3px solid var(--c-lavender);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--sp-6) var(--sp-8);
    margin: var(--sp-8) auto;
    font-size: var(--fs-lg);
    max-width: none;
}

.page-showcase .post-content blockquote p {
    color: var(--c-sandy);
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.page-showcase .post-content blockquote strong,
.page-showcase .post-content blockquote em {
    color: var(--c-sandy);
}

/* Lists — readable width, centered */
.page-showcase .post-content ul,
.page-showcase .post-content ol {
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
}

/* Ghost button card — centered */
.page-showcase .post-content .kg-button-card {
    text-align: center;
    margin: var(--sp-8) auto;
    max-width: var(--w-reading);
}

/* Team member: photo + name + role pattern */
.page-showcase .post-content > .kg-image-card + h5 {
    margin-top: var(--sp-4);
    text-align: center;
}

.page-showcase .post-content > h5 + h6 {
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: var(--sp-1);
    margin-bottom: var(--sp-3);
}

/* Team member bio — after name+role h6 */
.page-showcase .post-content > h6 + p {
    text-align: left;
}

/* H2 preceded by p or list — keep top border for section breaks */
.page-showcase .post-content > h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

/* "Nagroda specjalna" h5 in mid-content */
.page-showcase .post-content > p + h5 {
    font-style: normal;
    text-align: left;
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--sp-10);
    color: var(--c-lavender);
}

/* H3 after h5 (sub-heading pair) */
.page-showcase .post-content > h5 + h3 {
    max-width: var(--w-reading);
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .showcase-hero {
        padding: var(--sp-12) var(--gutter) var(--sp-8);
    }

    .page-showcase
        .post-content
        > .kg-image-card:not(.kg-width-wide):not(.kg-width-full) {
        max-width: 280px;
    }
}

/* ── Team Page — Zespół ──────────────────────── */

.zespol-body {
    max-width: var(--w-wide);
    margin: 0 auto;
    padding: var(--sp-10) var(--gutter) var(--sp-12);
    color: var(--c-text);
}

/* Intro h5 */
.page-zespol .post-content > h5:first-of-type {
    font-size: var(--fs-xl);
    font-weight: 400;
    font-style: normal;
    color: var(--c-text-secondary);
    text-align: left;
    max-width: var(--w-reading);
    margin-bottom: var(--sp-6);
}

/* Sticker illustration */
.page-zespol .post-content > h5:first-of-type + .kg-image-card {
    max-width: 280px;
    margin-bottom: var(--sp-10);
}

/* Section header */
.page-zespol .post-content > h3 {
    text-align: left;
    font-size: var(--fs-2xl);
    margin: var(--sp-10) 0 var(--sp-12);
    padding-bottom: var(--sp-5);
    position: relative;
    max-width: var(--w-reading);
}

.page-zespol .post-content > h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--c-lavender);
    border-radius: 2px;
}

/* ── Team member card styling ── */

/* Photo */
.page-zespol
    .post-content
    > .kg-image-card:not(.kg-width-wide):not(.kg-width-full) {
    max-width: 320px;
    margin: 0 0 var(--sp-4);
    padding-top: var(--sp-12);
    position: relative;
}

/* Lavender dot divider between members */
.page-zespol
    .post-content
    > .kg-image-card:not(.kg-width-wide):not(.kg-width-full)::before {
    content: "";
    position: absolute;
    top: var(--sp-4);
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--c-lavender);
    border-radius: 50%;
    opacity: 0.4;
}

/* First member card — no divider dot */
.page-zespol .post-content > h3 + .kg-image-card::before,
.page-zespol .post-content > h5:first-of-type + .kg-image-card::before {
    display: none;
}

.page-zespol
    .post-content
    > .kg-image-card:not(.kg-width-wide):not(.kg-width-full)
    img {
    border-radius: var(--radius);
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-zespol
    .post-content
    > .kg-image-card:not(.kg-width-wide):not(.kg-width-full):hover
    img {
    transform: scale(1.03);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Member name */
.page-zespol .post-content > .kg-image-card + h5 {
    text-align: left;
    font-size: var(--fs-2xl);
    font-weight: 700;
    font-style: normal;
    color: var(--c-text);
    margin-top: var(--sp-4);
    margin-bottom: var(--sp-1);
    max-width: none;
}

/* Member role — lavender pill label */
.page-zespol .post-content > h5 + h6 {
    display: inline-block;
    text-align: left;
    font-family: var(--f-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-lavender);
    padding: var(--sp-1) var(--sp-3);
    border: 1px solid rgba(226, 207, 255, 0.15);
    border-radius: 99px;
    margin: 0 0 var(--sp-4);
}

/* Member bio */
.page-zespol .post-content > h6 + p {
    text-align: left;
    max-width: var(--w-reading);
    color: var(--c-text-secondary);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
}

/* Generic paragraphs */
.page-zespol .post-content > p {
    text-align: left;
    max-width: var(--w-reading);
}

/* Scroll-triggered reveal for team members */
@keyframes zespol-reveal {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.97);
    }
}

@supports (animation-timeline: view()) {
    .page-zespol
        .post-content
        > .kg-image-card:not(.kg-width-wide):not(.kg-width-full) {
        animation: zespol-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;
    }

    .page-zespol .post-content > .kg-image-card + h5,
    .page-zespol .post-content > h5 + h6,
    .page-zespol .post-content > h6 + p {
        animation: zespol-reveal 0.5s ease both;
        animation-timeline: view();
        animation-range: entry 0% entry 20%;
    }
}

@media (max-width: 768px) {
    .page-zespol
        .post-content
        > .kg-image-card:not(.kg-width-wide):not(.kg-width-full) {
        max-width: 240px;
    }

    .page-zespol .post-content > .kg-image-card + h5 {
        font-size: var(--fs-xl);
    }
}

/* 12. PAYWALL / MEMBERSHIP CTA
   ========================================================================== */

.gh-post-upgrade-cta {
    position: relative;
}

.gh-post-upgrade-cta-content {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: var(--sp-10) var(--sp-8) !important;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: none !important;
}

.gh-post-upgrade-cta-content h2 {
    font-family: var(--f-heading);
    font-size: var(--fs-2xl);
    font-weight: 700;
    line-height: var(--lh-snug);
    color: var(--c-text) !important;
    margin: 0 0 var(--sp-5);
}

.gh-post-upgrade-cta-content .gh-btn {
    display: inline-block;
    background-color: var(--c-accent) !important;
    color: var(--c-black) !important;
    font-family: var(--f-heading);
    font-size: var(--fs-base);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.gh-post-upgrade-cta-content .gh-btn:hover {
    opacity: 0.85;
}

.gh-post-upgrade-cta-content p {
    margin-top: var(--sp-5);
    color: var(--c-text-secondary) !important;
    font-family: var(--f-body);
    font-size: var(--fs-sm);
}

.gh-post-upgrade-cta-content p a {
    color: var(--c-accent) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-post-upgrade-cta-content p a:hover {
    color: var(--c-text) !important;
}

/* ==========================================================================
   SWUP PAGE TRANSITIONS
   -------------------------------------------------------------------------- */
/* State classes applied by Swup on <html>:
   - .is-changing   — whole swap lifecycle (fetch + animate + render)
   - .is-leaving    — outgoing page is still visible, about to fade out
   - .is-animating  — during fade-out and fade-in
   - .is-rendering  — after new content is inserted, fading in
   Element with a class matching [class*="transition-"] is tracked by Swup. */

.transition-fade {
    opacity: 1;
}

html.is-changing .transition-fade {
    transition: opacity 0.25s ease;
}

html.is-animating .transition-fade {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    html.is-changing .transition-fade,
    html.is-animating .transition-fade {
        transition: none;
        opacity: 1;
    }
}
