/* =============================================
   Stranice članaka – urednički izgled (studeni 2026.)
   Učitava se na pojedinačnim člancima (is_single).
   ============================================= */

:root {
  --ar-ink: #293241;
  --ar-mut: #5a6272;
  --ar-line: #eadfd0;
  --ar-paper: #f7f1e8;
  --ar-serif: "Fraunces", Georgia, serif;
}

/* ---------- Header kao na naslovnici ---------- */
/* ista boja i ista tanka crta ispod izbornika kao na naslovnici */
body.single .site-header {
  background: var(--ar-paper);
  box-shadow: 0 1px 0 #f1e8dc, 0 1px 3px rgba(0, 0, 0, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---------- Traka napretka čitanja ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1003;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Zaglavlje članka ---------- */
.article-header {
  background: var(--ar-paper);
  border-bottom: 1px solid var(--ar-line);
  padding: 3rem 0 4rem;
}
/* naslov poravnat s nazivom stranice, kao na naslovnici */
.article-header-inner {
  max-width: var(--container-max);
}
.article-header-inner > * {
  max-width: 920px;
}
.article-header-inner .article-lead {
  max-width: 36rem;
}
.article-eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.article-eyebrow a {
  color: inherit;
  border-bottom: 1px solid rgba(185, 67, 42, 0.3);
}
.article-eyebrow a:hover {
  border-bottom-color: currentColor;
}
.article-title {
  font-family: var(--ar-serif);
  font-weight: 600;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ar-ink);
  margin: 0;
}
.article-lead {
  font-family: var(--font-reading);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ar-mut);
  margin: 1.1rem 0 0;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 0;
  font-size: 0.9rem;
  color: var(--ar-mut);
}
.article-meta a {
  color: var(--ar-ink);
  font-weight: 600;
}
.article-meta a:hover {
  color: var(--color-primary);
}
.article-cover {
  max-width: calc(960px + 3rem);
  margin-top: 2.5rem;
}
.article-cover img {
  width: 100%;
  border-radius: 20px;
}
.article-content-wrap {
  padding-top: 3rem;
}

/* ---------- Tekst ---------- */
.entry-content {
  color: #293241;
}
.entry-content > *:first-child {
  margin-top: 0;
}
/* Ostaci iz Worda: ručno zadane veličine slova poravnaj s tekstom */
.entry-content [style*="font-size"] {
  font-size: inherit !important;
}
.entry-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 3.5rem 0 1rem;
  color: var(--ar-ink);
  scroll-margin-top: 2rem;
}
.entry-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ar-ink);
}
/* Naglasci: umjesto teškog podebljanja blagi srednji rez.
   (U člancima je gotovo svaki pojam <b><i>, pa jaki bold čini tekst nemirnim.) */
.entry-content strong,
.entry-content b {
  font-weight: 500;
  color: var(--ar-ink);
}
.entry-content strong em,
.entry-content em strong,
.entry-content b i,
.entry-content i b {
  font-weight: 500;
}

/* Citati: istaknuti blok s tonom boje, oznakom i većim kurzivom */
.entry-content blockquote {
  position: relative;
  margin: 2.75rem 0;
  padding: 1.6rem 1.75rem 1.6rem 4.25rem;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 14px 14px 0;
  background: color-mix(in srgb, var(--color-primary) 7%, #fff);
  box-shadow: none;
  font-family: var(--ar-serif);
  font-style: normal;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--ar-ink);
}
.entry-content blockquote::before {
  content: "\201E";
  position: absolute;
  left: 1.1rem;
  top: 0.35rem;
  font-family: var(--ar-serif);
  font-style: normal;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.45;
}
.entry-content blockquote p {
  margin: 0;
}
.entry-content blockquote strong,
.entry-content blockquote b {
  font-weight: 400;
}

/* Slike i tablice */
.entry-content img {
  border-radius: 12px;
}
.entry-content table {
  border: 1px solid var(--ar-line);
  border-radius: 12px;
}
.entry-content th {
  background: var(--ar-paper);
}

/* ---------- Sadržaj članka ---------- */
.article-toc {
  margin: 0 0 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--ar-paper);
  border: 1px solid var(--ar-line);
  border-radius: 16px;
  font-family: var(--font-body);
}
.article-toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ar-mut);
}
.article-toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}
.article-toc li {
  counter-increment: toc;
  break-inside: avoid;
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;
  gap: 0.6rem;
}
.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--ar-serif);
  color: var(--color-primary);
  opacity: 0.55;
  min-width: 1.5em;
}
.article-toc a {
  color: var(--ar-ink);
  border-bottom: 0;
}
.article-toc a:hover {
  color: var(--color-primary);
}

/* ---------- Navigacija među koracima ---------- */
.post-navigation {
  background: var(--ar-paper);
  border-top: 1px solid var(--ar-line);
  padding: 3rem 0;
}
.post-nav-link {
  background: #fff;
  border: 1px solid var(--ar-line);
  border-radius: 16px;
  box-shadow: none;
}
.post-nav-link:hover {
  border-color: #f0c2b5;
  box-shadow: none;
}
.post-nav-title {
  font-family: var(--ar-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ar-ink);
}
.post-nav-arrow {
  color: var(--color-primary);
}

/* ---------- Mobitel ---------- */
@media (max-width: 700px) {
  .article-header {
    padding: 2rem 0 2.25rem;
  }
  .article-lead {
    font-size: 1.2rem;
  }
  .article-toc ol {
    columns: 1;
  }
  .article-toc {
    padding: 1.25rem;
  }
  .entry-content blockquote {
    font-size: 1.25rem;
    padding: 1.25rem 1.25rem 1.25rem 3.25rem;
  }
  .entry-content blockquote::before {
    left: 0.75rem;
    font-size: 3.5rem;
  }
  .entry-content h2 {
    font-size: 1.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reading-progress {
    display: none;
  }
}

/* ---------- Raspored: tekst lijevo (poravnat s naslovom), sadržaj desno ---------- */
.article-toc a.is-active {
  color: var(--color-primary);
  font-weight: 600;
}
/* uži ekrani: sadržaj iznad teksta, oboje poravnato s naslovom */
.article-layout > .entry-body {
  margin-left: 0;
}
.article-aside {
  max-width: 720px;
}
@media (min-width: 1100px) {
  .article-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) minmax(220px, 1fr);
    column-gap: 4.5rem;
  }
  .article-layout > .entry-body {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    max-width: 720px;
  }
  .article-aside {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 100%;
    max-width: 300px;
  }
  .article-aside .article-toc {
    position: sticky;
    top: 2rem;
    margin: 0;
    padding: 0 0 0 1.25rem;
    background: none;
    border: 0;
    border-left: 1px solid var(--ar-line);
    border-radius: 0;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
  .article-aside .article-toc ol {
    columns: 1;
  }
  .article-aside .article-toc li {
    font-size: 0.875rem;
    margin-bottom: 0.6rem;
    position: relative;
  }
  .article-aside .article-toc a.is-active::after {
    content: "";
    position: absolute;
    left: calc(-1.25rem - 1px);
    top: 0.1em;
    bottom: 0.1em;
    width: 2px;
    background: var(--color-primary);
  }
}

/* Ravnije plohe (studeni 2026.) */
.article-toc { border-radius: 6px; }
.post-nav-link { border-radius: 6px; }
.entry-content blockquote { border-radius: 0 6px 6px 0; }
.entry-content blockquote::before { color: var(--coral, #ee6c4d); }
.entry-content blockquote { border-left-color: var(--coral, #ee6c4d); }
.reading-progress span { background: var(--coral, #ee6c4d); }

/* Stranice (npr. Logički kalkulator): isto zaglavlje kao članci */
body.page .site-header {
  background: var(--ar-paper);
  box-shadow: 0 1px 0 #f1e8dc, 0 1px 3px rgba(0, 0, 0, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.entry-content .lk-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 0 0 2.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ar-mut);
}
.entry-content .lk-cta:last-child {
  margin: 3rem 0 0;
}
.entry-content a.lk-btn {
  border-bottom: 0;
}
.entry-content ol > li::marker {
  color: var(--color-primary);
  font-weight: 600;
}
.entry-content a.lk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  background: #ee6c4d;
  color: #293241;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.entry-content a.lk-btn:hover {
  background: #293241;
  color: #fff;
}

/* Bijela slova na koraljnim gumbima */
.entry-content a.lk-btn {
  color: #fff;
}
