/* ============================================================
   Bofor Baška — dinamički banner (v8 mockup → tema visitbaska)
   Sve klase i varijable nose predznak vbb- da ne diraju temu.
   Scena 3:1, Bingo hoda po vrhu zida, ljestvica ispod slike.
   ============================================================ */

.vbb-banner {
  --vbb-brand: #1a3b5c;
  --vbb-alert: #b93a2b;
  --vbb-cream: #faf6ee;
  --vbb-stone: #ede4d0;
  --vbb-stone-dark: #d9cdb3;
  --vbb-ink: #0e1721;
  --vbb-ink-soft: #33414f;

  --vbb-panel-w: 22%;
  --vbb-riva-w: 78%;
  --vbb-scale-left: 4%;
  --vbb-scale-right: 74%;
  --vbb-bingo-y: 51%;

  position: relative;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px -18px rgba(14, 23, 33, 0.35);
  isolation: isolate;
  background: var(--vbb-stone);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  color: var(--vbb-ink);
}

.vbb-banner *,
.vbb-banner *::before,
.vbb-banner *::after { box-sizing: border-box; }

/* ---------- Scena ---------- */
.vbb-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
}

.vbb-bglayers { position: absolute; inset: 0; z-index: 0; }

.vbb-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.vbb-banner[data-scene="calm"]      .vbb-bg[data-bg="calm"],
.vbb-banner[data-scene="breezy"]    .vbb-bg[data-bg="breezy"],
.vbb-banner[data-scene="stormy"]    .vbb-bg[data-bg="stormy"],
.vbb-banner[data-scene="hurricane"] .vbb-bg[data-bg="hurricane"] { opacity: 1; }

/* ---------- Lijevi panel: ruža vjetrova ---------- */
.vbb-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--vbb-panel-w);
  z-index: 3;
  padding: 3%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2%;
  background: linear-gradient(to right,
    rgba(250, 246, 238, 0.95) 0%,
    rgba(250, 246, 238, 0.92) 80%,
    rgba(250, 246, 238, 0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vbb-rose {
  position: relative;
  width: min(85%, 240px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vbb-rose img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(14, 23, 33, 0.15));
}

.vbb-arrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(0deg);
  transition: transform 1.4s cubic-bezier(0.4, 0.2, 0.3, 1);
  transform-origin: center;
  will-change: transform;
}

.vbb-arrow svg { width: 18%; height: 100%; overflow: visible; }

.vbb-info {
  text-align: center;
  color: var(--vbb-brand);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.2;
}

.vbb-wind-name {
  font-size: clamp(15px, 1.9vw, 30px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 4px;
}

.vbb-speed {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.vbb-num { font-size: clamp(22px, 2.8vw, 44px); font-weight: 700; line-height: 1; }

.vbb-unit,
.vbb-gust,
.vbb-deg {
  font-family: inherit;
  font-size: clamp(9px, 0.85vw, 12px);
  color: var(--vbb-ink-soft);
  font-weight: 500;
}

.vbb-gust { display: block; margin-top: 2px; }
.vbb-deg { display: block; margin-bottom: 6px; }

.vbb-bft {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(26, 59, 92, 0.15);
}

.vbb-bft .vbb-lbl {
  font-size: clamp(8px, 0.75vw, 10px);
  color: var(--vbb-ink-soft);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.vbb-bft .vbb-bft-num {
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 700;
  color: var(--vbb-alert);
  line-height: 1;
}

.vbb-bft .vbb-bft-name {
  font-size: clamp(9px, 0.85vw, 13px);
  color: var(--vbb-ink);
  font-weight: 500;
}

/* ---------- Riva i Bingo ---------- */
.vbb-riva {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  left: var(--vbb-panel-w);
  z-index: 2;
}

.vbb-bingo {
  position: absolute;
  top: var(--vbb-bingo-y);
  transform: translate(-50%, -100%);
  width: clamp(50px, 5vw, 78px);
  z-index: 4;
  left: var(--vbb-scale-left);
  transition: left 1.6s cubic-bezier(0.4, 0.2, 0.3, 1);
  pointer-events: none;
  will-change: left, transform;
  filter: drop-shadow(0 4px 6px rgba(14, 23, 33, 0.5));
}

.vbb-bingo img { width: 100%; height: auto; display: block; }

.vbb-banner[data-scene="calm"] .vbb-bingo img { animation: vbb-idle 3.5s ease-in-out infinite; }
.vbb-banner[data-scene="breezy"] .vbb-bingo img { animation: vbb-bounce 0.55s ease-in-out infinite; }
.vbb-banner[data-scene="stormy"] .vbb-bingo img { animation: vbb-brace 0.5s ease-in-out infinite; }
.vbb-banner[data-scene="hurricane"] .vbb-bingo img { animation: vbb-shake 0.18s ease-in-out infinite; }

@keyframes vbb-idle {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-1.5px) rotate(0.5deg); }
}
@keyframes vbb-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-1deg); }
}
@keyframes vbb-brace {
  0%, 100% { transform: translateY(0) rotate(-5deg) scaleX(0.98); }
  50% { transform: translateY(-1px) rotate(-6deg) scaleX(0.98); }
}
@keyframes vbb-shake {
  0% { transform: translate(-2px, 0) rotate(-8deg); }
  25% { transform: translate(2px, -1px) rotate(-6deg); }
  50% { transform: translate(-1px, 1px) rotate(-9deg); }
  75% { transform: translate(2px, 0) rotate(-7deg); }
  100% { transform: translate(-2px, 0) rotate(-8deg); }
}

/* ---------- Sjećanje: "prošli put" ---------- */
.vbb-flash {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(20, 24, 30, 0.72);
  color: #f5eeda;
  font-size: 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.vbb-flash.is-show { opacity: 1; transform: translateY(0); }

.vbb-flash .vbb-mf-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 9px;
  color: rgba(245, 238, 218, 0.6);
}

.vbb-flash .vbb-mf-body b { color: #f0c465; font-weight: 700; }

/* ---------- Ljestvica ispod slike ---------- */
.vbb-strip {
  position: relative;
  width: 100%;
  padding: 14px 0 12px;
  background: linear-gradient(to bottom, var(--vbb-stone) 0%, var(--vbb-stone-dark) 100%);
  border-top: 1px solid rgba(26, 59, 92, 0.1);
  border-bottom: 1px solid rgba(26, 59, 92, 0.1);
}

.vbb-strip::before {
  content: "";
  position: absolute;
  left: calc(var(--vbb-panel-w) + (var(--vbb-riva-w) * var(--vbb-scale-left) / 100));
  right: calc(var(--vbb-riva-w) * (100% - var(--vbb-scale-right)) / 100);
  top: 34px;
  height: 1px;
  background: linear-gradient(to right, transparent,
    rgba(26, 59, 92, 0.35) 10%, rgba(26, 59, 92, 0.35) 90%, transparent);
}

.vbb-strip-inner { position: relative; width: 100%; height: 106px; }

.vbb-marker {
  position: absolute;
  top: 0; bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 32px;
}

.vbb-marker .vbb-m-num {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(14px, 1.4vw, 22px);
  line-height: 1;
  color: var(--vbb-ink-soft);
  transition: color 0.3s ease, font-size 0.3s ease, transform 0.3s ease;
}

.vbb-marker .vbb-tick { width: 1px; height: 6px; background: rgba(26, 59, 92, 0.3); }

.vbb-marker .vbb-date {
  font-size: clamp(9px, 0.62vw, 10px);
  color: var(--vbb-ink-soft);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-top: 2px;
}

.vbb-marker.is-active .vbb-m-num {
  color: var(--vbb-alert);
  font-size: clamp(17px, 1.7vw, 27px);
  transform: translateY(-2px);
}
.vbb-marker.is-active .vbb-tick { background: var(--vbb-alert); height: 8px; width: 2px; }
.vbb-marker.is-active .vbb-date { color: var(--vbb-alert); font-weight: 700; opacity: 1; }

.vbb-strip-label {
  text-align: center;
  font-size: clamp(9px, 0.72vw, 11px);
  color: var(--vbb-ink-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 8px;
  opacity: 0.65;
}

/* ---------- Podnožje ---------- */
.vbb-footer {
  padding: 10px 16px;
  background: var(--vbb-stone-dark);
  color: var(--vbb-ink-soft);
  font-size: clamp(10px, 0.8vw, 12px);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  line-height: 1.45;
}

.vbb-footer .vbb-src { flex-shrink: 0; }
.vbb-footer .vbb-src a { color: var(--vbb-brand); text-decoration: underline; text-underline-offset: 2px; }
.vbb-footer .vbb-why { flex: 1; min-width: 220px; }
.vbb-footer .vbb-why strong { color: var(--vbb-alert); margin-right: 3px; }

.vbb-badge {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  vertical-align: middle;
  background: rgba(220, 140, 40, 0.15);
  color: #8f4f12;
  border: 1px solid rgba(220, 140, 40, 0.35);
}

/* ---------- Puna širina stranice ---------- */
.vbb-wrap {
  position: relative;
  width: 100%;
  margin: 0;
}

.vbb-wrap .vbb-banner {
  max-width: none;
  border-radius: 0;
  box-shadow: 0 14px 34px -22px rgba(14, 23, 33, 0.4);
}

.vbb-wrap .vbb-scene { aspect-ratio: 4.2 / 1; }

/* Legenda je u punoj širini niža: datumi stanu vodoravno. */
.vbb-wrap .vbb-strip { padding: 6px 0 4px; }
.vbb-wrap .vbb-strip-inner { height: 54px; }
.vbb-wrap .vbb-strip::before { top: 24px; }
.vbb-wrap .vbb-marker { cursor: help; }
.vbb-wrap .vbb-marker .vbb-date {
	writing-mode: horizontal-tb;
	transform: none;
	font-size: 9.5px;
	margin-top: 4px;
	opacity: 0.7;
}
.vbb-wrap .vbb-strip-label { margin-top: 2px; opacity: 0.55; font-size: 9px; }
.vbb-wrap .vbb-footer { padding: 5px 22px; font-size: 10px; opacity: 0.85; }

@media (max-width: 900px) {
  .vbb-wrap .vbb-scene { aspect-ratio: 3.2 / 1; }
}

@media (max-width: 720px) {
  .vbb-wrap .vbb-scene { aspect-ratio: 2.6 / 1; }
  .vbb-wrap .vbb-strip-inner { height: 44px; }
  .vbb-wrap .vbb-strip { padding: 8px 0 22px; }
}

/* ---------- Mobilni prikaz ---------- */
@media (max-width: 720px) {
  .vbb-banner {
    border-radius: 12px;
    --vbb-panel-w: 32%;
    --vbb-riva-w: 68%;
  }
  .vbb-panel { padding: 5px; gap: 3px; }
  .vbb-rose { width: min(72%, 92px); }
  .vbb-wind-name { font-size: 11px; margin-bottom: 2px; }
  .vbb-num { font-size: 17px; }
  .vbb-unit, .vbb-deg, .vbb-gust { font-size: 8px; }
  .vbb-deg { margin-bottom: 3px; }
  .vbb-bft { padding-top: 3px; }
  .vbb-bft .vbb-lbl { font-size: 7px; }
  .vbb-bft .vbb-bft-num { font-size: 14px; }
  .vbb-bft .vbb-bft-name { font-size: 9px; }

  .vbb-bingo { width: clamp(30px, 7.5vw, 46px); }

  .vbb-strip { padding: 10px 0 24px; }
  .vbb-strip-inner { height: 44px; }
  .vbb-strip .vbb-m-num { font-size: 11px; }
  .vbb-marker.is-active .vbb-m-num { font-size: 14px; }
  .vbb-marker .vbb-tick { height: 4px; }
  .vbb-marker .vbb-date { display: none; }
  .vbb-marker.is-active .vbb-date {
    display: block;
    position: absolute;
    top: 30px;
    font-size: 9px;
    white-space: nowrap;
    writing-mode: horizontal-tb;
    transform: none;
    margin-top: 0;
  }
  .vbb-marker:not(.is-active):nth-child(even) { display: none; }
  .vbb-strip-label { font-size: 8px; margin-top: 10px; letter-spacing: 0.1em; }
  .vbb-strip::before { top: 22px; }

  .vbb-footer { font-size: 10px; padding: 8px 10px; gap: 8px; }
  .vbb-footer .vbb-why { min-width: 100%; }

  .vbb-flash { top: 4px; right: 4px; font-size: 9px; padding: 4px 8px; }
  .vbb-flash .vbb-mf-label { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .vbb-bg { transition: none; }
  .vbb-arrow { transition: none; }
  .vbb-bingo { transition: none; }
  .vbb-banner .vbb-bingo img { animation: none; }
}
