/* ==========================================================================
   Design v3 — Novinky (/novinky) + detail novinky (/novinky/:slug)
   Views:    app/Views/v3/news.php         ($pageCss = 'news', $pageClass = 'b3-page-news')
             app/Views/v3/news_detail.php  ($pageCss = 'news', $pageClass = 'b3-page-news b3-page-news-detail')
   Prototyp: design_handoff_l2beleth/design/Novinky v3.dc.html (detail = extrapolace)
   Prefix:   .nw3- (výpis + sdílený medailon/meta), .nd3- (detail)
   ========================================================================== */

/* Per-page pozadí (zlatá záře vlevo nahoře) */
body.b3-page-news {
    --b-page-bg: radial-gradient(1000px 500px at 20% -100px, rgba(217, 181, 98, .10), transparent 70%), #070d0e;
}

/* ── Výpis: obal (.b-page.b-page--loose, --b-max:1100px) ───────────────── */
.nw3 {
    display: flex;
    flex-direction: column;
    gap: clamp(40px, 6vw, 72px);
}

.nw3-head .b-kicker { line-height: 1.55; }
.nw3-h1 {
    --b-h1-size: clamp(48px, 8vw, 104px);
    line-height: .95;
    overflow-wrap: break-word;
}

/* ── Časová osa ─────────────────────────────────────────────────────────── */
.nw3-timeline {
    --nw3-pad: clamp(64px, 10vw, 140px);   /* odsazení článků */
    --nw3-axis: clamp(28px, 5vw, 62px);    /* x svislé linky */
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-left: var(--nw3-pad);
}
.nw3-line {
    position: absolute;
    left: var(--nw3-axis);
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, #d9b562, rgba(60, 201, 180, .4) 70%, transparent);
    pointer-events: none;
}

.nw3-entry {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* Medailon s datem (72px) — střed na lince osy */
.nw3-medal {
    position: absolute;
    left: calc(-1 * var(--nw3-pad) + var(--nw3-axis) - 36px);
    top: -6px;
    width: 72px;
    height: 72px;
    flex: none;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #070d0e;
    border: 1px solid #d9b562;
    box-shadow: 0 0 30px rgba(217, 181, 98, .35);
    transition: border-color var(--b-dur) ease, box-shadow 200ms ease;
}
.nw3-medal__day {
    font-family: var(--b-display);
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: #e3c47f;
}
.nw3-medal__mon {
    font-size: 11px;
    line-height: 1.55;
    font-variant: small-caps;
    letter-spacing: .14em;
    color: #a4b6b4;
}

/* Meta kicker: „nejnovější novinka · 24. 5. 2026 · makin“ */
.nw3-meta {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    font-variant: small-caps;
    letter-spacing: .24em;
    text-transform: lowercase;
    color: #3cc9b4;
}
.nw3-meta time { white-space: nowrap; }   /* datum se nezalomí („24. 5. / 2026“ na 360px) */

.nw3-title {
    margin: 0;
    font-family: var(--b-display);
    font-weight: 700;
    font-size: clamp(30px, 4.4vw, 56px);
    line-height: 1.08;
    overflow-wrap: break-word;
    hyphens: auto;
}
.nw3-title a { color: #f6ead0; text-decoration: none; }
.nw3-title a:hover, .nw3-title a:focus-visible { color: #e3c47f; }

.nw3-excerpt {
    margin: 0;
    max-width: 70ch;
    font-size: 17.5px;
    line-height: 1.65;
    color: #bfcecd;
}

.nw3-read {
    align-self: flex-start;
    font-size: 21px;
    font-style: italic;
    color: #e3c47f;
    text-decoration: none;
}
.nw3-read:hover, .nw3-read:focus-visible { color: #f6ead0; }

/* Starší články (ne „nejnovější“): tlumený medailon, menší nadpis */
.nw3-entry:not(.nw3-entry--featured) .nw3-medal {
    border-color: #2a3e42;
    box-shadow: none;
}
.nw3-entry:not(.nw3-entry--featured) .nw3-medal__day { color: #cfdcda; }
.nw3-entry:not(.nw3-entry--featured):hover .nw3-medal,
.nw3-entry:not(.nw3-entry--featured):focus-within .nw3-medal {
    border-color: #8a6a2a;
    box-shadow: 0 0 20px rgba(217, 181, 98, .2);
}
.nw3-entry:not(.nw3-entry--featured) .nw3-title {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.12;
}
.nw3-entry:not(.nw3-entry--featured) .nw3-read { font-size: 19px; }

/* ── Stránkování ────────────────────────────────────────────────────────── */
.nw3-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 18px;
}
.nw3-pager__info {
    font-size: 16px;
    font-style: italic;
    color: #a4b6b4;
}

/* ==========================================================================
   Detail novinky (.nd3) — .b-page.b-page--loose, --b-max:900px
   ========================================================================== */
.nd3 {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 4vw, 44px);
}

.nd3-crumb {
    align-self: flex-start;
    line-height: 1.55;
    text-decoration: none;
}
.nd3-crumb:hover, .nd3-crumb:focus-visible { color: #3cc9b4; }

.nd3-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 28px;
}
/* Medailon v hlavičce detailu je v toku (ne absolutně na ose). */
.nd3-head .nd3-medal {
    position: static;
    left: auto;
    top: auto;
}
.nd3-head__text {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nd3-h1 {
    --b-h1-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ── Tělo článku (TinyMCE HTML) ─────────────────────────────────────────── */
.nd3-body {
    max-width: 720px;
    font-size: 19px;
    line-height: 1.7;
    color: #cfdcda;
    overflow-wrap: break-word;
}
.nd3-body > :first-child { margin-top: 0; }
.nd3-body > :last-child { margin-bottom: 0; }
.nd3-body p { margin: 0 0 1em; }
.nd3-body :is(h1, h2, h3, h4, h5, h6) { margin: 1.8em 0 .6em; color: #e3c47f; }
.nd3-body h1, .nd3-body h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.nd3-body h3 { font-size: clamp(20px, 2.4vw, 24px); line-height: 1.2; }
.nd3-body :is(h4, h5, h6) {
    font-family: var(--b-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.55;
    font-variant: small-caps;
    letter-spacing: .2em;
    color: #3cc9b4;
}
.nd3-body a {
    color: #e3c47f;
    text-decoration: underline;
    text-decoration-color: rgba(227, 196, 127, .4);
    text-underline-offset: 3px;
}
.nd3-body a:hover, .nd3-body a:focus-visible { color: #f6ead0; text-decoration-color: currentColor; }
.nd3-body :is(strong, b) { color: #e7eeec; font-weight: 600; }
.nd3-body :is(ul, ol) { margin: 0 0 1em; }
.nd3-body ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nd3-body ul > li { position: relative; padding-left: 26px; }
.nd3-body ul > li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: .72em;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: #d9b562;
    box-shadow: 0 0 8px rgba(217, 181, 98, .6);
}
.nd3-body ol { padding-left: 1.5em; }
.nd3-body ol > li { padding-left: .3em; }
.nd3-body ol > li + li { margin-top: 10px; }
.nd3-body ol > li::marker { color: #e3c47f; font-family: var(--b-display); font-size: .82em; }
.nd3-body li > :is(ul, ol) { margin: 10px 0 0; }
.nd3-body li > p { margin: 0; }
.nd3-body blockquote {
    margin: 1.4em 0;
    padding: 4px 0 4px 22px;
    border-left: 2px solid #8a6a2a;
    font-size: 20px;
    font-style: italic;
    line-height: 1.55;
    color: #e3c47f;
}
.nd3-body blockquote p:last-child { margin-bottom: 0; }
.nd3-body img {
    height: auto;
    margin: 1.4em 0;
    border: 1px solid #1d2d31;
    border-radius: 14px;
}
.nd3-body :is(iframe, video) { display: block; max-width: 100%; border: 0; border-radius: 14px; }
.nd3-body figure { margin: 1.4em 0; }
.nd3-body figure img { margin: 0; }
.nd3-body figcaption { margin-top: 8px; font-size: 15px; font-style: italic; color: #a4b6b4; }
.nd3-body hr { height: 1px; margin: 2em 0; border: 0; background: #14201f; }
.nd3-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    margin: 0 0 1em;
    border-collapse: collapse;
    font-size: 17px;
    line-height: 1.5;
}
.nd3-body :is(th, td) { padding: 10px 14px; border: 1px solid #1d2d31; text-align: left; vertical-align: top; }
.nd3-body th {
    font-weight: 400;
    font-variant: small-caps;
    letter-spacing: .14em;
    color: #a6ebdd;
    background: #0b1315;
}
.nd3-body code {
    padding: .1em .35em;
    border: 1px solid #1d2d31;
    border-radius: 4px;
    background: #0e1a1b;
    font-size: .88em;
    color: #e7eeec;
}
.nd3-body pre {
    margin: 0 0 1em;
    padding: 16px 18px;
    overflow-x: auto;
    border: 1px solid #1d2d31;
    border-radius: 12px;
    background: #0b1315;
    font-size: 15px;
    line-height: 1.5;
}
.nd3-body pre code { padding: 0; border: 0; background: none; }

/* ── Patička článku ─────────────────────────────────────────────────────── */
.nd3-foot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    max-width: 720px;
}
.nd3-orn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    --ink: #d9b562;
}
.nd3-orn::before, .nd3-orn::after {
    content: '';
    flex: 1;
    height: 1px;
}
.nd3-orn::before { background: linear-gradient(90deg, transparent, #2a3e42); }
.nd3-orn::after { background: linear-gradient(90deg, #2a3e42, transparent); }
