/* assets/fx/fx.css */

/* =========================================
   1) Bricks Builder: visa alltid innehåll
   (robust: matchar både class- och data-attribut-varianter)
   ========================================= */
/* Bricks Builder: visa alltid innehåll (triggas av JS som sätter .fx-builder) */
.fx-builder .fx,
.fx-builder .fx-stagger .fx-child {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

/* =========================================
   2) Reduced motion: aldrig gömma innehåll
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .fx,
  .fx * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .fx,
  .fx-stagger .fx-child {
    opacity: 1 !important;
    filter: none !important;
  }
}

/* =========================================
   3) Grundstate
   ========================================= */
.fx {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity var(--fx-dur, 1200ms) var(--fx-ease, cubic-bezier(.2,.8,.2,1)),
    transform var(--fx-dur, 1200ms) var(--fx-ease, cubic-bezier(.2,.8,.2,1)),
    filter var(--fx-dur, 1200ms) var(--fx-ease, cubic-bezier(.2,.8,.2,1));
  will-change: opacity, transform, filter;
}

/* Stagger-barn: initialt dolda även innan JS */
.fx-stagger .fx-child {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  filter: none;
  transition:
    opacity var(--fx-dur, 1200ms) var(--fx-ease, cubic-bezier(.2,.8,.2,1)),
    transform var(--fx-dur, 1200ms) var(--fx-ease, cubic-bezier(.2,.8,.2,1));
  will-change: opacity, transform;
}

/* Triggat */
.fx.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.fx-stagger .fx-child.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================
   4) Presets
   ========================================= */
.fx--fade { transform: none; }
.fx--fade-up { transform: translate3d(0, 16px, 0); }
.fx--fade-down { transform: translate3d(0, -16px, 0); }
.fx--fade-left { transform: translate3d(-16px, 0, 0); }
.fx--fade-right { transform: translate3d(16px, 0, 0); }

.fx--scale { transform: scale(.96); }
.fx--blur { filter: blur(10px); }

/* =========================================
   5) Helpers
   ========================================= */
.fx--delay-1 { transition-delay: 120ms; }
.fx--delay-2 { transition-delay: 240ms; }
.fx--delay-3 { transition-delay: 360ms; }

.fx--dur-5 { --fx-dur: 500ms; }
.fx--dur-9 { --fx-dur: 900ms; }

/* Ensure hover effects are not overridden */
.fx-child:hover {
  transition-delay: 0s !important; /* Remove delay on hover */
}

/* =========================================
   6) Grouped border effects for similar classes
   ========================================= */
.grid-cards__card,
.bcc-faq__item,
.pricing-container {
  position: relative;
  border: 1px solid var(--primary-trans-40);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.grid-cards__card:hover,
.bcc-faq__item:hover,
.pricing-container:hover {
  border-color: var(--primary-trans-60);
  box-shadow: 0 0 15px var(--primary-trans-40); /* Subtle glow effect */
}

/* Add bottom border animation */
.grid-cards__card::after,
.bcc-faq__item::after,
.pricing-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px; /* Adjust thickness of the bottom border */
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
  transition: width 0.5s ease;
}

.grid-cards__card:hover::after,
.bcc-faq__item:hover::after,
.pricing-container:hover::after {
  width: 100%;
}

