/* Advanced UI/UX Effects and Animations */

/* Logo Enhancements */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3));
}

.logo-text {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Advanced Button Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.btn-primary::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;
}

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

.btn-secondary {
    position: relative;
    overflow: hidden;
}

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

.btn-secondary:hover::after {
    width: 300px;
    height: 300px;
}

/* Card Hover Effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

/* Floating Animation */
.feature-item {
    animation: floatSoft 6s ease-in-out infinite;
}

.feature-item:nth-child(2n) {
    animation-delay: -2s;
}

.feature-item:nth-child(3n) {
    animation-delay: -4s;
}

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

/* Pulse Effect for Important Elements */
.phone-btn {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(37, 99, 235, 0.5), 0 0 30px rgba(37, 99, 235, 0.3); }
    100% { box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }
}

/* Morphing Background */
.hero-title {
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: morphGlow 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes morphGlow {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

/* Interactive Form Effects */
.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.form-group label {
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label {
    color: #2563eb;
    transform: translateY(-2px);
}

/* Testimonial Card Enhancements */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotate 10s linear infinite;
}

.testimonial-card:hover::before {
    opacity: 1;
}

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

/* Stats Counter Animation */
.stat-number {
    position: relative;
    overflow: hidden;
}

.stat-number::after {
    content: attr(data-value);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover .stat-number::after {
    opacity: 1;
}

/* Advanced Hover Effects */
.area-item {
    position: relative;
    overflow: hidden;
}

.area-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.area-item:hover::before {
    left: 100%;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Micro Interactions */
.nav a {
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.3s ease;
}

.nav a:hover::before {
    left: 100%;
}

/* Contact Icon Animations */
.contact-icon {
    position: relative;
}

.contact-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon::after {
    width: 120%;
    height: 120%;
}

/* FAQ Enhanced Animations */
.faq-question {
    position: relative;
    overflow: hidden;
}

.faq-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.05), transparent);
    transition: left 0.4s ease;
}

.faq-question:hover::before {
    left: 100%;
}

/* Service Icon Enhancements */
.service-icon,
.feature-icon {
    position: relative;
    overflow: hidden;
}

.service-icon::before,
.feature-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: iconRotate 3s linear infinite;
}

.service-card:hover .service-icon::before,
.feature-item:hover .feature-icon::before {
    opacity: 1;
}

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

/* Text Reveal Animation */
.hero-title,
.section-header h2 {
    position: relative;
    overflow: hidden;
}

.hero-title::before,
.section-header h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: textReveal 3s ease-in-out infinite;
}

@keyframes textReveal {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Gradient Text Effects */
.highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Parallax Scroll Effects */
.parallax-element {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Interactive Shadows */
.interactive-shadow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-shadow:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 15px 35px rgba(37, 99, 235, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Glitch Effect for Special Elements */
.glitch-effect {
    position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-effect::before {
    color: #ff0000;
    animation: glitch1 0.3s infinite;
}

.glitch-effect::after {
    color: #00ff00;
    animation: glitch2 0.3s infinite;
}

@keyframes glitch1 {
    0%, 100% { transform: translateX(0); opacity: 0; }
    20% { transform: translateX(-2px); opacity: 1; }
}

@keyframes glitch2 {
    0%, 100% { transform: translateX(0); opacity: 0; }
    20% { transform: translateX(2px); opacity: 1; }
}

/* Morphing Buttons */
.morph-btn {
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.morph-btn:hover {
    border-radius: 15px;
    transform: scale(1.05);
}

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

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

/* Liquid Loading Effect */
.liquid-loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(from 0deg, #2563eb, #3b82f6, #2563eb);
    animation: liquidSpin 2s linear infinite;
}

.liquid-loader::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    background: white;
}

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

/* Neon Glow Effects */
.neon-text {
    color: #fff;
    text-shadow: 
        0 0 5px #2563eb,
        0 0 10px #2563eb,
        0 0 15px #2563eb,
        0 0 20px #2563eb;
    animation: neonFlicker 2s ease-in-out infinite alternate;
}

@keyframes neonFlicker {
    from {
        text-shadow: 
            0 0 5px #2563eb,
            0 0 10px #2563eb,
            0 0 15px #2563eb,
            0 0 20px #2563eb;
    }
    to {
        text-shadow: 
            0 0 2px #2563eb,
            0 0 5px #2563eb,
            0 0 8px #2563eb,
            0 0 12px #2563eb;
    }
}

/* 3D Flip Cards */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 300px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.flip-card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flip-card-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
}

/* Particle Effect Background */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Advanced Text Effects */
.typing-effect {
    overflow: hidden;
    border-right: 0.15em solid #2563eb;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #2563eb; }
}

/* Glass Morphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Magnetic Hover Effect */
.magnetic-element {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magnetic-element:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Wave Animation */
.wave-animation {
    position: relative;
    overflow: hidden;
}

.wave-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Elastic Scale Effect */
.elastic-scale {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.elastic-scale:hover {
    transform: scale(1.1);
}

.elastic-scale:active {
    transform: scale(0.95);
}

/* Color Transition Effects */
.color-transition {
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    background-size: 200% 200%;
}

.color-transition:hover {
    background-position: 100% 100%;
    transform: translateY(-3px);
}

/* Breathing Animation */
.breathing-element {
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Slide-in Animations */
.slide-in-left {
    transform: translateX(-100px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right {
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-up {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-down {
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-in {
    transform: translate(0);
    opacity: 1;
}

/* Stagger Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    animation: staggerIn 0.6s ease forwards;
}

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

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Mobile Interactions */
@media (max-width: 768px) {
    .service-card:active,
    .testimonial-card:active,
    .area-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .hero::after,
    .morphGlow,
    .particleFloat,
    .rotate,
    .wave,
    .breathe,
    .neonFlicker,
    .gradientShift,
    .movePattern,
    .floatSoft,
    .pulseGlow,
    .iconRotate,
    .textReveal,
    .staggerIn {
        animation: none !important;
    }
    
    .elastic-scale,
    .magnetic-element,
    .interactive-shadow {
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hero {
        background: #000;
        color: #fff;
    }
    
    .service-card,
    .testimonial-card {
        border: 2px solid #fff;
    }
}
