/* Kuhu Care Journey Animation — fixed, lightweight, and isolated from theme styles. */
.kuhu-care-journey-animation {
  --kuhu-hospital-stop: clamp(58px, 6vw, 94px);
  --kuhu-bottom-scene-height: clamp(58px, 7.5vw, 92px);
  position: fixed;
  z-index: 99990;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  pointer-events: none;
  line-height: 0;
  isolation: isolate;
}

.kuhu-care-crane-layer {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}

.kuhu-care-journey-scene {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--kuhu-bottom-scene-height);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(5, 12, 24, 0) 0%, rgba(5, 12, 24, 0.2) 52%, rgba(5, 12, 24, 0.9) 100%);
}

.kuhu-care-journey-scene::before {
  content: '';
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.kuhu-care-road {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 15px;
  background: linear-gradient(180deg, rgba(15, 25, 41, 0.88), rgba(3, 8, 16, 0.98));
  border-top: 1px solid rgba(117, 205, 255, 0.22);
}

.kuhu-care-road::after {
  content: '';
  position: absolute;
  top: 13px;
  right: 0;
  left: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 34px, transparent 34px 68px);
  opacity: 0.55;
}

.kuhu-care-hospital {
  position: absolute;
  z-index: 3;
  bottom: 14px;
  left: clamp(4px, 1vw, 14px);
  width: clamp(56px, 7vw, 95px);
  height: clamp(41px, 5.5vw, 71px);
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.3));
}

.kuhu-care-hospital img,
.kuhu-care-crane img,
.kuhu-care-dropped-twins img,
.kuhu-care-ambulance img,
.kuhu-care-family img {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}

.kuhu-care-crane,
.kuhu-care-dropped-twins,
.kuhu-care-ambulance,
.kuhu-care-family {
  backface-visibility: hidden;
  will-change: left, top, opacity, transform;
}

.kuhu-care-crane {
  position: absolute;
  z-index: 7;
  top: 1px;
  left: calc(100% + 130px);
  width: clamp(78px, 10vw, 130px);
  height: clamp(34px, 4.8vw, 62px);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.24));
  transform-origin: 50% 50%;
  animation: kuhu-crane-flight 36s linear infinite;
}

.kuhu-care-crane-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  animation: kuhu-crane-image-float 1.35s ease-in-out infinite;
}

.kuhu-care-crane .kuhu-crane-carried-twins {
  position: absolute;
  z-index: 2;
  top: 80%;
  left: 51%;
  width: clamp(24px, 3.8vw, 50px);
  height: clamp(22px, 3.8vw, 50px);
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  animation: kuhu-crane-baby-carried 36s linear infinite;
}

.kuhu-care-dropped-twins {
  position: absolute;
  z-index: 6;
  top: -30px;
  left: calc(var(--kuhu-hospital-stop) + 10px);
  width: clamp(24px, 3.6vw, 48px);
  height: clamp(22px, 3.6vw, 48px);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.28));
  opacity: 0;
  animation: kuhu-baby-drop 36s linear infinite;
}

.kuhu-care-ambulance {
  position: absolute;
  z-index: 5;
  bottom: 15px;
  left: calc(100% + 130px);
  width: clamp(66px, 9vw, 115px);
  height: clamp(29px, 4vw, 46px);
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, 0.34));
  animation: kuhu-ambulance-trip 36s linear infinite;
}

.kuhu-care-ambulance img {
  animation: kuhu-ambulance-glow 0.75s steps(2, end) infinite;
}

.kuhu-care-family img {
  animation: kuhu-family-bob 1.1s ease-in-out infinite;
}

.kuhu-ambulance-light {
  animation: kuhu-ambulance-flash 0.75s steps(2, end) infinite;
}

.kuhu-care-family {
  position: absolute;
  z-index: 4;
  bottom: 14px;
  left: calc(var(--kuhu-hospital-stop) - 5px);
  width: clamp(86px, 11.5vw, 150px);
  height: clamp(36px, 5vw, 66px);
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.32));
  opacity: 0;
  animation: kuhu-family-departure 36s linear infinite;
}

.kuhu-care-spark {
  position: absolute;
  z-index: 6;
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: clamp(15px, 2vw, 26px);
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

.kuhu-spark-one {
  top: 25%;
  left: 28%;
  color: #ff8fa3;
  animation: kuhu-spark-pop 36s linear infinite;
}

.kuhu-spark-two {
  top: 42%;
  left: 36%;
  color: #7ddcff;
  animation: kuhu-spark-pop-two 36s linear infinite;
}

@keyframes kuhu-ambulance-trip {
  0%,
  4% {
    left: calc(100% + 130px);
    opacity: 0;
  }

  8% {
    left: calc(100% + 110px);
    opacity: 1;
  }

  34% {
    left: var(--kuhu-hospital-stop);
    opacity: 1;
  }

  37% {
    left: var(--kuhu-hospital-stop);
    opacity: 0;
  }

  38%,
  100% {
    left: calc(100% + 130px);
    opacity: 0;
  }
}

@keyframes kuhu-crane-flight {
  0%,
  4% {
    top: 1px;
    left: calc(100% + 150px);
    opacity: 0;
    transform: scaleX(1);
  }

  8% {
    top: clamp(5px, 1vw, 12px);
    left: calc(100% + 120px);
    opacity: 1;
    transform: scaleX(1);
  }

  34%,
  43% {
    top: clamp(14px, 3vw, 30px);
    left: var(--kuhu-hospital-stop);
    opacity: 1;
    transform: scaleX(1);
  }

  44% {
    top: clamp(12px, 2.6vw, 26px);
    left: calc(var(--kuhu-hospital-stop) + 8px);
    opacity: 1;
    transform: scaleX(-1);
  }

  78% {
    top: clamp(4px, 1vw, 12px);
    left: calc(100% - 110px);
    opacity: 1;
    transform: scaleX(-1);
  }

  87%,
  100% {
    top: 1px;
    left: calc(100% + 150px);
    opacity: 0;
    transform: scaleX(-1);
  }
}

@keyframes kuhu-crane-baby-carried {
  0%,
  34% {
    opacity: 1;
  }

  35%,
  100% {
    opacity: 0;
  }
}

@keyframes kuhu-baby-drop {
  0%,
  33% {
    top: -30px;
    opacity: 0;
  }

  35% {
    top: 4px;
    opacity: 1;
  }

  42% {
    top: calc(100% - var(--kuhu-bottom-scene-height) + clamp(22px, 3.5vw, 48px));
    opacity: 1;
  }

  46%,
  100% {
    top: calc(100% - var(--kuhu-bottom-scene-height) + clamp(22px, 3.5vw, 48px));
    opacity: 0;
  }
}

@keyframes kuhu-crane-image-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scaleY(1);
  }

  50% {
    transform: translateY(-2px) rotate(-1deg) scaleY(0.965);
  }
}

@keyframes kuhu-family-departure {
  0%,
  46% {
    left: calc(var(--kuhu-hospital-stop) - 5px);
    opacity: 0;
  }

  49% {
    left: var(--kuhu-hospital-stop);
    opacity: 1;
  }

  82% {
    left: calc(100% - 120px);
    opacity: 1;
  }

  90%,
  100% {
    left: calc(100% + 300px);
    opacity: 0;
  }
}

@keyframes kuhu-ambulance-flash {
  0%,
  49% {
    fill: #62e2ff;
  }

  50%,
  100% {
    fill: #ff7899;
  }
}

@keyframes kuhu-ambulance-glow {
  0%,
  49% {
    filter: brightness(1) saturate(1);
  }

  50%,
  100% {
    filter: brightness(1.06) saturate(1.12);
  }
}

@keyframes kuhu-family-bob {
  0%,
  100% {
    transform: translateY(0);
  }

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

@keyframes kuhu-spark-pop {
  0%,
  43% {
    opacity: 0;
    transform: scale(0.6) rotate(-20deg);
  }

  48%,
  61% {
    opacity: 0.9;
    transform: scale(1) rotate(0deg);
  }

  68%,
  100% {
    opacity: 0;
    transform: scale(0.6) rotate(20deg);
  }
}

@keyframes kuhu-spark-pop-two {
  0%,
  46% {
    opacity: 0;
    transform: scale(0.6) rotate(15deg);
  }

  51%,
  65% {
    opacity: 0.85;
    transform: scale(1) rotate(0deg);
  }

  72%,
  100% {
    opacity: 0;
    transform: scale(0.6) rotate(-15deg);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .kuhu-care-journey-animation {
    --kuhu-hospital-stop: clamp(50px, 6.5vw, 68px);
    --kuhu-bottom-scene-height: clamp(58px, 7.2vw, 76px);
  }

  .kuhu-care-journey-scene::before {
    bottom: 10px;
  }

  .kuhu-care-road {
    height: 13px;
  }

  .kuhu-care-road::after {
    top: 11px;
  }

  .kuhu-care-hospital {
    bottom: 10px;
    left: 2px;
    width: var(--kuhu-hospital-stop);
    height: clamp(36px, 4.7vw, 52px);
  }

  .kuhu-care-crane {
    width: clamp(68px, 8.5vw, 96px);
    height: clamp(32px, 4.1vw, 44px);
  }

  .kuhu-care-crane .kuhu-crane-carried-twins {
    top: 78%;
    width: clamp(20px, 3.2vw, 38px);
    height: clamp(19px, 3.2vw, 38px);
  }

  .kuhu-care-dropped-twins {
    left: calc(var(--kuhu-hospital-stop) + 8px);
    width: clamp(20px, 3vw, 36px);
    height: clamp(19px, 3vw, 36px);
  }

  .kuhu-care-ambulance {
    bottom: 10px;
    width: clamp(60px, 7.8vw, 84px);
    height: clamp(24px, 3vw, 32px);
  }

  .kuhu-care-family {
    bottom: 10px;
    width: clamp(76px, 9.5vw, 105px);
    height: clamp(32px, 4vw, 44px);
  }

  .kuhu-care-spark {
    font-size: clamp(14px, 1.8vw, 20px);
  }
}

@media (max-width: 767px) {
  .kuhu-care-journey-animation {
    --kuhu-hospital-stop: clamp(44px, 13vw, 58px);
    --kuhu-bottom-scene-height: clamp(52px, 14vw, 62px);
    height: 100vh;
    height: 100dvh;
  }

  .kuhu-care-journey-scene::before {
    bottom: 10px;
  }

  .kuhu-care-road {
    height: 12px;
  }

  .kuhu-care-road::after {
    top: 10px;
  }

  .kuhu-care-hospital {
    bottom: 10px;
    left: 1px;
    width: var(--kuhu-hospital-stop);
    height: clamp(32px, 9.5vw, 43px);
  }

  .kuhu-care-crane {
    top: 0;
    width: clamp(56px, 16vw, 78px);
    height: clamp(26px, 7.4vw, 37px);
  }

  .kuhu-care-crane .kuhu-crane-carried-twins {
    top: 76%;
    width: clamp(18px, 5.5vw, 32px);
    height: clamp(17px, 5.5vw, 32px);
  }

  .kuhu-care-dropped-twins {
    left: calc(var(--kuhu-hospital-stop) + 6px);
    width: clamp(18px, 5.2vw, 30px);
    height: clamp(17px, 5.2vw, 30px);
  }

  .kuhu-care-ambulance {
    bottom: 10px;
    width: clamp(58px, 18vw, 88px);
    height: clamp(23px, 6.9vw, 34px);
  }

  .kuhu-care-family {
    bottom: 10px;
    width: clamp(74px, 22vw, 126px);
    height: clamp(31px, 8.2vw, 50px);
  }

  .kuhu-care-spark {
    font-size: clamp(12px, 3.5vw, 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kuhu-care-ambulance,
  .kuhu-care-crane,
  .kuhu-care-dropped-twins,
  .kuhu-care-family,
  .kuhu-care-crane-image,
  .kuhu-care-crane .kuhu-crane-carried-twins,
  .kuhu-care-ambulance img,
  .kuhu-care-family img,
  .kuhu-ambulance-light,
  .kuhu-care-spark {
    animation-play-state: paused;
  }

  .kuhu-care-family {
    left: var(--kuhu-hospital-stop);
    opacity: 1;
  }
}
