/*---------------------------
  Animation Styles
---------------------------*/

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

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

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

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

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Flip Animation */
@keyframes flip {
  from {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }
  to {
    transform: perspective(400px) rotateY(0deg);
    opacity: 1;
  }
}

.flip-in {
  backface-visibility: hidden;
  opacity: 0;
  transform: perspective(400px) rotateY(90deg);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
}

.flip-in.visible {
  opacity: 1;
  transform: perspective(400px) rotateY(0deg);
}

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

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

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

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

.bounce {
  animation: bounce 2s ease-in-out infinite;
}

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

.shimmer {
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
  background-size: 600px 100%;
  animation: shimmer 2s infinite linear;
}

/* Ripple Animation */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  animation: ripple 1.5s;
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

.typing-animation {
  overflow: hidden;
  white-space: nowrap;
  border-right: 0.15em solid var(--primary-color);
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Staggered Appearance for Lists */
.stagger-fade-in {
  opacity: 0;
}

.stagger-fade-in.visible {
  opacity: 1;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-fade-in.visible:nth-child(1) {
  transition-delay: 0.1s;
}

.stagger-fade-in.visible:nth-child(2) {
  transition-delay: 0.2s;
}

.stagger-fade-in.visible:nth-child(3) {
  transition-delay: 0.3s;
}

.stagger-fade-in.visible:nth-child(4) {
  transition-delay: 0.4s;
}

.stagger-fade-in.visible:nth-child(5) {
  transition-delay: 0.5s;
}

.stagger-fade-in.visible:nth-child(n+6) {
  transition-delay: 0.6s;
}

/* Button Hover Animation */
.btn-animated {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-animated::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease-out;
}

.btn-animated:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

/* Section Entry Animations */
.section-entry.visible .section-title {
  animation: fadeInLeft 0.8s ease forwards;
}

.section-entry.visible .section-subtitle {
  animation: fadeInLeft 0.8s 0.2s ease forwards;
}

.section-entry.visible .content-block {
  animation: fadeIn 0.8s 0.4s ease forwards;
}

/* Logo Animation */
@keyframes logoSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.logo-spin {
  animation: logoSpin 20s linear infinite;
}

/* Progress Line Animation */
@keyframes progressLine {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.progress-line {
  width: 0%;
  height: 3px;
  background-color: var(--primary-color);
  position: absolute;
  bottom: 0;
  left: 0;
  animation: progressLine 3s ease-out forwards;
}

/* Card Hover Effects */
.hover-card {
  transition: all 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.hover-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-card:hover::after {
  opacity: 1;
}

/* Parallax Scroll Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Scroll Line Animation */
.scroll-line {
  width: 2px;
  height: 60px;
  background-color: var(--white);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  animation: scrollLine 2s ease-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

/* Image Hover Zoom Effect */
.image-zoom {
  overflow: hidden;
}

.image-zoom img {
  transition: transform 0.5s ease;
}

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

/* 3D Tilt Effect */
.tilt-effect {
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
}

/* Animated Underline */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.animated-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Text Reveal */
.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.text-reveal.visible span {
  transform: translateY(0);
}

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

.text-gradient {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradient 5s linear infinite;
}