/**
 * PROFESSIONAL ANIMATIONS & HOVER EFFECTS
 * افکت‌های حرفه‌ای و انیمیشن‌های زیبا
 */

/* =============================================================================
   1. FONT FACE - Beautiful Persian Typography
   ============================================================================= */

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif !important;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif !important;
}

/* =============================================================================
   2. CARD HOVER EFFECTS - افکت‌های کارت
   ============================================================================= */

/* Enhanced Service Card Hover */
.service-card {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(59, 130, 246, 0.3),
    0 0 20px rgba(59, 130, 246, 0.2);
}

.service-card:hover::before {
  opacity: 1;
}

/* Gradient Background Animation for Cards */
.service-card--primary,
.service-card--secondary,
.service-card--accent,
.service-card--info,
.service-card--success,
.service-card--telegram {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Card Icon Bounce Animation */
.service-card:hover .service-card-icon {
  animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  25% {
    transform: translateY(-10px) scale(1.1);
  }

  50% {
    transform: translateY(-5px) scale(1.05);
  }

  75% {
    transform: translateY(-8px) scale(1.08);
  }
}

/* Card Content Slide Up */
.service-card-content {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card-content {
  transform: translateY(-5px);
}

/* Ripple Effect on Click */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.service-card:active::after {
  width: 300px;
  height: 300px;
}

/* =============================================================================
   3. BUTTON HOVER EFFECTS
   ============================================================================= */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.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:hover,
.btn.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4),
    0 0 20px rgba(14, 165, 233, 0.3);
}

.btn-outline:hover,
.btn.outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
}

/* Shine Effect on Hover */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0));
  transform: rotateZ(60deg) translate(-5em, 7.5em);
  transition: transform 0.6s;
}

.btn-primary:hover::after {
  transform: rotateZ(60deg) translate(1em, -9em);
}

/* =============================================================================
   4. HERO SECTION ANIMATIONS
   ============================================================================= */

/* Glass Hero Entrance */
.glass-hero {
  animation: heroEntrance 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(30px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Hero Light Animations */
.hero-light--1 {
  animation: lightFloat1 8s ease-in-out infinite;
}

.hero-light--2 {
  animation: lightFloat2 10s ease-in-out infinite;
}

@keyframes lightFloat1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }

  33% {
    transform: translate(30px, -20px) scale(1.1);
    opacity: 0.4;
  }

  66% {
    transform: translate(-20px, 30px) scale(0.9);
    opacity: 0.35;
  }
}

@keyframes lightFloat2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }

  33% {
    transform: translate(-30px, 20px) scale(1.1);
    opacity: 0.4;
  }

  66% {
    transform: translate(20px, -30px) scale(0.9);
    opacity: 0.35;
  }
}

/* Hero Title Animation */
.hero-title {
  animation: titleSlideIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero Description Fade In */
.hero-description,
.hero-subdescription {
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Buttons Cascade Animation */
.hero-btn:nth-child(1) {
  animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.hero-btn:nth-child(2) {
  animation: fadeInUp 0.8s ease-out 0.7s backwards;
}

.hero-btn:nth-child(3) {
  animation: fadeInUp 0.8s ease-out 0.9s backwards;
}

/* Hero Button Pulse */
.hero-btn {
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
  }

  50% {
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.5);
  }
}

/* =============================================================================
   5. CARD ENTRANCE ANIMATIONS (Staggered)
   ============================================================================= */

.service-card {
  animation: cardEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.service-card:nth-child(1) {
  animation-delay: 0.1s;
}

.service-card:nth-child(2) {
  animation-delay: 0.2s;
}

.service-card:nth-child(3) {
  animation-delay: 0.3s;
}

.service-card:nth-child(4) {
  animation-delay: 0.4s;
}

.service-card:nth-child(5) {
  animation-delay: 0.5s;
}

.service-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =============================================================================
   6. NAVBAR ANIMATIONS
   ============================================================================= */

/* Navbar Slide Down */
.navbar {
  animation: navbarSlideDown 0.5s ease-out;
}

@keyframes navbarSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Nav Link Hover */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary-500);
  transition: all 0.3s ease;
  transform: translateX(50%);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  transform: translateY(-2px);
}

/* Active Nav Link */
.nav-link[aria-current="page"] {
  position: relative;
}

.nav-link[aria-current="page"]::after {
  width: 100%;
}

/* =============================================================================
   7. FOOTER ANIMATIONS
   ============================================================================= */

.footer {
  animation: fadeIn 1s ease-out;
}

.footer-links a {
  position: relative;
  transition: all 0.3s ease;
}

.footer-links a::before {
  content: '←';
  position: absolute;
  right: -20px;
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  transform: translateX(5px);
}

.footer-links a:hover::before {
  right: -15px;
  opacity: 1;
}

/* =============================================================================
   8. ANNOUNCEMENT CARDS
   ============================================================================= */

.announcement-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.announcement-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.announcement-card:hover .announcement-image img {
  transform: scale(1.1);
}

.announcement-link {
  position: relative;
  display: inline-block;
}

.announcement-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.announcement-link:hover::after {
  width: 100%;
}

/* =============================================================================
   9. MOBILE BOTTOM NAV ANIMATIONS
   ============================================================================= */

.mobile-bottom-nav {
  animation: slideUpFromBottom 0.5s ease-out;
}

@keyframes slideUpFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-nav-item {
  transition: all 0.3s ease;
}

.mobile-nav-item:active {
  transform: scale(0.9);
}

.mobile-nav-item.active {
  animation: navItemPop 0.3s ease;
}

@keyframes navItemPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* =============================================================================
   10. LOADING & SKELETON ANIMATIONS
   ============================================================================= */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* =============================================================================
   11. SCROLL REVEAL ANIMATIONS
   ============================================================================= */

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================================
   12. MICRO-INTERACTIONS
   ============================================================================= */

/* Input Focus Animation */
input:focus,
textarea:focus,
select:focus {
  animation: inputFocusPulse 0.3s ease;
}

@keyframes inputFocusPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

/* Checkbox Check Animation */
input[type="checkbox"]:checked {
  animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* =============================================================================
   13. TEXT GRADIENT ANIMATION
   ============================================================================= */

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

/* =============================================================================
   14. FLOATING ELEMENTS
   ============================================================================= */

.float {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* =============================================================================
   15. PERFORMANCE OPTIMIZATIONS
   ============================================================================= */

/* Reduce Motion for Accessibility */
@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;
  }
}

/* GPU Acceleration for Smooth Animations */
.service-card,
.btn,
.hero-light,
.glass-hero {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* =============================================================================
   16. SPECIAL EFFECTS
   ============================================================================= */

/* Glow Effect on Hover */
.glow-on-hover {
  position: relative;
}

.glow-on-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  background-size: 400%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  animation: glowing 20s linear infinite;
}

.glow-on-hover:hover::before {
  opacity: 0.5;
}

@keyframes glowing {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 400% 0;
  }

  100% {
    background-position: 0 0;
  }
}

/* =============================================================================
   END OF ANIMATIONS
   ============================================================================= */