/* =========================================================
   „Live” sloj — učitava se poslednji
   ========================================================= */

/* oznake banera: bez pozicije i dimenzija, samo zakonski „Sponzorisano” */
.ad-slot::before { content: "Sponzorisano"; position: absolute; top: -20px; right: 0; display: block; margin: 0; }

/* meni „Ekrani” samo u demo režimu (?demo=1) */
body:not(.demo) .screens-btn, body:not(.demo) .screens { display: none !important; }

/* broj u nadnaslovu hero-a */
.hero-count { gap: 10px; flex-wrap: wrap; }
.hero-count span { white-space: nowrap; }
.hero-count b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-count i { font-style: normal; opacity: .6; }
.stats-strip b { font-variant-numeric: tabular-nums; }

/* dugmad „Sve …” ispod sekcija samo na telefonu */
.mobile-cta { display: none; }

@media (max-width: 860px) {
  /* nadnaslov: kompaktno, u jednom redu */
  .hero-count { font-size: 10.5px; letter-spacing: .08em; gap: 6px; margin-bottom: 14px; flex-wrap: nowrap; }
  .hero-count::before, .hero-count::after { display: none; }
  .hero-count { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 7px 12px; border-radius: 30px; }

  /* „Često traženo” ne treba na telefonu */
  .hero-tags { display: none; }
  .hero .container { padding-bottom: 92px; }

  /* statistika: ikonica, broj i opis — centrirano */
  .stats-strip .s, .stats-strip .s:nth-child(n) { flex-direction: column !important; align-items: center !important; text-align: center; gap: 8px; padding: 20px 10px; }
  .stats-strip .s > div { display: flex; flex-direction: column; align-items: center; }
  .stats-strip .s-ic { width: 40px; height: 40px; }
  .stats-strip b { font-size: 22px; }
  .stats-strip span:not(.s-ic) { font-size: 12.5px; line-height: 1.35; margin-top: 2px; }

  /* naslovi sekcija: dugme ide ispod sadržaja, sadržaj se „lepi” uz naslov */
  .section-head > .btn { display: none; }
  .section-head { margin-bottom: 18px; }
  .section-head p { margin-top: 4px; }
  .mobile-cta { display: flex; width: 100%; margin-top: 18px; height: 54px; border-radius: 12px; }

  /* „Kako funkcioniše”: viša fotografija, dugme preko cele širine */
  .how-photo { aspect-ratio: 4/5; max-height: 520px; }
  .how-cta { width: 100%; height: 54px; border-radius: 12px; }

  /* oznaka banera ne sme da stoji preko sadržaja na telefonu */
  .ad-slot::before { position: static; text-align: right; margin-bottom: 6px; }
}
@media (max-width: 380px) {
  .stats-strip .inner { grid-template-columns: 1fr 1fr !important; }
  .stats-strip .s, .stats-strip .s:nth-child(n) { border-top: 0 !important; }
  .stats-strip .s:nth-child(n+3) { border-top: 1px solid var(--line) !important; }
  .stats-strip .s:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .hero-count { font-size: 9.5px; letter-spacing: .05em; padding: 6px 10px; }
}

/* ---------- Logo kao slika ---------- */
.gcard-logo.has-img, .fcard-logo:has(img) { padding: 6px; background: #fff; overflow: hidden; }
.gcard-logo img, .fcard-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Kartica geometra na telefonu:
   [logo][naziv] → mesto · licence · ocena → usluge → linija → status + akcije ---------- */
@media (max-width: 860px) {
  .gcard { grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: "logo top" "meta meta" "tags tags" "side side"; row-gap: 0; column-gap: 14px; align-items: center; }
  .gcard-main { display: contents; }
  .gcard-logo { grid-area: logo; width: 60px; height: 60px; }
  .gcard-top { grid-area: top; align-self: center; }
  .gcard h4 { font-size: 16px; }
  .gcard-meta { grid-area: meta; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); gap: 6px 14px; font-size: 13px; }
  .gcard-tags { grid-area: tags; margin-top: 12px; }
  .gcard-side { grid-area: side; margin-top: 14px; padding-top: 14px; }
}
@media (max-width: 380px) {
  .gcard { grid-template-columns: 52px minmax(0, 1fr); }
  .gcard-logo { width: 52px; height: 52px; }
  .gcard-meta > span:nth-child(3) { display: inline-flex; }
}

/* ---------- Prozor za prijavu: prekidač centriran ---------- */
@media (max-width: 860px) {
  .modal .modal-main { padding-top: 62px; position: relative; }
  .modal-grab { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); margin: 0; }
  .modal .close { top: 14px; right: 14px; }
  .modal .seg-pill { margin: 0 0 20px; width: 100%; }
  .seg.seg-pill button { display: flex; align-items: center; justify-content: center; text-align: center; }
}

/* ---------- Vest: baner „Događaj” niži na telefonu ---------- */
@media (max-width: 1140px) {
  .ad-tall { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 540px) {
  .ad-tall { aspect-ratio: 4 / 3; }
}
