/* ===== MODERN UI/UX ENHANCEMENTS ===== */
/* World-Class Cutting-Edge Design System */

/* ===== Advanced Animations & Keyframes ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

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

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

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 255, 0.5), 0 0 40px rgba(0, 217, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 102, 255, 0.8), 0 0 60px rgba(0, 217, 255, 0.5); }
}

@keyframes particles {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Enhanced Body & Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Glassmorphism Effects ===== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Enhanced Navbar with Glassmorphism ===== */
.navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.logo-img {
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05) rotate(2deg);
}

/* ===== Enhanced Hero Section ===== */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-background {
    background: linear-gradient(135deg, #0A0E27 0%, #1A1F3A 50%, #0A0E27 100%);
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

/* Animated Particles Background */
.hero-background::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 217, 255, 0.4), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 102, 255, 0.4), transparent),
        radial-gradient(3px 3px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(0, 217, 255, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(0, 102, 255, 0.3), transparent);
    background-size: 200% 200%;
    animation: particles 20s ease-in-out infinite;
}

/* Add pulsing glow effect to hero-overlay */
.hero-overlay {
    animation: float 8s ease-in-out infinite;
}

.hero-content {
    animation: slideInUp 1s ease-out;
    position: relative;
    z-index: 10;
}

.hero-title {
    animation: slideInUp 1s ease-out 0.2s both;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    color: #ffffff;
}

/* Enhanced gradient text with glow */
.gradient-text {
    background: linear-gradient(135deg, #0066FF 0%, #00D9FF 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.3));
}

.hero-subtitle {
    animation: slideInUp 1s ease-out 0.4s both;
    font-size: 1.3rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
}

.hero-cta {
    animation: slideInUp 1s ease-out 0.6s both;
    gap: var(--spacing-lg);
}

.hero-stats {
    animation: slideInUp 1s ease-out 0.8s both;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-stats .stat-item {
    transition: all 0.3s ease;
    cursor: pointer;
    padding: var(--spacing-md);
}

.hero-stats .stat-item:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.hero-stats .stat-item h3 {
    animation: pulse 2s ease-in-out infinite;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #00D9FF, #0066FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stats .stat-item p {
    color: rgba(255, 255, 255, 0.72);
}

/* Outline button is white on dark hero background */
.hero .btn-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
}

.hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

/* ===== Enhanced Buttons ===== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #0066FF 0%, #00D9FF 100%);
    background-size: 200% 200%;
    animation: gradientFlow 3s ease infinite;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.4);
}

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

.btn-outline::after {
    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-outline:hover::after {
    left: 100%;
}

/* ===== Section Animations ===== */
.section {
    animation: fadeIn 1s ease-out;
}

.section-header {
    animation: slideInUp 0.8s ease-out;
}

/* ===== Enhanced Cards with Glassmorphism ===== */
.service-card,
.product-card,
.feature-card,
.pricing-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInScale 0.8s ease-out;
}

.service-card::before,
.product-card::before,
.pricing-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 102, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.service-card:hover::before,
.product-card:hover::before,
.pricing-card:hover::before {
    top: -10%;
    left: -10%;
}

.service-card:hover,
.product-card:hover,
.pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.2);
}

/* ===== Animated Icons ===== */
.service-icon,
.feature-icon {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: bounceIn 0.8s ease-out;
}

.service-icon::before,
.feature-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: inherit;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    transition: all 0.4s;
}

.service-card:hover .service-icon,
.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card:hover .service-icon::before,
.feature-card:hover .feature-icon::before {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.3;
}

.service-icon i,
.feature-icon i {
    animation: float 3s ease-in-out infinite;
}

/* ===== About Cards with Modern Effects ===== */
.about-item {
    position: relative;
    overflow: hidden;
    animation: slideInLeft 0.8s ease-out;
}

.about-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #0066FF, #00D9FF);
    transition: height 0.4s ease;
}

.about-item:hover::after {
    height: 100%;
}

.about-item:nth-child(2) {
    animation-delay: 0.2s;
}

.about-item:nth-child(3) {
    animation-delay: 0.4s;
}

/* ===== Enhanced Pricing Cards ===== */
.pricing-card.featured {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(0, 217, 255, 0.05) 100%);
    animation: glow 2s ease-in-out infinite;
}

.pricing-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== Newsletter Section with Glow Effect ===== */
.newsletter {
    position: relative;
    background: linear-gradient(135deg, #0066FF 0%, #00D9FF 100%);
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 10s ease-in-out infinite;
}

/* ===== Contact Form with Modern Styling ===== */
.contact-form-wrapper {
    animation: slideInRight 0.8s ease-out;
}

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

.info-card {
    transition: all 0.3s ease;
    animation: slideInLeft 0.8s ease-out;
}

.info-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.15);
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* ===== Social Links with Hover Effects ===== */
.social-links a,
.footer-social a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a::before,
.footer-social a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s;
}

.social-links a:hover::before,
.footer-social a:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
}

.social-links a:hover {
    transform: translateY(-5px) rotate(10deg) scale(1.1);
}

/* ===== Enhanced Modal Animations ===== */
.modal.active {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: bounceIn 0.5s ease-out;
}

.modal-close {
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.2);
}

/* ===== Success Message Animation ===== */
.success-message {
    animation: slideInRight 0.5s ease-out;
}

.success-message.show {
    animation: bounceIn 0.5s ease-out;
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066FF, #00D9FF);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===== Loading Animation ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A0E27 0%, #1A1F3A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 217, 255, 0.2);
    border-top-color: #00D9FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

/* ===== Parallax Effect for Sections ===== */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0066FF, #00D9FF);
    border-radius: 6px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00D9FF, #0066FF);
}

/* ===== Stagger Animation for Grid Items ===== */
.services-grid .service-card:nth-child(1) { animation-delay: 0s; }
.services-grid .service-card:nth-child(2) { animation-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { animation-delay: 0.2s; }
.services-grid .service-card:nth-child(4) { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(5) { animation-delay: 0.4s; }
.services-grid .service-card:nth-child(6) { animation-delay: 0.5s; }

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

.pricing-grid .pricing-card:nth-child(1) { animation-delay: 0s; }
.pricing-grid .pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-grid .pricing-card:nth-child(3) { animation-delay: 0.4s; }

/* ===== Micro-interactions ===== */
.btn, .nav-menu a, .service-card, .product-card {
    -webkit-tap-highlight-color: transparent;
}

button:active, .btn:active {
    transform: scale(0.95);
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    .hero-stats .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .hero-stats .stat-item p {
        font-size: 0.85rem;
    }
    
    .hero-background::after {
        background-size: 100% 100%;
    }
    
    .service-card,
    .product-card,
    .pricing-card {
        animation: fadeInScale 0.6s ease-out;
    }
    
    /* Reduce animations on mobile for performance */
    .hero-stats .stat-item h3 {
        animation: none;
    }
    
    .service-icon i,
    .feature-icon i {
        animation: none;
    }
    
    /* Better button sizing on mobile */
    .btn-lg {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-cta {
        gap: var(--spacing-md);
    }
    
    /* Optimize card hover effects for mobile */
    .service-card:hover,
    .product-card:hover,
    .pricing-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 85vh;
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* ===== 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;
    }
}

/* ===== Text Gradient Effects ===== */
.gradient-text {
    background: linear-gradient(135deg, #0066FF 0%, #00D9FF 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
}

/* ===== Floating Action Button (Back to Top) ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0066FF, #00D9FF);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 102, 255, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.6);
}

/* ===== Enhanced Typography ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-title {
    font-weight: 900;
    letter-spacing: -0.03em;
}

/* ===== Improved Focus States for Accessibility ===== */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid rgba(0, 102, 255, 0.5);
    outline-offset: 2px;
}

/* ===== Grid Animation on Scroll ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Additional Advanced Effects ===== */

/* Neon glow effect for CTAs */
.btn-primary {
    position: relative;
    box-shadow: 
        0 0 20px rgba(0, 102, 255, 0.3),
        0 0 40px rgba(0, 217, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    box-shadow: 
        0 0 30px rgba(0, 102, 255, 0.5),
        0 0 60px rgba(0, 217, 255, 0.3),
        0 0 90px rgba(0, 102, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Enhanced section transitions */
.section {
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.3), transparent);
}

/* Improved service card interactions */
.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
}

.service-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 1) 100%);
}

/* Card shine effect */
.service-card::after,
.product-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotateZ(45deg) translate(0, -100%);
    transition: transform 0.6s ease;
}

.service-card:hover::after,
.product-card:hover::after {
    transform: rotateZ(45deg) translate(0, 100%);
}

/* Text selection styling */
::selection {
    background: rgba(0, 217, 255, 0.3);
    color: var(--dark);
}

::-moz-selection {
    background: rgba(0, 217, 255, 0.3);
    color: var(--dark);
}

/* Smooth transitions for all interactive elements */
a, button, input, textarea, select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(0, 217, 255, 0.5);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 217, 255, 0.1);
}

/* Improved newsletter section */
.newsletter {
    position: relative;
    overflow: hidden;
}

.newsletter::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

.newsletter-content {
    position: relative;
    z-index: 2;
}

/* Enhanced stat items with counter animation */
.stat-item h3 {
    font-variant-numeric: tabular-nums;
    will-change: contents;
}

/* Improved modal backdrop */
.modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal.active .modal-content {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Enhanced footer with subtle animation */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 102, 255, 0.5), 
        rgba(0, 217, 255, 0.5), 
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Improved form inputs with modern styling */
.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 4px rgba(0, 102, 255, 0.1),
        0 8px 25px rgba(0, 102, 255, 0.15);
}

/* Loading skeleton for better perceived performance */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(248, 249, 250, 1) 0%,
        rgba(239, 239, 239, 1) 50%,
        rgba(248, 249, 250, 1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Enhanced pricing card featured effect */
.pricing-card.featured {
    position: relative;
    overflow: visible;
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0066FF, #00D9FF, #0066FF);
    background-size: 200% 200%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientFlow 3s ease infinite;
}

/* Improved social links with hover effects */
.social-links a,
.footer-social a {
    background: linear-gradient(135deg, #0066FF, #00D9FF);
}

.social-links a:hover,
.footer-social a:hover {
    background: linear-gradient(135deg, #00D9FF, #0066FF);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.4);
}

/* Enhanced About section cards */
.about-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(10px);
}

.about-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 1) 100%);
}

/* Performance: GPU acceleration for animated elements */
.service-card,
.product-card,
.feature-card,
.pricing-card,
.btn,
.hero-stats {
    transform: translateZ(0);
    will-change: transform;
}

/* Dark theme compatibility (optional future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable automatic dark mode
    :root {
        --dark: #F8F9FA;
        --light: #0A0E27;
        --white: #1A1F3A;
    }
    */
}

/* Print styles */
@media print {
    .navbar,
    .back-to-top,
    .scroll-progress,
    .page-loader,
    .modal,
    .btn {
        display: none !important;
    }
    
    .hero-background::after {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-outline {
        border-width: 3px;
    }
    
    .service-card,
    .product-card,
    .pricing-card {
        border: 2px solid var(--primary-color);
    }
}

/* ==========================================================================
   TECHNOLOGY STACK — override block (ensure styles apply regardless of
   cascade order with styles.css)
   ========================================================================== */
.tech-stack {
    background: #f8fafc;
}

.tech-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-category {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s;
    opacity: 1 !important;
    transform: none !important;
}

.tech-category:hover {
    border-color: #c7d2fe;
}

.tech-cat-label {
    flex-shrink: 0;
    min-width: 140px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1259FB;
    padding-top: 0.3rem;
    display: block;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.8rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: default;
}

.tech-tags span:hover {
    border-color: #1259FB;
    color: #1259FB;
    background: rgba(99, 102, 241, 0.06);
}

@media (max-width: 640px) {
    .tech-category {
        flex-direction: column;
        gap: 0.65rem;
    }
    .tech-cat-label {
        min-width: auto;
    }
}

/* ==========================================================================
   PRODUCT GRID — responsive 3-col → 2-col → 1-col
   ========================================================================== */
@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Services grid equal height */
.services-grid {
    align-items: stretch;
}

a.service-card.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
