/* =========================================================
   Forum v2: početna (kategorije + potkategorije), kategorija, nova tema
   ========================================================= */

/* zaglavlje foruma */
.forum-hero { background: var(--bordo); color: #fff; padding: 36px 0 40px; position: relative; overflow: hidden; }
.forum-hero::after { content: ""; position: absolute; inset: 0; opacity: .08; background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.forum-hero .container { position: relative; z-index: 1; }
.forum-hero.sm { padding: 28px 0 30px; }
.forum-hero .crumbs, .forum-hero .crumbs a { color: #c3cde0; }
.fh-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.forum-hero h2 { color: #fff; margin: 0; }
.forum-hero p { color: #c3cde0; margin: 6px 0 0; font-size: 16.5px; }
.fh-search { margin-top: 22px; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; background: #fff; border-radius: 14px; color: var(--muted); max-width: 640px; }
.fh-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; min-width: 0; background: transparent; }
.fh-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 15px; color: #c3cde0; }
.fh-stats b { color: #fff; margin-right: 4px; }
.fh-stats .online { display: inline-flex; align-items: center; gap: 6px; }
.fh-stats .online i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }

.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 28px 0 64px; align-items: start; }
.forum-main { display: grid; gap: 20px; min-width: 0; }
.forum-side { display: grid; gap: 16px; position: sticky; top: 100px; }
.fs-rules h3, .nt-tips h3 { display: flex; gap: 8px; align-items: center; font-size: 16px; }
.fs-rules h3 svg.lucide, .nt-tips h3 svg.lucide { color: var(--red); }
.fs-rules ul, .nt-tips ul { padding-left: 18px; margin: 10px 0; display: grid; gap: 6px; font-size: 15px; }

/* kartica kategorije */
.fcat-list { display: grid; gap: 14px; }
.fcat { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.fcat:hover { border-color: var(--brand-100); box-shadow: var(--shadow-lg); }
.fcat-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 24px; gap: 16px; align-items: center; padding: 18px 20px; color: var(--ink); }
.fcat-head:hover { color: var(--ink); }
.fcat-head:hover h3 { color: var(--red); }
.fcat-ic { width: 56px; height: 56px; border-radius: 14px; background: var(--bordo); color: #fff; display: grid; place-items: center; }
.fcat-ic svg.lucide { width: 26px; height: 26px; }
.fcat-txt h3 { margin: 0 0 3px; font-size: 18px; transition: color .15s; }
.fcat-txt p { margin: 0; font-size: 15px; color: var(--muted); }
.fcat-nums { display: flex; gap: 18px; }
.fcat-nums span { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--muted); }
.fcat-nums b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fcat-go { color: var(--line-2); }
.fcat-subs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px 92px; }
.fcat-subs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 30px; background: #f5f7fb; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.fcat-subs a svg.lucide { width: 14px; height: 14px; color: var(--muted); }
.fcat-subs a b { font-size: 12px; color: var(--muted); font-weight: 700; margin-left: 2px; }
.fcat-subs a:hover { background: var(--bordo); border-color: var(--bordo); color: #fff; }
.fcat-subs a:hover svg.lucide, .fcat-subs a:hover b { color: #c3cde0; }
.fcat-last { display: flex; gap: 12px; align-items: center; padding: 12px 20px 12px 92px; border-top: 1px solid var(--line); background: #fbfcfe; color: var(--ink); }
.fcat-last .avatar { width: 32px; height: 32px; font-size: 11px; }
.fl-txt { min-width: 0; }
.fl-txt b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-txt span { font-size: 13.5px; color: var(--muted); }
.fcat-last:hover b { color: var(--red); }

/* red teme */
.ftopic { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 190px; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.ftopic:last-child { border-bottom: 0; }
.ftopic.is-sticky { background: #fffaf0; }
.ftopic.has-new { box-shadow: inset 4px 0 0 var(--red); }
.ftopic .avatar { width: 44px; height: 44px; }
.ft-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; align-items: center; }
.ft-sub { font-size: 13px; font-weight: 700; color: var(--bordo); background: var(--brand-50); padding: 3px 9px; border-radius: 20px; }
.ft-sub:hover { background: var(--bordo); color: #fff; }
.mt-flag.hot { background: var(--danger-50); color: var(--red-2); }
.ftopic h4 { margin: 0 0 4px; font-size: 16.5px; line-height: 1.4; }
.ftopic h4 a { color: var(--ink); }
.ftopic h4 a:hover { color: var(--red); }
.ft-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); align-items: center; }
.ft-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ft-meta svg.lucide { width: 14px; height: 14px; }
.ft-author { color: var(--ink-2); font-weight: 700; }
.ft-author em { font-style: normal; font-weight: 500; color: var(--muted); }
.fr-role { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.fr-role svg.lucide { width: 12px; height: 12px; }
.fr-role.geo { background: var(--ok-50); color: var(--ok); }
.fr-role.mod { background: var(--info-50); color: var(--info); }
.ft-nums { display: flex; gap: 16px; }
.ft-nums span { display: flex; flex-direction: column; align-items: center; font-size: 12.5px; color: var(--muted); }
.ft-nums b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ft-last { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; }
.ft-last .avatar.sm { width: 34px; height: 34px; font-size: 11px; }
.ft-last b { display: block; font-size: 14px; }
.ft-last span:not(.avatar) { font-size: 13px; color: var(--muted); }
.ft-last .mt-new { position: absolute; right: 0; top: -22px; font-size: 12px; padding: 3px 9px; }
.ft-group { padding: 10px 20px; font-size: 13.5px; font-weight: 800; color: var(--muted); background: #f5f7fb; border-bottom: 1px solid var(--line); }
.f-latest .ftopic { grid-template-columns: 44px minmax(0, 1fr) 150px; }
.f-latest .ft-last { display: none; }

/* stranica kategorije */
.fk-title { display: flex; gap: 16px; align-items: center; }
.fk-ic { width: 60px; height: 60px; border-radius: 16px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex-shrink: 0; }
.fk-ic svg.lucide { width: 28px; height: 28px; color: #fff; }
.fk-body { padding: 24px 0 64px; }
.fk-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 22px; }
.fk-sub { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); transition: .2s; }
.fk-sub:hover { border-color: var(--bordo); color: var(--ink); }
.fk-sub.active { border-color: var(--bordo); background: var(--bordo); color: #fff; }
.fk-sub-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--bordo); display: grid; place-items: center; flex-shrink: 0; }
.fk-sub.active .fk-sub-ic { background: rgba(255,255,255,.14); color: #fff; }
.fk-sub b { display: block; font-size: 15px; line-height: 1.3; }
.fk-sub span:not(.fk-sub-ic) { font-size: 13px; color: var(--muted); }
.fk-sub.active span:not(.fk-sub-ic) { color: #c3cde0; }
.fk-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fk-bar .chip-tabs { margin-bottom: 12px; }
.fk-count { font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.ftopic-list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.ftopic-list .geo-empty { border: 0; border-radius: 0; }

/* nova tema */
.nt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 28px 0 64px; align-items: start; }
.nt-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nt-cat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 56px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; text-align: left; }
.nt-cat svg.lucide { width: 20px; height: 20px; color: var(--bordo); flex-shrink: 0; }
.nt-cat.active { border-color: var(--bordo); background: var(--bordo); color: #fff; }
.nt-cat.active svg.lucide { color: #fff; }

/* tablet / telefon */
@media (max-width: 1140px) {
  .forum-layout, .nt-layout { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; }
  .ftopic { grid-template-columns: 44px minmax(0, 1fr) 130px; }
  .ft-last { display: none; }
  .nt-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .forum-hero { padding: 26px 0 28px; }
  .fh-row .btn { width: 100%; }
  .fh-search { height: 50px; margin-top: 18px; }
  .fh-stats { font-size: 14px; gap: 6px 16px; }
  .fcat-head { grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 12px; padding: 16px; }
  .fcat-ic { width: 48px; height: 48px; border-radius: 12px; }
  .fcat-ic svg.lucide { width: 22px; height: 22px; }
  .fcat-txt h3 { font-size: 17px; }
  .fcat-txt p { font-size: 14px; }
  .fcat-nums { grid-column: 2 / 3; grid-row: 2; gap: 14px; }
  .fcat-nums span { flex-direction: row; gap: 4px; font-size: 13.5px; align-items: baseline; }
  .fcat-nums b { font-size: 14.5px; }
  .fcat-go { grid-column: 3; grid-row: 1; }
  .fcat-subs { padding: 0 16px 14px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fcat-subs::-webkit-scrollbar { display: none; }
  .fcat-subs a { flex-shrink: 0; height: 40px; }
  .fcat-last { padding: 12px 16px; }

  .ftopic { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; align-items: start; }
  .ftopic .avatar { width: 40px; height: 40px; }
  .ftopic h4 { font-size: 16px; }
  .ft-nums { grid-column: 2; flex-direction: row; gap: 14px; }
  .ft-nums span { flex-direction: row; gap: 4px; align-items: baseline; font-size: 13.5px; }
  .ft-nums b { font-size: 14.5px; }
  .f-latest .ftopic { grid-template-columns: 40px minmax(0, 1fr); }
  .ftopic .mt-new { position: static; }
  .ftopic.has-new .ft-nums::after { content: "nove poruke"; font-size: 12px; font-weight: 700; color: #fff; background: var(--red); padding: 2px 9px; border-radius: 20px; align-self: center; }

  .fk-title { gap: 12px; }
  .fk-ic { width: 48px; height: 48px; border-radius: 12px; }
  .fk-subs { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; margin-bottom: 16px; }
  .fk-subs::-webkit-scrollbar { display: none; }
  .fk-sub { flex: 0 0 auto; min-width: 200px; padding: 12px 14px; }
  .ftopic-list { border-radius: 14px; }
  .nt-cats { grid-template-columns: 1fr 1fr; }
  .nt-cat { font-size: 13.5px; padding: 10px 12px; }
}
@media (max-width: 380px) {
  .nt-cats { grid-template-columns: 1fr; }
}
.ft-meta .ft-author { display: block; flex-basis: 100%; }
.ft-author em::before { content: "· "; }
.ft-author .fr-role { margin-left: 6px; vertical-align: 1px; }
.fk-bar .chip-tabs { margin-right: 0; padding-right: 0; max-width: 100%; }
@media (max-width: 860px) { .fk-bar { display: block; } .fk-count { display: block; } }
@media (max-width: 860px) { .ftopic.has-new .ft-nums::after { white-space: nowrap; margin-left: auto; } .ft-nums { width: 100%; align-items: center; } }
