/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hero Animations ===== */
@keyframes heroFadeIn {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Icon Hover Animations ===== */
.service-icon,
.value-icon,
.info-icon,
.qual-icon,
.industry-icon {
  transition: all 0.4s ease;
}

.service-card:hover .service-icon,
.value-box:hover .value-icon,
.info-item:hover .info-icon,
.qual-item:hover .qual-icon,
.industry-item:hover .industry-icon {
  transform: scale(1.1) rotateY(360deg);
  filter: drop-shadow(0 5px 15px rgba(0,255,136,0.5));
}

/* ===== Button Pulse Animation ===== */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0,255,136,0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(0,255,136,0);
  }
}

.cta-btn {
  animation: pulse 2s infinite;
}

.cta-btn:hover {
  animation: none;
}

/* ===== Floating Animation ===== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.hero-content .cta-btn {
  animation: float 3s ease-in-out infinite;
}

.hero-content .cta-btn:hover {
  animation: none;
}

/* ===== Glow Effect ===== */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0,255,136,0.5),
                0 0 10px rgba(0,255,136,0.3),
                0 0 15px rgba(0,255,136,0.2);
  }
  50% {
    box-shadow: 0 0 10px rgba(0,255,136,0.8),
                0 0 20px rgba(0,255,136,0.6),
                0 0 30px rgba(0,255,136,0.4);
  }
}

.emergency-number:hover {
  animation: glow 1.5s ease-in-out infinite;
}

/* ===== Underline Animation ===== */
.nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ff88, #00cc6a);
  transition: width 0.3s ease;
}

.nav ul li a:hover::after,
.nav ul li a.active::after {
  width: 100%;
}

/* ===== Card Border Animation ===== */
@keyframes borderGlow {
  0%, 100% {
    border-color: transparent;
    box-shadow: none;
  }
  50% {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0,255,136,0.3);
  }
}

.service-card:hover,
.value-box:hover,
.team-member:hover,
.qual-item:hover,
.industry-item:hover,
.process-step:hover {
  animation: borderGlow 2s ease-in-out infinite;
}

/* ===== Loading Spinner (für Formulare) ===== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  border: 3px solid rgba(0,255,136,0.1);
  border-top: 3px solid #00ff88;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

/* ===== Fade In Up ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Slide In From Left ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Slide In From Right ===== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Scale In ===== */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Testimonial Animation ===== */
.testimonial-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.testimonial-card:nth-child(1) {
  animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
  animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* ===== Service Card Stagger ===== */
.service-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== Image/Icon Load Animation ===== */
img, svg {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ===== Text Highlight Effect ===== */
@keyframes highlight {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.highlight-text {
  background: linear-gradient(90deg, #00ff88, #00cc6a, #00ff88);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: highlight 3s linear infinite;
}

/* ===== Ripple Effect ===== */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0,255,136,0.5);
  width: 20px;
  height: 20px;
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* ===== Shake Animation (für Fehler) ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* ===== Success Checkmark Animation ===== */
@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmark 0.5s ease-out forwards;
}

/* ===== Smooth Scroll Behavior ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Reduce Motion für Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Parallax Effect für Hero ===== */
.hero-bg {
  transition: transform 0.5s ease-out;
}

/* ===== Hover Lift Effect ===== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ===== Glitch Effect (optional für Hero) ===== */
@keyframes glitch {
  0% {
    text-shadow: 2px 2px #00ff88, -2px -2px #ff00ff;
  }
  25% {
    text-shadow: -2px -2px #00ff88, 2px 2px #ff00ff;
  }
  50% {
    text-shadow: 2px -2px #00ff88, -2px 2px #ff00ff;
  }
  75% {
    text-shadow: -2px 2px #00ff88, 2px -2px #ff00ff;
  }
  100% {
    text-shadow: 2px 2px #00ff88, -2px -2px #ff00ff;
  }
}

.glitch-text {
  animation: glitch 0.3s ease-in-out infinite;
}

/* ===== Typing Effect ===== */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.typing-effect {
  overflow: hidden;
  border-right: 3px solid #00ff88;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}