* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; width: 100%; max-width: 100%; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0b0f19; color: #e2e8f0; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }

/* MENI SEKCIJE BERZA */
.nav-categories { 
    background: #111827; 
    border-bottom: 1px solid #1f2937; 
    width: 100%; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
}
.nav-categories-inner { 
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 0 20px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    white-space: nowrap; 
}
.nav-link { 
    display: inline-block; 
    padding: 12px 14px; 
    color: #94a3b8; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 14px; 
    border-bottom: 3px solid transparent; 
    transition: all 0.2s; 
    white-space: nowrap; 
    flex-shrink: 0; 
}
.nav-link:hover, .nav-link.active { 
    color: #10b981; 
    border-bottom-color: #10b981; 
}

.portal-layout { max-width: 1240px; margin: 25px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; width: 100%; }
.main-berza-feed { min-width: 0; width: 100%; }

/* HERO TERMINAL TICKER */
.market-ticker-banner { background: #111827; border: 1px solid #1f2937; border-left: 4px solid #10b981; border-radius: 14px; padding: 14px 20px; color: #fff; margin-bottom: 25px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.market-badge-pulse { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: #10b981; text-transform: uppercase; letter-spacing: 0.5px; }
.pulse-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; box-shadow: 0 0 8px #10b981; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.ticker-slider-wrapper { position: relative; height: 46px; min-width: 250px; overflow: hidden; background: #0f172a; border: 1px solid #1f2937; border-radius: 8px; padding: 4px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.ticker-slide-item { position: absolute; top: 0; left: 14px; right: 14px; height: 100%; display: flex; justify-content: space-between; align-items: center; opacity: 0; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease; }
.ticker-slide-item.active { opacity: 1; transform: translateY(0); }
.ticker-slide-item.exit { opacity: 0; transform: translateY(-100%); }
.ticker-currency-tag { font-size: 11.5px; font-weight: 800; color: #38bdf8; letter-spacing: 0.5px; }
.ticker-currency-name { font-size: 10.5px; color: #64748b; }
.ticker-rate-value { font-size: 17px; font-weight: 800; color: #10b981; text-shadow: 0 0 8px rgba(16,185,129,0.3); }

/* TERMINAL KARTICE */
.berza-card-box { background: #111827; border: 1px solid #1f2937; border-radius: 16px; padding: 24px; margin-bottom: 25px; box-shadow: 0 4px 20px rgba(0,0,0,0.25); position: relative; scroll-margin-top: 85px; }
.berza-header-wrap { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 2px solid #10b981; padding-bottom: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.berza-naslov { font-size: 18px; font-weight: 800; color: #f8fafc; margin: 0; display: flex; align-items: center; gap: 8px; }
.berza-logo-img { height: 42px; width: auto; max-width: 140px; object-fit: contain; background: #ffffff; padding: 4px 8px; border-radius: 6px; }

.tekst-izvjestaja { font-size: 14px; color: #cbd5e1; background: #0f172a; padding: 18px; border-radius: 10px; border: 1px solid #1f2937; white-space: pre-line; margin-bottom: 16px; max-height: 380px; overflow-y: auto; line-height: 1.65; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* VALUTNI KALKULATOR */
.currency-calc-box {
    background: #0f172a;
    border: 1px solid #1f2937;
    border-left: 3px solid #38bdf8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
    scroll-margin-top: 85px;
}
.calc-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.calc-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}
.calc-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.calc-input-wrap {
    display: flex;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
}
.calc-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 9px 12px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.calc-select {
    background: #1f2937;
    border: none;
    border-left: 1px solid #334155;
    color: #38bdf8;
    font-size: 13px;
    font-weight: 800;
    padding: 0 10px;
    outline: none;
    cursor: pointer;
}
.calc-swap-btn {
    background: #1f2937;
    border: 1px solid #334155;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    margin-top: 18px;
}
.calc-swap-btn:hover {
    background: #334155;
    color: #10b981;
    border-color: #10b981;
    transform: rotate(180deg);
}
.calc-info-text {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* TERMINAL TABELA */
table.mini-tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
table.mini-tabela th, table.mini-tabela td { border: 1px solid #1f2937; padding: 10px 14px; text-align: left; }
table.mini-tabela th { background: #0f172a; font-weight: 800; color: #38bdf8; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
table.mini-tabela tr:hover { background: #1a2234; }
table.mini-tabela td:last-child { color: #10b981; font-weight: 700; }

.btn-link-source { color: #38bdf8; text-decoration: none; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.btn-link-source:hover { color: #10b981; text-decoration: underline; }

/* SOCIAL SHARE BUTTONS */
.social-share-strip { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; text-decoration: none; font-size: 14px; font-weight: bold; transition: opacity 0.2s, transform 0.2s; }
.share-btn:hover { opacity: 0.85; transform: scale(1.08); }
.share-fb { background: #1877f2; }
.share-tw { background: #000000; border: 1px solid #374151; }
.share-wa { background: #25d366; }
.share-vb { background: #7360f2; }
.share-tg { background: #24a1de; }

/* SIDEBAR */
.sidebar-wrapper { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 80px; width: 100%; min-width: 0; }
.side-card { background: #111827; border: 1px solid #1f2937; border-radius: 16px; padding: 18px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); width: 100%; min-width: 0; }
.side-card-title { font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #1f2937; display: flex; justify-content: space-between; align-items: center; }

.news-mini-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.news-mini-item { display: flex; gap: 10px; text-decoration: none; color: inherit; align-items: center; border-bottom: 1px solid #1a2234; padding-bottom: 8px; }
.news-mini-item:hover .news-mini-title { color: #10b981; }
.news-mini-thumb { width: 55px; height: 45px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #1f2937; }
.news-mini-title { font-size: 13px; font-weight: 700; line-height: 1.35; color: #f1f5f9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sidebar-logo-mini { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 8px; background: #fff; padding: 2px; border-radius: 4px; }

[id*="info"] { scroll-margin-top: 85px; }

/* MOBILNA PRILAGODBA */
@media (max-width: 1024px) {
    .portal-layout { grid-template-columns: 1fr; }
    .sidebar-wrapper { position: static; }
}

@media (max-width: 768px) {
    .nav-categories-inner { padding: 0 10px; gap: 4px; }
    .portal-layout { padding: 0 10px; margin: 15px auto; gap: 20px; }
    .berza-card-box { padding: 16px; border-radius: 12px; }
    .berza-naslov { font-size: 15.5px; }
    .berza-logo-img { height: 32px; }
    .market-ticker-banner { padding: 14px; gap: 10px; flex-direction: column; align-items: stretch; }
    .ticker-slider-wrapper { min-width: 100%; }
    .calc-grid { grid-template-columns: 1fr; gap: 8px; }
    .calc-swap-btn { margin: 0 auto; transform: rotate(90deg); }
    .calc-swap-btn:hover { transform: rotate(270deg); }
}