/* ===== ENHANCED ANIMATIONS & INTERACTIVE EFFECTS ===== */

/* Smooth page transitions */
@@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

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

@@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

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

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

@@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

@@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

@@keyframes shimmerEffect {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

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

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

@@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Card hover effects */
.card-hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(111, 66, 193, 0.2);
}

/* Icon animations */
.icon-animated {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.icon-spin {
    animation: spin 2s linear infinite;
}

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

/* Form input focus animations */
.form-control-animated {
    transition: all 0.3s ease;
    background-color: white;
}

.form-control-animated:focus {
    animation: slideInUp 0.3s ease-out;
}

/* Button animations */
.btn-animated-hover {
    position: relative;
    overflow: hidden;
}

.btn-animated-hover::after {
    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-animated-hover:active::after {
    width: 300px;
    height: 300px;
}

/* Responsive card grid animations */
.card-grid-item {
    opacity: 0;
    animation: slideInUp 0.5s ease-out forwards;
}

.card-grid-item:nth-child(1) { animation-delay: 0.1s; }
.card-grid-item:nth-child(2) { animation-delay: 0.2s; }
.card-grid-item:nth-child(3) { animation-delay: 0.3s; }
.card-grid-item:nth-child(4) { animation-delay: 0.4s; }
.card-grid-item:nth-child(5) { animation-delay: 0.5s; }
.card-grid-item:nth-child(6) { animation-delay: 0.6s; }

/* Phone icon hover effect */
.phone-icon {
    animation: ring 4s ease-in-out infinite;
}

@@keyframes ring {
    0%, 10%, 20%, 50%, 80%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(15deg); }
    25% { transform: rotate(-15deg); }
    35% { transform: rotate(10deg); }
    45% { transform: rotate(-10deg); }
}

/* Smooth scrollbar effect (for webkit browsers) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* Lazy load animation */
.lazy-load {
    opacity: 0;
    animation: fadeIn 0.6s ease-in forwards;
}

/* Stagger animation for lists */
.list-item-animated {
    opacity: 0;
    animation: slideInLeft 0.5s ease-out forwards;
}

.list-item-animated:nth-child(1) { animation-delay: 0.05s; }
.list-item-animated:nth-child(2) { animation-delay: 0.1s; }
.list-item-animated:nth-child(3) { animation-delay: 0.15s; }
.list-item-animated:nth-child(4) { animation-delay: 0.2s; }
.list-item-animated:nth-child(5) { animation-delay: 0.25s; }

/* Responsive - reduce animations on mobile and reduced motion preference */
@media (max-width: 768px) {
    .card-grid-item {
        animation-delay: 0s !important;
    }

    .list-item-animated {
        animation-delay: 0s !important;
    }
}

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

/* Loading spinner */
.spinner-border-animated {
    animation: spin 0.8s linear infinite;
}

/* Fade and scale combo */
.fade-scale-in {
    animation: fadeIn 0.4s ease-out, scaleIn 0.4s ease-out;
}

/* Emphasis animation for CTAs */
.cta-emphasis {
    animation: pulse 2s ease-in-out infinite;
}

/* Hover lift effect for any element */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Underline animation on hover */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #667eea;
    transition: width 0.3s ease;
}

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

/* ============================================
   PREMIUM 5-STAR ANIMATIONS
   ============================================ */

/* Text Shimmer Animation - Gold text with subtle shimmer */
@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    color: #d4af37; /* Fallback color */
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 25%, #ffd700 50%, #f4d03f 75%, #d4af37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s ease-in-out infinite;
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
    .text-shimmer {
        background: none;
        -webkit-text-fill-color: #d4af37;
        color: #d4af37;
    }
}

/* Parallax Float */
@keyframes parallaxFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
    75% { transform: translateY(-15px) rotate(1deg); }
}

.parallax-element {
    animation: parallaxFloat 8s ease-in-out infinite;
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3),
                    0 0 40px rgba(212, 175, 55, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.5),
                    0 0 60px rgba(212, 175, 55, 0.2);
    }
}

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Elegant Reveal */
@keyframes elegantReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.elegant-reveal {
    animation: elegantReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Border Glow Animation */
@keyframes borderGlow {
    0%, 100% { border-color: rgba(212, 175, 55, 0.3); }
    50% { border-color: rgba(212, 175, 55, 0.8); }
}

.border-glow {
    animation: borderGlow 2s ease-in-out infinite;
}

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

.icon-bounce {
    animation: iconBounce 2s ease-in-out infinite;
}

/* Rotate Subtle */
@keyframes rotateSlight {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.rotate-slight {
    animation: rotateSlight 4s ease-in-out infinite;
}

/* Scale Pulse */
@keyframes scalePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.scale-pulse {
    animation: scalePulse 2s ease-in-out infinite;
}

/* Gradient Shift */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #d4af37;
    animation: typewriter 3s steps(40) 1s forwards,
               blink 0.75s step-end infinite;
}

/* Stagger Fade In */
.stagger-fade > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover Effects */
.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.hover-shine:hover::before {
    left: 100%;
}

/* Magnetic Hover */
.magnetic-hover {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.magnetic-hover:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6f42c1, #5a32a3);
    border-radius: 6px;
    border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b6cd1, #6f42c1);
}

/* Selection Colors */
::selection {
    background: rgba(111, 66, 193, 0.3);
    color: #d4af37;
}

::-moz-selection {
    background: rgba(111, 66, 193, 0.3);
    color: #d4af37;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 3px;
}
