/* Float the header over the carousel so it adds no scroll distance above it */
header.site-header,
#masthead,
.elementor-location-header {
  position: absolute !important;   /* use "fixed" to keep the header visible while scrolling */
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
}
body.admin-bar header.site-header,
body.admin-bar #masthead,
body.admin-bar .elementor-location-header { top: 32px; }

.mgr-wrap {
  --spin: 300vh;                        /* extra scroll distance: bigger = slower spin */
  position: relative;
  margin-top: 0 !important;
  height: calc(100vh + var(--spin));
  height: calc(100vh + var(--spin));
}
.mgr-section {
  --w: clamp(220px, min(28vw, 42vh), 460px);  /* card width */
  --h: calc(var(--w) * 0.8);                  /* card height: lower = wider, flatter cards */
  --r: calc(var(--w) * 1.25);                 /* radius: raise the multiplier if cards overlap */
  --angle: -8deg;                             /* overall tilt: 0deg = perfectly level */
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.mgr-scene {
  perspective: calc(var(--w) * 6.5);          /* lower = back cards shrink more */
  width: var(--w);
  height: var(--h);
  transform: rotate(var(--angle));
}
.mgr-tilt {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-3deg);                  /* camera tilt: 0 = straight on */
}
.mgr-ring {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}
.mgr-card {
  position: absolute;
  inset: 0;
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--r));
  will-change: opacity;
}
.mgr-card a {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 28px 55px rgba(0,0,0,.28);
  will-change: transform;
}
.mgr-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.mgr-card a:hover img { transform: scale(1.06); }

.mgr-title {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: block !important;
  padding: 3rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0));
  color: #fff !important;
  font-size: clamp(.9rem, 1.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

@media (max-width: 768px) {
  .mgr-section { --w: clamp(150px, min(40vw, 26vh), 240px); --angle: -6deg; }
  .mgr-title { padding: 1.8rem .7rem .7rem; }
}