/* =========================================================
   Forum editor, slike u objavama, lightbox, profil (tabovi,
   radno vreme), footer popravke
   ========================================================= */

/* ---------- Editor odgovora ---------- */
.rte { border: 1px solid var(--line-2); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.rte:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--brand-50); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #f8f9fc; border-radius: 8px 8px 0 0; align-items: center; position: sticky; top: 78px; z-index: 3; }
.rte-bar button, .rte-img { height: 36px; min-width: 36px; padding: 0 8px; border: 0; background: transparent; border-radius: 5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; }
.rte-bar button:hover, .rte-img:hover { background: #fff; color: var(--red); box-shadow: var(--shadow); }
.rte-bar button.on { background: var(--bordo); color: #fff; }
.rte-bar .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.rte-img { border: 1px dashed var(--brand-100); color: var(--red); margin-left: 2px; }
.rte-nolink { margin-left: auto; color: var(--muted); display: inline-flex; padding: 0 6px; opacity: .7; cursor: help; }
.rte-nolink svg.lucide { width: 16px; height: 16px; }
.rte-area { min-height: 160px; max-height: 520px; overflow-y: auto; padding: 16px 18px; outline: 0; font-size: 15.5px; line-height: 1.7; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rte-area ul, .rte-area ol, .post-content ul, .post-content ol { padding-left: 22px; margin: 6px 0; }
.rte-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rte-foot span { display: inline-flex; gap: 6px; align-items: center; }
.rte-foot svg.lucide { width: 14px; height: 14px; }
.rte-count { font-family: var(--mono); }
.rte-fig { margin: 10px 0; display: inline-block; max-width: 100%; }
.rte-fig img { max-width: min(100%, 420px); max-height: 300px; border-radius: 6px; display: block; box-shadow: var(--shadow); object-fit: cover; }
.rte-area .rte-fig img { outline: 2px dashed var(--brand-100); outline-offset: 3px; }

/* ---------- Slike u objavama ---------- */
.post-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; max-width: 560px; }
.post-imgs img, .post-content img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
.post-imgs img:hover, .post-content img:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.post-content .rte-fig img { aspect-ratio: auto; max-width: 420px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(6, 10, 20, .94); display: none; align-items: center; justify-content: center; padding: 60px 80px; backdrop-filter: blur(6px); }
.lightbox.open { display: flex; animation: lbIn .2s ease; }
@keyframes lbIn { from { opacity: 0; } }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: lbZoom .25s cubic-bezier(.2,.8,.2,1); }
@keyframes lbZoom { from { transform: scale(.94); opacity: 0; } }
.lightbox figcaption { color: #d5dcea; font-size: 13.5px; font-family: var(--mono); }
.lb-close, .lb-nav { position: absolute; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: .2s; }
.lb-close:hover, .lb-nav:hover { background: var(--red); border-color: var(--red); }
.lb-close { top: 18px; right: 18px; width: 46px; height: 46px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; }
.lb-nav.prev { left: 18px; } .lb-nav.next { right: 18px; }
.g-stage { cursor: zoom-in; }
@media (max-width: 860px) {
  .lightbox { padding: 60px 10px; }
  .lb-nav { top: auto; bottom: 18px; transform: none; width: 48px; height: 48px; }
  .lb-nav.prev { left: calc(50% - 58px); } .lb-nav.next { right: calc(50% - 58px); }
  .rte-bar { top: 64px; }
  .rte-img span { display: none; }
}

/* ---------- Profil: tabovi i radno vreme ---------- */
.tabs a { cursor: pointer; }
.tabs a .tcount { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.open-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 30px; font-size: 13px; font-weight: 700; }
.open-pill i.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; }
.open-pill.is-open { background: var(--ok-50); color: var(--ok); }
.open-pill.is-open i.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: .5; animation: pulse 1.6s infinite; }
@keyframes pulse { to { transform: scale(1.8); opacity: 0; } }
.open-pill.is-closed { background: var(--danger-50); color: var(--red-2); }
.open-pill.is-soon { background: #fff4e0; color: #9a5b00; }
.hours tr.today td { color: var(--ink); font-weight: 800; }
.hours tr.today td:first-child::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: 2px; }
.hours tr.today.open td:first-child::before { background: var(--ok); }
.svc-list { display: grid; gap: 0; }
.svc-row { display: flex; gap: 16px; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.svc-row:last-child { border-bottom: 0; }
.svc-row .tile-ic { margin: 0; flex-shrink: 0; }
.svc-row > div:nth-child(2) { flex: 1; }
.svc-row p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.svc-row .price { text-align: right; font-size: 15px; }
.svc-row .price small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.branch-big { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.branch-big .bb-info { padding: 22px; }
.branch-big .map { height: 100%; min-height: 240px; }
.pgallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pgallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: zoom-in; transition: .25s; }
.pgallery img:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.pgallery img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
.rating-sum { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; padding: 24px; }
.rating-big { text-align: center; }
.rating-big b { font-family: var(--display); font-size: 54px; color: var(--bordo); line-height: 1; display: block; }
.stars { color: #f5a623; display: inline-flex; gap: 2px; }
.stars svg.lucide { width: 16px; height: 16px; fill: currentColor; }
.rbar { display: grid; grid-template-columns: 30px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; margin: 5px 0; font-family: var(--mono); }
.rbar div { height: 8px; background: var(--brand-50); border-radius: 8px; overflow: hidden; }
.rbar div i { display: block; height: 100%; background: var(--red); }
.review { padding: 20px 24px; border-top: 1px solid var(--line); }
.review-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.review-head b { display: block; font-size: 14px; }
.review .reply { margin-top: 12px; padding: 12px 14px; background: #f8f9fc; border-left: 3px solid var(--bordo); border-radius: 0 6px 6px 0; font-size: 14px; }
@media (max-width: 860px) {
  .branch-big { grid-template-columns: 1fr; }
  .rating-sum { grid-template-columns: 1fr; }
  .pgallery { grid-template-columns: 1fr 1fr; }
  .post-imgs { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Footer popravke ---------- */
.footer .logo { display: inline-flex; align-items: center; gap: 12px; padding: 0; }
.footer .icon-btn { display: inline-grid; place-items: center; padding: 0; width: 42px; height: 42px; }
.footer .icon-btn svg.lucide { width: 18px; height: 18px; }
.footer .icon-btn:hover { background: var(--red) !important; border-color: var(--red) !important; }
.footer .social { display: flex; gap: 8px; margin-top: 18px; }
.footer p { max-width: 280px; }
@media (max-width: 860px) {
  .footer { padding-bottom: 96px; }
  .footer .grid { gap: 32px; }
  .footer-bottom { flex-direction: column; }
}
.tabs { scroll-margin-top: 90px; }
@media (max-width: 860px) { .dash { grid-template-columns: minmax(0, 1fr); } .dash-main { min-width: 0; } }
.grid > *, .with-side > *, .form-grid > * { min-width: 0; }
.hours-edit .input { min-width: 0; width: 100%; padding: 0 6px; }

/* ---------- Radno vreme v2 ---------- */
.hours-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.hours-title svg.lucide { color: var(--red); }
.hours-status { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 8px; margin-bottom: 14px; }
.hours-status b { display: block; font-size: 16px; line-height: 1.2; }
.hours-status span:not(.hs-ic) { font-size: 13px; display: block; margin-top: 2px; }
.hours-status > div { flex: 1; min-width: 0; }
.hs-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #fff; }
.hs-ic svg.lucide { width: 20px; height: 20px; }
.hours-status.is-open { background: var(--ok-50); color: var(--ok); }
.hours-status.is-open b { color: #14532d; }
.hours-status.is-soon { background: #fff4e0; color: #9a5b00; }
.hours-status.is-closed { background: var(--bordo); color: #c3cde0; }
.hours-status.is-closed b { color: #fff; }
.hours-status.is-closed .hs-ic { background: rgba(255,255,255,.1); color: #fff; }
.hs-bar { height: 4px; background: rgba(29,122,70,.18); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.hs-bar i { display: block; height: 100%; background: currentColor; border-radius: 4px; }
.hours { border-collapse: separate; border-spacing: 0; }
.hours td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.hours td:first-child { padding-left: 4px; }
.hours td:last-child { padding-right: 4px; font-family: var(--mono); font-size: 13px; font-weight: 600; text-align: right; }
.hours tr:last-child td { border-bottom: 0; }
.hours tr.today td { background: var(--brand-50); color: var(--ink); font-weight: 800; border-bottom-color: transparent; }
.hours tr.today td:first-child { border-radius: 6px 0 0 6px; padding-left: 10px; box-shadow: inset 3px 0 0 var(--red); }
.hours tr.today td:last-child { border-radius: 0 6px 6px 0; padding-right: 10px; }
.hours tr.today.open td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.hours tr.today td:first-child::before { display: none; }
.today-tag { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: var(--bordo); color: #fff; padding: 2px 6px; border-radius: 3px; margin-left: 6px; vertical-align: 1px; font-weight: 600; }
.hours td.muted { color: var(--muted); font-weight: 500; }

/* ---------- Karusel firmi v2: manje kartice, 3 u redu ---------- */
.with-ads > * { min-width: 0; }
.fcard { flex-basis: calc((100% - 40px) / 3); aspect-ratio: auto; height: 340px; border-radius: 8px; }
.fcard-body { padding: 16px; }
.fcard h4 { font-size: 15px; }
.fcard .meta-line { font-size: 12.5px; gap: 2px 10px; }
.fcard-logo { width: 46px; height: 46px; font-size: 13px; }
.fcard-top { top: 12px; left: 12px; right: 12px; }
.fcard-tags { margin-top: 10px; }
.fcard-tags span { font-size: 11px; padding: 3px 7px; }
.fcard-cta { font-size: 13px; padding-top: 10px; margin-top: 12px; }
@media (max-width: 1140px) { .fcard { flex-basis: calc((100% - 40px) / 3); } }
@media (max-width: 860px) { .fcard { flex-basis: calc((100% - 20px) / 2); height: 320px; } }
@media (max-width: 540px) { .fcard { flex-basis: 78%; height: 330px; } }
