/* ==========================================================================
   MODIVIAM — mélységi karusszel
   --------------------------------------------------------------------------
   A react-bits DepthCarousel hivatalos stíluslapjának átültetése
   (npx shadcn add @react-bits/DepthCarousel-JS-CSS → DepthCarousel.css).
   A szabályok szándékosan a forrást követik: álló lapok, lekerekített sarok,
   kerek, áttetsző vezérlők. Csak az osztálynevek mások, és a fókuszgyűrű
   kapott márkaszínt.
   ========================================================================== */

/* Az eredeti Elementor karusszel elrejtve — nem törölve. */
.mv-depth__source-hidden { display: none !important; }

.mv-depth {
  position: relative;
  width: 100%;
  height: 100%;
  /* A lapok mérete a képernyőhöz igazodik (lásd a JS `meretezes()` függvényét),
     ezért a keretnek is nőnie kell, különben levágná a nagyobb fotót. */
  min-height: clamp(30rem, 34vw, 34rem);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: var(--dc-perspective, 1400px);
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.mv-depth:active { cursor: grabbing; }

.mv-depth:focus-visible {
  outline: 2px solid var(--mv-gold, #C6A97C);
  outline-offset: 4px;
  border-radius: 12px;
}

.mv-depth__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.mv-depth__card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  overflow: hidden;
  background: #0b0d12;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.65),
    0 8px 20px -10px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity, filter;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.mv-depth__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  /* A szaggatott fehér perem a képfájlokba van égetve — itt is levágjuk. */
  clip-path: inset(4% round 18px);
  transform: scale(1.09);
}

.mv-depth__tint {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* --- Nyilak --------------------------------------------------------------- */

/* A nyilak nem dobozok, hanem hajszálvonalas jelek — a márka nyelvén.
   A kerek, áttetsző gomb a referenciában jó, itt viszont idegen test volt. */
.mv-depth__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3000;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  /* !important: a gombok navy hátteret kaptak az oldal saját stílusából
     (`rgb(14, 42, 58)`), ezért néztek ki dobozos, kék négyzetnek. */
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: rgba(240, 235, 226, 0.55) !important;
  cursor: pointer;
  transition: color 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mv-depth__arrow svg {
  width: 30px;
  height: 30px;
  stroke-width: 1;
}

.mv-depth__arrow:hover,
.mv-depth__arrow:focus-visible {
  color: var(--mv-gold, #C6A97C) !important;
  background: transparent !important;
}

.mv-depth__arrow--prev { left: clamp(0.25rem, 1.5vw, 1rem); }
.mv-depth__arrow--next { right: clamp(0.25rem, 1.5vw, 1rem); }

.mv-depth__arrow--prev:hover { transform: translateY(-50%) translateX(-4px); }
.mv-depth__arrow--next:hover { transform: translateY(-50%) translateX(4px); }

/* --- Halvány tükröződés a lapok alatt -------------------------------------- */

.mv-depth__card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 11, 0.55));
}

/* --- Pontok --------------------------------------------------------------- */

.mv-depth__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 16, 22, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* !important: a gombokra írt általános `border-radius: 0` szabályom
   szögletessé tette a pontokat — mérve 20×7 képpontos SZÖGLETES csík volt. */
.mv-depth__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.mv-depth__dot.is-active {
  width: 20px;
  background: #fff;
}

@media (max-width: 768px) {
  .mv-depth { min-height: min(64vw, 28rem); }
}

@media (max-width: 560px) {
  /* Telefonon a karusszel KILÉP a szekció oldalsó térközéből: a fotó így a
     képernyő majdnem teljes szélességét megkapja. A megrendelő panasza épp
     az volt, hogy mobilon túl kicsi a kép. */
  .mv-depth {
    min-height: 62vw;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mv-depth__card { will-change: auto; }
  .mv-depth__arrow,
  .mv-depth__dot { transition: none; }
}
