/* ===== ANIMATIONS & KEYFRAMES ===== */

/* Fade-in Animation */
@keyframes fadeIn {
  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);
  }
}

/* Slide-up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale-in Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Bounce Animation for Scroll Indicator */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Float Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Shake Animation for Error States */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* ===== ANIMATION CLASSES ===== */

/* Fade Up Animation */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide In Animation */
.animate-slide-in {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide Up Animation */
.animate-slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scale In Animation */
.animate-scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Bounce Animation */
.animate-bounce {
  animation: bounce 2s infinite;
}

/* Delay Classes for Staggered Animations */
.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

/* ===== HERO ANIMATIONS ===== */
.hero-content > * {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1s ease-out forwards;
}

.hero-logo {
  animation-delay: 0.2s;
}

.hero-title {
  animation-delay: 0.4s;
}

.hero-subtitle {
  animation-delay: 0.6s;
}

.hero-buttons {
  animation-delay: 0.8s;
}

/* ===== HOVER ANIMATIONS ===== */

/* Button Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Card Hover Effects */
.feature-card,
.service-card,
.value-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover,
.service-card:hover,
.value-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(12, 49, 69, 0.15);
}

/* Icon Hover Effects */
.feature-icon,
.service-icon {
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon,
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Social Link Hover Effects */
.social-link {
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.4s ease;
}

.social-link:hover::before {
  left: 100%;
}

/* ===== TIMELINE ANIMATIONS ===== */
.timeline-item {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item:nth-child(2) {
  transition-delay: 0.2s;
}

.timeline-item:nth-child(3) {
  transition-delay: 0.4s;
}

/* Timeline Line Animation */
.timeline::before {
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.5s ease-out;
}

.timeline.visible::before {
  transform: scaleY(1);
}

/* ===== QUOTES SLIDER ANIMATIONS ===== */
.quote-card {
  transition: all 0.5s ease-in-out;
}

.quote-card.active {
  animation: fadeIn 0.5s ease-in-out;
}

/* Navigation Dots Animation */
.quote-nav-btn {
  transition: all 0.3s ease;
  position: relative;
}

.quote-nav-btn::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: var(--secondary-color);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.quote-nav-btn.active::before,
.quote-nav-btn:hover::before {
  opacity: 0.3;
  transform: scale(1);
}

/* ===== FORM ANIMATIONS ===== */
.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 146, 195, 0.15);
}

/* Label Float Animation */
.form-group label {
  transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  transform: translateY(-25px) scale(0.9);
  color: var(--secondary-color);
}

/* Checkbox Animation */
.checkmark {
  transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: scale(1.1);
}

/* ===== LOADING ANIMATIONS ===== */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== PARALLAX EFFECTS ===== */
.parallax {
  transition: transform 0.1s ease-out;
}

/* ===== SCROLL INDICATOR ANIMATIONS ===== */
.scroll-indicator {
  animation: float 3s ease-in-out infinite;
}

.scroll-arrow {
  position: relative;
}

.scroll-arrow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--white));
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* ===== STAGGER ANIMATIONS FOR GRIDS ===== */
.usp-features .feature-card:nth-child(1) {
  transition-delay: 0.1s;
}

.usp-features .feature-card:nth-child(2) {
  transition-delay: 0.2s;
}

.usp-features .feature-card:nth-child(3) {
  transition-delay: 0.3s;
}

.usp-features .feature-card:nth-child(4) {
  transition-delay: 0.4s;
}

.services-grid .service-card:nth-child(1) {
  transition-delay: 0.1s;
}

.services-grid .service-card:nth-child(2) {
  transition-delay: 0.2s;
}

.services-grid .service-card:nth-child(3) {
  transition-delay: 0.3s;
}

.services-grid .service-card:nth-child(4) {
  transition-delay: 0.4s;
}

.values-grid .value-card:nth-child(1) {
  transition-delay: 0.1s;
}

.values-grid .value-card:nth-child(2) {
  transition-delay: 0.2s;
}

.values-grid .value-card:nth-child(3) {
  transition-delay: 0.3s;
}

.values-grid .value-card:nth-child(4) {
  transition-delay: 0.4s;
}

/* ===== ERROR ANIMATIONS ===== */
.error {
  animation: shake 0.6s ease-in-out;
  border-color: #e74c3c !important;
}

.success {
  animation: pulse 0.6s ease-in-out;
  border-color: #27ae60 !important;
}

/* ===== ACCESSIBILITY ANIMATIONS ===== */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .animate-slide-in,
  .animate-slide-up,
  .animate-scale-in,
  .animate-bounce,
  .hero-content > *,
  .timeline-item,
  .quote-card,
  .feature-card,
  .service-card,
  .value-card {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .timeline::before {
    transform: scaleY(1) !important;
  }
}

/* ===== FOCUS ANIMATIONS ===== */
*:focus {
  animation: focusPulse 0.3s ease-in-out;
}

@keyframes focusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(39, 146, 195, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(39, 146, 195, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(39, 146, 195, 0);
  }
}

/* ===== NAVIGATION ANIMATIONS ===== */
.nav-link {
  position: relative;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(39, 146, 195, 0.1);
  border-radius: 8px;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link:focus::before {
  transform: scale(1);
}

/* Mobile Navigation Animation - Nur auf Mobile anwenden */
@media (max-width: 768px) {
  .nav-menu {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-list li {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
  }

  .nav-menu.active .nav-list li {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-menu.active .nav-list li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-menu.active .nav-list li:nth-child(2) {
    transition-delay: 0.2s;
  }

  .nav-menu.active .nav-list li:nth-child(3) {
    transition-delay: 0.3s;
  }

  .nav-menu.active .nav-list li:nth-child(4) {
    transition-delay: 0.4s;
  }

  .nav-menu.active .nav-list li:nth-child(5) {
    transition-delay: 0.5s;
  }
}

/* Desktop Navigation - Sicherstellen, dass es sichtbar ist */
@media (min-width: 769px) {
  .nav-menu {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-list li {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== GLASMORPHISM HOVER EFFECTS ===== */
.glass-effect {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-effect:hover {
  backdrop-filter: blur(16px);
  transform: translateY(-3px);
}

/* ===== COOKIEBAR ANIMATIONS ===== */
.cookiebar {
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookiebar.show {
  transform: translateY(0);
}

/* ===== BACK TO TOP BUTTON ANIMATIONS ===== */
.back-to-top {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top:hover {
  transform: translateY(-3px) rotate(5deg);
}

.back-to-top:active {
  transform: translateY(-1px) rotate(2deg);
}
