/* =============================================
   QUSAI LAW - Professional Animation System
   Works alongside Elementor 3.32.3 animations
   RTL-safe, Hebrew
   ============================================= */

/* ---- KEYFRAMES ---- */

@keyframes qRevealScale {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes qRevealScaleFrom15 {
  0% {
    opacity: 0;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1.5);
  }
}

@keyframes qFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes qFloatWithScale15 {

  0%,
  100% {
    transform: scale(1.5) translateY(0);
  }

  50% {
    transform: scale(1.5) translateY(-10px);
  }
}

@keyframes qFloatWeak {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes qFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(25px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ---- ZONE 1: HERO (all pages) ---- */

.q-hero-logo {
  opacity: 0;
}

.q-hero-logo.q-revealed {
  animation: qRevealScale 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.q-hero-logo.q-has-scale.q-revealed {
  animation: qRevealScaleFrom15 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.q-hero-logo.q-floating {
  opacity: 1;
  animation: qFloat 8s ease-in-out infinite;
}

.q-hero-logo.q-has-scale.q-floating {
  opacity: 1;
  animation: qFloatWithScale15 8s ease-in-out infinite;
}

.q-hero-text {
  opacity: 0;
}

.q-hero-text.q-revealed {
  opacity: 1;
  animation: qFadeSlideUp 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.q-hero-text.q-stagger-1.q-revealed {
  animation-delay: 200ms;
}

.q-hero-text.q-stagger-2.q-revealed {
  animation-delay: 400ms;
}

.q-hero-text.q-stagger-3.q-revealed {
  animation-delay: 600ms;
}

.q-hero-text.q-stagger-4.q-revealed {
  animation-delay: 800ms;
}


/* ---- ZONE 2: SPECIALTIES GRID (homepage, id="info") ---- */

.q-stagger-card:nth-child(1) {
  animation-delay: 0ms !important;
}

.q-stagger-card:nth-child(2) {
  animation-delay: 120ms !important;
}

.q-stagger-card:nth-child(3) {
  animation-delay: 240ms !important;
}

.q-stagger-card:nth-child(4) {
  animation-delay: 360ms !important;
}

.q-specialty-icon img {
  animation: qFloatWeak 8s ease-in-out infinite;
  animation-play-state: paused;
}

.q-specialty-icon.q-float-active img {
  animation-play-state: running;
}

.q-specialty-card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.q-specialty-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.q-specialty-card:hover .elementor-widget-image img {
  transform: scale(1.03);
  transition: transform 0.4s ease;
}


/* ---- ZONE 3: BENEFITS (about page, grid 0d8bae6) ---- */

.q-benefit-card:nth-child(1) {
  animation-delay: 0ms !important;
}

.q-benefit-card:nth-child(2) {
  animation-delay: 120ms !important;
}

.q-benefit-card:nth-child(3) {
  animation-delay: 240ms !important;
}

.q-benefit-card:nth-child(4) {
  animation-delay: 360ms !important;
}

.q-benefit-icon .elementor-image-box-img img {
  animation: qFloatWeak 9s ease-in-out infinite;
  animation-play-state: paused;
}

.q-benefit-icon.q-float-active .elementor-image-box-img img {
  animation-play-state: running;
}


/* ---- FIX 1: HEADER LOGO GLOW ---- */

.elementor-element-5cc681d img {
  filter: drop-shadow(0 0 8px rgba(232, 212, 188, 0.45)) drop-shadow(0 0 20px rgba(43, 91, 170, 0.25));
}


/* ---- FIX 2: FOOTER LOGO OVERFLOW ---- */
/* scale(1.5) -> scale(1.15) fixed directly in homepage wp-custom-css */

.elementor-element-cc9edb9 .elementor-widget-wrap {
  overflow: hidden;
}


/* ---- FIX 3: TEXT OVERLAP / Z-INDEX ---- */

.elementor-location-header {
  z-index: 100;
  position: relative;
}

[data-elementor-type="wp-page"]>.e-con.e-parent:first-child {
  overflow: hidden;
}


/* ---- ACCESSIBILITY ---- */

@media (prefers-reduced-motion: reduce) {

  .q-hero-logo,
  .q-hero-text {
    opacity: 1 !important;
    animation: none !important;
  }

  .q-hero-logo.q-floating,
  .q-hero-logo.q-has-scale.q-floating {
    animation: none !important;
  }

  .q-specialty-icon img,
  .q-benefit-icon .elementor-image-box-img img {
    animation: none !important;
  }

  .q-stagger-card,
  .q-benefit-card {
    animation-delay: 0ms !important;
  }
}