/* 28.11.2026 – P1: izgled menija i naslovne strane usklađen sa svetprogramiranja.com
   (boje: tamnoplava, cijan, plava, narandžasta; font Inter). Stilovi su ograničeni na .sp-nav i .sp-home,
   pa ne menjaju ostale strane simulacija. */
:root {
  --sp-navy-900: #0b1324;
  --sp-navy-800: #0f1729;
  --sp-navy-700: #16233f;
  --sp-header: #143d59;
  --sp-cyan: #22d3ee;
  --sp-blue: #3b82f6;
  --sp-orange: #f97316;
  --sp-text: #222;
  --sp-muted: #4b5563;
  --sp-gradient-line: linear-gradient(90deg, #22d3ee 0%, #3b82f6 50%, #f97316 100%);
}

/* ===== Meni ===== */
.sp-nav {
  font-family: Inter, Arial, sans-serif;
  background: var(--sp-header);
  border-bottom: 3px solid transparent;
  border-image: var(--sp-gradient-line) 1;
  padding: .35rem 0;
  position: sticky; top: 0; z-index: 1030;
}
.sp-nav .navbar-brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.sp-nav .navbar-brand img { height: 34px; width: auto; }
.sp-nav .navbar-brand small { display: block; font-weight: 500; font-size: .72rem; color: #9fdcf0; letter-spacing: .02em; }
.sp-nav .nav-link { color: #e6eef7 !important; font-weight: 600; font-size: .95rem; padding: .55rem .8rem !important; border-radius: .4rem; cursor: pointer; }
.sp-nav .nav-link:hover, .sp-nav .nav-link:focus, .sp-nav .nav-link.show { color: #fff !important; background: rgba(255,255,255,.08); }
.sp-nav .dropdown-menu { border: 0; border-radius: .6rem; box-shadow: 0 12px 30px rgba(11,19,36,.25); padding: .4rem; min-width: 16rem; }
.sp-nav .dropdown-item { border-radius: .4rem; padding: .45rem .75rem; font-size: .93rem; white-space: normal; color: var(--sp-text); }
.sp-nav .dropdown-item:hover, .sp-nav .dropdown-item:focus { background: #e8f7fb; color: var(--sp-navy-900); }
.sp-nav .navbar-toggler { border: 1px solid rgba(255,255,255,.35); padding: .3rem .55rem; }
.sp-nav .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.sp-nav .language-switcher { position: static; margin: 0; }
.sp-nav .language-switcher a { display: inline-block; color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: .3rem .8rem; }
.sp-nav .language-switcher a:hover { background: var(--sp-orange); border-color: var(--sp-orange); }
@media (max-width: 991.98px) {
  .sp-nav .navbar-collapse { padding: .5rem 0 .8rem; }
  .sp-nav .dropdown-menu { box-shadow: none; background: rgba(255,255,255,.06); }
  .sp-nav .dropdown-item { color: #e6eef7; }
  .sp-nav .dropdown-item:hover { background: rgba(255,255,255,.1); color: #fff; }
  .sp-nav .language-switcher { margin-top: .5rem; }
}

/* ===== Naslovna strana ===== */
.sp-home { font-family: Inter, Arial, sans-serif; color: var(--sp-text); }
.sp-home .sp-hero {
  background: radial-gradient(1200px 500px at 85% -10%, rgba(59,130,246,.35), transparent 60%),
              linear-gradient(160deg, var(--sp-navy-900) 0%, var(--sp-navy-700) 100%);
  color: #fff; padding: 3.2rem 1rem 3.6rem;
}
.sp-home .sp-hero-inner { max-width: 1100px; margin: 0 auto; }
.sp-home .sp-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sp-cyan); border: 1px solid rgba(34,211,238,.45); border-radius: 999px; padding: .25rem .75rem; margin-bottom: 1rem; }
.sp-home .sp-hero h1 { font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.15; margin: 0 0 .8rem; color: #fff; text-align: left; }
.sp-home .sp-hero h1 span { background: var(--sp-gradient-line); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-home .sp-hero p.lead { color: #c9d6e6; font-size: 1.1rem; max-width: 46rem; margin-bottom: 1.6rem; }
.sp-home .sp-btn { display: inline-block; font-weight: 700; border-radius: .55rem; padding: .7rem 1.2rem; text-decoration: none; margin: 0 .5rem .6rem 0; }
.sp-home .sp-btn-primary { background: var(--sp-orange); color: #fff; }
.sp-home .sp-btn-primary:hover { background: #ea580c; color: #fff; }
.sp-home .sp-btn-ghost { border: 1px solid rgba(255,255,255,.45); color: #fff; }
.sp-home .sp-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.sp-home .sp-tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.sp-home .sp-tags span { font-size: .82rem; color: #dbe7f5; background: rgba(255,255,255,.08); border-radius: 999px; padding: .25rem .7rem; }

.sp-home .sp-section { max-width: 1100px; margin: 0 auto; padding: 2.6rem 1rem 1rem; }
.sp-home .sp-section > h2 { font-weight: 800; font-size: 1.6rem; margin: 0 0 .3rem; text-align: left; }
.sp-home .sp-section > p.sp-sub { color: var(--sp-muted); margin-bottom: 1.4rem; }
.sp-home .sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.sp-home .sp-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e9f0; border-radius: .9rem; overflow: hidden;
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.sp-home .sp-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,41,.12); border-color: #bfe9f5; }
.sp-home .sp-card-img { aspect-ratio: 16 / 10; background: #f1f5fa; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sp-home .sp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sp-home .sp-card-img.sp-icon { background: linear-gradient(140deg, var(--sp-navy-800), var(--sp-navy-700)); color: var(--sp-cyan); font-size: 2.6rem; font-weight: 800; }
.sp-home .sp-card-body { padding: .9rem 1rem 1.1rem; }
.sp-home .sp-card-body h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .3rem; color: var(--sp-navy-900); }
.sp-home .sp-card-body p { font-size: .9rem; color: var(--sp-muted); margin: 0; }
.sp-home .sp-card-body .sp-badge { display: inline-block; font-size: .72rem; font-weight: 700; color: #0e7490; background: #e0f7fb; border-radius: 999px; padding: .1rem .55rem; margin-bottom: .45rem; }
.sp-home .sp-divider { height: 3px; background: var(--sp-gradient-line); border: 0; max-width: 1100px; margin: 2.4rem auto 0; opacity: .7; }
.sp-home .sp-about { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; line-height: 1.65; }
.sp-home .sp-about h2 { font-weight: 800; font-size: 1.35rem; margin-top: 1.6rem; text-align: left; }
@media (max-width: 575.98px) {
  .sp-home .sp-hero { padding: 2.2rem 1rem 2.6rem; }
  .sp-home .sp-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .sp-home .sp-card-body { padding: .7rem .75rem .85rem; }
  .sp-home .sp-card-body p { display: none; }
}

/* 28.11.2026 – P1: meni i uvod naslovne strane preko cele širine ekrana.
   Stari main.css daje body marginu (25px 38px …) i .content-wrapper padding 16px; meni zato ide do ivica (100vw)
   i do vrha strane. overflow-x: clip (ne hidden) da ne pokvari position: sticky menija. */
body:has(.sp-nav) { margin-top: 0 !important; padding-top: 0 !important; overflow-x: clip; }
.content-wrapper:has(.sp-nav) { padding-top: 0 !important; }
.sp-nav, .sp-home .sp-hero { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
header:has(> .sp-nav) { position: sticky; top: 0; z-index: 1030; }

/* 28.11.2026 – P1: tekst naslovne strane levo poravnat (main.css ima text-align: justify), bez žutog dugmeta menija iz starog stila,
   a p5 animacije na naslovnoj strani ne smeju biti šire od ekrana (na telefonu su širile celu stranu). */
.sp-home p, .sp-home h1, .sp-home h2, .sp-home h3 { text-align: left; }
.sp-nav .navbar-toggler { background: transparent !important; }
.sp-nav .navbar-nav, .sp-nav .nav-link { text-align: left; }
.okvir_animacija canvas { max-width: 100% !important; height: auto !important; }
.okvir_animacija { max-width: 100%; overflow: hidden; }

/* ===== Footer (28.11.2026 – P1) – kao na svetprogramiranja.com ===== */
.sp-footer {
  font-family: Inter, Arial, sans-serif; color: #cbd5e1; margin-top: 3rem; text-align: left;
  background: radial-gradient(circle at 12% 0%, rgba(34,211,238,.10), transparent 40%),
              radial-gradient(circle at 90% 100%, rgba(249,115,22,.08), transparent 45%),
              linear-gradient(180deg, var(--sp-navy-800) 0%, var(--sp-navy-900) 100%);
  border-top: 3px solid transparent; border-image: var(--sp-gradient-line) 1;
}
.sp-footer-inner { max-width: 1100px; margin: 0 auto; padding: 2.6rem 1rem 1.6rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.sp-footer-logo { display: flex; align-items: center; gap: .55rem; color: #fff !important; font-weight: 800; font-size: 1.05rem; text-decoration: none; margin-bottom: .7rem; }
.sp-footer-logo img { height: 34px; width: auto; }
.sp-footer-brand p { font-size: .9rem; line-height: 1.6; color: #94a3b8; margin: 0 0 .9rem; text-align: left; }
.sp-footer-main { color: var(--sp-cyan) !important; font-weight: 700; font-size: .9rem; text-decoration: none; }
.sp-footer-main:hover { text-decoration: underline; }
.sp-footer-col h2 { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 .8rem; text-align: left; }
.sp-footer-col ul { list-style: none; padding: 0; margin: 0; }
.sp-footer-col li { margin: 0 0 .45rem; }
.sp-footer-col a, .sp-footer-links a { color: #cbd5e1 !important; text-decoration: none; font-size: .9rem; }
.sp-footer-col a:hover, .sp-footer-links a:hover { color: var(--sp-cyan) !important; }
.sp-footer-bottom { max-width: 1100px; margin: 0 auto; padding: 1rem; border-top: 1px solid rgba(148,163,184,.2);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.2rem; font-size: .85rem; color: #94a3b8; }
.sp-footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
@media (max-width: 860px) { .sp-footer-inner { grid-template-columns: 1fr 1fr; } .sp-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .sp-footer-inner { grid-template-columns: 1fr; gap: 1.4rem; } }

/* 28.11.2026 – bez praznog prostora ispod footera (main.css daje body margin-bottom) */
body:has(.sp-footer) { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.content-wrapper:has(.sp-footer) { padding-bottom: 0 !important; }
.jumbotron:has(> .sp-footer), .jumbotron:has(.sp-footer) { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.jumbotron:has(.sp-footer) { background: transparent !important; padding-top: 0 !important; }

/* ===== Tekst strana (28.11.2026 – P1, dopuna) =====
   Ranije: tri fonta (Georgia iz ejsContentsLeft.css, Helvetica za naslove, Roboto koji se ne učitava),
   tekst jarko tamnoplav #00008F, mali naslovi jarko plavi, obostrano poravnanje, sivi linkovi.
   Sada: font Inter, tamnosiv tekst, tamnoplavi naslovi, levo poravnanje, plavi linkovi.
   Sama simulacija (EJS model u #_topFrame) se NE menja. */
body { font-family: Inter, Arial, sans-serif !important; color: #1f2937 !important; line-height: 1.65; background: #fff !important; }
:is(p, li, td, th, dd, dt, label, .moj_tekst, .moj_pasus, .section):not(#_topFrame, #_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) {
  font-family: Inter, Arial, sans-serif; color: #1f2937; text-align: left !important;
}
p:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *), li:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { font-size: 1rem; line-height: 1.7; }
:is(h1, h2, h3, h4, h5, h6):not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) {
  font-family: Inter, Arial, sans-serif !important; color: #0b1324 !important; font-weight: 800; line-height: 1.25; letter-spacing: -.01em;
}
h1:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *):not(.sp-hero h1) { font-size: clamp(1.6rem, 3vw, 2.1rem) !important; text-align: left !important; margin: 1.2rem 0 .8rem; }
h2:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *):not(.sp-section > h2) { font-size: clamp(1.3rem, 2.4vw, 1.6rem) !important; margin: 1.6rem 0 .6rem; }
h3:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *):not(.sp-card *), h4:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { font-size: 1.2rem !important; margin: 1.3rem 0 .5rem; }
/* linkovi u tekstu (meni, footer, kartice i dugmad imaju svoje boje) */
a:not(.sp-nav a):not(.sp-footer a):not(.sp-card):not(.sp-btn):not(#_topFrame a):not(.dropdown-item),
a:not(.sp-nav a):not(.sp-footer a):not(.sp-card):not(.sp-btn):not(#_topFrame a):not(.dropdown-item):visited {
  color: #2563eb !important; text-decoration: none; font-weight: 600;
}
a:not(.sp-nav a):not(.sp-footer a):not(.sp-card):not(.sp-btn):not(#_topFrame a):not(.dropdown-item):hover { color: #1d4ed8 !important; text-decoration: underline; }
/* okviri i kod */
.moj_pasus { background: #f8fafc !important; border: 1px solid #e5e9f0; border-radius: .8rem !important; line-height: 1.65 !important; color: #1f2937 !important; }
.moj_kod { background: #f8fafc !important; color: #0f172a !important; font-weight: 500 !important; border-left: 3px solid #22d3ee !important; border-radius: .4rem;
  font-family: Consolas, "Courier New", monospace !important; }
/* 28.11.2026 – Q3b: samo kod u tekstu (ne u <pre>); kod u <pre> boji Prism, a formule imaju svoj stil */
:not(pre) > code:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { color: #0e7490 !important; font-family: Consolas, "Courier New", monospace; font-size: .95em !important; }
strong:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *), b:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { color: inherit; }
/* telefon: bez velikih bočnih margina iz main.css (7rem) */
@media (max-width: 767.98px) { body { margin-left: 0 !important; margin-right: 0 !important; } }
/* EJS model zadržava svoj izgled (font i boju iz EJS biblioteke, kao ranije) */
#_topFrame { font-family: Georgia, "Times New Roman", Times, serif !important; color: #00008F !important; line-height: normal; }
/* 28.11.2026 – izuzeci: meni, footer, uvod i kartice naslovne strane imaju svoj stil (zato :not(... .sp-nav * ...)) */
/* telefon: dugi linkovi i kod se lome ili skroluju unutar svog okvira, umesto da šire stranu */
:is(p, li, td) :is(a, code):not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { overflow-wrap: anywhere; }
pre:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { max-width: 100%; overflow-x: auto; white-space: pre; }
img:not(#_topFrame *, .sp-nav *, .sp-footer *, .sp-hero *, .sp-card *) { max-width: 100%; height: auto; }
/* telefon: .content-wrapper ima marginu 16px i širinu 100% pa izlazi van ekrana */
@media (max-width: 767.98px) { .content-wrapper { margin-left: 0 !important; margin-right: 0 !important; width: auto !important; } }

/* 28.11.2026 – kontrast: main.css daje svim linkovima "a { color !important }" i posećenim "a:visited { color: #8d2467 !important }",
   pa su naziv sajta u meniju, dugme „Napravi svoju simulaciju“ i stavke menija postajali ljubičasti. Ovde boje sa !important. */
.sp-nav .navbar-brand, .sp-nav .navbar-brand:visited, .sp-nav .navbar-brand span { color: #fff !important; }
.sp-nav .navbar-brand small { color: #9fdcf0 !important; }
.sp-nav .nav-link, .sp-nav .nav-link:visited { color: #e6eef7 !important; }
.sp-nav .dropdown-item, .sp-nav .dropdown-item:visited { color: #1f2937 !important; }
.sp-nav .dropdown-item:hover, .sp-nav .dropdown-item:focus { color: #0b1324 !important; }
.sp-nav .language-switcher a, .sp-nav .language-switcher a:visited { color: #fff !important; }
@media (max-width: 991.98px) {
  .sp-nav .dropdown-item, .sp-nav .dropdown-item:visited { color: #e6eef7 !important; }
  .sp-nav .dropdown-item:hover { color: #fff !important; }
}
.sp-home .sp-btn-primary, .sp-home .sp-btn-primary:visited, .sp-home .sp-btn-primary:hover { color: #fff !important; }
.sp-home .sp-btn-ghost, .sp-home .sp-btn-ghost:visited, .sp-home .sp-btn-ghost:hover { color: #fff !important; border-color: rgba(255,255,255,.7); }
.sp-home .sp-card, .sp-home .sp-card:visited { color: inherit !important; }
.sp-footer-logo, .sp-footer-logo:visited { color: #fff !important; }
.sp-footer-main, .sp-footer-main:visited { color: #22d3ee !important; }
.sp-footer-col a:visited, .sp-footer-links a:visited { color: #cbd5e1 !important; }
.sp-nav .navbar-brand img, .sp-footer-logo img { height: 36px !important; width: 36px !important; }
.sp-nav .language-switcher a { background: transparent !important; }
.sp-nav .language-switcher a:hover { background: var(--sp-orange) !important; }
.sp-nav .language-switcher a { white-space: nowrap; }
/* 28.11.2026 – P2: <hr> sa fiksnom širinom/marginom izlazio je van ekrana na telefonu (/o_ejsu_primer) */
hr:not(#_topFrame *) { max-width: 100% !important; box-sizing: border-box !important; }
/* 28.11.2026 – P2: telefon – p5 platna fiksne širine (600 px) skroluju se unutar svog okvira (ne smanjuju se, da miš u
   interaktivnim animacijama i dalje pogađa prave koordinate); video (iframe) se smanjuje na širinu ekrana. */
:is(div, section):has(> canvas.p5Canvas):not(#_topFrame *) { max-width: 100%; overflow-x: auto; }
iframe:not(#_topFrame *) { max-width: 100% !important; }

/* ===== Strane simulacija (28.11.2026 – P2) =====
   Raspored svih 7 simulacija (SR/EN): [id^="contents_"] = meni „Sadržaj“ (div.contents > div.intro / div.Simulation),
   [id^="uvod_"] / [id^="introduction_"] = deo koji se menja klikom (uvod, zadatak, simulacija).
   Ranije: plave trake sa crnom ivicom iz ejsContentsLeft.css; sada red dugmadi i okvir za sadržaj. */
[id^="contents_"] { margin: .5rem 0 1rem !important; }
html body [id^="contents_"] > .intro_1 > h2:not(#_nema) {   /* (:not(#_nema) samo podiže specifičnost iznad opšteg pravila za h2) samo natpis „Sadržaj“ (meni je u .intro_1; uvod je u susednom #uvod_…) */
  font-size: .78rem !important; font-weight: 800 !important; letter-spacing: .08em; text-transform: uppercase;
  color: #64748b !important; margin: 0 0 .5rem !important; border: 0 !important;
}
[id^="contents_"] h2 b { font-weight: inherit; }
[id^="contents_"] div.contents { display: flex; flex-wrap: wrap; gap: .5rem; border: 0 !important; padding: 0 0 .9rem; margin: 0 0 .4rem;
  border-bottom: 1px solid #e5e9f0 !important; }
[id^="contents_"] div.intro, [id^="contents_"] div.Simulation, [id^="contents_"] div.simulation {
  background: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; }
[id^="contents_"] div.contents a { display: inline-block; font-weight: 700 !important; font-size: .92rem; text-decoration: none !important;
  padding: .5rem .95rem; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #16233f !important;
  transition: background .15s, border-color .15s, color .15s; }
[id^="contents_"] div.contents a:hover { border-color: #22d3ee; background: #ecfeff; color: #0b1324 !important; }
[id^="contents_"] div.contents .Simulation a { background: #f97316; border-color: #f97316; color: #fff !important; }
[id^="contents_"] div.contents .Simulation a::before { content: "▶ "; font-size: .8em; }
[id^="contents_"] div.contents .Simulation a:hover { background: #ea580c; border-color: #ea580c; color: #fff !important; }
[id^="contents_"] div.contents a.is-active { background: #0b1324; border-color: #0b1324; color: #fff !important; }
[id^="contents_"] div.contents .Simulation a.is-active { background: #c2410c; border-color: #c2410c; }
[id^="contents_"] div.signature { background: none !important; padding: 0 !important; margin: 0 0 .2rem !important; font-size: .8rem; color: #64748b; }
[id^="contents_"] div.signature a { font-weight: 600 !important; }
/* deo koji se menja (uvod, zadatak, simulacija) */
[id^="uvod_"]:not(:empty), [id^="introduction_"]:not(:empty) {
  background: #fff; border: 1px solid #e5e9f0; border-radius: .9rem; padding: 1.2rem 1.4rem; margin-top: .6rem;
  box-shadow: 0 6px 18px rgba(15,23,41,.05); }
[id^="uvod_"] img:not(#_topFrame *), [id^="introduction_"] img:not(#_topFrame *) {
  display: block; margin: 1rem auto; border-radius: .6rem; border: 1px solid #e5e9f0; max-width: 100%; height: auto; }
[id^="uvod_"] :is(figcaption, .caption):not(#_topFrame *), [id^="introduction_"] :is(figcaption, .caption):not(#_topFrame *) {
  text-align: center !important; font-size: .88rem; color: #64748b !important; }
@media (max-width: 575.98px) {
  [id^="uvod_"]:not(:empty), [id^="introduction_"]:not(:empty) { padding: .9rem .8rem; border-radius: .7rem; }
  [id^="contents_"] div.contents a { font-size: .86rem; padding: .45rem .8rem; }
}
/* 28.11.2026 – P2: okvir sadržaja ne sme da obilazi plutajuće (float) elemente menija iznad (EN strane: naslov uvoda je bio gurnut udesno) */
[id^="uvod_"], [id^="introduction_"] { clear: both; display: flow-root; }

/* ===== Kod i formule (28.11.2026 – Q3b) =====
   Kod: <pre class="code-block"><code class="language-…"> – boji Prism.js (cdnjs 1.29.0, kao na svetprogramiranja.com).
   Formule: <pre class="formula"> – bez Prism-a; veća tamna slova na svetloj podlozi (ranije sitna plava slova). */
pre.code-block:not(#_topFrame *) { border-radius: .6rem !important; border: 1px solid #e5e9f0; margin: 1rem 0 1.2rem !important; font-size: .9rem !important;
  line-height: 1.55; max-width: 100%; overflow-x: auto; }
pre.code-block code[class*="language-"] { font-family: Consolas, "Courier New", monospace !important; font-size: inherit !important; }
pre.formula:not(#_topFrame *) { background: #f8fafc !important; border: 1px solid #e5e9f0; border-left: 4px solid #3b82f6 !important; border-radius: .5rem;
  padding: .75rem 1rem !important; margin: .8rem 0 1rem !important; color: #0b1324 !important; font-family: "Cambria Math", Cambria, "Times New Roman", serif !important;
  font-size: 1.12rem !important; line-height: 1.6; white-space: pre-wrap; overflow-x: auto; max-width: 100%; }
pre.formula code, pre.formula * { color: #0b1324 !important; font-family: inherit !important; font-size: inherit !important; background: none !important; }
div.code-toolbar { margin: 1rem 0 1.2rem; }
div.code-toolbar > pre.code-block { margin: 0 !important; }

/* 28.11.2026 – Q3b: footer ne sme da obilazi plutajući (float) sadržaj strane (/vertikalan_hitac: footer je bio desno od sadržaja) */
.content:has(.sp-footer), footer:has(> .sp-footer), .sp-footer { clear: both; }

/* ===== Putanja / breadcrumb (28.11.2026 – Q3) ===== */
.sp-breadcrumb { font-family: Inter, Arial, sans-serif; font-size: .85rem; margin: .9rem 0 0; }
.sp-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .5rem; margin: 0; padding: 0; }
.sp-breadcrumb li { color: #64748b; margin: 0 !important; padding: 0 !important; font-size: .85rem !important; line-height: 1.4 !important; }
.sp-breadcrumb li + li::before { content: "›"; margin-right: .5rem; color: #94a3b8; }
.sp-breadcrumb a, .sp-breadcrumb a:visited { color: #2563eb !important; font-weight: 600 !important; text-decoration: none; }
.sp-breadcrumb a:hover { text-decoration: underline; }
.sp-breadcrumb [aria-current] { color: #334155; font-weight: 600; }

/* 28.11.2026 – Q3: zaštita – ako je EJS model negde širi od ekrana, skroluje se unutar okvira (provereno: kosi hitac i rotacija diska na 400 px staju) */
[id^="uvod_"]:has(#_topFrame), [id^="introduction_"]:has(#_topFrame) { overflow-x: auto; }

/* ===== Kviz „Proveri znanje“ (28.11.2026 – Q5) – stil kao na svetprogramiranja.com (global.css .quiz), uz boje ovog sajta ===== */
.quiz { margin: 2rem 0 1rem; padding: 1.4rem 1.4rem .6rem; background: #f8fafc; border: 1px solid #e5e9f0; border-radius: .9rem; }
.quiz h2, .quiz h3 { margin-top: 0 !important; margin-bottom: 1.1rem !important; }
.quiz .question { margin: 0 0 1.1rem; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid #d9e2e8; border-radius: .7rem; box-shadow: 0 2px 7px rgba(0,0,0,.04); }
.quiz .question p { margin: 0 0 .7rem; font-weight: 600; line-height: 1.5; }
.quiz .question label { display: block; margin: .4rem 0; padding: .5rem .75rem; border-radius: .45rem; cursor: pointer; line-height: 1.5; text-align: left; }
.quiz .question label:hover { background: #ecfeff; }
.quiz .question input[type="radio"] { margin-right: .5rem; transform: translateY(1px); }
.quiz .check-btn, .quiz button { margin-top: .6rem; padding: .5rem 1rem; border: 1px solid #16233f; border-radius: .45rem; background: #16233f; color: #fff !important;
  font-size: .95rem; font-weight: 700; cursor: pointer; }
.quiz .check-btn:hover, .quiz button:hover { background: #0b1324; }
.quiz .result { display: block; min-height: 22px; margin-top: .6rem; font-weight: 700; }
.quiz .result.correct { color: #1e7b34 !important; }
.quiz .result.incorrect { color: #b3261e !important; }
.quiz .result.unanswered { color: #8a5a00 !important; }
.quiz .reset-quiz { background: #eef3f6 !important; color: #173f56 !important; border-color: #bccbd5 !important; }
@media (max-width: 700px) { .quiz { padding: 1rem .8rem .4rem; } .quiz .question { padding: .9rem; } .quiz .check-btn, .quiz button { width: 100%; } }

/* ===== Navigacija između simulacija i plan časa (28.11.2026 – Q6) ===== */
.sp-lesson { font-family: Inter, Arial, sans-serif; margin: 2rem 0 1rem; clear: both; }
.sp-simnav { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; }
.sp-simnav a { display: block; padding: .8rem 1rem; border: 1px solid #e5e9f0; border-radius: .7rem; background: #fff; text-decoration: none !important;
  color: #0b1324 !important; font-weight: 700 !important; transition: border-color .15s, box-shadow .15s; }
.sp-simnav a:hover { border-color: #22d3ee; box-shadow: 0 6px 16px rgba(15,23,41,.08); }
.sp-simnav a small { display: block; font-weight: 600; font-size: .78rem; color: #64748b; margin-bottom: .15rem; }
.sp-simnav .sp-simnav-next { text-align: right; }
.sp-make { background: #ecfeff; border: 1px solid #a5f3fc; border-radius: .7rem; padding: .7rem 1rem; margin: 0 0 1rem; }
.sp-teacher { border: 1px solid #e5e9f0; border-radius: .7rem; background: #f8fafc; }
.sp-teacher > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 800; color: #16233f; }
.sp-teacher-body { padding: 0 1.2rem 1rem; }
.sp-teacher-body h3 { font-size: 1.05rem !important; margin: 1rem 0 .4rem !important; }
.sp-teacher-title { display: none; }
.sp-print { margin-top: .8rem; padding: .5rem 1rem; border: 1px solid #16233f; border-radius: .45rem; background: #16233f; color: #fff; font-weight: 700; cursor: pointer; }
@media (max-width: 575.98px) { .sp-simnav { grid-template-columns: 1fr; } .sp-simnav .sp-simnav-next { text-align: left; } }
/* štampa samo plana časa (dugme „Štampaj plan časa“ dodaje klasu body.sp-print-teacher) */
@media print {
  body.sp-print-teacher * { visibility: hidden !important; }
  body.sp-print-teacher .sp-teacher, body.sp-print-teacher .sp-teacher * { visibility: visible !important; }
  body.sp-print-teacher .sp-teacher { position: absolute; left: 0; top: 0; width: 100%; border: 0; background: #fff; }
  body.sp-print-teacher .sp-teacher > summary, body.sp-print-teacher .sp-print { display: none !important; }
  body.sp-print-teacher .sp-teacher-title { display: block; font-size: 1.2rem; }
}
