.tutorial-embed {
  background: #F5F5F5;
}

.tutorial-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.tutorial-tabs {
  position: relative;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.tutorial-tabs .nav-link {
  white-space: nowrap;
  border: 1px solid #2E7D32;
  color: #2E7D32;
  background: #fff;
  border-radius: 999px;
  font-weight: 500;
}

.tutorial-tabs .nav-link.active {
  background: #2E7D32;
  color: #fff;
}

.tutorial-step {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

/* Ramka o stalej wysokosci - zrzuty maja rozne proporcje, a przyciski Wstecz/Dalej
   nie moga skakac miedzy krokami. */
.tutorial-frame {
  height: min(62vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.tutorial-shot {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  /* Caly zrzut musi zmiescic sie na ekranie razem z podpisem i przyciskami. */
  width: min(320px, 100%, calc(62vh * var(--shot-ratio)));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  background: #fff;
}

.tutorial-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.tutorial-highlight {
  position: absolute;
  border: 3px solid #FF9800;
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.35);
  animation: tutorial-pulse 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tutorial-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-highlight { animation: none; }
}

.tutorial-caption {
  max-width: 420px;
  min-height: 7.5em;
}

.tutorial-counter {
  color: #2E7D32;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.tutorial-text {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 0;
}

.tutorial-text strong {
  color: #1B5E20;
}

.tutorial-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 780px;
  margin: 1.5rem auto 0;
}

.tutorial-dots {
  display: flex;
  gap: 6px;
}

.tutorial-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C8E6C9;
}

.tutorial-dots span.active {
  background: #2E7D32;
}

@media (max-width: 767.98px) {
  .tutorial-panel {
    padding: 1rem 0.75rem;
  }

  /* Jeden przewijany wiersz zakladek - zrzut i podpis mieszcza sie wtedy na ekranie telefonu. */
  .tutorial-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .tutorial-tabs::-webkit-scrollbar {
    display: none;
  }

  .tutorial-step {
    flex-direction: column;
    gap: 1rem;
  }

  .tutorial-frame {
    height: 52vh;
    width: 100%;
  }

  .tutorial-shot {
    width: min(300px, 100%, calc(52vh * var(--shot-ratio)));
  }

  .tutorial-caption {
    text-align: center;
  }

  .tutorial-text {
    font-size: 1.05rem;
  }

  .tutorial-controls .btn {
    padding: 0.4rem 0.75rem;
  }
}
