/*
 * Animations.css - Animation Stylesheet
 * Sytnaya-Myata - Gasversorger Vergleich
 * Vaporwave/Futuristic Theme
 */

/* ===== Keyframe Animations ===== */

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

/* Glow Animation */
@keyframes glow {
  0% {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5), 0 0 10px rgba(0, 255, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.5), 0 0 30px rgba(0, 255, 255, 0.3);
  }
  100% {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5), 0 0 10px rgba(0, 255, 255, 0.3);
  }
}

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

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

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* Typewriter Animation */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Neon Flicker Animation */
@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7), 0 0 10px rgba(0, 255, 255, 0.5), 0 0 15px rgba(0, 255, 255, 0.3);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* ===== Applied Animations ===== */

/* Animated Glow Text */
.glow-effect {
  animation: glow 3s infinite;
}

/* Floating Elements */
.float-animation {
  animation: float 5s ease-in-out infinite;
}

/* Pulse Button */
.pulse {
  animation: pulse 2s infinite;
  border-radius: var(--border-radius);
}

/* Animated Gradient Background */
.gradient-animation {
  background: linear-gradient(270deg, var(--primary-neon), var(--primary-purple), var(--primary-pink), var(--primary-blue));
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Shimmer Effect */
.shimmer {
  background: linear-gradient(to right, transparent 0%, rgba(0, 255, 255, 0.2) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  overflow: hidden;
  position: relative;
}

/* Rotate Element */
.rotate {
  animation: rotate 10s linear infinite;
}

/* Fade In Elements */
.fade-in {
  animation: fadeIn 1s ease-out;
}

/* Slide Up Elements */
.slide-up {
  animation: slideUp 0.8s ease-out;
}

/* Neon Flicker */
.neon-flicker {
  animation: neonFlicker 3s infinite alternate;
}

/* ===== Interactive Animations ===== */

/* Card Hover Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Link Hover Animation */
.link-animation {
  position: relative;
}

.link-animation::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--primary-neon);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-animation:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Scale Animation */
.scale-animation {
  transition: transform 0.3s ease;
}

.scale-animation:hover {
  transform: scale(1.05);
}

/* Button Animations */
.btn-animation {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-neon);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.btn-animation:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Icon Rotate on Hover */
.icon-rotate {
  transition: transform 0.3s ease;
}

.icon-rotate:hover {
  transform: rotate(15deg);
}

/* Text Fade on Hover */
.text-fade {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.text-fade-container:hover .text-fade:not(:hover) {
  opacity: 0.5;
  transform: scale(0.98);
}

/* ===== Page Transition Animations ===== */

/* Page Entry Animation */
.page-entry {
  animation: fadeIn 0.8s ease-out;
}

/* Section Reveal Animation */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered List Item Animation */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Individual staggered item delays */
.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* ===== Component-Specific Animations ===== */

/* Hero Section */
.hero-content h1 {
  animation: glow 3s infinite;
}

.hero-content p {
  animation: fadeIn 1s ease-out 0.3s forwards;
  opacity: 0;
}

.hero-content .btn-neon {
  animation: fadeIn 1s ease-out 0.6s forwards;
  opacity: 0;
}

.hero-image img {
  animation: float 6s ease-in-out infinite;
}

/* Testimonial Slider Animation */
.testimonials-slider .testimonial-card {
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.testimonials-slider .testimonial-card.inactive {
  opacity: 0;
  transform: translateX(100px);
  position: absolute;
}

.testimonials-slider .testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
}

/* Statistics Counter Animation */
.stat-number {
  display: inline-block;
  position: relative;
  transition: transform 0.3s ease;
}

.stat-number.animate {
  animation: pulse 0.5s;
}

/* Service Card Icon Animation */
.service-card .card-icon {
  position: relative;
}

.service-card .card-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 255, 255, 0.1);
  animation: pulse 2s infinite;
}

/* Blog Card Hover Animation */
.blog-card .blog-image img {
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

/* Comparison Table Row Hover */
.comparison-table tr {
  transition: background-color 0.3s ease;
}

.comparison-table tr:hover td {
  background-color: rgba(0, 255, 255, 0.05);
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-toggle span {
  transition: all 0.3s ease;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  animation: fadeIn 0.3s;
}

/* Cookie Banner Animation */
.cookie-banner {
  animation: slideUp 0.5s ease-out;
}

/* Thank You Page Checkmark Animation */
.thanks-icon svg {
  animation: fadeIn 1s ease-out, float 3s ease-in-out infinite;
}

/* Article Quote Highlight */
.article-quote {
  position: relative;
  overflow: hidden;
}

.article-quote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary-neon);
  animation: pulse 2s infinite;
}

/* Read More Link Animation */
.read-more::after {
  display: inline-block;
  transition: transform 0.3s ease;
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* Social Icon Hover Animation */
.social-links a, .share-button {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover, .share-button:hover {
  transform: translateY(-5px);
  background-color: var(--primary-neon);
}

/* ===== Media Queries for Animations ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .glow-text, .glow-effect {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
    animation: none !important;
  }
  
  .pulse, .float-animation, .rotate, .shimmer, .neon-flicker {
    animation: none !important;
  }
  
  .card-hover:hover, .scale-animation:hover {
    transform: none !important;
  }
}
