/* ==========================================================================
   legal.css — Politika privatnosti i Uslovi korištenja
   Dijele ga privatnost.php i uslovi.php.

   Prati vizuelni jezik landinga/kontakta (tamni hero + svijetli sadrzaj),
   ali je tipografija podesena za DUG tekst: uzi stubac, veci prored i
   jasna hijerarhija naslova. Prefiks .lg- da se ne sudari s portal.css.
   ========================================================================== */

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

:root {
    --lg-blue:    #1d4ed8;
    --lg-gold:    #f59e0b;
    --lg-text:    #0f172a;
    --lg-text-2:  #475569;
    --lg-muted:   #64748b;
    --lg-border:  #e2e8f0;
    --lg-surface: #ffffff;
    --lg-bg:      #f1f5f9;
    --lg-radius:  12px;
    --lg-font:    'Inter', system-ui, sans-serif;
}

body {
    font-family: var(--lg-font);
    color: var(--lg-text);
    background: var(--lg-bg);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; color: inherit; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
/* Nizi od landinga: pravni dokument ne treba veliku scenu, tekst je bitan. */
.lg-hero {
    background: #060d1f;
    color: #fff;
    padding: 0 24px;
    position: relative;
    overflow: hidden;
}
.lg-hero::before {
    content: '';
    position: absolute;
    width: 560px; height: 560px;
    top: -280px; left: -120px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    background: radial-gradient(circle, rgba(29,78,216,.5) 0%, rgba(99,102,241,.26) 50%, transparent 70%);
}
.lg-hero::after {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    bottom: -220px; right: -80px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    background: radial-gradient(circle, rgba(245,158,11,.28) 0%, transparent 70%);
}
.lg-hero-inner {
    max-width: 820px; margin: auto;
    padding: 58px 0 48px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 12px;
    position: relative; z-index: 1;
}
.lg-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800; line-height: 1.1;
    letter-spacing: -.03em;
    color: #fff;
}
.lg-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,.62);
    max-width: 520px; line-height: 1.6;
}
.lg-updated {
    display: inline-block;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: .78rem; font-weight: 600;
    color: #cbd5e1;
}
.lg-wave { display: block; width: 100%; height: 56px; margin-bottom: -2px; fill: var(--lg-bg); }

/* ── Raspored: sadrzaj + ljepljivi TOC ────────────────────────────────── */
main { flex: 1; }
.lg-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 34px 24px 72px;
    width: 100%;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 34px;
    align-items: start;
}

.lg-toc {
    position: sticky; top: 22px;
    background: var(--lg-surface);
    border-radius: 14px;
    padding: 18px 18px 20px;
    box-shadow: 0 4px 18px rgba(15,23,42,.06);
}
.lg-toc-title {
    font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--lg-muted);
    margin-bottom: 10px;
}
.lg-toc ol { list-style: none; counter-reset: toc; }
.lg-toc li { counter-increment: toc; margin-bottom: 2px; }
.lg-toc a {
    display: block;
    font-size: .82rem; line-height: 1.4;
    color: var(--lg-text-2);
    padding: 5px 8px 5px 26px;
    border-radius: 7px;
    position: relative;
    transition: background .13s, color .13s;
}
.lg-toc a::before {
    content: counter(toc) '.';
    position: absolute; left: 8px;
    font-size: .74rem; font-weight: 600;
    color: var(--lg-muted);
}
.lg-toc a:hover { background: #f1f5f9; color: var(--lg-blue); }

/* ── Tijelo dokumenta ─────────────────────────────────────────────────── */
.lg-doc {
    background: var(--lg-surface);
    border-radius: 18px;
    padding: 40px 44px 44px;
    box-shadow: 0 4px 20px rgba(15,23,42,.07);
    /* Ogranicava duzinu reda na ~75 znakova — preko toga oko gubi pocetak
       sljedeceg reda i dug tekst postaje naporan. */
    font-size: .95rem;
    line-height: 1.75;
    color: var(--lg-text-2);
}

.lg-lead {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--lg-text);
    padding-bottom: 20px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--lg-border);
}

.lg-doc section { scroll-margin-top: 22px; }

.lg-doc h2 {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--lg-text);
    letter-spacing: -.015em;
    margin: 34px 0 12px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--lg-border);
}
.lg-doc section:first-of-type h2 { margin-top: 22px; }

.lg-doc h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--lg-text);
    margin: 20px 0 7px;
}

.lg-doc p { margin-bottom: 12px; }
.lg-doc a:not(.lg-toc a) { color: var(--lg-blue); font-weight: 500; }
.lg-doc a:hover { text-decoration: underline; }
.lg-doc strong { color: var(--lg-text); font-weight: 650; }
.lg-doc em { font-style: italic; }

.lg-doc ul, .lg-doc ol { margin: 0 0 14px 0; padding-left: 0; list-style: none; }
.lg-doc ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 7px;
}
.lg-doc ul li::before {
    content: '';
    position: absolute; left: 4px; top: .62em;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--lg-blue);
    opacity: .55;
}
.lg-doc ol { counter-reset: lgol; }
.lg-doc ol li {
    counter-increment: lgol;
    position: relative;
    padding-left: 24px;
    margin-bottom: 7px;
}
.lg-doc ol li::before {
    content: counter(lgol) '.';
    position: absolute; left: 2px;
    font-weight: 600; color: var(--lg-blue); opacity: .7;
    font-size: .88rem;
}

.lg-muted { color: var(--lg-muted); font-size: .88rem; }

/* ── Isticanja ────────────────────────────────────────────────────────── */
/* Plava napomena: dodatno pojasnjenje, nije upozorenje. */
.lg-note {
    background: #eff6ff;
    border-left: 3px solid var(--lg-blue);
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin: 14px 0 16px;
    font-size: .9rem;
}
.lg-note p:last-child { margin-bottom: 0; }

/* Zuto upozorenje: rezervisano za dio o djeci — mora zapasti za oko. */
.lg-warn {
    background: linear-gradient(160deg, #fffbeb 0%, #fefce8 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 15px 18px;
    margin: 8px 0 16px;
    font-size: .92rem;
}
.lg-warn p:last-child { margin-bottom: 0; }

/* ── Tabela pravnih osnova ────────────────────────────────────────────── */
.lg-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 16px;
    font-size: .875rem;
}
.lg-table th {
    text-align: left;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    color: var(--lg-muted);
    padding: 8px 12px;
    border-bottom: 2px solid var(--lg-border);
}
.lg-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--lg-border);
    vertical-align: top;
    line-height: 1.55;
}
.lg-table tr:last-child td { border-bottom: none; }
.lg-table td:first-child { color: var(--lg-text); font-weight: 500; }

.lg-related {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--lg-border);
    font-size: .9rem;
    color: var(--lg-muted);
}

/* ── Responzivno ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    /* TOC iznad teksta i vise ljepljiv — na uskom ekranu bi zauzeo pola vidnog polja. */
    .lg-content { grid-template-columns: 1fr; gap: 20px; }
    .lg-toc { position: static; }
    .lg-toc ol {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 10px;
    }
}
@media (max-width: 620px) {
    .lg-hero-inner { padding: 44px 0 38px; }
    .lg-content { padding: 24px 14px 56px; }
    .lg-doc { padding: 26px 20px 30px; border-radius: 14px; }
    .lg-toc ol { grid-template-columns: 1fr; }

    /* Tabela u dvije linije po redu — inace se stubac "pravni osnov" stisne
       na 2-3 znaka po redu i postane necitljiv. */
    .lg-table thead { display: none; }
    .lg-table tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--lg-border);
    }
    .lg-table td { display: block; border: none; padding: 2px 0; }
    .lg-table td:last-child {
        font-size: .82rem;
        color: var(--lg-muted);
    }
    .lg-table td:last-child::before {
        content: 'Osnov: ';
        font-weight: 600;
    }
}

/* ── Stampa ───────────────────────────────────────────────────────────── */
/* Pravni dokument se cesto stampa ili sprema u PDF. */
@media print {
    .lg-hero, .lg-wave, .lg-toc, .pt-topbar, .pt-footer, #cookieBanner { display: none !important; }
    body { background: #fff; }
    .lg-content { display: block; max-width: none; padding: 0; }
    .lg-doc { box-shadow: none; border-radius: 0; padding: 0; font-size: 10.5pt; }
    .lg-doc h2 { page-break-after: avoid; }
    .lg-doc section { page-break-inside: avoid; }
    .lg-note, .lg-warn { border: 1px solid #999; background: none; }
}

