/* ===================================
   ROZZANA ESSENCE MANUFACTURER
   Animation Stylesheet
   =================================== */

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes slideInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.hero-title.animated {
  animation: scaleIn 1.5s ease-in-out forwards;
}

.hero-subtitle.animated {
  animation: fadeIn 1.2s ease-in-out 0.4s forwards;
}

/* ===================================
   SECTION ANIMATIONS
   =================================== */

.section-header.animated {
  animation: fadeUp 1s ease-in-out forwards;
}

.page-header.animated {
  animation: fadeUp 1s ease-in-out forwards;
}

.page-content.animated {
  animation: fadeUp 1s ease-in-out 0.2s forwards;
}

.blog-header.animated {
  animation: fadeUp 1s ease-in-out forwards;
}

.contact-header.animated {
  animation: fadeUp 1s ease-in-out forwards;
}

/* ===================================
   GALLERY ANIMATIONS
   =================================== */

.gallery-item.animated {
  animation: fadeUp 0.8s ease-in-out forwards;
}

.gallery-item:nth-child(1) {
  animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
  animation-delay: 0.28s;
}

.gallery-item:nth-child(3) {
  animation-delay: 0.46s;
}

.gallery-item:nth-child(4) {
  animation-delay: 0.64s;
}

.gallery-item:nth-child(5) {
  animation-delay: 0.82s;
}

.gallery-item:nth-child(6) {
  animation-delay: 1s;
}

/* Image overlay text animation */
.gallery-item.animated .image-overlay-text {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   BLOG ARTICLE ANIMATIONS
   =================================== */

.blog-article.animated {
  animation: fadeUp 0.8s ease-in-out forwards;
}

.blog-article:nth-child(1) {
  animation-delay: 0.1s;
}

.blog-article:nth-child(2) {
  animation-delay: 0.28s;
}

.blog-article:nth-child(3) {
  animation-delay: 0.46s;
}

.blog-article:nth-child(4) {
  animation-delay: 0.64s;
}

.blog-article:nth-child(5) {
  animation-delay: 0.82s;
}

.blog-article:nth-child(6) {
  animation-delay: 1s;
}

/* ===================================
   CONTACT ITEM ANIMATIONS
   =================================== */

.contact-item.animated {
  animation: fadeUp 0.8s ease-in-out forwards;
}

.contact-item:nth-child(1) {
  animation-delay: 0.1s;
}

.contact-item:nth-child(2) {
  animation-delay: 0.28s;
}

.contact-item:nth-child(3) {
  animation-delay: 0.46s;
}

/* ===================================
   IMAGE SCROLL EFFECTS
   =================================== */

/* Fade effect for About section */
.image-fade-effect {
  transition: opacity 0.6s ease-in-out;
}

/* Slide effect for Corporate section */
.image-slide-effect {
  transition: transform 0.6s ease-in-out;
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

.hero-title,
.hero-subtitle,
.section-header,
.page-header,
.gallery-item,
.blog-article,
.contact-item {
  will-change: transform, opacity;
}

/* Remove will-change after animation completes */
.animated {
  will-change: auto;
}

/* ===================================
   HOVER TRANSITIONS
   =================================== */

.gallery-item img,
.article-image img {
  will-change: transform;
}

/* Smooth transitions for all interactive elements */
a,
button,
.gallery-item,
.blog-article {
  transition: all 0.3s ease-in-out;
}

/* ===================================
   SCROLL REVEAL UTILITY CLASSES
   =================================== */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease-in-out;
}

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

.fade-in {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.fade-in.visible {
  opacity: 1;
}

.slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease-in-out;
}

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

.slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 1s ease-in-out;
}

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

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: all 1s ease-in-out;
}

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

/* ===================================
   STAGGER DELAYS
   =================================== */

.animation-delay-1 {
  animation-delay: 0.1s !important;
}

.animation-delay-2 {
  animation-delay: 0.2s !important;
}

.animation-delay-3 {
  animation-delay: 0.3s !important;
}

.animation-delay-4 {
  animation-delay: 0.4s !important;
}

.animation-delay-5 {
  animation-delay: 0.5s !important;
}

.animation-delay-6 {
  animation-delay: 0.6s !important;
}

/* ===================================
   REDUCED MOTION SUPPORT
   =================================== */

@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;
  }
}
