/* /pomoc — Pomoć (noseći layout + pod-stranice po tabu) */

html { scroll-behavior: smooth; }

/* Tab navigacija Pomoći — mirne hairline pilule; brand samo na aktivnoj.
   9 stavki se lomi u više redova bez „pokidanog" underline efekta. */
.help-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 26px;
}
.help-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-1, #fff);
    color: var(--c-text-secondary);
    font-weight: 600;
    font-size: var(--fs-sm);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.help-tab__ico { color: var(--c-text-muted); flex-shrink: 0; transition: color .12s ease; }
.help-tab:hover {
    color: var(--c-text-strong);
    border-color: var(--c-border-strong, var(--c-border));
    box-shadow: 0 2px 8px -4px rgba(15, 23, 42, .18);
}
.help-tab:hover .help-tab__ico { color: var(--c-text-strong); }
.help-tab.is-active {
    background: var(--c-pill-brand-bg, var(--c-brand-surface, #eff6ff));
    border-color: color-mix(in srgb, var(--c-brand) 35%, var(--c-border));
    color: var(--c-brand-strong, var(--c-brand));
}
.help-tab.is-active .help-tab__ico { color: var(--c-brand); }

/* Na javnom (anonimnom) layoutu hero je centriran — centriraj i tabove */
.public-shell .help-tabs { justify-content: center; }

/* Breadcrumb-kicker u heroju podstranice (link nazad na /pomoc) */
.help-hero-kicker {
    display: inline-block;
    margin-bottom: 6px;
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-brand);
    text-decoration: none;
}
.help-hero-kicker:hover { color: var(--c-brand-strong); text-decoration: underline; }

/* Klikabilne kartice-vodiči na početnoj stranici Pomoći */
a.help-card { text-decoration: none; }
.help-card--link {
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.help-card--link:hover {
    border-color: color-mix(in srgb, var(--c-brand) 35%, var(--c-border));
    box-shadow: 0 10px 26px -16px rgba(15, 23, 42, .28);
    transform: translateY(-1px);
}
.help-card__go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-brand);
}
.help-card--link:hover .help-card__go { color: var(--c-brand-strong); }

@media (max-width: 720px) {
    /* Na telefonu 10 tabova ne slažemo u 4 reda — jedan red sa horizontalnim skrolom */
    .help-tabs {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .help-tabs::-webkit-scrollbar { display: none; }
    .help-tab { padding: 7px 12px; flex: 0 0 auto; }
    .public-shell .help-tabs { justify-content: flex-start; }
}

/* Sekcijska ikonica u zaglavlju pb-panel-a (uz kicker + naslov).
   Mora biti specifičnija od `.pb-panel--padded > .pb-panel__head > div:first-child`
   koje postavlja flex:1 1 auto na prvi div u headeru. */
.pb-panel--padded > .pb-panel__head:has(> .help-sec-ico) {
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
}
.pb-panel--padded > .pb-panel__head > .help-sec-ico:first-child,
.pb-panel--padded > .pb-panel__head > .help-sec-ico {
    flex: 0 0 40px !important;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--c-pill-brand-bg);
    color: var(--c-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.pb-panel--padded > .pb-panel__head > .help-sec-ico svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

/* Karetice sa „šta troši kredite" */
.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}
@media (max-width: 820px) {
    .help-grid { grid-template-columns: 1fr; }
}

.help-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 18px 16px;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    background: var(--c-surface-1, var(--p-white));
}
.help-card__ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--c-pill-brand-bg);
    color: var(--c-brand);
}
.help-card__ico svg { width: 18px; height: 18px; }
.help-card h3 {
    margin: 2px 0 0;
    font-family: var(--p-font-display);
    font-weight: 650;
    font-size: var(--fs-md);
    letter-spacing: -0.01em;
    color: var(--c-text-strong);
}
.help-card p {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--c-text-secondary);
}
.help-card a { color: var(--c-brand); font-weight: 600; text-decoration: none; }
.help-card a:hover { color: var(--c-brand-strong); }

/* „Kako AI radi" tok */
.help-prose {
    max-width: 880px;
    margin-top: 6px;
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--c-text);
}
.help-prose > p { margin: 0 0 16px; }
.help-prose__h3 {
    margin: 22px 0 8px;
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: var(--fs-lg);
    letter-spacing: -0.015em;
    color: var(--c-text-strong);
}

.help-pipeline {
    display: grid;
    gap: 12px;
    margin: 6px 0 22px;
}
.help-step {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface-1, var(--p-white));
}
.help-step__num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--c-pill-brand-bg);
    color: var(--c-brand);
    font-weight: 700;
    font-size: var(--fs-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.help-step h4 {
    margin: 0 0 4px;
    font-family: var(--p-font-display);
    font-weight: 650;
    font-size: var(--fs-base);
    color: var(--c-text-strong);
}
.help-step p {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--c-text-secondary);
}

.help-callout {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--c-brand) 22%, var(--c-border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-brand) 8%, transparent), transparent 70%);
    margin: 4px 0 14px;
}
.help-callout__ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--c-brand);
    color: var(--p-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.help-callout__ico svg { width: 18px; height: 18px; }
.help-callout h4 {
    margin: 0 0 4px;
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: var(--fs-base);
    color: var(--c-text-strong);
}
.help-callout p {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--c-text);
}

.help-disclaimer {
    margin: 4px 0 0;
    padding: 12px 14px;
    border-left: 3px solid var(--c-border-strong, var(--c-border));
    background: var(--c-surface-2, transparent);
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.55;
    border-radius: 6px;
}

/* Q&A */
.help-qa {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}
.help-qa__item {
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface-1, var(--p-white));
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.help-qa__item[open] {
    border-color: color-mix(in srgb, var(--c-brand) 35%, var(--c-border));
    box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--c-brand) 35%, transparent);
}
.help-qa__item summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-weight: 600;
    font-size: var(--fs-base);
    color: var(--c-text-strong);
}
.help-qa__item summary::-webkit-details-marker { display: none; }
.help-qa__chev { color: var(--c-text-muted); transition: transform .2s ease; flex-shrink: 0; }
.help-qa__item[open] .help-qa__chev { transform: rotate(180deg); color: var(--c-brand); }
.help-qa__body {
    padding: 0 18px 16px;
    font-size: var(--fs-sm);
    line-height: 1.65;
    color: var(--c-text-secondary);
}
.help-qa__body p { margin: 0; }
.help-qa__body a { color: var(--c-brand); font-weight: 600; text-decoration: none; }
.help-qa__body a:hover { color: var(--c-brand-strong); }

/* ==========================================================================
   Mockup okvir — statičan prikaz „kao prava stranica" u sekcijama Pomoći.
   Sadržaj unutar .help-mock__screen koristi PRAVE klase ciljne stranice
   (pb-*, ri-*, cl-*, leg-*, rl-*, cr-*…), pa mora da učita i njen CSS.
   ========================================================================== */
.help-mock {
    margin: 16px 0 6px;
    border: 1px solid var(--c-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--c-surface-1, #fff);
    box-shadow: 0 14px 40px -24px rgba(15, 23, 42, .35);
}
.help-mock__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--c-surface-2, #f1f5f9);
    border-bottom: 1px solid var(--c-border);
}
.help-mock__dots { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.help-mock__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-border-strong, #cbd5e1); display: block; }
.help-mock__url {
    flex: 1 1 auto;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    font-size: var(--fs-2xs);
    color: var(--c-text-muted);
    background: var(--c-surface-1, #fff);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 3px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.help-mock__screen {
    padding: 20px 22px 26px;
    background: var(--c-surface-page, #f6f8fc);
    overflow-x: auto; /* širok sadržaj (tabele, editor) skroluje unutar okvira, ne lomi stranicu */
}
.help-mock__screen > * { min-width: 0; }
@media (max-width: 720px) {
    .help-mock__screen { padding: 14px 12px 18px; }
}

/* Mockup je statičan: ništa unutra nije klikabilno */
.help-mock__screen a,
.help-mock__screen button,
.help-mock__screen input,
.help-mock__screen textarea,
.help-mock__screen select,
.help-mock__screen summary,
.help-mock__screen label { pointer-events: none; }

/* Sticky elementi realnih stranica ne smeju da se „lepe" unutar Pomoći */
.help-mock__screen .leg-results-head,
.help-mock__screen .law-toc,
.help-mock__screen .law-toolbar { position: static !important; }

/* Numerisane oznake regiona na mockup-u + legenda ispod */
.help-anno { position: relative; }
.help-dot {
    position: absolute;
    top: -9px;
    left: -9px;
    z-index: 3;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-brand);
    color: var(--p-white, #fff);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(37, 99, 235, .4), 0 0 0 2px var(--c-surface-1, #fff);
}
.help-legend {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
}
.help-legend li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    line-height: 1.55;
}
.help-legend .help-dot { position: static; margin-top: 1px; }
.help-legend strong { color: var(--c-text-strong); }

/* Pomoćni rasporedi unutar mockup-a */
.help-mock-stack { display: grid; gap: 14px; }
.help-mock-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

/* Realne stranice na mobilnom pretvaraju facete u off-canvas fioku — u statičnom
   mockup-u to bi ih sakrilo, pa ih vraćamo u tok dokumenta. */
.help-mock .cl-facets-backdrop { display: none !important; }
.help-mock .cl-layout__facets {
    position: static !important;
    transform: none !important;
    height: auto !important;
    max-width: none !important;
}

/* Uži kontejneri (ulogovani shell + TOC kolona, tablet, telefon): kolone mockup-a
   se slažu jedna ispod druge umesto da se gnječe. */
@media (max-width: 1250px) {
    .help-mock .cl-layout { flex-direction: column; }
    .help-mock .cl-layout__facets { width: 100% !important; flex: 1 1 auto !important; }
    .help-mock .law-text-layout { grid-template-columns: 1fr; }
    .help-mock .law-toc { max-height: none; }
    .help-mock-editor { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    /* „Papir" editora i pravni dokument u uskom mockup-u — manji unutrašnji padding */
    .help-mock .document-paper { padding: 18px 16px; }
    .help-mock .pb-legal-doc { padding: 1.1rem 1rem 1.4rem; }
}

/* ==========================================================================
   Novinski raspored: lepljivi sadržaj levo + ritam sekcija (uvodnik,
   linije-prekidi, izvučeni citati). JS u _HelpLayout gradi TOC iz [data-toc].
   ========================================================================== */
/* Sadržaj stranice drži PUNU širinu kontejnera; TOC visi u slobodnom prostoru
   LEVO od njega. Na javnom layoutu kontejner je centriran (980px), pa TOC ide
   u levu marginu apsolutno; na ulogovanom shell-u (workspace je pun, nema
   margine) TOC postaje uska kolona samo na vrlo širokim ekranima. */
.help-shell { position: relative; }
.help-toc { display: none; padding: 4px 0 4px 2px; }
.help-toc__inner {
    position: sticky;
    top: calc(var(--topbar-h, 70px) + 20px);
}

@media (min-width: 1420px) {
    .public-shell .help-toc {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        right: 100%;
        margin-right: 28px;
        width: 190px;
    }
}
@media (min-width: 1450px) {
    .app-shell .help-shell {
        display: grid;
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 30px;
        align-items: start;
    }
    .app-shell .help-toc { display: block; }
}
.help-shell.no-toc .help-toc { display: none !important; }
.help-shell.no-toc { display: block; }
.help-toc__title {
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin: 0 0 10px 12px;
}
.help-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
    border-left: 1px solid var(--c-border);
}
.help-toc__link {
    display: block;
    padding: 6px 10px 6px 11px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: var(--fs-sm);
    line-height: 1.35;
    color: var(--c-text-secondary);
    text-decoration: none;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.help-toc__link:hover { color: var(--c-text-strong); }
.help-toc__link.is-active {
    border-left-color: var(--c-brand);
    color: var(--c-brand-strong, var(--c-brand));
    font-weight: 600;
}

.help-content [data-toc] { scroll-margin-top: calc(var(--topbar-h, 70px) + 18px); }

/* Uvodnik stranice — novinski „lead" sa inicijalom */
.help-lead { margin: 2px 0 10px; }
.help-lead__kicker {
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-brand);
    margin-bottom: 8px;
}
.help-lead__title {
    margin: 0 0 12px;
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: clamp(22px, 2.4vw, 28px);
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--c-text-strong);
}
.help-lead__text {
    margin: 0;
    max-width: 800px;
    font-size: var(--fs-md);
    line-height: 1.7;
    color: var(--c-text);
}
.help-lead__text::first-letter {
    float: left;
    font-family: var(--p-font-display);
    font-weight: 750;
    font-size: 3.05em;
    line-height: .85;
    padding: 5px 10px 0 0;
    color: var(--c-brand);
}
.help-lead .help-grid { margin-top: 22px; }

/* Novinska linija-prekid sa kickerom sekcije */
.help-break {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 44px 0 14px;
}
.help-break::before,
.help-break::after {
    content: '';
    flex: 1 1 auto;
    border-top: 3px double var(--c-border-strong, var(--c-border));
}
.help-break::before { flex: 0 0 26px; }
.help-break__label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-text-muted);
}
.help-break__num { color: var(--c-brand); }

/* Naslov + uvod sekcije (ispod prekida) */
.help-h2 {
    margin: 0 0 8px;
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: clamp(19px, 2vw, 24px);
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--c-text-strong);
}
.help-sec-intro {
    margin: 0 0 4px;
    max-width: 780px;
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--c-text-secondary);
}

/* Izvučeni citat — pauza između sekcija */
.help-pull {
    margin: 40px 0 6px;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--c-brand);
    max-width: 760px;
}
.help-pull__text {
    margin: 0;
    font-family: var(--p-font-display);
    font-weight: 650;
    font-size: var(--fs-xl, 1.25rem);
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: var(--c-text-strong);
}
.help-pull__src {
    display: block;
    margin-top: 8px;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-muted);
}
