/* ===========================================================
   Akademia Chirurgii — BLOG
   Paleta i typografia spójne ze stroną główną (../index.html):
   czerń #161412 + żywa czerwień #E4002B, Archivo + Plus Jakarta.
   =========================================================== */

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

:root {
    --navy:       #161412;
    --navy-deep:  #0C0B0A;
    --navy-soft:  #242220;
    --red:        #E4002B;
    --red-bright: #FF1F35;
    --red-soft:   #FDE6EA;
    --bg:         #F4F4F2;
    --bg-2:       #FAFAF8;
    --white:      #FFFFFF;
    --ink:        #161412;
    --muted:      #585650;
    --muted-2:    #8A8880;
    --sep:        #E6E5E0;
    --gold:       #C9A24B;
    --serif: 'Archivo', system-ui, -apple-system, sans-serif;
    --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--white);
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 800; letter-spacing: -0.02em; }

/* ---------- NAV ---------- */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sep);
    padding: 0 2rem;
}
.nav-inner {
    max-width: 1140px; margin: 0 auto; height: 92px;
    display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
    display: flex; align-items: baseline; gap: 0.05rem;
    text-decoration: none; font-family: var(--serif);
    font-weight: 600; font-size: 1.32rem; letter-spacing: -0.01em;
    color: var(--navy); line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a:not(.nav-cta) {
    font-size: 0.9rem; font-weight: 600; color: var(--muted);
    text-decoration: none; transition: color 0.15s;
}
.nav-links a:not(.nav-cta):hover { color: var(--navy); }
.nav-links a.active { color: var(--red); }
.nav-cta {
    background: var(--red); color: var(--white) !important;
    padding: 0.6rem 1.35rem; border-radius: 4px;
    font-size: 0.875rem; font-weight: 700; text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}
.nav-cta:hover { background: var(--red-bright); transform: translateY(-1px); }

/* ---------- HAMBURGER + MENU MOBILNE ---------- */
.nav-toggle {
    display: none; /* desktop: ukryty */
    flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    background: transparent; border: 1px solid var(--sep); border-radius: 8px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.nav-toggle-bar {
    display: block; width: 100%; height: 2px; border-radius: 2px;
    background: var(--navy); transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(12,11,10,0.55); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-panel {
    position: absolute; top: 0; right: 0; width: min(86vw, 360px); height: 100%;
    background: var(--navy); color: var(--white);
    box-shadow: -20px 0 50px rgba(0,0,0,0.4);
    padding: 1.4rem 1.6rem 2rem; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.22,0.61,0.36,1);
    overflow-y: auto;
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.mobile-menu-title {
    font-family: var(--serif); font-weight: 700; font-size: 0.78rem;
    letter-spacing: 0.16em; text-transform: uppercase; color: #FF8F8F;
}
.mobile-menu-close {
    background: transparent; border: none; color: var(--white);
    font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 0.3rem;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-close:hover { color: #FF8F8F; }
/* reset stylów dziedziczonych z globalnego nav{} (panel zawiera <nav>) */
.mobile-menu-links { display: flex; flex-direction: column; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; position: static; padding: 0; border: none; box-shadow: none; }
.mobile-menu-links a {
    font-family: var(--serif); font-weight: 600; font-size: 1.18rem;
    color: rgba(255,255,255,0.9); text-decoration: none;
    padding: 0.95rem 0; border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: color 0.15s;
}
.mobile-menu-links a:hover, .mobile-menu-links a.active { color: #FF8F8F; }
.mobile-menu-links a.mobile-menu-cta {
    margin-top: 1.4rem; border-bottom: none; text-align: center;
    background: var(--red); color: var(--white); border-radius: 6px;
    padding: 1rem 1.5rem; font-size: 1.02rem; font-weight: 700;
    box-shadow: 0 10px 26px rgba(192,0,0,0.4);
}
.mobile-menu-links a.mobile-menu-cta:hover { background: var(--red-bright); color: var(--white); }

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
    font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
    letter-spacing: 0.01em; margin-bottom: 1.6rem;
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: #FFC9C9; }
.breadcrumb span { color: rgba(255,255,255,0.4); }
.breadcrumb span[aria-current] { color: #FFC9C9; }

/* ---------- BLOG HERO (lista) ---------- */
.blog-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 500px at 78% -10%, rgba(192,0,0,0.22), transparent 60%),
        linear-gradient(155deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--white);
    padding: 4.5rem 2rem 4rem;
}
.blog-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(680px 460px at 30% 30%, #000 30%, transparent 75%);
    pointer-events: none;
}
.blog-hero-inner { max-width: 880px; margin: 0 auto; position: relative; }
.blog-tag {
    display: inline-flex; align-items: center; gap: 0.55rem;
    background: rgba(192,0,0,0.16);
    border: 1px solid rgba(225,20,20,0.4);
    color: #FFC9C9; font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.13em; text-transform: uppercase;
    padding: 0.42rem 1rem; border-radius: 100px; margin-bottom: 1.6rem;
}
.blog-tag .dotline { width: 7px; height: 7px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 10px var(--red-bright); }
.blog-hero h1 {
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    font-weight: 600; line-height: 1.08;
    letter-spacing: -0.02em; margin-bottom: 1.2rem;
}
.blog-hero h1 em { font-style: italic; color: #FF8F8F; }
.blog-hero-sub {
    font-size: 1.08rem; color: rgba(255,255,255,0.74);
    max-width: 680px; line-height: 1.7;
}

/* ---------- SECTION BASE ---------- */
.section { padding: 4.5rem 2rem; }
.section-inner { max-width: 1140px; margin: 0 auto; }

/* ---------- LISTA ARTYKUŁÓW ---------- */
.posts-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.post-card {
    display: flex; flex-direction: column;
    background: var(--white); border: 1px solid var(--sep);
    border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    border-top: 3px solid var(--red);
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(22,20,18,0.10); border-color: #ECCFCF; border-top-color: var(--red); }
.post-card-body { padding: 1.8rem 1.7rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-meta {
    display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
    margin-bottom: 0.9rem; font-size: 0.78rem; color: var(--muted-2);
}
.post-cat {
    background: var(--red-soft); color: var(--red);
    font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    font-size: 0.68rem; padding: 0.28rem 0.65rem; border-radius: 4px;
}
.post-meta time { font-weight: 600; }
.post-card h2 {
    font-size: 1.24rem; font-weight: 600; line-height: 1.25;
    letter-spacing: -0.01em; margin-bottom: 0.7rem; color: var(--navy);
}
.post-card p { font-size: 0.94rem; color: var(--muted); line-height: 1.62; flex-grow: 1; }
.post-readmore {
    display: inline-flex; align-items: center; gap: 0.45rem;
    margin-top: 1.3rem; font-size: 0.88rem; font-weight: 700; color: var(--red);
}
.post-card:hover .post-readmore { gap: 0.7rem; }

/* ---------- ARTYKUŁ (single) ---------- */
.article-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 500px at 82% -20%, rgba(192,0,0,0.20), transparent 60%),
        linear-gradient(155deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--white);
    padding: 4rem 2rem 3.6rem;
}
.article-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(620px 420px at 28% 30%, #000 30%, transparent 75%);
    pointer-events: none;
}
.article-hero-inner { max-width: 760px; margin: 0 auto; position: relative; }
.article-cat {
    display: inline-flex; align-items: center; gap: 0.55rem;
    background: rgba(192,0,0,0.16); border: 1px solid rgba(225,20,20,0.4);
    color: #FFC9C9; font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 0.36rem 0.9rem; border-radius: 100px; margin-bottom: 1.4rem;
}
.article-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 600; line-height: 1.14; letter-spacing: -0.02em;
    margin-bottom: 1.3rem;
}
.article-byline {
    display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
    font-size: 0.9rem; color: rgba(255,255,255,0.62);
}
.article-byline strong { color: #FFC9C9; font-weight: 700; }
.article-byline .sep { color: rgba(255,255,255,0.3); }

/* korpus artykułu */
.article-body {
    max-width: 760px; margin: 0 auto; padding: 3.4rem 2rem 1rem;
}
.article-body p {
    font-size: 1.08rem; color: var(--ink); line-height: 1.78; margin-bottom: 1.4rem;
}
.article-body h2 {
    font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    font-weight: 700; letter-spacing: -0.015em; line-height: 1.2;
    color: var(--navy); margin: 2.6rem 0 1rem;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
    font-family: var(--serif); font-size: 1.22rem; font-weight: 700;
    letter-spacing: -0.01em; color: var(--navy); margin: 2rem 0 0.8rem;
}
.article-body ul { list-style: none; margin: 0 0 1.6rem; display: grid; gap: 0.6rem; }
.article-body ul li {
    position: relative; padding-left: 1.7rem;
    font-size: 1.05rem; color: var(--ink); line-height: 1.7;
}
.article-body ul li::before {
    content: ""; position: absolute; left: 0; top: 0.62rem;
    width: 9px; height: 9px; background: var(--red);
    border-radius: 50% 50% 50% 0; transform: rotate(45deg);
}
.article-body strong { font-weight: 700; color: var(--navy); }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

/* kropla krwi — separator marki */
.blood-rule { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 2.4rem; }
.blood-rule::before { content: ""; height: 1px; flex: 0 0 46px; background: var(--red); }
.blood-rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--sep), transparent); }
.blood-drop {
    flex: 0 0 auto; width: 11px; height: 11px; background: var(--red);
    border-radius: 50% 50% 50% 0; transform: rotate(45deg);
    box-shadow: 0 0 0 4px rgba(228,0,43,0.1);
}

/* blok pytania egzaminacyjnego */
.exam-box {
    background: var(--bg-2); border: 1px solid var(--sep); border-left: 4px solid var(--red);
    border-radius: 12px; padding: 1.8rem 1.9rem; margin: 0 0 1.8rem;
}
.exam-box .exam-q { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.1rem; line-height: 1.4; margin-bottom: 1.2rem; }
.exam-options { list-style: none; display: grid; gap: 0.6rem; margin: 0; }
.exam-options li {
    padding: 0.8rem 1rem; border-radius: 8px; background: var(--white);
    border: 1px solid var(--sep); font-size: 1rem; line-height: 1.55; padding-left: 1rem;
}
.exam-options li::before { display: none; }
.exam-options li .opt-letter { font-weight: 700; color: var(--muted-2); margin-right: 0.5rem; }
.exam-options li.correct {
    background: #F0F8F1; border-color: #BFE3C4;
}
.exam-options li.correct .opt-letter { color: #1E7B33; }
.exam-options li.correct .opt-flag {
    display: inline-flex; align-items: center; gap: 0.3rem;
    margin-left: 0.6rem; font-size: 0.74rem; font-weight: 700;
    color: #1E7B33; text-transform: uppercase; letter-spacing: 0.05em;
}

/* cytat źródłowy */
.source-quote {
    border-left: 3px solid var(--gold); background: var(--bg-2);
    border-radius: 0 10px 10px 0; padding: 1.2rem 1.5rem; margin: 0 0 1.6rem;
    font-family: var(--serif); font-style: italic; font-size: 1.05rem;
    color: var(--navy); line-height: 1.6;
}
.source-quote cite { display: block; margin-top: 0.6rem; font-style: normal; font-family: var(--sans); font-size: 0.85rem; color: var(--muted-2); font-weight: 600; }

/* powrót do listy */
.article-back {
    max-width: 760px; margin: 0 auto; padding: 1.5rem 2rem 0;
}
.article-back a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; font-weight: 700; color: var(--red); text-decoration: none;
}
.article-back a:hover { gap: 0.7rem; }

/* CTA wewnątrz artykułu */
.article-inline-cta {
    max-width: 760px; margin: 3rem auto 0; padding: 0 2rem;
}
.article-inline-cta-card {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--white); border-radius: 16px; padding: 2.4rem 2.2rem;
    border-top: 3px solid var(--red); position: relative; overflow: hidden;
}
.article-inline-cta-card h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.article-inline-cta-card h3 em { font-style: italic; color: #FF8F8F; }
.article-inline-cta-card p { font-family: var(--sans); font-size: 0.98rem; color: rgba(255,255,255,0.72); line-height: 1.6; margin-bottom: 1.5rem; }

/* ---------- CTA / BTN ---------- */
.btn-primary {
    display: inline-block; background: var(--red); color: var(--white);
    padding: 0.95rem 2rem; border-radius: 5px;
    font-size: 0.96rem; font-weight: 700; text-decoration: none;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 8px 24px rgba(192,0,0,0.32);
}
.btn-primary:hover { background: var(--red-bright); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(192,0,0,0.42); }
.btn-secondary {
    display: inline-block; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92);
    padding: 0.95rem 2rem; border-radius: 5px;
    font-size: 0.96rem; font-weight: 600; text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2); transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.13); }
.cta-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.blog-cta {
    position: relative; overflow: hidden;
    background:
        radial-gradient(700px 400px at 50% -20%, rgba(192,0,0,0.28), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--white); padding: 5rem 2rem; text-align: center;
}
.blog-cta-inner { max-width: 720px; margin: 0 auto; }
.blog-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1rem; }
.blog-cta h2 em { font-style: italic; color: #FF8F8F; }
.blog-cta p { font-family: var(--sans); font-size: 1.06rem; color: rgba(255,255,255,0.72); max-width: 600px; margin: 0 auto 2.2rem; line-height: 1.65; }
.blog-cta .cta-actions { justify-content: center; }

/* ---------- FOOTER ---------- */
footer { background: var(--navy-deep); color: rgba(255,255,255,0.45); text-align: center; padding: 3rem 2rem; font-size: 0.85rem; line-height: 1.9; }
footer .footer-brand { font-family: var(--serif); font-size: 1.15rem; color: rgba(255,255,255,0.85); margin-bottom: 0.6rem; }
footer a { color: rgba(255,255,255,0.62); text-decoration: none; }
footer a:hover { color: var(--white); }
footer .disclaimer { margin-top: 0.9rem; font-size: 0.78rem; color: rgba(255,255,255,0.35); max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
    .posts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .blog-hero, .article-hero { padding: 3.2rem 1.4rem 3rem; }
    .section { padding: 3.2rem 1.4rem; }
    .article-body { padding: 2.6rem 1.4rem 1rem; }
    .article-back, .article-inline-cta { padding-left: 1.4rem; padding-right: 1.4rem; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    nav { padding: 0 1.2rem; }
}
