/* ═══════════════════════════════════════
   SINGLE POST – single.css
   Zmienne scoped do .single-post
   ═══════════════════════════════════════ */

.single-post {
    --sp-bg:        #ffffff;
    --sp-surface:   #f5f5f5;
    --sp-border:    #e0e0e0;
    --sp-gold:      #f0a500;
    --sp-gold-dark: #c98a00;
    --sp-red:       #e63329;
    --sp-text:      #1a1a1a;
    --sp-muted:     #666666;
    --sp-radius:    8px;
    --sp-font-head: 'Syne', sans-serif;
    --sp-font-body: 'DM Sans', sans-serif;
}

/* ─── Article Container ─── */

.sp-article {
    padding: clamp(2rem, 5vw, 3.5rem) 0 0;
    background: var(--sp-bg);
}

.sp-article__inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ─── Category Badge ─── */

.sp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}

.sp-cat-badge {
    display: inline-block;
    padding: 4px 12px;
    background: transparent;
    color: var(--sp-gold);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--sp-font-body);
    border: 1px solid var(--sp-gold);
    border-radius: var(--sp-radius);
    text-decoration: none;
    line-height: 1.5;
    transition: background 0.2s ease, color 0.2s ease;
}

.sp-cat-badge:hover {
    background: var(--sp-gold);
    color: var(--sp-bg);
}

/* ─── Title ─── */

.sp-title {
    font-family: var(--sp-font-head);
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    color: var(--sp-text);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 1rem;
}

/* ─── Meta ─── */

.sp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 14px;
    font-family: var(--sp-font-body);
    color: var(--sp-muted);
}

.sp-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.sp-meta__item svg {
    flex-shrink: 0;
    opacity: 0.5;
    stroke: var(--sp-muted);
}

/* ─── Featured Image ─── */

.sp-featured-image {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: var(--sp-radius);
    overflow: hidden;
    border: 1px solid var(--sp-border);
}

.sp-featured-image__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: var(--sp-radius);
}

/* ─── Content ─── */

.sp-content {
    font-family: var(--sp-font-body);
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    line-height: 1.75;
    color: var(--sp-text);
}

.sp-content h2 {
    font-family: var(--sp-font-head);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--sp-text);
    margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.02em;
}

.sp-content h3 {
    font-family: var(--sp-font-head);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: var(--sp-text);
    margin: 2rem 0 0.5rem;
}

.sp-content h4 {
    font-family: var(--sp-font-head);
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 600;
    color: var(--sp-text);
    margin: 1.5rem 0 0.5rem;
}

.sp-content p {
    margin: 0 0 1.25rem;
}

.sp-content a {
    color: var(--sp-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.sp-content a:hover {
    color: var(--sp-gold-dark);
}

.sp-content ul,
.sp-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.sp-content li {
    margin-bottom: 0.4rem;
    color: var(--sp-text);
}

.sp-content blockquote {
    border-left: 4px solid var(--sp-gold);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--sp-surface);
    border-radius: 0 var(--sp-radius) var(--sp-radius) 0;
    font-style: italic;
    color: var(--sp-text);
}

.sp-content blockquote p:last-child {
    margin-bottom: 0;
}

.sp-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--sp-radius);
}

.sp-content figure {
    margin: 1.5rem 0;
}

.sp-content figcaption {
    font-size: 13px;
    color: var(--sp-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.sp-content pre {
    background: var(--sp-surface);
    color: var(--sp-text);
    padding: 1.25rem;
    border-radius: var(--sp-radius);
    border: 1px solid var(--sp-border);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.sp-content code {
    background: var(--sp-surface);
    color: var(--sp-gold);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--sp-border);
}

.sp-content pre code {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    color: inherit;
}

.sp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.sp-content th,
.sp-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--sp-border);
    text-align: left;
    color: var(--sp-text);
}

.sp-content th {
    background: var(--sp-surface);
    font-weight: 600;
    color: var(--sp-gold);
    font-family: var(--sp-font-head);
}

/* ─── Separator ─── */

.sp-separator {
    border: none;
    border-top: 1px solid var(--sp-border);
    margin: clamp(2rem, 4vw, 3rem) 0 clamp(1rem, 2vw, 1.5rem);
}

/* ─── Bottom Bar ─── */

.sp-bottom-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Przycisk "Wróć do bloga" */
.sp-bottom-bar .btn--secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--sp-border);
    color: var(--sp-muted);
    border-radius: var(--sp-radius);
    font-family: var(--sp-font-body);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.sp-bottom-bar .btn--secondary:hover {
    border-color: var(--sp-gold);
    color: var(--sp-gold);
}

.sp-bottom-bar .btn--secondary svg {
    stroke: currentColor;
}

/* Przycisk "Udostępnij" */
.sp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--sp-gold);
    cursor: pointer;
    font-family: var(--sp-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--sp-gold);
    border-radius: var(--sp-radius);
    transition: background 0.2s ease, color 0.2s ease;
}

.sp-share-btn:hover {
    background: var(--sp-gold);
    color: var(--sp-bg);
}

.sp-share-btn svg {
    stroke: currentColor;
}

.sp-share-btn--copied {
    color: #4caf50;
    border-color: #4caf50;
}

.sp-share-btn--copied:hover {
    background: #4caf50;
    color: var(--sp-bg);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 600px) {
    .sp-bottom-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .sp-bottom-bar .btn--secondary,
    .sp-share-btn {
        justify-content: center;
        width: 100%;
    }

    .sp-meta {
        gap: 0.75rem;
    }
}