/* =====================================================
   Sürdürülebilirlik.com.tr by Türkçev Çevre - Animation Styles
   Keyframes, Scroll Animations, Transitions
   ===================================================== */

/* ===== KEYFRAME ANIMATIONS ===== */

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Pulse */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Pulse Grow */
@keyframes pulseGrow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

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

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

/* Bounce */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Glow */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
  }
}

/* Text Reveal */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Line Grow */
@keyframes lineGrow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Particle Float */
@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--x, 100px), var(--y, -500px)) rotate(360deg);
    opacity: 0;
  }
}

/* ===== SCROLL TRIGGER CLASSES ===== */

/* Initial States */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.fade-up {
  transform: translateY(40px);
}

.animate-on-scroll.fade-down {
  transform: translateY(-40px);
}

.animate-on-scroll.fade-left {
  transform: translateX(-40px);
}

.animate-on-scroll.fade-right {
  transform: translateX(40px);
}

.animate-on-scroll.scale-up {
  transform: scale(0.9);
}

.animate-on-scroll.scale-down {
  transform: scale(1.1);
}

/* Animated State */
.animate-on-scroll.animated {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger Children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.animated > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animated > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animated > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animated > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animated > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animated > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.animated > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MICRO INTERACTIONS ===== */

/* Button Hover Effects */
.btn-hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

/* Card Hover Effects */
.card-hover-float {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card-hover-float:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* Link Underline Animation */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-500);
  transition: width var(--transition-base);
}

.link-underline:hover::after {
  width: 100%;
}

/* Icon Rotate on Hover */
.icon-rotate-hover {
  transition: transform var(--transition-base);
}

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

/* Image Zoom on Hover */
.img-zoom-container {
  overflow: hidden;
}

.img-zoom {
  transition: transform var(--transition-slow);
}

.img-zoom-container:hover .img-zoom {
  transform: scale(1.1);
}

/* Border Glow on Hover */
.border-glow {
  transition: box-shadow var(--transition-base);
}

.border-glow:hover {
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

/* ===== SPECIAL EFFECTS ===== */

/* Gradient Text Animation */
.gradient-text-animate {
  background: linear-gradient(90deg, var(--accent-500), var(--accent-400), var(--accent-500));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

/* Glassmorphism Shimmer */
.glass-shimmer {
  position: relative;
  overflow: hidden;
}

.glass-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Typing Effect */
.typing-text {
  border-right: 2px solid var(--accent-500);
  animation: blink 0.7s infinite;
  white-space: nowrap;
  overflow: hidden;
}

@keyframes blink {
  0%, 100% { border-color: var(--accent-500); }
  50% { border-color: transparent; }
}

/* Counter Animation Container */
.counter-animate {
  display: inline-block;
  animation: countUp 0.5s ease-out forwards;
}

/* Reveal Line */
.reveal-line {
  position: relative;
  overflow: hidden;
}

.reveal-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent-500);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-line.animated::after {
  width: 100%;
}

/* ===== PARALLAX EFFECTS ===== */

.parallax-slow {
  transform: translateY(calc(var(--scroll) * 0.1px));
}

.parallax-medium {
  transform: translateY(calc(var(--scroll) * 0.3px));
}

.parallax-fast {
  transform: translateY(calc(var(--scroll) * 0.5px));
}

/* ===== PAGE TRANSITIONS ===== */

.page-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease;
}

.page-transition-exit {
  opacity: 1;
}

.page-transition-exit-active {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ===== FLOATING ELEMENTS ===== */

.floating {
  animation: float 3s ease-in-out infinite;
}

.floating-slow {
  animation: float 5s ease-in-out infinite;
}

.floating-fast {
  animation: float 2s ease-in-out infinite;
}

.floating-delay-1 {
  animation-delay: 0.5s;
}

.floating-delay-2 {
  animation-delay: 1s;
}

.floating-delay-3 {
  animation-delay: 1.5s;
}

/* ===== PULSE ANIMATIONS ===== */

.pulse-dot {
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-500);
  transform: translate(-50%, -50%);
  animation: pulseOut 2s infinite;
  opacity: 0;
  z-index: -1;
}

@keyframes pulseOut {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* ===== HERO ANIMATIONS ===== */

.hero-title-animate {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
}

.hero-subtitle-animate {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.5s;
}

.hero-cta-animate {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.7s;
}

/* ===== NUMBER COUNTING ===== */

.count-up {
  font-variant-numeric: tabular-nums;
  transition: all 0.1s ease-out;
}

/* ===== HOVER CARD EFFECT ===== */

.hover-card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.hover-card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg);
}

/* ===== SKELETON LOADING ===== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--glass-bg) 0%,
    var(--glass-border) 50%,
    var(--glass-bg) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-title {
  height: 2em;
  width: 60%;
  margin-bottom: 1em;
}

.skeleton-image {
  height: 200px;
}

/* ===== NOTIFICATION ANIMATIONS ===== */

.notification-enter {
  animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-exit {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== WAVE ANIMATION ===== */

.wave {
  position: relative;
  overflow: hidden;
}

.wave::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%2300ff88' fill-opacity='0.1' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") repeat-x;
  animation: wave 20s linear infinite;
}

@keyframes wave {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: 1440px;
  }
}
