/* =========================================================
   RIVERVIEW – Karuzela kart (widget Elementora)
   ========================================================= */
.rvr-cc {
  --rvr-cc-per: 2.6;
  --rvr-cc-gap: 16px;
  position: relative;
}

/* ---------- Nagłówek ---------- */
.rvr-cc__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.rvr-cc__title { margin: 0; }
.rvr-cc__intro { margin-top: 12px; max-width: 640px; }

/* ---------- Przewijany obszar ---------- */
.rvr-cc__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.rvr-cc__viewport::-webkit-scrollbar { display: none; }
.rvr-cc__viewport:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.rvr-cc--drag .rvr-cc__viewport { cursor: grab; }
.rvr-cc__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.rvr-cc__track {
  display: flex;
  gap: var(--rvr-cc-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Karta ---------- */
.rvr-cc__card {
  position: relative;
  flex: 0 0 calc((var(--rvr-cc-base, 100%) - (var(--rvr-cc-per) - 1) * var(--rvr-cc-gap)) / var(--rvr-cc-per));
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin: 0;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.rvr-cc__media {
  position: relative;
  /* szerokość z ustawień; wysokość wynika z proporcji 1:1 – także w układzie „zdjęcie nad tekstem” */
  flex: 0 0 auto !important;
  width: 40%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  align-self: flex-start;
}
.rvr-cc .rvr-cc__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rvr-cc__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rvr-cc-text-split .rvr-cc__body { justify-content: space-between; }
.rvr-cc-text-split .rvr-cc__card { align-items: stretch; }

.rvr-cc .rvr-cc__heading {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}
.rvr-cc .rvr-cc__text p { margin: 0 0 .6em; }
.rvr-cc .rvr-cc__text p:last-child { margin-bottom: 0; }

/* ---------- Link „Dowiedz się więcej” (efekt rvr-link) ---------- */
.rvr-cc .rvr-cc__link {
  --link-color: currentColor;
  --link-border-color: currentColor;
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  margin-top: 16px;
  color: inherit;
  text-decoration: none;
}
.rvr-cc .rvr-cc__link .rvr-link__label {
  position: relative;
  display: inline-flex;
  padding-bottom: 4px;
  overflow: clip;
  color: var(--link-color);
}
.rvr-cc .rvr-cc__link .rvr-link__label::before,
.rvr-cc .rvr-cc__link .rvr-link__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--link-border-color);
  transition: transform .4s cubic-bezier(.77,0,.175,1);
}
.rvr-cc .rvr-cc__link .rvr-link__label::before { transform: translate3d(-100%,0,0); }
.rvr-cc .rvr-cc__link .rvr-link__label::after { transform: translateZ(0); transition-delay: .1s; }
.rvr-cc .rvr-cc__link .rvr-link__inner { position: relative; display: block; overflow: clip; }
.rvr-cc .rvr-cc__link .rvr-link__target,
.rvr-cc .rvr-cc__link .rvr-link__dup {
  display: block;
  transition: transform .6s cubic-bezier(.165,.84,.44,1);
}
.rvr-cc .rvr-cc__link .rvr-link__dup {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  transform: translate3d(0,105%,0);
}
.rvr-cc .rvr-cc__link:hover .rvr-link__label::before,
.rvr-cc .rvr-cc__link:focus-visible .rvr-link__label::before,
.rvr-cc-cardlink-yes .rvr-cc__card:hover .rvr-link__label::before { transform: translateZ(0); transition-delay: .1s; }
.rvr-cc .rvr-cc__link:hover .rvr-link__label::after,
.rvr-cc .rvr-cc__link:focus-visible .rvr-link__label::after,
.rvr-cc-cardlink-yes .rvr-cc__card:hover .rvr-link__label::after { transform: translate3d(100%,0,0); transition-delay: 0s; }
.rvr-cc .rvr-cc__link:hover .rvr-link__target,
.rvr-cc .rvr-cc__link:focus-visible .rvr-link__target,
.rvr-cc-cardlink-yes .rvr-cc__card:hover .rvr-link__target { transform: translate3d(0,-105%,0); }
.rvr-cc .rvr-cc__link:hover .rvr-link__dup,
.rvr-cc .rvr-cc__link:focus-visible .rvr-link__dup,
.rvr-cc-cardlink-yes .rvr-cc__card:hover .rvr-link__dup { transform: translateZ(0); }

/* cała karta klikalna */
.rvr-cc-cardlink-yes .rvr-cc__link { position: static; }
.rvr-cc-cardlink-yes .rvr-cc__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.rvr-cc-cardlink-yes .rvr-cc__card { cursor: pointer; }

/* przybliżenie zdjęcia */
.rvr-cc .rvr-cc__media img { transition: transform .8s cubic-bezier(.16,1,.3,1); }
.rvr-cc-zoom-yes .rvr-cc__card:hover .rvr-cc__media img { transform: scale(1.05); transition-duration: .8s; transition-delay: 0s; }

/* ---------- Nawigacja ---------- */
.rvr-cc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}
.rvr-cc__indicator { flex: 1 1 auto; min-width: 0; }
.rvr-cc__nav { display: flex; align-items: center; flex: 0 0 auto; margin-left: auto; }
.rvr-cc .rvr-cc__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  transition: opacity .2s, color .2s;
}
.rvr-cc .rvr-cc__arrow + .rvr-cc__arrow { border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 30%, transparent); }
.rvr-cc .rvr-cc__arrow svg { width: 10px; height: 10px; display: block; }
.rvr-cc .rvr-cc__arrow:disabled { opacity: .3; cursor: default; }
.rvr-cc .rvr-cc__arrow:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }

.rvr-cc__counter { font-size: .875rem; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.rvr-cc__progress {
  position: relative;
  display: block;
  max-width: 320px;
  height: 1px;
  background-color: color-mix(in srgb, currentColor 25%, transparent);
  overflow: hidden;
}
.rvr-cc__progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background-color: currentColor;
  transition: width .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1);
}

/* ---------- Animacja wejścia ---------- */
.rvr-cc--reveal .rvr-cc__media { opacity: 0; }
.rvr-cc--reveal .rvr-cc__media img { transform: scale(1.25); }
.rvr-cc--reveal .rvr-cc__body > * { opacity: 0; transform: translate3d(0, 12px, 0); }

.rvr-cc--reveal.is-inview .rvr-cc__media {
  opacity: 1;
  transition: opacity 1s cubic-bezier(.45,0,.55,1) calc(min(var(--i), 4) * .12s);
}
.rvr-cc--reveal.is-inview .rvr-cc__media img {
  transform: scale(1);
  transition: transform 1.4s cubic-bezier(.16,1,.3,1) calc(min(var(--i), 4) * .12s);
}
.rvr-cc--reveal.is-inview .rvr-cc__body > * {
  opacity: 1;
  transform: none;
  transition: opacity .8s cubic-bezier(.45,0,.55,1) calc(min(var(--i), 4) * .12s + .25s),
              transform .8s cubic-bezier(.16,1,.3,1) calc(min(var(--i), 4) * .12s + .25s);
}
.rvr-cc--reveal.is-inview.rvr-cc-done .rvr-cc__media img { transition: transform .8s cubic-bezier(.16,1,.3,1); }
.rvr-cc-zoom-yes .rvr-cc--reveal.is-inview .rvr-cc__card:hover .rvr-cc__media img { transform: scale(1.05); }

/* edytor i ograniczony ruch – bez animacji wejścia */
.elementor-editor-active .rvr-cc--reveal .rvr-cc__media,
.elementor-editor-active .rvr-cc--reveal .rvr-cc__body > * { opacity: 1; transform: none; }
.elementor-editor-active .rvr-cc--reveal .rvr-cc__media img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rvr-cc__viewport { scroll-behavior: auto; }
  .rvr-cc--reveal .rvr-cc__media,
  .rvr-cc--reveal .rvr-cc__body > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .rvr-cc .rvr-cc__media img { transform: none !important; transition: none !important; }
  .rvr-cc .rvr-link__target, .rvr-cc .rvr-link__dup, .rvr-cc .rvr-link__label::before, .rvr-cc .rvr-link__label::after { transition: none !important; }
}

/* komunikat w edytorze */
.rvr-cc-empty {
  padding: 40px 20px;
  border: 1px dashed #c4c4c4;
  text-align: center;
  font-size: 14px;
  color: #777;
}
