/*
 * Modern Animations & Upgrades
 * This file will not be overwritten by theme updates.
*/

/* ==================== MODERN ANIMATIONS ==================== */

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

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

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

/* Slide In from Bottom */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide In from Top */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale Up */
@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

/* Glow Pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(var(--cl-accent-rgb), 0.3);
  }
}

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

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

/* ==================== COMPONENT ANIMATIONS ==================== */

/* Hero Section */
.hero h1 {
  animation: slideInDown 0.8s ease-out;
}

.hero p {
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero .btn {
  animation: slideInUp 0.8s ease-out 0.4s both;
  transition: all 0.3s ease;
}

.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(var(--cl-accent-rgb), 0.3);
}

.hero .fake-searchbar {
  animation: slideInUp 0.8s ease-out 0.3s both;
}

/* Navbar */
.navbar {
  animation: slideInDown 0.6s ease-out;
}

.navbar-brand {
  transition: all 0.3s ease;
}

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

.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cl-accent);
  transition: width 0.3s ease;
}

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

/* Product Cards */
.product-card {
  animation: scaleUp 0.5s ease-out;
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card img {
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.08);
}

/* Buttons */
.btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  animation: glowPulse 2s ease-in-out infinite;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Forms */
.form-control,
.form-select {
  transition: all 0.3s ease;
  border: 1px solid var(--cl-border);
}

.form-control:focus,
.form-select:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(var(--cl-accent-rgb), 0.2);
}

/* Feedback Cards */
.feedback-card {
  animation: slideInUp 0.6s ease-out;
  transition: all 0.3s ease;
}

.feedback-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Status Page */
.status-card {
  animation: scaleUp 0.5s ease-out;
  transition: all 0.3s ease;
}

.status-card:hover {
  transform: scale(1.02);
}

/* Footer */
footer {
  animation: slideInUp 0.8s ease-out;
}

/* Social Links */
.social-link {
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  transform: translateY(-5px) rotate(-5deg);
}

/* ==================== TEXT & CONTENT ANIMATIONS ==================== */

/* Text Block */
.text-block {
  animation: slideInLeft 0.6s ease-out;
}

.text-block h2 {
  animation: slideInLeft 0.6s ease-out 0.1s both;
}

.text-block p {
  animation: slideInLeft 0.6s ease-out 0.2s both;
}

/* Image Gallery */
.image-gallery-item {
  animation: scaleUp 0.5s ease-out;
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.image-gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ==================== LOADING & TRANSITION EFFECTS ==================== */

/* Page Transition */
[x-cloak] {
  display: none !important;
}

/* Loading Skeleton */
@keyframes skeletonLoading {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton-loading {
  background-color: var(--bs-gray-bg);
  background-image: linear-gradient(
    90deg,
    var(--bs-gray-bg) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    var(--bs-gray-bg) 75%
  );
  background-size: 1000px 100%;
  animation: skeletonLoading 2s infinite;
}

/* ==================== UTILITY ANIMATIONS ==================== */

/* Apply animations on scroll */
.animate-on-scroll {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

/* Delay animations */
.delay-1 { animation-delay: 0.1s !important; }
.delay-2 { animation-delay: 0.2s !important; }
.delay-3 { animation-delay: 0.3s !important; }
.delay-4 { animation-delay: 0.4s !important; }
.delay-5 { animation-delay: 0.5s !important; }

/* ==================== MODERN STYLING ENHANCEMENTS ==================== */

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Enhanced Focus States */
*:focus-visible {
  outline: 2px solid var(--cl-accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Card Elevation */
.card {
  transition: all 0.3s ease;
  border: none;
  background: var(--cl-background-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ==================== RESPONSIVE ANIMATIONS ==================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

