/* Core Animation Styles */
.animate-item {
  opacity: 0;
  transform: translateY(16px);
  transition:
    transform 0.3s cubic-bezier(0.0, 0.0, 0.2, 1.15),
    opacity 0.3s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: none;
}

.animate-item.animated {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Staggered Animation Delays */
.animate-item:nth-child(1) { transition-delay: 0ms; }
.animate-item:nth-child(2) { transition-delay: 50ms; }
.animate-item:nth-child(3) { transition-delay: 100ms; }
.animate-item:nth-child(4) { transition-delay: 150ms; }
.animate-item:nth-child(5) { transition-delay: 200ms; }
.animate-item:nth-child(n+6) { transition-delay: 250ms; }

/* Animation Variations */
[data-animation="fadeUp"] {
  transform: translateY(24px);
}

[data-animation="fadeDown"] {
  transform: translateY(-24px);
}

[data-animation="fadeLeft"] {
  transform: translateX(24px);
}

[data-animation="fadeRight"] {
  transform: translateX(-24px);
}

[data-animation="zoomIn"] {
  transform: scale(0.94);
}

[data-animation="zoomOut"] {
  transform: scale(1.06);
}

[data-animation="rotateIn"] {
  transform: rotateY(-8deg) scale(0.92);
  transform-origin: center;
}

[data-animation="clipReveal"] {
  clip-path: inset(0 0 100% 0);
  transform: translateY(0);
}

[data-animation="clipReveal"].animated {
  clip-path: inset(0 0 0 0);
}

/* Enhanced Card Effects */
.feature-card:hover,
.project-card:hover,
.post-card:hover,
.app-card:hover,
.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Image Hover Effects */
.project-image,
.post-image,
.about-image,
.hero-image {
  overflow: hidden;
}

.project-card:hover .project-image img,
.post-card:hover .post-image img,
.about-image:hover img,
.hero-image:hover img {
  transform: scale(1.05);
}

/* Enhanced Button Effects */
.btn:hover,
.project-cta-button:hover,
.app-store-button:hover,
.language-switch:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Feature Icon Animation */
.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Enhanced Link Animations */
.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(var(--gradient-direction), var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: var(--transform-origin);
  transition: transform 0.3s cubic-bezier(0.0, 0.0, 0.2, 1.15);
}

/* Floating Elements Effect */
.floating-element {
  animation: float 10s infinite ease-in-out;
  transform: translateY(0);
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.floating-element:hover {
  animation: none;
}
.floating-element::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}
.floating-element::before {
  mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
  opacity: 0.3;
  z-index: 0;
}
.floating-element::before {
  animation: heroGridPulse 10s infinite alternate cubic-bezier(0.4, 0.0, 0.2, 1.0);
}
.floating-element::before {
  pointer-events: none;
}
.floating-element::before {
  transform: scale(1.08);
}
.floating-element::before {
  opacity: 0.15;
}
.floating-element::before {
  transform: scale(1);
}
.floating-element::before {
  opacity: 0.3;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.03);
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .animate-item {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .hero::before,
  .floating-element {
    animation: none !important;
  }

  .project-card:hover,
  .post-card:hover,
  .feature-card:hover,
  .app-card:hover,
  .btn:hover,
  .project-cta-button:hover,
  .app-store-button:hover,
  .language-switch:hover {
    transform: translateY(-3px) !important;
  }
}



/**
 * Ultra Premium Animation System - CSS
 * Optimized for performance, smooth transitions, and premium aesthetics
 * @version 2.0
 */

:root {
  /* Animation durations - can be customized */
  --animation-duration-fast: 250ms;
  --animation-duration-normal: 300ms;
  --animation-duration-slow: 450ms;

  /* Easing curves for premium feel */
  --ease-premium: cubic-bezier(0.08, 0.82, 0.17, 1);
  --ease-out-premium: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-premium: cubic-bezier(0.4, 0.0, 0.2, 1.15);

  /* Animation stagger steps */
  --stagger-step: 50ms;
}

/* =======================================
   Core Animation Base Styles
   ======================================= */
.animate-item {
  opacity: 0;
  transform: translateY(16px);
  transition:
    transform var(--animation-duration-normal) var(--ease-premium),
    opacity var(--animation-duration-normal) var(--ease-out-premium);
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: none;
}

.animate-item.animated {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Staggered Animation Delays */
.animate-item:nth-child(1) { transition-delay: 0ms; }
.animate-item:nth-child(2) { transition-delay: var(--stagger-step); }
.animate-item:nth-child(3) { transition-delay: calc(var(--stagger-step) * 2); }
.animate-item:nth-child(4) { transition-delay: calc(var(--stagger-step) * 3); }
.animate-item:nth-child(5) { transition-delay: calc(var(--stagger-step) * 4); }
.animate-item:nth-child(n+6) { transition-delay: calc(var(--stagger-step) * 5); }

/* Animation Variations */
[data-animation="fadeUp"] {
  transform: translateY(24px);
}

[data-animation="fadeDown"] {
  transform: translateY(-24px);
}

[data-animation="fadeLeft"] {
  transform: translateX(24px);
}

[data-animation="fadeRight"] {
  transform: translateX(-24px);
}

[data-animation="zoomIn"] {
  transform: scale(0.94);
}

[data-animation="zoomOut"] {
  transform: scale(1.06);
}

[data-animation="rotateIn"] {
  transform: rotateY(-8deg) scale(0.92);
  transform-origin: center;
}

[data-animation="clipReveal"] {
  clip-path: inset(0 0 100% 0);
  transform: translateY(0);
}

[data-animation="clipReveal"].animated {
  clip-path: inset(0 0 0 0);
}

/* Premium Ultra Smooth Blur-in Animation */
[data-animation="blurIn"] {
  transform: translateY(0);
  filter: blur(8px);
}

[data-animation="blurIn"].animated {
  filter: blur(0);
}

/* Premium Reveal Animation */
[data-animation="premium-reveal"] {
  position: relative;
  transform: translateY(0);
  opacity: 1;
  overflow: hidden;
}

[data-animation="premium-reveal"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform: translateX(0);
  z-index: 1;
  transition: transform var(--animation-duration-slow) var(--ease-out-premium);
}

[data-animation="premium-reveal"].animated::before {
  transform: translateX(101%);
}

[data-animation="premium-reveal"] > * {
  opacity: 0;
  transition: opacity 150ms ease 250ms;
}

[data-animation="premium-reveal"].animated > * {
  opacity: 1;
}

/* =======================================
   Enhanced Hero Section
   ======================================= */
.hero {
min-height: 86vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate; /* Creates stacking context for better z-index control */
}

/* Primary grid layer */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 40%, transparent 75%);
  z-index: 0;
  animation: heroGridPulse 15s infinite alternate var(--ease-premium);
  pointer-events: none;
}

/* Secondary diagonal grid layer for depth */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 80px 80px;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
  z-index: 0;
  animation: heroGridPulseAlt 18s infinite alternate-reverse var(--ease-premium);
  pointer-events: none;
  filter: blur(0.5px);
  mix-blend-mode: overlay;
}

/* Premium glow effect */
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(var(--primary-rgb, 79, 70, 229), 0.12) 0%,
    rgba(var(--primary-rgb, 79, 70, 229), 0.05) 25%,
    transparent 50%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-premium);
}

/* Subtle gradient for reduced motion */
.hero-subtle-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(var(--primary-rgb, 79, 70, 229), 0.08) 0%,
    rgba(var(--secondary-rgb, 139, 92, 246), 0.03) 60%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Floating Elements Container */
.floating-elements {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  transition: all 0.3s var(--ease-premium);
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
  box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.04);
}

/* Hero Animations */
@keyframes heroGridPulse {
  0% {
    opacity: 0.2;
    transform: scale(1) translateZ(0);
  }
  100% {
    opacity: 0.1;
    transform: scale(1.05) translateZ(0);
  }
}

@keyframes heroGridPulseAlt {
  0% {
    opacity: 0.12;
    transform: scale(1.02) translateZ(0);
  }
  100% {
    opacity: 0.06;
    transform: scale(1.08) translateZ(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.03);
  }
}

@media(prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after {
    animation: none;
  }
  .floating-element {
    animation: none;
  }
}

@media(prefers-color-scheme: dark) {
  .hero-glow {
    background: radial-gradient(
      circle at var(--x, 50%) var(--y, 50%),
      rgba(var(--primary-rgb, 79, 70, 229), 0.2) 0%,
      rgba(var(--primary-rgb, 79, 70, 229), 0.1) 25%,
      transparent 50%
    );
  }

  .hero-subtle-gradient {
    background: radial-gradient(
      circle at 50% 30%,
      rgba(var(--primary-rgb, 79, 70, 229), 0.15) 0%,
      rgba(var(--secondary-rgb, 139, 92, 246), 0.05) 60%,
      transparent 100%
    );
  }

  .hero::before, .hero::after {
    background-image:
      linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 75%);
    opacity: 0.2;
  }
}

/* =======================================
   Enhanced Card Effects
   ======================================= */
.hover-lift {
  transition:
    transform var(--animation-duration-normal) var(--ease-premium),
    box-shadow var(--animation-duration-normal) var(--ease-premium);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

/* Card gradient border effect */
.card-gradient-border {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.card-gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(to right, var(--primary), var(--secondary)) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--animation-duration-normal) var(--ease-premium);
  z-index: -1;
}

.card-gradient-border:hover::before {
  opacity: 1;
}

/* =======================================
   Enhanced Image Hover Effects
   ======================================= */
.hover-zoom {
  overflow: hidden;
}

.hover-zoom img {
  transition: transform 800ms var(--ease-premium);
  will-change: transform;
}

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

/* Premium zoom with focus effect */
.hover-zoom-focus {
  overflow: hidden;
}

.hover-zoom-focus img {
  transition:
    transform 800ms var(--ease-premium),
    filter 800ms var(--ease-premium);
  will-change: transform;
}

.hover-zoom-focus:hover img {
  transform: scale(1.08);
  filter: brightness(1.05) contrast(1.05);
}

/* =======================================
   Enhanced Button Effects
   ======================================= */
.btn,
.project-cta-button,
.app-store-button,
.language-switch {
  position: relative;
  transition:
    transform var(--animation-duration-normal) var(--ease-premium),
    box-shadow var(--animation-duration-normal) var(--ease-premium),
    background-color var(--animation-duration-normal) var(--ease-premium);
  overflow: hidden;
  z-index: 1;
}

.btn:hover,
.project-cta-button:hover,
.app-store-button:hover,
.language-switch:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Premium button hover effect with ripple */
.btn::after,
.project-cta-button::after,
.app-store-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 0% 0%;
  z-index: -1;
}

.btn:hover::after,
.project-cta-button:hover::after,
.app-store-button:hover::after {
  animation: ripple 700ms var(--ease-premium);
}

@keyframes ripple {
  0% {
    opacity: 0.4;
    transform: scale(0, 0) translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: scale(20, 20) translate(-50%, -50%);
  }
}

/* =======================================
   Enhanced Nav & Link Animations
   ======================================= */
.nav-link {
  position: relative;
  --gradient-direction: to right;
  --transform-origin: left;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(var(--gradient-direction), var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: var(--transform-origin);
  transition: transform var(--animation-duration-normal) var(--ease-in-premium);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Premium tooltip effect for special links */
.premium-tooltip {
  position: relative;
}

.premium-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 0.5rem 0.75rem;
  background-color: #000;
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--animation-duration-normal) var(--ease-premium),
    transform var(--animation-duration-normal) var(--ease-premium),
    visibility 0s linear var(--animation-duration-normal);
}

.premium-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity var(--animation-duration-normal) var(--ease-premium),
    transform var(--animation-duration-normal) var(--ease-premium),
    visibility 0s linear 0s;
}

/* =======================================
   Accessibility - Reduced Motion
   ======================================= */
@media (prefers-reduced-motion: reduce) {
  /* Disable animations */
  .animate-item {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* Disable hero animations */
  .hero::before,
  .hero::after,
  .floating-element,
  .btn::after,
  .project-cta-button::after,
  .app-store-button::after {
    animation: none !important;
  }

  /* Reduce hover transforms */
  .hover-lift:hover,
  .btn:hover,
  .project-cta-button:hover,
  .app-store-button:hover,
  .language-switch:hover {
    transform: translateY(-2px) !important;
  }

  /* Disable image hover zoom */
  .hover-zoom img,
  .hover-zoom-focus img {
    transition: none !important;
    transform: none !important;
  }

  /* Allow minimal transition for feedback */
  [data-reduced-motion="subtle"] {
    transition-duration: 100ms !important;
  }
}

/**
 * App Page Animation Styles
 * Provides enhanced animations specifically for the app page template
 */

/* App Specific Animations */
:root {
  /* Add app-specific animation variables */
  --app-animation-duration: 600ms;
  --app-stagger-delay: 80ms;
}

/* =======================================
   Banner Section Animations
   ======================================= */
.app-banner {
  position: relative;
  overflow: hidden;
}

.app-banner .container {
  position: relative;
  z-index: 2;
}

/* Banner background gradient animation */
.app-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 80%) var(--y, 20%),
    rgba(255, 255, 255, 0.1) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 1.2s var(--ease-premium);
  animation: bannerGradientPulse 15s infinite alternate var(--ease-premium);
  z-index: 1;
}

.app-banner:hover::before {
  opacity: 1;
  --x: 30%;
  --y: 70%;
}

@keyframes bannerGradientPulse {
  0% {
    opacity: 0.3;
    --x: 80%;
    --y: 20%;
  }
  50% {
    opacity: 0.7;
    --x: 30%;
    --y: 40%;
  }
  100% {
    opacity: 0.5;
    --x: 60%;
    --y: 60%;
  }
}

/* Back link animation */
.back-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: all 300ms var(--ease-premium);
  z-index: 10;
}

.back-link svg {
  transition: transform 300ms var(--ease-premium);
}

.back-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* Floating back link that appears when scrolling */
.back-link-floating {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary, #4f46e5);
  color: white;
  box-shadow: var(--shadow-md);
  opacity: 0.7;
  transform: translateY(-100%);
  transition: transform 300ms var(--ease-premium), opacity 300ms var(--ease-premium);
  z-index: 1000;
}

.back-link-floating.back-link-visible {
  transform: translateY(0);
  opacity: 1;
}

.back-link-floating:hover {
  opacity: 1;
  background-color: var(--primary, #4f46e5);
}

/* RTL support for back link */
[dir="rtl"] .back-link svg {
  transform: rotate(180deg);
}

[dir="rtl"] .back-link:hover svg {
  transform: translateX(4px) rotate(180deg);
}

[dir="rtl"] .back-link-floating {
  left: auto;
  right: 1rem;
}

/* =======================================
   App Iframe Container Animation
   ======================================= */
.app-iframe-container {
  position: relative;
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(0); /* Override default fadeUp */
  transition: transform 500ms var(--ease-premium), box-shadow 500ms var(--ease-premium);
}

.app-iframe-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary, #4f46e5);
  transform: translateX(0);
  z-index: 2;
  transition: transform 800ms var(--ease-out-premium);
}

.app-iframe-container.animated::before {
  transform: translateX(101%);
}

.app-iframe-container .app-iframe {
  opacity: 0;
  transition: opacity 150ms ease 600ms;
}

.app-iframe-container.animated .app-iframe {
  opacity: 1;
}

/* Subtle grow effect on hover */
.app-iframe-container:hover {
  transform: scale(1.01);
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.15),
    0 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* =======================================
   Feature Section Animations
   ======================================= */
.app-features {
  position: relative;
  overflow: hidden;
}

/* Background grid animation */
.app-features::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(var(--primary-rgb, 79, 70, 229), 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--primary-rgb, 79, 70, 229), 0.03) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  opacity: 0;
  z-index: 0;
  transition: opacity 1s var(--ease-premium);
}

.app-features:hover::before {
  opacity: 1;
}

.features-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Feature Card Enhanced Animations */
.feature-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 500ms var(--ease-premium);
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    rgba(var(--primary-rgb, 79, 70, 229), 0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 400ms var(--ease-premium);
  z-index: -1;
}

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

/* Premium Feature Icon Animation */
.premium-icon-animation {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background-color: rgba(var(--primary-rgb, 79, 70, 229), 0.1);
  color: var(--primary, #4f46e5);
  transition: all 400ms var(--ease-premium);
}

.premium-icon-animation::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb, 79, 70, 229), 0.2);
  opacity: 0;
  transform: scale(1.1);
  transition: all 400ms var(--ease-premium);
}

.feature-card:hover .premium-icon-animation {
  transform: scale(1.1);
  background-color: rgba(var(--primary-rgb, 79, 70, 229), 0.15);
}

.feature-card:hover .premium-icon-animation::before {
  opacity: 1;
  transform: scale(1.2);
}

.premium-icon-animation svg {
  transition: transform 500ms var(--ease-premium);
}

.feature-card:hover .premium-icon-animation svg {
  transform: scale(1.1);
}

/* =======================================
   CTA Section Animations
   ======================================= */
.app-cta-section {
  position: relative;
  text-align: center;
  padding: 3rem 1rem;
  overflow: hidden;
}

/* CTA background effect */
.app-cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(var(--primary-rgb, 79, 70, 229), 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 800ms var(--ease-premium);
  z-index: -1;
}

.app-cta-section:hover::before {
  opacity: 1;
}

/* CTA Button Pulse Animation */
.cta-button-pulse {
  position: relative;
  z-index: 1;
}

.cta-button-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 79, 70, 229), 0.5);
  animation: ctaButtonPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
  z-index: -1;
}

@keyframes ctaButtonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 79, 70, 229), 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(var(--primary-rgb, 79, 70, 229), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 79, 70, 229), 0);
  }
}

/* =======================================
   Responsive Styles
   ======================================= */
@media (max-width: 768px) {
  /* Adjust animation timing for better performance on mobile */
  :root {
    --app-animation-duration: 450ms;
    --app-stagger-delay: 50ms;
  }

  /* Reduce animation intensity for better performance */
  .app-banner::before {
    animation-duration: 20s;
  }

  /* Simplify feature cards on mobile */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Ensure iframe container doesn't grow too much on hover */
  .app-iframe-container:hover {
    transform: scale(1.005);
  }
}

/* =======================================
   Reduced Motion Support
   ======================================= */
@media (prefers-reduced-motion: reduce) {
  /* Disable background animations */
  .app-banner::before,
  .app-features::before,
  .app-cta-section::before {
    animation: none !important;
    transition: none !important;
  }

  /* Disable CTA button pulse */
  .cta-button-pulse::before {
    animation: none !important;
  }

  /* Simplified app iframe animation */
  .app-iframe-container::before {
    transition-duration: 200ms !important;
  }

  .app-iframe-container .app-iframe {
    transition-delay: 200ms !important;
  }

  /* Keep subtle hover states for feedback */
  .feature-card:hover .premium-icon-animation {
    transform: scale(1.05) !important;
  }
}