/* ═══════════════════════════════════════════════════════════
   K4 SPORT — Global UI
   Lightbox · Shortcode Kalendar · Galerija · Edit bar
   Zavisi od: frontend.css
═══════════════════════════════════════════════════════════ */

/* ── Lightbox overlay ──────────────────────────────────────── */

.k4-lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
    
    
}
.k4-lb-overlay.active { display: flex; }

.k4-lb-inner {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.k4-lb-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.k4-lb-img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  transition: opacity 0.25s ease;
  display: block;
}
.k4-lb-spinner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,107,0,0.2);
  border-top-color: #FF6B00;
  border-radius: 50%;
  animation: k4Spin 0.7s linear infinite;
  display: none;
}
.k4-lb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}
.k4-lb-caption { font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.k4-lb-counter { font-size: 0.82rem; color: rgba(255,255,255,0.45); white-space: nowrap; }

.k4-lb-close,
.k4-lb-prev,
.k4-lb-next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.k4-lb-close:hover,
.k4-lb-prev:hover,
.k4-lb-next:hover { background: rgba(255,107,0,0.7); }

.k4-lb-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.1rem; }
.k4-lb-prev  { left: 20px;  top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.6rem; }
.k4-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.6rem; }

/* ── Inline edit bar (admin only) ──────────────────────────── */
#k4-edit-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(13,13,13,0.95);
  border: 1px solid rgba(255,107,0,0.4);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  font-size: 0.82rem;
  color: #fff;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.k4-eb-btn {
  background: #FF6B00;
  border: none;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.k4-eb-btn:hover { background: #e05e00; }

.k4-editable {
  outline: 2px dashed rgba(255,107,0,0.5) !important;
  outline-offset: 3px !important;
  border-radius: 3px !important;
  cursor: text !important;
  min-width: 20px;
  min-height: 1em;
}
.k4-editable:focus {
  outline: 2px solid #FF6B00 !important;
  background: rgba(255,107,0,0.05) !important;
}

/* ── Header scrolled ───────────────────────────────────────── */
.k4-header-scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.4) !important;
  border-bottom-color: rgba(255,107,0,0.2) !important;
}

/* ── Shortcode — Kalendar lista ────────────────────────────── */
.k4-sc-kalendar { display: flex; flex-direction: column; gap: 36px; }

.k4-sc-kal-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--k4-card-border);
}
.k4-sc-kal-month-head h3 { font-size: 1.15rem; font-weight: 800; margin: 0; }

.k4-sc-kal-count {
  font-size: 0.78rem;
  color: var(--k4-text-muted);
  background: var(--k4-bg3);
  border: 1px solid var(--k4-card-border);
  padding: 3px 12px;
  border-radius: 20px;
}

.k4-sc-kal-items { display: flex; flex-direction: column; gap: 10px; }

.k4-sc-kal-item {
  display: grid;
  grid-template-columns: 58px 1px 1fr auto;
  gap: 0 16px;
  align-items: center;
  padding: 16px 20px;
  transition: transform 0.25s ease;
}
.k4-sc-kal-item:hover { transform: translateX(3px); }

.k4-sc-kal-date  { display: flex; flex-direction: column; align-items: center; text-align: center; }
.k4-sc-day       { font-size: 2rem; font-weight: 900; color: var(--k4-primary); line-height: 1; }
.k4-sc-mon       { font-size: 0.7rem; color: var(--k4-text-muted); text-transform: uppercase; }
.k4-sc-kal-sep   { width: 1px; height: 50px; background: var(--k4-card-border); }
.k4-sc-kal-info  { min-width: 0; }
.k4-sc-kal-top   { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }

.k4-sc-kal-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--k4-text);
  margin-bottom: 6px;
}
.k4-sc-kal-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.k4-sc-kal-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 110px;
  flex-shrink: 0;
}
.k4-sc-kal-price { font-size: 1.3rem; font-weight: 900; color: var(--k4-primary); line-height: 1; }
.k4-sc-kal-footer { text-align: center; margin-top: 16px; }

/* ── Shortcode — Galerija ──────────────────────────────────── */
.k4-sc-galerija   { display: grid; gap: 6px; }
.k4-sc-galerija-2 { grid-template-columns: repeat(2, 1fr); }
.k4-sc-galerija-3 { grid-template-columns: repeat(3, 1fr); }
.k4-sc-galerija-4 { grid-template-columns: repeat(4, 1fr); }

.k4-sc-foto-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1;
  background: var(--k4-bg3);
  transition-delay: var(--k4-delay, 0s);
}
.k4-sc-foto-item a   { display: block; width: 100%; height: 100%; }
.k4-sc-foto-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.k4-sc-foto-item:hover img { transform: scale(1.06); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .k4-sc-kal-item             { grid-template-columns: 50px 1px 1fr; }
  .k4-sc-kal-cta              { display: none; }
  .k4-sc-galerija-3,
  .k4-sc-galerija-4           { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .k4-sc-galerija-2           { grid-template-columns: 1fr; }
  .k4-lb-prev                 { left: 8px; }
  .k4-lb-next                 { right: 8px; }
}




