.wp-block-nextora-advanced-container,
.wp-block-nextora-advanced-container *,
.nextora-advanced-container,
.nextora-advanced-container * {
  box-sizing: border-box;
}

.wp-block-nextora-advanced-container,
.nextora-advanced-container {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  box-sizing: border-box;
  padding: var(--wp--preset--spacing--xl, 4rem) var(--wp--preset--spacing--lg, 1.5rem);
  --nextora-ac-min-height: 268px;
  --nextora-ac-min-height-scale-mobile: 0.65;
  --nextora-ac-min-height-scale-tablet: 0.85;
  min-height: calc(var(--nextora-ac-min-height) * var(--nextora-ac-min-height-scale-mobile));
  color: var(--wp--preset--color--contrast, #0f172a);
  --nextora-ac-overlay-color: var(--wp--preset--color--contrast, #0f172a);
  --nextora-ac-overlay-opacity: 0.3;
  max-width: 100%;
}


.nextora-advanced-container--fill-gradient {
  background: var(--nextora-ac-section-bg);
}

.nextora-advanced-container--hover-reveal {
  isolation: isolate;
}

.nextora-advanced-container--hover-reveal:not(.nextora-advanced-container--fill-gradient):not([class*="-gradient-background"]):not([data-nextora-has-section-background]) {
  background: transparent;
}

.nextora-advanced-container__bg-reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

.nextora-advanced-container__hover-mask,
.nextora-advanced-container__hover-mask-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: block;
}

@media (any-hover: none) {
  .nextora-advanced-container--hover-reveal .nextora-advanced-container__hover-mask {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nextora-advanced-container--hover-reveal .nextora-advanced-container__hover-mask {
    display: none;
  }
}

@media (min-width: 600px) {
  .wp-block-nextora-advanced-container,
  .nextora-advanced-container {
    min-height: calc(var(--nextora-ac-min-height) * var(--nextora-ac-min-height-scale-tablet));
  }
}

@media (min-width: 782px) {
  .wp-block-nextora-advanced-container,
  .nextora-advanced-container {
    min-height: var(--nextora-ac-min-height);
  }
}

.nextora-advanced-container__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Parallax: GSAP-driven y-translate (view.ts). Extend bg sizing so movement doesn't expose edges. */
.nextora-advanced-container--parallax .nextora-advanced-container__bg {
  height: 120%;
  top: -10%;
}

/* Parallax: fixed background (CSS background-attachment). */
.nextora-advanced-container--parallax-fixed .nextora-advanced-container__bg {
  background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
  .nextora-advanced-container--parallax .nextora-advanced-container__bg,
  .nextora-advanced-container--parallax-fixed .nextora-advanced-container__bg {
    height: 100%;
    top: 0;
    transform: none;
    background-attachment: scroll;
  }
}

.nextora-advanced-container__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.nextora-advanced-container__overlay--solid {
  background-color: var(--nextora-ac-overlay-color);
  opacity: var(--nextora-ac-overlay-opacity);
}

.nextora-advanced-container__overlay--fade-right {
  background: linear-gradient(
    to right,
    var(--nextora-ac-overlay-color),
    transparent 70%
  );
  opacity: var(--nextora-ac-overlay-opacity);
}

.nextora-advanced-container__overlay--cinematic {
  opacity: var(--nextora-ac-overlay-opacity);
  background:
    linear-gradient(
      to top,
      var(--nextora-ac-overlay-color) 6%,
      color-mix(in srgb, var(--nextora-ac-overlay-color) 55%, transparent) 46%,
      color-mix(in srgb, var(--nextora-ac-overlay-color) 25%, transparent)
    ),
    linear-gradient(
      to right,
      color-mix(in srgb, var(--nextora-ac-overlay-color) 80%, transparent),
      transparent 62%
    );
}

.nextora-advanced-container__overlay--diagonal {
  opacity: var(--nextora-ac-overlay-opacity);
  background: linear-gradient(
    105deg,
    var(--nextora-ac-overlay-color) 32%,
    color-mix(in srgb, var(--nextora-ac-overlay-color) 70%, transparent) 60%,
    transparent
  );
}

.nextora-advanced-container--overlay-diagonal .nextora-advanced-container__bg {
  opacity: 0.28;
}

.nextora-advanced-container--scroll-reveal.nextora-advanced-container--reveal-pending:not(.nextora-advanced-container--ready) .nextora-advanced-container__inner {
  opacity: 0;
  transform: translateY(28px);
}

/* No-JS / script failure: show content once loading finishes. */
.nextora-advanced-container--scroll-reveal:not(.nextora-advanced-container--reveal-pending) .nextora-advanced-container__inner,
.nextora-advanced-container--scroll-reveal.nextora-advanced-container--ready .nextora-advanced-container__inner {
  opacity: 1;
  transform: none;
}

.nextora-advanced-container__bg--video video,
.nextora-advanced-container__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Background image motion (CSS). Slightly oversized layer prevents edge gaps during transform. */
.nextora-advanced-container--bg-anim .nextora-advanced-container__bg {
  width: 115%;
  height: 115%;
  left: -7.5%;
  top: -7.5%;
  will-change: transform;
  animation-duration: calc(var(--nextora-ac-bg-anim-base-duration, 22s) / var(--nextora-ac-bg-anim-speed, 1));
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.nextora-advanced-container--bg-anim-ken-burns .nextora-advanced-container__bg {
  animation-name: nextora-ac-anim-ken-burns;
}

.nextora-advanced-container--bg-anim-slow-zoom .nextora-advanced-container__bg {
  animation-name: nextora-ac-anim-slow-zoom;
}

.nextora-advanced-container--bg-anim-gentle-pan .nextora-advanced-container__bg {
  animation-name: nextora-ac-anim-gentle-pan;
}

.nextora-advanced-container--bg-anim-subtle-drift .nextora-advanced-container__bg {
  animation-name: nextora-ac-anim-subtle-drift;
}

.nextora-advanced-container--bg-anim-breathing .nextora-advanced-container__bg {
  animation-name: nextora-ac-anim-breathing;
}

@keyframes nextora-ac-anim-ken-burns {
  0% {
    transform: scale(1) translate(0, 0);
  }

  100% {
    transform: scale(1.14) translate(-3%, -2%);
  }
}

@keyframes nextora-ac-anim-slow-zoom {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes nextora-ac-anim-gentle-pan {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-4%);
  }
}

@keyframes nextora-ac-anim-subtle-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1.04);
  }

  33% {
    transform: translate(-2.5%, -1.5%) scale(1.04);
  }

  66% {
    transform: translate(2%, -2.5%) scale(1.04);
  }
}

@keyframes nextora-ac-anim-breathing {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nextora-advanced-container--bg-anim .nextora-advanced-container__bg {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    animation: none;
    transform: none;
    will-change: auto;
  }
}

.nextora-advanced-container__inner {
  position: relative;
  z-index: 2;
}

/* Light Rays */
.nextora-advanced-container--light-rays {
  isolation: isolate;
}

.nextora-advanced-container__light-rays {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .nextora-advanced-container__light-rays {
    display: none;
  }
}

/* Ambient icons */
.nextora-advanced-container--ambient-icons {
  --nextora-ac-ambient-icon-size: 48px;
  --nextora-ac-ambient-icon-stroke-width: 1.5;
}

.nextora-advanced-container__ambient-icons {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.nextora-advanced-container__ambient-icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: left, top, opacity;
}

.nextora-advanced-container__ambient-icon svg {
  width: var(--nextora-ac-ambient-icon-size, 48px);
  height: var(--nextora-ac-ambient-icon-size, 48px);
  stroke: var(--nextora-ac-ambient-icon-color, var(--wp--preset--color--contrast, #0f172a));
  stroke-width: var(--nextora-ac-ambient-icon-stroke-width, 1.5);
}

@keyframes nextora-ac-ambient-fade {
  0%,
  100% {
    opacity: 0;
  }

  15% {
    opacity: var(--nextora-ac-ambient-icon-opacity, 0.08);
  }

  85% {
    opacity: var(--nextora-ac-ambient-icon-opacity, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nextora-advanced-container__ambient-icons {
    display: none;
  }
}

/* Ripples */
.nextora-advanced-container--ripples {
  --nextora-ac-ripples-resolution: 512;
  --nextora-ac-ripples-drop-radius: 35px;
  --nextora-ac-ripples-perturbance: 0.12;
}

@media (prefers-reduced-motion: reduce) {
  .nextora-advanced-container--ripples canvas {
    display: none;
  }
}
