/* ============================================
   MODERN PROFESSIONAL ENHANCEMENTS
   High-End Animations & Glass Morphism
   ============================================ */

/* ===== SMOOTH PAGE TRANSITIONS ===== */
:root {
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-elastic: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --color-primary: #3b82f6;
  --color-primary-dark: #1e40af;
  --color-secondary: #3B82F6;
  --color-accent: #ec4899;
}

* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PAGE LOAD ANIMATIONS ===== */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

body {
  animation: pageEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ===== FADE & SLIDE ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* ===== SCALE & ZOOM ANIMATIONS ===== */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleInCenter {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleUpCenter {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== ROTATION ANIMATIONS ===== */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* ===== SHIMMER LOADING ANIMATION ===== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer-loading {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ===== PULSE ANIMATIONS ===== */
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseSoft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ===== FLOATING ANIMATIONS ===== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== WAVE ANIMATIONS ===== */
@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

/* ===== SLIDING ANIMATIONS ===== */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutToLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* ===== BORDER ANIMATIONS ===== */
@keyframes borderGlow {
  0% {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
  }
  50% {
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
  }
  100% {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
  }
}

/* ===== GRADIENT ANIMATION ===== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===== TEXT ANIMATIONS ===== */
@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.4), 
                 0 0 20px rgba(245, 158, 11, 0.2);
  }
  50% {
    text-shadow: 0 0 20px rgba(251, 146, 60, 0.8), 
                 0 0 40px rgba(245, 158, 11, 0.5),
                 0 0 60px rgba(217, 119, 6, 0.3);
  }
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* ===== BLUR ANIMATIONS ===== */
@keyframes blurIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* ===== BOUNCING ANIMATIONS ===== */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes bounceSoft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== UTILITY ANIMATION CLASSES ===== */
.animate-fadeIn {
  animation: fadeIn var(--transition-slow) ease-out forwards;
}

.animate-fadeInUp {
  animation: fadeInUp var(--transition-smooth) ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft var(--transition-smooth) ease-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight var(--transition-smooth) ease-out forwards;
}

.animate-fadeInDown {
  animation: fadeInDown var(--transition-smooth) ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn var(--transition-smooth) ease-out forwards;
}

.animate-slideInFromLeft {
  animation: slideInFromLeft var(--transition-smooth) ease-out forwards;
}

.animate-slideInFromRight {
  animation: slideInFromRight var(--transition-smooth) ease-out forwards;
}

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

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-wave {
  animation: wave 1s ease-in-out infinite;
}

/* ===== GLASS MORPHISM EFFECTS ===== */
.glass-container {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  transition: all var(--transition-smooth);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 48px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== GRADIENT BACKGROUNDS ===== */
.gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-warm {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-cool {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-sunset {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-ocean {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-forest {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

.gradient-royal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== MODERN CARDS ===== */
.modern-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 245, 0.8));
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: rgba(59, 130, 246, 0.2);
}

/* ===== PREMIUM BUTTONS ===== */
.btn-premium {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-smooth);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-premium:active {
  transform: translateY(-1px);
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Secondary Button */
.btn-secondary {
  background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #1E40AF 0%, #1D3A8A 100%);
}

/* Accent Button */
.btn-accent {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  color: white;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
}

/* ===== INPUT FIELDS ===== */
.input-modern {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.input-modern:focus {
  outline: none;
  background: white;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: scale(1.01);
}

.input-modern::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* ===== SECTION ANIMATIONS ===== */
.section-enter {
  animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.stagger-child {
  animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

.stagger-child:nth-child(1) { animation-delay: 0.1s; }
.stagger-child:nth-child(2) { animation-delay: 0.2s; }
.stagger-child:nth-child(3) { animation-delay: 0.3s; }
.stagger-child:nth-child(4) { animation-delay: 0.4s; }
.stagger-child:nth-child(5) { animation-delay: 0.5s; }
.stagger-child:nth-child(6) { animation-delay: 0.6s; }
.stagger-child:nth-child(7) { animation-delay: 0.7s; }
.stagger-child:nth-child(8) { animation-delay: 0.8s; }

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
  transition: all var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.hover-glow {
  transition: all var(--transition-smooth);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 
              0 0 40px rgba(59, 130, 246, 0.2);
}

.hover-scale {
  transition: transform var(--transition-smooth);
}

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

.hover-brightness {
  transition: all var(--transition-smooth);
}

.hover-brightness:hover {
  filter: brightness(1.1);
}

/* ===== TEXT EFFECTS ===== */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  animation: textGlow 2s ease-in-out infinite;
}

/* ===== BORDER TREATMENTS ===== */
.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, #667eea, #764ba2) 1;
}

/* ===== BACKDROP BLUR EFFECTS ===== */
.blur-bg {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.blur-bg-heavy {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ===== SMOOTH SCROLL BEHAVIOR ===== */
html {
  scroll-behavior: smooth;
}

/* ===== FAST LOADING UTILITIES ===== */
.lazy-img {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.lazy-img.loaded {
  opacity: 1;
}

/* ===== PERFORMANCE: WILL CHANGE ===== */
.will-animate {
  will-change: transform, opacity;
}

.will-animate-scroll {
  will-change: transform;
}

/* ===== MOBILE SMOOTH TOUCH ===== */
* {
  -webkit-tap-highlight-color: transparent;
}

button {
  -webkit-user-select: none;
  user-select: none;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  .glass-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .glass-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
  }
  
  .modern-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .input-modern {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
  }
  
  .input-modern:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: #3b82f6;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .no-print {
    display: none !important;
  }
  
  .animate-* {
    animation: none !important;
  }
}
